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

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

Try the basicFourFunction sketch, Andy. That should get you some servo movement. You don't need to actually connect any pots to the analog inputs A0 to A3 - just leave those pins floating and there will be enough drift on the analog readings to make the servos move. You can just link one of those analog inputs to VCC or GND to drive the servos to their standard +/- 100% travel limits.

I don't understand why it's not recognizing your cppm signal. Have you connected up the GND from the cppm src (taranis or Phil's PPM tester) to the GND on your CC2500 unit? If you've only connected the one wire and the src and target have floating grounds (e.g. battery powered) then that would explain it.

If it's not that, you could try changing the pinMode statement on line 99 to pinMode(CPPM_PIN, INPUT); instead of pinMode(CPPM_PIN, INPUT_PULLUP); but I'm not confident that will make any difference. Another thing to try is to alter the attachInterrupt( statement on line 100 to RISING instead of FALLING - but I don't really expect that to work either.
Last edited by Martin on 06 Nov 2020, 15:41, edited 1 time 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 »

Here is a pic of my setup, may not look too tidy.

From the left:

Arduino Nano loaded with a Phil G encoder, powered by 3.3v from power supply board.
Power supply board with a 10v battery input and 3 5v outputs (not used) and 3 3.3v outputs (2 used).
Arduino Nano loaded with cppm sketch, powered by 3.3v power supply board. Ppm input to pin 3 (sketch amended for pin 3). Scope probe connected to ppm input.
CC2500 low power module connected to arduino on pins 10 - CSN, 11 - MOSI, 12 - MISO, 13 - SCK. 3.3v power from Arduino shield power rail.
Frsky V8FR receiver showing green bind.

I have tried the basic 4 channel sketch but also with no servo movement.

I do have some spare CC2500 modules so next I will try swopping it.
785B3A32-2C73-4BF6-AB12-791B9648B99E.jpg
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

If it's transmitting (as seen by your spectrum analyser) then the CC2500 module is probably fine, and the Arduino must be communicating with it okay. I don't understand why it would be able to send all the information to make the thing transmit, frequency hop, bind, and so on, without the actual channel data values getting through. It uses the same data registers to transmit the "I'm in bind mode" data that it normally uses to send the channel values - so there's something really strange happening.

Have you bound the same receiver to a known working FrSky V8 transmitter and verified that the servos move with that? Perhaps it's a bad receiver, bad servos, bad receiver battery, or bad receiver-servo connections. Are you sure you've plugged the servo plugs in the right way round? :P
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 2 identical V8 receivers which I have checked out as OK with another transmitter. Both working OK.

I have found that the battery supply to the power board was dropping so changed it.

Also checked the receiver battery as well.

Like you I do not understand why the ppm input is not working. The Taranis and Phil G ppm inputs are the same I used on a MPM module setup which worked OK.

Did change the CC2500 with no change.

I will go over my Arduino IDE sketch to see if I have missed something on the settings.

But I think I will give it break for today.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

Okay, thanks Andy. If I think of anything else to try, I'll post it here. It could well be a bug in my code. So far, I've only tried it with an old V8FR 'square hard case' receiver - maybe there's some subtle difference with newer V8 receivers that makes them incompatible with my code? :o I think I have one of those newer V8FR II receivers, like yours, in one, of my models - so I'll try it with that soon.

If it's not that, and if you get completely stuck or fed up with it, you could perhaps send me your module and Arduino, so I can hopefully diagnose what's wrong, fix it, and send it back to you. I would most likely learn things in the process! :D Send me a PM if you want to try that way.
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

There are so many things that could cause a test setup to not work, bad connection, low battery, error in sketch config, u/s module when it is a test on a bench.

I have found when trying to get both the NRF24 and MPM setups to work that I would leave it till the next day, check everything and it would work. I guess this is the same. Should be easier to get to work than the MPM.

Note - the plan on the bench is for a Keil Kraft Talon (electric powered and radio controlled) which has been pushed aside for the electronics! :lol:
Attachments
B53AAA5B-92B5-45A1-A2FA-55A50701A64A.jpeg
13EE2A01-90A1-4E6D-A30D-69ED1C3FEF8F.jpeg
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

I've tried it now with one of my V8R7-II receivers and it's working fine. My V8R7-II receivers are the cardboard case versions. I don't think I have any V8FR-II receivers, like yours.

The V8R7-II does seem less willing to bind than my old V8FR receiver - I had to hold it closer to the transmitter - and the LED indicators are different.

On the V8FR you get red and green solid LEDs in bind mode, and they flash rapidly once the receiver has bound. When not binding, a solid Red LED is a good signal, and a flashing red LED means no signal.

With the V8R7-II, in normal mode a flashing red LED means no signal, and it changes to a solid green LED when it's locked onto the transmitter it's bound to. In bind mode, a solid red LED means, "not bound yet", and it changes to a flashing red LED once it's bound.
AndyS
Posts: 42
Joined: 12 Oct 2018, 19:03
Location: Biggleswade

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by AndyS »

Tomorrow I will try using a fine tuning pot to try and optimise the RF output.

On a separate note, reference using the serial monitor. I have two USBASP's one that I use mostly and works well is the Turnigy one and has a voltage output of 5v (no jumper that I can see to change to 3.3v). The other is a ebay standard USBASP that is working on 3.3v but does not load a Arduino sketch (error message to re load firmware).

Therefore to use the serial monitor I have to disconnect the CC2500 from the arduino and use a standard usb cable to connect to the Arduino (on the USB port). CC2500 disconnected because of 5v from the USB. So I cannot use the serial monitor with the CC2500 as I cannot supply the Arduino with 3.3v and view the usb port at the same time.

I must say that I am not sure what driver the USBASP should have. I have used Zadig to set the driver, but there are some options:

WinUSB(v6.1.7600.16385)
libusb-win32(v1.2.6.0)
libusbK (v3.0.7.0)
USB Serial (CDC)

I am never sure which to use. Any advice?

The Serial Monitor does not seem to work when connected with a USBasp but should it?

Just trying to eliminate some possible errors.
DSC_0013.JPG
DSC_0012.JPG
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by Martin »

I normally use Linux, where there's no having to install drivers - USBasp and Serial adapters work right out of the box. You do, however, have to add your user account to the dialout group or you don't have permission to use those interfaces (unless you start up your IDE with sudo) :lol:

But I just fired up Windows to check. My USBasp can be connected at the same time as my CC2500 module. It's working fine and is using the driver WinUSB (v6.1.7600.16385). It has enough power to work the Arduino and the attached (high power version, from Banggood) CC2500.

I think I got it from Hobby King. Out of the box it was 5V, but there was a tiny surface mount resistor (probably a zero ohm link - I never checked) soldered across two pads on the bottom of the board, marked "5V/3.3V SEL" on the silk screen (click on photos for larger view). I removed that resistor/link and then it worked at 3.3V - I verified with a multimeter and scope that all the signal lines worked at 3.3V - not just the VCC output.
USBaspFront.jpg
USBaspBack.jpg
Recently, I upgraded all my USBasps to the latest firmware - which made them run much faster. Details on how to do it and downloads at https://www.fischl.de/usbasp/ You use one USBasp to update the others - I think you can get an Arduino board to work as an updating tool, if you only have one USBasp, but I didn't try that.

For 3.3V serial, I use a genuine FTDI board which I've had for years. I bought two of them, and they were both originally 5V units.
FTDI_front.jpg
FTDI_back.jpg
To convert it to 3.3V, I had to scratch through a 'link' track on the back of the board and add a blob of solder to link two pads the other way (they're in a group of three marked "JP1", up near the connector)
Although the silk screen still says 5V, on one pin - it's really 3.3V on that pin and all the signal pins too. I write on my adapters using one of those white "TipEx" correction pens that typists use - 3.3V / 5V if there's room, and just three or five dots if there isn't.

The serial board is also (just) capable of powering the Arduino and the high-power CC2500 - but the Arduino resets itself and restarts when I switch from range test power to full power, or vice versa.

I can have both connected at the same time, and with the Pro Mini Strong, they both just plug straight on, with no adapter wires. 8-)
ProMini_adapters.jpg
The other three wires you can see connected are the ones that go to the buddy-box DIN connector you saw connected to my old Futaba Gold in the video. I can have that connected at the same time too (it powers the Pro Mini from the Futaba transmitter battery through the buddy cable into the 'Vin' pin. I can leave the serial and USBasp all connected at the same time - no problem! 8-)
User avatar
ozrs
Posts: 114
Joined: 16 Feb 2018, 15:21
Location: West Australia

Re: FrSky V8 transmitter module using Arduino and CC2500

Post by ozrs »

I had wondered whether the FrSky protocols from the MPM could be flashed to the internal XJT module of the Taranis, since this should allow D8 plus D16v and D16v2 to be used.

I was told the XJT was protected to prevent this. Does anyone know what the protection is?
Richard
Post Reply