Sunday 28 December 2014

Build your own RC receiver

Its always fun learning something new. Ever since we got a 2.4 GHz RC system a few years ago, I wanted to understand how these things actually work. How do they send data over the air? What components are used?
Well, in the last months we finally got around digging into it. And it turned out that it is a rather simple affair. So we built our own RC receivers.

RX DIY with HKR3000 and XR3100
The HobbyKing HKR3000 and XR3100 receivers along with two different versions of compatible, home-brew receivers.

The HobbyKing system uses RF technology from Nordic Semiconductor. It employs the famous nRF24 RF transceivers. Those chips are extremely popular in hobby electronic circles due to their low cost, reliability and ease of use. This is good news as it means that components and even ready made modules are easily available at low prices.

Like most 2.4GHz RF systems, the nRF24 can be configured in many different ways to achieve the functionality suitable for the application at hand. So the first task was to reverse engineer how exactly the RF system is set up in the HobbyKing RC system. This was quite some work as no documentation is available, but with a bit of preserverance we managed to find out all we need to know. We have documented everything in detail.

Building the actual receivers was straight-forward once we knew how the system works. We built two different flavours, each having strengths and weaknesses.

RX DIY front
lpc812-nrf24l01 variant on the left, nrf24le1 variant on the right

The first variant, we call it lpc812-nrf24l01, uses a commonly available NRF24L01+ module along with a NXP LPC812 micro-controller.

The NRF24L01+ module can be found for less than USD 1 per piece in qty 10 from online suppliers. The NXP LPC812 is a tiny 16-pin micro-controller that contains a 32-bit ARM Cortex-M0 core along with other useful hardware. Despite what it offers, it costs less than USD 2. It has a built-in ROM bootloader so that firmware can be flashed with an off-the-shelf USB-to-serial dongle -- no proprietary programming hardware needed. The toolchain is standard GNU GCC for ARM, hence very easy to program for.

The lpc812-nrf24l01 hardware requires a circuit board as the components come in a very small pin pitch package only. Compared to the second variant, the lpc812-nrf24l01 does not have a CPPM output, but it does have a UART preprocessour output which achieves the same functionality.

RX DIY back
lpc812-nrf24l01 variant on the left, nrf24le1 variant on the right

The second variant is based on the NRF24LE1 chip. Hence we call it nrf24le1. This chip includes the same RF hardware as the NRF24L01, but also has a 8051-compatible micro-controller on board. This exact same chip is used in the HobbyKing receivers.

This receiver has a very low part count: NRF24LE1 module, voltage regulator, a few capacitors; done! It can be built on a breadboard if needed. Beside the UART preprocessour output we also added a CPPM output. CPPM carries Steering, Throttle and CH3 information in a single wire.

The NRF24LE1 module is about USD 6, so more expensive than the NRF24L01. To flash the firmware one needs a special programmer, but there are lots of open designs available on the Internet. You can also get ready-made programmers in online shops for reasonable cost.
There are different versions of NRF24LE1 modules for sale, so be careful to buy the right one if you want to use the PCB we provided.

The firmware of both receiver variants is in large parts identical. The major difference lies in the hardware aspects as the 8051 is quite a different animal than the NXP LPC812.

All hardware and firmware for both designes is Open-Source. Please find all related project documents on our nrf24l01-rc Github page.

The NRF24LE1 firmware included in this project can be compiled to be compatible with the HKR3000 and XR3100 hardware. However, since those receivers use the OTP version (NRF24LE1G) one would have to replace the chip with the NR24LE1E versions to be able to use it.

In case you have any question don't hesitate to contact us!

3 comments:

  1. I have been trying to get an nRf24LE1 chip to work in RC for 18 months. I stumbled accross you site and you have done it and shared it with the world! Well done and thank you. It's generous, skilled people like yourself that make this world a better place.
    Cheers,
    Christian

    ReplyDelete
  2. hmm. That would proberbly also mean, that i could flash some of my leftover, other recievers with the same firmware, and.. presto, my old paperweights, will now work with my new transmitter :-)

    ReplyDelete
    Replies
    1. It depends on which receiver we are talking about. The HobbyKing receivers HKR3000 and HKR3100 can not be re-flashed as they use the OTP (one-time programmable) version of the NRF chip. You could replace the chip with a flash version, but consider whether this is worth it over building a complete receiver.
      If you are using another 2.4 GHz system then you need to find outwhich RF system they are using as are different 2.4 GHz chip-sets used in RC, and they are mostly incompatible with each-other.

      The following websites have excellent information about RF protocols and RF chips used in RC:

      https://github.com/pascallanger/DIY-Multiprotocol-TX-Module

      http://www.deviationtx.com/

      Delete