Skip to content

Commit

Permalink
Merge pull request #9 from AlessandroAU/master
Browse files Browse the repository at this point in the history
pull master d231a1d
  • Loading branch information
StonedDawg authored Feb 11, 2021
2 parents 309d242 + d231a1d commit 5ab42b8
Show file tree
Hide file tree
Showing 37 changed files with 55,757 additions and 8 deletions.
Binary file removed PCB/2400MHz/TX_SX1280/G-NiceRF_LORA1280F27.rar
Binary file not shown.
8 changes: 5 additions & 3 deletions PCB/2400MHz/TX_SX1280/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ Upload the Gerber file to https://jlcpcb.com/. Check the price for 5, 10, and 3

- Solder the 4 pin molex connector. Cut the pins flush with the PCB before soldering.
- Apply tape to the base of the esp32 board to insulate it from potentially shorting with the molex pins. Remove the black plastic standoffs. Place on the PCB and cut the pins flush then solder.
- Set the regulator to 3.3V and cut the PCB trace on the regulator for ADJ (red circle on image 4). Remove the black standoff, insulate the base with tape, then solder in place.
- Set the regulator voltage to 3.45V by rotating the potentiometer on the top fully clockwise, and jumper both the 5V and 12V pads on the back. Why didn't we just jumper the 3.3V? Because that also requires cutting the ADJ trace and potentially damaging the regulator. The e28 will also run better on a voltage slightly above 3.3V. Now remove the black standoff, insulate the base with tape, then solder in place.

<img src="img/regulator_setup.jpg" width="30%">

- Solder the 10k resistor.
- Solder the e28 module. Dont forget to change the zero ohm resistor near the ufl. Default is to use the PCB antenna, it must be repositioned to use the ufl.

<img src="img/1.jpg" width="30%"> <img src="img/2.jpg" width="30%"> <img src="img/3.jpg" width="30%">
<img src="img/4.jpg" width="30%"> <img src="img/5.jpg" width="30%"> <img src="img/6.jpg" width="30%">
<img src="img/1.jpg" width="30%"> <img src="img/2.jpg" width="30%"> <img src="img/3.jpg" width="30%"> <img src="img/5.jpg" width="30%"> <img src="img/6.jpg" width="30%">
<img src="img/7.jpg" width="30%"> <img src="img/8.jpg" width="30%">
Binary file removed PCB/2400MHz/TX_SX1280/img/4.jpg
Binary file not shown.
Binary file added PCB/2400MHz/TX_SX1280/img/regulator_setup.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions PCB/2400MHz/TX_SX1280_Slim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ Upload the Gerber file to https://jlcpcb.com/. Check the price for 5, 10, and 3
- Solder the WROOM32 module
- Solder the 2x 10k resistors
- Solder the capacitor
- Set the regulator voltage to 3.45V by rotating the potentiometer on the top fully clockwise, and jumper both the 5V and 12V pads on the back. Why didn't we just jumper the 3.3V? Because that also requires cutting the ADJ trace and potentially damaging the regulator. The e28 will also run better on a voltage slightly above 3.3V.

<img src="img/regulator_setup.jpg" width="30%">

- Apply tape to the base of the regulator pcb to insulate it from potentially shorting with the vias on the main pcb. Solder on a 4 pin straight header, then remove the plastic bridge on the header so that the reg will stil flush with the main pcb on the bottom. NOTE: pictures show the v1 pcb with reg on the top, which is incorrect. The v1.1 PCB moved the reg to the underside of the main PCB, so it doesn't intrude on the antenna SMA.
- Set the regulator to 3.3V and cut the PCB trace on the regulator for ADJ, then solder in place.
- Solder 3x silicon wires to the 3 pin header pads (G, V, S), and attach to the 8 way header using the pinout below, so that G goes to GND, V goes to 6V, and S goes to S.Port.

### STLs
Expand All @@ -40,4 +43,4 @@ Upload the Gerber file to https://jlcpcb.com/. Check the price for 5, 10, and 3
### Schematic and PCB layout

<img src="img/schm.png" width="30%">
<img src="img/pcb.png" width="30%">
<img src="img/pcb.png" width="30%">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,835 changes: 7,835 additions & 0 deletions PCB/2400MHz/TX_SX1280_Slimmer/CAD_files/bottom_case_slimmer.STEP

Large diffs are not rendered by default.

Binary file not shown.
47,160 changes: 47,160 additions & 0 deletions PCB/2400MHz/TX_SX1280_Slimmer/CAD_files/top_case_slimmer.STEP

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://easyeda.com/jberkmanPI/tx-slim-2-4g-sch
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/layout.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PCB/2400MHz/TX_SX1280_Slimmer/img/schem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions PCB/2400MHz/TX_SX1280_Slimmer/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

# 2.4GHz Slimmer Tx

<img src="img/11.jpg" width="20%">

