FrSky V8 transmitter module using Arduino and CC2500

Any old or new electronic projects on the go
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

I read about AndyS's experiments with the CC2500, and because my LORA modules still haven't arrived, I thought I'd try to get one working today.



I started with a download of the current edition of Pascal's MultiProtocol code, and then edited _Config.h file to remove all but the V8 protocol. I've attached the modified file to this post

I only enabled the CC2500, commented out all the protocols except FRSKYV_CC2500_INO, commented out TELEMETRY, and ENABLE_SERIAL, in the #if NBR_BANKS > 0 section, I made all 14 options the same:

{PROTO_FRSKYV, NONE , 0 , P_HIGH , NO_AUTOBIND , 40 , 0x00000000 },

I wired it up (details below) but it still wouldn't bind till I played with this line:

//#define FORCE_FRSKYV_TUNING 0

I removed the comment // altered the value in steps of 20, starting at 120 and working downwards, recompiling and uploading at each stage. When I got down to -20 it sprang into life! Of course, your chip may need a different value.

The connections are not what you might expect - although the CC2500 chip is SPI with pins like MOSI, MISO, etc. these DO NOT connect to the normal Arduino hardware MISO, MOSI, SCK... at 11, 12, 13. Pascal's code bit-bangs the SPI on pins D4, D5, D6, D7.

========================================================================
These are the connections you need to run Multiprotocol with the _config.h file below:

SI (MOSI) D5
RFSCL D4 (this is the 'clock', normally named SCK for SPI interface)
SO (MISO) D6
RFCS D7 (this is the chip select line)
GD00 linked to PA_EN if PA_EN present or left disconnected
GD02 linked to LNA_EN if LNA_EN present or left disconnected

ALL PINS ARE 3.3V MAXIMUM!!! if you put 5V on any CC2500 pin, you'll likely destroy it. I used a Pro Mini Expand 5V 16MHz Arduino, but I powered it using a 3.3V FTDI, and double-checked that all the FTDI pins, not just VCC, worked at 3.3V levels.

The other used pins on the Arduino:

D10, D11, D12 all linked to VCC. A0 linked to GND (this is the opposite to what I said in the video). These are the four pins normally driven by the rotary switch to select a protocol - by hard-wiring them like this you ensure that the same (non-serial) protocol is always selected. The pull-up links on 10, 11, 12 are likely not required because (I think) Pascal's code enables the internal pull-ups.

D3 is the PPM input from the encoder - I used a tiny orange R617XL receiver for tests - it receives either DSM2 or DSMX from a Spektrum transmitter and outputs CPPM.

D13 is the onboard-LED, but also the "bind button." Link it to ground at power-up and you put the 'transmitter' into bind mode.
========================================================================

Edit: if you download my (now working) library, the default connections are different: CS connects to 10, MOSI to MOSI (11), MISO to MISO(12) and SCK to SCK(13). This is described in the documentation.

The FrSky D8 and D16 (EU-LBT and International) protocols all use the same CC2500, so should be just as easy.
Attachments
FrSkyV8Tx.zip
Library, updated 2020-11-12 Unzip in your Arduino\libraries folder
(317.92 KiB) Downloaded 185 times
FrSkyV8Tx.pdf
Library documentation, updated 2020-11-12 Now includes more detailed API descriptions of all the available library functions.
(300.86 KiB) Downloaded 236 times
_Config.h.zip
(9.03 KiB) Downloaded 232 times
Last edited by Martin on 12 Nov 2020, 10:01, edited 7 times in total.
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

Martin - Brilliant. This has encouraged me to press on. I have most of your suggestions implemented including the frsky tuning set at 0, will now try a different value.

I will check my connections and look at your config and hopefully get there.

I suspect that I may have damaged the cc2500 I have at moment but have 2 more on order.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

I ordered a couple of these modules which include a low noise amplifier and power output stage, from Banggood.
They cost me £10.17, including shipping, so just over five quid each.

https://uk.banggood.com/CC2500-PA-LNA-R ... rehouse=CN

Image

It's not clear to me whether or not they come with antennas - but I think I have some that will fit if they don't.

