Introduction: NRF24 Jr Module for Toy Quadcopters
We will build a module for those chinese toy quadcopters like the Eachine H8 or Cheerson CX-10.
It consists of an arduino pro mini, a nrf24 2,4ghz transmitter and a 3.3v regulator.
The module should fit into the module bay of the frsky taranis.
We will use the open source nrf24_multipro project.
Step 1: Plan the Connections
You will need the ppm, +bat and gnd pins on your remote.
Remember that you also have battery voltage level on the ppm pin, so use a regulator or voltage divider.
The "+6v" pin is not used and has no function.
The nrf24 module will be connected to the arduino like this:
MOSI - D3
SCK - D4
CE - D5
MISO - A0
CS - A1
Well. of course you could change this in the code if you decide on a different design.
The nrf24 can take 5v logic level on the logic pins but needs 3.3v as vcc so use a 3.3v converter.
If you have a 3.3v arduino it is even easier as you could power both from the same converter.
I used a 5v arduino and used the onboard linear converter, which can take the taranis battery voltage.
Step 2: Upload the Code
We will use the nrf24_multipro project from goebish on github.
Change your pins in the "nRF24_multipro.ino" according to you wiring, if it is different.
If you are using a module without amplifier like the NRF24L01 change the line:
#define RF_POWER TX_POWER_80mW
to
#define RF_POWER TX_POWER_158mW
Don't worry. Those are just internal values. It won't transmit anywhere near that set power.
Upload your code, insert the module in your remote and maybe tape/glue it to a cover.
While powering it on, hold the sticks into the right positions for your quad as written in the readme.
Set the mixes according to your quad like in the picture.
Power the quad on, your remote and have fun.
21 Comments
7 years ago
I try to read it slowly after my attempt with arduino+nrf24L PL LA failed to bind to my eachine H8....
Is
installing a regulator/voltage divider on PPM line is mandatory? what
is the scheme? is it should be put between the line of PPM (D2 and and
PPM)?
Sorry for newbie questions
Reply 6 years ago
Yes you should have a voltage divider because the signal is at battery level, which can be as high as 8V.
The divider should drop it down to less than 3V if you are using a 3.3V arduino. I used a 5V arduino and the divider drops it down to around 4.8V.
You will need a 1/2 or 1/3 divider. You could use a 10k resistor from gnd to the arduino pin and 20k or a bit lower from the arduino pin to the ppm signal. Then you have Uppm * 10/(10+20) = 1/3 Uppm on your pin.
Reply 7 years ago
The voltage divider is there because the arduino works at 5v logic level and the taranis at battery voltage, which can be up to 8V peak and that can damage the arduino.
If you are using a 3.3V arduino it will damage it without a divider.
You need to calculate the values depending on what resistors you have.
A 1/2 or 1/3 divider should be okay. So you will have for example a 50k resistor from ppm to D2 and a 50k from D2 to gnd resulting in a 1/2 voltage divider.
Reply 7 years ago
can you help with the wiring diagram to put the resistor? I try to put it between ppm line, but no luck, I can't bind with my eachine H8, even after hold elevator up aileron right while turn on my taranis.
all wiring from my arduino to NRF2401+PL+NA is already as your article, and I put 3.3v stepdown regulator to power both NRF24 and arduino
Reply 7 years ago
If you have the tools to measure the actual voltage on your lines you could confirm if they are right.
How is your wiring at the moment? You might have to use lower value resistors or maybe your signal level is too low.
You can try it without the divider if the ppm voltage is not too high and you are using a 5v arduino. But i strongly recommend to reduce the voltage.
If you are powering the arduino from the regulator i assume you use a 3.3v arduino so you will definetly need a ~1/3 divider. The resulting voltage is
U_ppm * R2/(R1+R2)
6 years ago
If I am not the only person who wanted to have this working with Radiolink AT9 transmitter, here's the code with the needed modifications:
https://github.com/Sulya/nrf24_multipro
7 years ago
It is possible to use arduino+nrf24+joystick module to control the h8?
7 years ago
Hi,
Thanks a lot for this project !!! Very Nice
i've make it on a "practice pinboard" and it was working fine yesterday.
i've bind my Taranis with an Eachine H8 ... But only One Time !
May be a chance to find the correct Binding way / Config... but today i'm still trying to bind it again but don't success in :(
Does someone can explain me again how to bind cos i'm surely in a wrong way !!!
thinks
7 years ago
Hi nice project, i have a lot of problems with the arduino code: integer constant is too large for "long" type; some variables are not declareted...can someone help me?
Thanks in advance
Reply 7 years ago
i have same problem, did you fix it?
Reply 7 years ago
I reply myself... update your arduino IDE... :P
Reply 7 years ago
have install divider on PPM line?
Reply 7 years ago
it was a compilation problem, only updating IDE and fix it.
7 years ago
Hi, great project, but don't work for my Taranis.
I get some compiling warning "In function 'void HiSky_calc_fh_channels()':", so I'dont know if it's a problem of code, some problem with hardware or with Taranis model configuration.
Could someone give me and advice? How could I test with Arduino serial.
Thanks in advance
7 years ago
Sorry if I'm being think but I can't work out where to connect the wires coming out the back of the remote. Can someone spell it out please? Thanks.
Reply 7 years ago
It's OK. PPM goes to D2, +Batt goes to the arduino +ve in and the GND goes to the arduino -ve in. And it works!
7 years ago
Thanks for the instructable, got it to work with my Turnigy 9x. For the record
here's my experience with the voltages needed. The PPM pin's logic one voltage varies between transmitters, so the best solution is to use a level shifter connected to the Arduino's VCC (5 or 3.3V), however if you're lazy like me it seems that for a Taranis a voltage divider made of two 10k resistors will work just fine (i.e. divide by 2), while for the Turnigy 9x you need a single 10k resistor on the PPM line, no voltage divider. On the Turnigy, dividing the voltage by 2 will prevent it from working, while connecting directly with no resistor at all it'll occasionally work and occasionally go crazy sending random values to the copter, easy to lose. I used the smallest, cheapest nRF module with the pcb antenna and I get a better range than with the original Eachine H8 tx (but still short). I connected the +BAT pin directly to the arduino's RAW pin, and I power the nRF24 with the arduino's 5V connected through three diode's in series that gives me some ~3.2V.
7 years ago
Great project! What is the range you get with that module?
Reply 7 years ago
The range is very limited. For me not more than the original remote. Maybe 30-50m
Depends on your antenna and module.
With some antenna modifications on the receiver side and with a real antenna on your transmitter it should be possible to get a way longer distance.
7 years ago
Great I gonna build one.