Skip to content

kkbin505/Arduino-Transmitter-for-ELRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple TX

现已增加中文介绍,详情请看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.

微信图片_20220213205906

video:

https://www.youtube.com/watch?v=BPLFkZUoV28

Features:

  • Support ExpressLRS 2.4G external TX module
  • Up to 500Hz packet rate
  • 4 analog channel
  • 4 AUX channel

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.

  • Simple TX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.

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.

Update:

2024/11/7 add 3 stage AUX channel

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

The development was moved to VS code

2022/11/5 Move IDE to VSCODE and Arduino Extension

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

2022/6/3 Optimize Calibration

  1. Add center stick calibration
  2. Optimze channel reverse use 4 values to handdle reverse in config.h

// Define Reverse 1 = reverse, 0 = normal

Is_Aileron_Reverse =1;

Is_Elevator_Reverse =1;

Is_Throttle_Reverse =0;

Is_Rudder_Reverse =0;

2022/5/29 Calibration added

Calibration function added by erstec in Platformio_test_branch, thanks

  1. enter debug mode by uncomment #define DEBUG
  2. flash firmware to arduino nano
  3. open serial monitor at 115200 baud, center stick and keep for 5 seconds
  4. move stick full range within 20 seconds untill you see "Calibration Done"
  5. comment //#define DEBUG and flash firmware to arduino nano
  6. test in bf configurator
  7. done

2022/4/6 Test branch

platformio

Update Log 2022/4/3

Add Test branch for ppm output

Update Log 2022/3/26

Update STL File:

Solve gimbal & switch interference

Add battery tray

ASSEMBLE

Update Log 2022/3/20

Update PPM to ELRS library, siginal is more stable, still need more test

https://github.com/kkbin505/Arduino-Transmitter-for-ELRS/tree/main/PPMtoCRSF

Update Log V0.9.3

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 Log V0.9.2

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

Update Log V0.9.1

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:

  • The 328p do not support inverted UART (which OpenTX use), there are 2 options:
    1. Tun UART_INVERTED off.
    2. Adding a digital invert IC (I tested with SN74LS06N)

** 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.

Tips

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):

  • Enter debug mode by delete "//" before #define DEBUG
  • Flash with arduino IDE
  • Open serialmonitor change baud rate to 115200
  • Record max and min RC channel value and write in map() function (reverse order if neede) example:map(Aileron_value,893,223,RC_CHANNEL_MIN,RC_CHANNEL_MAX)
  • Add "//" back before #define DEBUG
  • Flash with arduino IDE

There are many amazing Expreslrs handset. But I want a simple arduino based transmitter for my DIY 2.4G external TX module.

https://youtu.be/PrfSfnqcBgk

Add PCB V0.9

I replace the control board with my PCB and system.

微信图片_20220123195005

1. Project Intro:

1.1 Hardware (PCB)

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.

EasyEDA(标准版) - 免费、易用、强大的在线电路设计软件 - Google Chrome 2022_1_23 19_47_16

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.

1.2 Firmware

All source codes are in SimpleTX folder.

It is writen in arduino frame use VScode, but arduino IDE should also work.

1.3 CAD-Model

3 versions of transmitter shell are available.

1 is a remix from https://github.com/cruwaller/elrs_handset

DSC00981

I removed 2 switch, and modify switch in front side from Switches to Tango2 like switch

DSC00982

Front_Shell_REV-A_M7_kkbin_modify.stl

2 is my design, it is compatibal with jumper TX 12 hall gimbal, very compact.

DSC00988

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. buzzer

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/

About

Arduino based RC transmitter for ELRS external TX Module

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published