As well as the extra range, they're big enough (22mm x 34 mm) to make soldering easier than the little, limited range PCB-antenna-only boards I already have.

Once I've finished modifying the sketch, I'll do some range checks with the tiny boards, as well as the bigger ones when they arrive.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

Phil_G wrote: 25 Oct 2020, 10:08 This is brilliant Martin, I think its what a lot have been waiting for. Its a shame that the Frsky tuning value varies so widely - the trimpot on an analogue input seems a good idea.
Simplified hardware would be good too - just the 2500 and a PA, 'keep it simple' :D

I think the complexity and versatility of the MPM discourages a lot of us Martin, if you can reduce this to a simple sketch and a Bangood RF board it will be very popular - people know and trust the Frsky V8 and a simple featureless replacement is all they ask for :D This could turn out to be the most popular project ever!
Cheers
Phil
Thanks Phil. And don't forget that the D8 (and D16) protocols also run on the same hardware. If we ignore the telemetry functions, then the D8 and D16 protocols are just as easy to implement, and allow the use of a whole range of currently available cheap receivers - often cheaper than the V8 ones.

I'm trying to build a simple library that will hide away all the complexity and allow the protocols to be used from any sketch. If I'm successful, then I'll make different libraries available for each protocol. I'll keep the APIs of the libraries compatible, so to change your project from V8 to D8 mode will just mean changing a couple of lines in your sketch, then recompiling and uploading.
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

That is the module that I have used so far and is probably destroyed.
It does not come with connector or antenna.

I have some questions however regarding this module:

On Pascal's schematic the CC2500 connections are:

1 - 3.3v Vcc
2 - MOSI - to Arduino D5
3 - SCK - D4
4 - MISO - D6
5 - D03 - connected to Pin 10 LNA-EN
6 - GND
7 - D00 - connected to Pin 9 EN-A
8 - CSN - Arduino D7
9 - EN-A - connected to Pin7
10 - LNA-EN - connected to Pin 5

The smaller CC2500 pinout looks different, as per your video:

1 - GND
2 - 3.3v Vcc
3 - MOSI - D5
4 - SCK - D4
5 - MISO - D6
6 -
7 -
8- CSN - D7

No interconnections of pins, which makes me query Pascal's schematic.

Protocol select pins 10,11,12 and A0, you have 10, 11 and 12 connected to Vcc (High) which I assume is the same as no connection to Gnd from the rotary switch. A0 is connected in video to Gnd which would select Bank 1, mode 8 and as all modes on the config are FrSky, it is selected. Is connecting 10, 11, 12 to Vcc better than leaving open and floating?

I understand that 5v on any pin on the CC2500 can kill it (probably what I have done) but again Pascal's schematic show direct connections from the Arduino or ST32 to the CC2500 module. So once again this makes me query Pascal's schematic.

My next attempt will be with, like you using only 3.3v to the arduino.

I guess that suppling the small CC2500 from the Arduino 3.3v is Ok but I suspect the CC2500 version with LNA and PA will need a separate 3.3v supply as per Pascal's schematic.

Thanks for your assistance with this and I think your proposed version with Phils encoder making a DIY FrSky transmitter module is a great idea.

I have attached Pascal's schematic.
Attachments
DIY_Mulitprotocol_Module_Schematic.jpg
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

Phil_G wrote: 25 Oct 2020, 10:08 I think the complexity and versatility of the MPM discourages a lot of us Martin, if you can reduce this to a simple sketch and a Bangood RF board it will be very popular - people know and trust the Frsky V8 and a simple featureless replacement is all they ask for :D This could turn out to be the most popular project ever!
Cheers
Phil
Definitely a 'Plus 1' from me :D
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

AndyS wrote: 25 Oct 2020, 10:52 That is the module that I have used so far and is probably destroyed.
It does not come with connector or antenna.

I have some questions however regarding this module:

On Pascal's schematic the CC2500 connections are:

1 - 3.3v Vcc
2 - MOSI - to Arduino D5
3 - SCK - D4
4 - MISO - D6
5 - D03 - connected to Pin 10 LNA-EN
6 - GND
7 - D00 - connected to Pin 9 EN-A
8 - CSN - Arduino D7
9 - EN-A - connected to Pin7
10 - LNA-EN - connected to Pin 5