EasyEda Link: https://easyeda.com/jberkmanPI/tx-slim-2-4g-sch

### PCB manufacturing

This is copied from the slim board page.

Upload the Gerber file to https://jlcpcb.com/. Check the price for 5, 10, and 30 pieces. It is sometimes cheaper to order 30 than 10 and only a minor increase in price compared to 5.

*PCB Thickness: 1mm*

### BOM

- E28-2G4M27S SX1280 Wireless module 2.4G 27dBm https://www.aliexpress.com/item/33004335921.html
- 3.3V DC-DC Step Down Power Supply https://www.aliexpress.com/item/32880983608.html
- 10k 0805 resistor https://www.aliexpress.com/item/4000049692396.html
- SMA or RPSMA connector https://www.aliexpress.com/item/4000848776660.html https://www.aliexpress.com/item/4000848776660.html
- WROOM32 module https://www.aliexpress.com/item/ESP32-ESP-32S-WIFI-Bluetooth-Module-240MHz-Dual-Core-CPU-MCU-Wireless-Network-Board-ESP-WROOM/4000230070560.html
- 10uF 3528 Cap https://www.aliexpress.com/item/32666405364.html?algo_pvid=365ae59d-9e6c-46b7-9792-2656b0961f70&algo_expid=365ae59d-9e6c-46b7-9792-2656b0961f70-6&btsid=0bb0623116027669252885518ea610&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
- 8 Way header https://au.rs-online.com/web/p/sil-sockets/7022852/
- #2 screw for sheet metal, .25" long. https://www.amazon.com/TOUHIA-Screws-Phillips-Stainless-Self-Tapping/dp/B07PDC3F85/ref=sr_1_8?dchild=1&keywords=%232+screw&qid=1612739282&sr=8-8

### Build order

- Solder the e28 module. Dont forget to change the zero ohm resistor near the ufl. Default is to use the PCB antenna, it must be repositioned to use the ufl.
- Solder the WROOM32 module
- Solder the 10k resistor
- Solder the capacitor
- Set the regulator voltage to 3.45V by rotating the potentiometer on the top fully clockwise, and jumper both the 5V and 12V pads on the back. Why didn't we just jumper the 3.3V? Because that also requires cutting the ADJ trace and potentially damaging the regulator. The e28 will also run better on a voltage slightly above 3.3V.

<img src="img/regulator_setup.jpg" width="30%">

- Apply tape to the base of the regulator pcb to insulate it from potentially shorting with the vias on the main pcb. Solder on a 4 pin straight header, then remove the plastic bridge on the header so that the reg will stil flush with the main pcb on the bottom. NOTE: pictures show the v1 pcb with reg on the top, which is incorrect. The v1.1 PCB moved the reg to the underside of the main PCB, so it doesn't intrude on the antenna SMA.
- Solder 3x silicon wires to the 3 pin header pads (G, V, S), and attach to the 8 way header using the pinout below, so that G goes to GND, V goes to 6V, and S goes to S.Port.

### 3d Prints

- Print as shown below. Print with at least 50% infill.
- Supports used.



### Build process and Pics

- Solder wires to connector
- Install from outside of module case
- Install module into radio
- Hot glue wires/connector to set location.


- Solder wires to board
- install rf cable to case
- install rf cable to sx1280 board
- Neatly install in case
- Add 4 screws

- Solder wires to board
- install rf cable
- install rf cable to sx1280 board
- Neatly install in case
- Add 4 screws


<img src="img/1.jpg" width="20%"> <img src="img/2.jpg" width="20%">
<img src="img/4.jpg" width="20%"> <img src="img/5.jpg" width="20%">
<img src="img/6.jpg" width="20%"> <img src="img/7.jpg" width="20%">
<img src="img/8.jpg" width="20%"> <img src="img/9.jpg" width="20%">
<img src="img/10.jpg" width="20%">


### Schematic and PCB layout

<img src="img/schem.jpg" width="30%">

<img src="img/layout.jpg" width="20%">

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Links:
![868/915MHz Hardware](img/900Mhardware.jpg)

