现已增加中文介绍,详情请看Wiki页面
This is an Arduino based RC transmitter TX. I want to design a RC transmitter (soft and hardware) that is simple to build, and use arduino board wich I am familler with, and it should supoort ELRS.
video:
https://www.youtube.com/watch?v=BPLFkZUoV28
This project includes code, stl file for transmitter shell and pcb board, you can easily diy your own rc transmitter from arduino development board in a very simple way.
I have tested for 6 month since the first prototype (mod from an old Devo7), it works pretty well.
I use superslim module in the shell, but any esp32 based tx module should be working.
It was tested for ELRS 1.0 and 2.0.
In branch 2.X maintance: Because I have started flying fixed wing with iNav, current 7 channels are not enougth. So I added channel 8 and changed channel 6 (AUX2) from 2 postion switch to 3 postion. This is also for Betaflight. The 3 postion have to use 2 digital pins, currently I am using D3 and D8.
The current digital pin:
D2 - AUX3
D3 - AUX2 low
D8 - AUX2 high
D4 - AUX1
D5 - AUX4
D6 - BUZZER
D7 - LED
Add buzzer support on pin 6
The PIO becomes unusable dude to unstalbe network, so I switch back to arduino extension, still in VSCODE, because the original Arduino IDE is low efficient.
The code still works in Arduino IDE, you can compile in both enviroment
The PIO will be saved in a seprate branch and will unliked be updated
// Define Reverse 1 = reverse, 0 = normal
Is_Aileron_Reverse =1;
Is_Elevator_Reverse =1;
Is_Throttle_Reverse =0;
Is_Rudder_Reverse =0;
Calibration function added by erstec in Platformio_test_branch, thanks
platformio
Add Test branch for ppm output
Update STL File:
Solve gimbal & switch interference
Add battery tray
Update PPM to ELRS library, siginal is more stable, still need more test
https://github.com/kkbin505/Arduino-Transmitter-for-ELRS/tree/main/PPMtoCRSF
Increase baud rate to 400K
*** In 400k baud, theoretical maxmum packet rate is 500Hz (400000/320bit per second, 1.6ms per frame). RC data pcket is 32byte=320bit(plus 1 start bit and 1 end bit).
Now simpleTX is supporting 500Hz
Add 3rd pre seeting for 500Hz 25mW
Gestrue: Hold AILERON left and ELEVATOR up at power up.
Update cmd to elrs 2.0 (power setting commond of 2.0 is different from 1.0)
Re write gimbal calibation method, add center stick offset in config file
Add 2 pre settings for power and package rate:
Now you can enter setting 1 and 2 by gesutre:
Setting 1: //250Hz 25mW
Hold AILERON left and ELEVATOR down at power up.
Setting 2: //150Hz 100mW
Hold AILERON right and ELEVATOR up at power up.
Center stick will keep your previous setting.
Due to the hardware limitation of the ATMega328p, the follow functions are not supported:
** Telemetray is off, 328p do not support half duplex.
The uart logic voltage of ESP32 is 3.3V, my ATMega328p is 5V. However mine TX work fine, it seems ESP32 UART is 5V tolerance.
Default RC channel order is AETR, you can change channel order whatever you like, by changing the RC channel order. Current gimbal calibratin method is complex (but you need to do only once):
There are many amazing Expreslrs handset. But I want a simple arduino based transmitter for my DIY 2.4G external TX module.
I replace the control board with my PCB and system.
In PCB folder, you can find the PCB and BOM, the PCB is designed in Easyeda and files in Gerber type. I orderd my PCB use the Gerber file from JLCpcb.
The PCB is v0.9 means it is not complete, but it works well at least for me.
The version includes 4 digital switch, but I forget to wire out the LED pint, so I use one channel for LED only 3 digital available.
The analogy channel support 3.3v gimbal (hall and poentional meter both works), the pin use 1.25 6p plug, it is the same pin order as most frsky gimbal (M7 for example). If you use orther gimbal pay attention to the pin order. I find jumper gimbal reversed GND(red) and 3.3V(black).
I powered my board with 2S battery, the arduino nano have a decent LDO (ASM1117), and the ELRS module also powerd from 2S.
All source codes are in SimpleTX folder.
It is writen in arduino frame use VScode, but arduino IDE should also work.
3 versions of transmitter shell are available.
1 is a remix from https://github.com/cruwaller/elrs_handset
I removed 2 switch, and modify switch in front side from Switches to Tango2 like switch
Front_Shell_REV-A_M7_kkbin_modify.stl
2 is my design, it is compatibal with jumper TX 12 hall gimbal, very compact.
SimpleTX_Top_v15.stl
3 is for X9 lite gimbal, it feels too big for me.
!!! Do not solder the buzzer, need to add triode in next version, I burned my board.
This Transmitter is inspired by cruwallero: https://github.com/cruwaller/elrs_handset
Some code are based on Pawel's amazing work on SBUS generate code.
https://quadmeup.com/generate-s-bus-with-arduino-in-a-simple-way/