The smaller CC2500 pinout looks different, as per your video:

1 - GND
2 - 3.3v Vcc
3 - MOSI - D5
4 - SCK - D4
5 - MISO - D6
6 -
7 -
8- CSN - D7

No interconnections of pins, which makes me query Pascal's schematic.
I think the two pins I didn't connect (named GD00 and GD02) may be some spare I/O pins on the CC2500. I think (maybe) Pascal is using them as outputs to enable the low noise amplifier, etc - but my little module doesn't have those extra features so I just left them disconnected. I'll investigate further when my bigger modules arrive.
Protocol select pins 10,11,12 and A0, you have 10, 11 and 12 connected to Vcc (High) which I assume is the same as no connection to Gnd from the rotary switch. A0 is connected in video to Gnd which would select Bank 1, mode 8 and as all modes on the config are FrSky, it is selected. Is connecting 10, 11, 12 to Vcc better than leaving open and floating?
You can leave the pull-up links off - they're not needed.
I understand that 5v on any pin on the CC2500 can kill [it (probably what I have done) but again Pascal's schematic show direct connections from the Arduino or ST32 to the CC2500 module. So once again this makes me query Pascal's schematic.
STM chips all work at 3.3V anyway, and there are some notes in the documentation of Multiprotocol, that although you must select '5V 16MHz' in the Arduino IDE for Atmel ATMega328 chips, any boards must actually run at 3.3V. The problem is that the Arduino IDE bundles the voltage with the frequency - even though they are really independent, and the IDE has no way of knowing the the actual working voltage. So the rule is, 'choose the 5V 16MHz option in the IDE, but make sure you actually use a working voltage of 3.3V'. Beware serial interfaces and USBasp interfaces that can be switched to 3.3V - some of them switch just the VCC line, but still leave Rx, Tx, or MISO, MOSI, etc working at 5V - which can then 'leak through' to the CC2500 and kill it. Check the interface voltages out with a multimeter and/or scope before you trust that they are really 3.3V. The alternative is to use one of those level shifter boards to keep the CC2500 safe from 5V.
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

I have a result!

Without changing my connections or the Arduino multi module config_h, but powering both the ppm generating arduino and the multi module arduino with 3.3v I got an output on my 2.4Ghz scanner. :D

So I have been very lucky in that the CC2500 seems to have survived 5v (measured on scope) control signals to the module. But the module only works when they are 3.3v.

I have not yet tried the module with a FrSky V8 reciever. Just very happy to get an output at this stage. :D
Attachments
538938F6-FB78-43B1-B273-FB9C86EB1D7E.jpeg
538938F6-FB78-43B1-B273-FB9C86EB1D7E.jpeg (25.94 KiB) Viewed 40075 times
5BA523D4-17A0-4EA5-A33F-86798A19CE4B.jpeg
5BA523D4-17A0-4EA5-A33F-86798A19CE4B.jpeg (45.71 KiB) Viewed 40075 times
User avatar
Wayne_H
Posts: 808
Joined: 17 Feb 2018, 05:26
Location: Temora, NSW. Australia
Contact:

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Wayne_H »

I must also add my thanks & endorsement - brilliant stuff Martin👏👏👍👍

I'll be following your progress very keenly having already ordered a couple of CC2500's in eager anticipation 8-)
Cheers,

Wayne
Once a Retrobate, always a Retrobate............ ;)
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

Phil_G wrote: 25 Oct 2020, 23:22 I suspect that probably most, if not all, MPM users actually only ever use their favourite protocol :D
I got quite frustrated with the RC Groups ‘DIY Multi Module’ thread. You may have noticed my comment on the thread. There is over 1000 posts on the thread and most are about getting some obscure protocol for a drone :roll: included or how to make it work. There is very little about actually making a module apart from some early posts.

If you are, like me only interested in one or two protocols then a stripped down simplified module is what we need.

Although my own module is now giving a output I have yet to bind it to a v8 receiver. I have not yet gone very far with the tuning, which may be the solution. I have this morning received in the post two new CC2500 modules from Bangood.
Post Reply