Links:
- [Mini 900MHz RX](https://github.com/AlessandroAU/ExpressLRS/tree/master-dev/PCB/900MHz/RX_Mini) Currently Smallest DIY 868/915MHz RX
- [Mini 900MHz RX](https://github.com/AlessandroAU/ExpressLRS/tree/master/PCB/900MHz/RX_Mini_v1.1) Currently Smallest DIY 868/915MHz RX
- [20x20 900MHz RX](https://github.com/AlessandroAU/ExpressLRS/tree/master-dev/PCB/900MHz/RX_20x20_0603_SMD) Convenient Stack Mounted DIY 20x20mm 868/915MHz RX
- [20x20 900MHz RX](https://github.com/AlessandroAU/ExpressLRS/tree/master-dev/PCB/900MHz/RX_20x20_0805_SMD) Convenient Stack Mounted DIY 20x20mm 868/915MHz RX

Expand Down
19 changes: 19 additions & 0 deletions src/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ monitor_speed = 420000
monitor_dtr = 0
monitor_rts = 0

[env:Frsky_TX_R9M_via_STLINK_OLD_BOOTLOADER_DEPRECATED]
platform = ststm32@8.0.0
board = bluepill_f103c8
build_unflags = -Os
build_flags =
-D TARGET_R9M_TX
-D PLATFORM_STM32
-D HSE_VALUE=12000000U
-O2
-DVECT_TAB_OFFSET=0x2000U
board_build.ldscript = variants/R9M_ldscript_old_bl.ld
board_build.flash_offset = 0x2000
src_filter = ${common_env_data.src_filter} -<ESP32*.*> -<ESP8266*.*> -<WS281B*.*> -<rx_*.cpp>
upload_flags =
BOOTLOADER=bootloader/r9m_bootloader.bin
VECT_OFFSET=0x2000
lib_deps =
https://github.com/PaoloP74/extEEPROM.git

## TODO: R9M STLINK/stock and R9M Lite targets can be merged
[env:Frsky_TX_R9M_via_STLINK]
platform = ststm32@8.0.0
Expand Down
5 changes: 4 additions & 1 deletion src/python/build_env_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
if stm and "$UPLOADER $UPLOADERFLAGS" in env.get('UPLOADCMD', '$UPLOADER $UPLOADERFLAGS'):
target_name = env['PIOENV'].upper()
print("STM ENV: '%s'" % target_name)
if "_R9M_" in target_name:
if target_name == "FRSKY_TX_R9M_VIA_STLINK_OLD_BOOTLOADER_DEPRECATED":
print("you are using the old bootloader, please update this will be removed soon")
env.AddPostAction("buildprog", [opentx.gen_frsky])
elif "_R9M_" in target_name:
env.AddPostAction("buildprog", [opentx.gen_elrs])
if "WIFI" in target_name:
env.Replace(UPLOADCMD=upload_via_esp8266_backpack.on_upload)
Expand Down
45 changes: 45 additions & 0 deletions src/python/opentx.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,48 @@ def gen_elrs(source, target, env):
sys.stdout.write("=====================================================================================================================================\n")
sys.stdout.write("\n")
sys.stdout.flush()

def gen_frsky(source, target, env):
print("generating frk file...")
if "_stock" in env['PIOENV']:
return
sys.stdout.write("\n")
sys.stdout.write("\n")
sys.stdout.write("Building flashable .frk file...\n")
target_bin = source[0] # target[0]
sys.stdout.write("Source bin: %s \n" % target_bin)
bin_path = os.path.dirname(target_bin.rstr())
bin_target = os.path.join(bin_path, 'elrs-old-bootloader.frk')
with open(bin_target, "wb+") as _out:
bin_content = target_bin.get_contents()
# append FrSky header (16bytes)
'''
struct FrSkyFirmwareInformation_no_pack {
uint32_t fourcc; = 0x4B535246
uint8_t headerVersion; = 1
uint8_t firmwareVersionMajor;
uint8_t firmwareVersionMinor;
uint8_t firmwareVersionRevision;
uint32_t size; == len(bin_content)
uint8_t productFamily;
uint8_t productId;
uint16_t crc;
};
'''
sys.stdout.write("Bin size: %u \n" % len(bin_content))
_out.write(b"\x46\x52\x53\x4B") # fourcc
_out.write(b"\x01") # header version
_out.write(b"\x00\x00\x00") # fw versions
size = len(bin_content) + 16
_out.write(bytearray(
[size & 0xFF, size >> 8 & 0xFF, size >> 16 & 0xFF, size >> 24 & 0xFF]))
_out.write(b"\x00\x00") # productFamily, productId
_out.write(b"\x00\x00") # crc
_out.write(bin_content)
_out.close()
sys.stdout.write("\n")
sys.stdout.write("=====================================================================================================================================\n")
sys.stdout.write("|| !!! Copy %s to SD card and choose flash external in order to flash via OpenTX !!! ||\n" % bin_target)
sys.stdout.write("=====================================================================================================================================\n")
sys.stdout.write("\n")
sys.stdout.flush()
2 changes: 1 addition & 1 deletion src/user_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

-DAUTO_WIFI_ON_BOOT

#-DUSE_ESP8266_BACKPACK
-DUSE_ESP8266_BACKPACK

#-DJUST_BEEP_ONCE
#-DMY_STARTUP_MELODY="B5 16 P16 B5 16 P16 B5 16 P16 B5 2 G5 2 A5 2 B5 8 P4 A5 8 B5 1|140|-3"
Expand Down
Loading

0 comments on commit 5ab42b8

Please sign in to comment.