Cheap UHF spectrum analyzer (and RC tx rx) using RFM22 module

OK, I built my ghetto Tx with an Arduino Pro Mini @ 3v3 and get no output from it.

Built one of Zitron's boards as a Tx and get no output from it.

Checking with one of Zitron's boards as an Rx and running the Spectrum Analyzer software, I see nothing from either of the above boards.
Using my OpenLRS module, I see a nice fat signal on the Spec An software.

My Tx is a Futaba T9C (FF9).
I scoped the PPM module pin and see nearly no signal output on my ghetto board or Zitron's board, but, with my OpenLRS module installed I see 2.3 volts on the 'scope.

So, how do we 'trick' the Futaba T9C into outputting a PPM voltage??

So near and yet so far!!

Nigel.

The original Futaba module has a trick to tell the radio that the module is plugged.

See here: RC Groups - View Single Post - Futaba RF Module Pinout

That doesn't work, pin 3 just needs pulling low to turn on the RF LED on the front panel of the Tx (a 1k resistor works fine).
For example, OpenLRS controls pin3 via Arduino and code.

I can use a 10k pullup resistor between pin1 (PPM) and pin2 (Tx battery voltage) and get around 10v PPM - waaay too much!

I think I'll try a pullup resistor between PPM and the 3.3v onboard regulator of my ghetto module.

Any other ideas? (other than using the trainer port, which is not an option for module useage).

Nigel.

Devonian:
That doesn't work, pin 3 just needs pulling low to turn on the RF LED on the front panel of the Tx (a 1k resistor works fine).
For example, OpenLRS controls pin3 via Arduino and code.

I can use a 10k pullup resistor between pin1 (PPM) and pin2 (Tx battery voltage) and get around 10v PPM - waaay too much!

I think I'll try a pullup resistor between PPM and the 3.3v onboard regulator of my ghetto module.

Any other ideas? (other than using the trainer port, which is not an option for module useage).

Nigel.

Wait so you are able to get PPM out but it's 10V? So can't you just use a voltage divider to drop it to 3.3V?

Edit:
OK ignore that. So basically the PPM output is active low or open collector or something? It's probably not good for the radio if you feed 10V through it. In that case pulling it up to 3.3V will work, or alternatively you can add "digitalWrite(3, HIGH)" inside the PPMInitialization() function after "pinMode(3,INPUT)", to turn on the 328's internal pull-up.

Also I just got my new boards back. They are 37x48mm, and seem to fit into my 9x module box (34x54) if I put them in at an angle. I'll put some pictures up later.

Hi Zitron,

I understand the Futaba PPM signal on the module pin is open collector.
So, using your PCB, I added "digitalWrite(3, HIGH)" to the code and it now works -- sort of...!
The spec-an software shows a nice signal.

The servo I had attached to the Rx is jittering something awful and was crashing the gear against the end stop, so I stopped testing pretty quick.
I'm using your RF22 code from here:

On my ghetto 3v3 version, I loaded the same Tx code and the Rx gives a short flicker on the red LED as if it receives something then stops, also no signal appears on the spec-an software.
Will there need to be any code change to make a 3v3 Pro Mini work ?
I have this board, which has the addition pinouts

On your board, which way does the switch/jumper give low/high power?
Jumper across 3v3 and GPIO2 gives high power??

Sounds good reference your new PCB's.

We're getting there!!

Nigel.

Oops. I have a feeling that the jitter is caused by the negative PPM used by Futaba. You can try changing "attachInterrupt(1, ppm_fun, RISING);" in your Tx PPMInitialization(); function to "attachInterrupt(1, ppm_fun, FALLING);". I didn't think about that since my 9x uses positive PPM.

You should confirm that works by connecting your Rx to the computer and start serial monitor at 38400 baud. It will print the first 8 channel values in us*2 (0.5 us resolution). If all the values are stable and in the 2000 to 4000 range then it should be safe to connect a servo to it. You can use my plotting program Multi-channle data plot/streaming/graphing thing - Exhibition / Gallery - Arduino Forum to visualize and noise and/or jitter.

I'm not sure what's up with your Pro Mini board. Does it work in spectrum analyser mode? 3.3V to GPIO2 is the high power (20dB) mode, with the red or whatever colour LED you soldered to D1 as an indication. I think if you leave the jumpers unconnected, it defaults to high power mode, which I added as a safety feature.

Edit:

Oh, also all of my code seem to work fine with arduino 1.0.1. I would suggest everyone change to that, since they fixed hardware serial and some servo bugs.

Thanks for the info Zitron.

Unfortunatley, I might have run out of time for now as I am on holiday the next week and when I get back I have to start packing our house up (and my workshop/hobby room) ready for a house move.
That also means I will be unlikely to do any R/C for several months as the 'new' place is a bit run down and needs quite a bit of work to be to my liking - great really as I can make it just what we need for the rest of our lives. I am well into single digit numbers of years until my retirement, and it can't come soon enough!

I'll try to do some work as and when I can, but I really think my 'spare time' will be limited for quite some months ahead.

Nigel.

No worries! Good luck with the house move!

Hopefully in the next couple of months I will have done some definitive in-flight range tests, using a modified ardupilot code that runs on this RF22 board and log RSSI vs distance. It is more or less working, just waiting for better weather for a proper test: Autopilot Flight Test 1 on Vimeo

Great work and nice video.
Was that with UHF R/C ?

Nigel.

Yes, it's a v2 board. I have converted all my RC aircraft to UHF. Working great so far, although I've only been flying line-of-sight.

Guys can you help me out with a hardware question... Is the new rfm23bp http://www.hoperf.com/rf_fsk/fsk/rfm23bp.htm , directly compatible code-wise...Like if some arduino code works for rfm22b it will work also for rfm23bp if I make the correct hardware connections.

Hmm... very interesting... looks like they use the same SI chip with some RF power amp or something, so it should work. There are probably a few things that need to be changed in the code, obvious stuff like power level setting. You do need to be aware that the thing draws 550mA during transmit, so you will need a switch mode BEC or something to power it. It can run on 3.3 to 6V, so that's good.

It is possible to use a RFM23 as the tx and the (probably cheaper) RFM22 as the rx, so you can reuse the rx boards. This is very cool!

Any ideal on prices and availability??

Thanks for the answer, nope no idea...Melih says he will use these in the new version of Openlrs, but there is a long time with no activity...He says he will also probably sell the modules, so could be nice as a dealer for us who diy boards...

Modules output power probably varies with the voltage used right....Currently we use 3.3v right? I can't find info in the datasheet on how much power this module outputs at 3.3V, if its about 500mW that would be nice...I wouldn't even ramp it to 1W.

I'm not sure you can change output power with voltage. Some versions of the datasheet says you can change power from 1dBm to 30dBm with register settings, just like the RFM22, however, the datasheet on hoperf website has incomplete info...

Although I have recently moved home and have no workshop or modelling facility (yet!) I'm still watching what is going on.
I see Flytron has announced their 1W modules...
http://www.flytron.com/openlrs/212-openlrs-m3-1w-tx-module-for-futaba.html

Would be useful to be able to fly with 100mW and hit a 'get out of jail button' for 1W.

Nigel.

Unfortunately he hasn't yet posted the correct schematics and source code :(.

$110 is a lot of money. I don't think he will be able to sell many at that price considering that you can just get this: Radio Control Planes, Drones, Cars, FPV, Quadcopters and more - Hobbyking $180 with diversity receivers.

A bit of a update, I lost my glider while testing autopilot. Stupid mistake, pulling too hard out of a dive. So I had to get a new one, spent all summer trying to get that flying. During that flight I was able to log RSSI vs distance, you can see the plot. I didn't go very far, only 200m, but if I extrapolate the trend I will probably start to get occasional packet drops at 1km and lose signal completely at 10km.

On the RF22 front, I have managed to get telemetry working on my boards, and fixed some bugs, unfortunately also introduced some new ones that causes the board to lock up randomly and other weird problems.

Yeah for us who know how cheap it is to actually build such an unit 110$ is very high.. That Rmilec unit is crap people say..

Thanks for the progress report, sorry about the glider.

Hi guys,

Just to let you know that I found a problem with my board design. It the way I am using the resistor dividers to shift 5V from arduino to 3.3V for the RFM22. Because I have modified the RF22 library to run at very high speed, the resistors and the capacitance of the traces begin to act like a RC filter. This can corrupt the SPI data, causing lockups. This means that the SPI bus is operating very close to the limit, voltage problems with power supply can easily cause a lockup, especially if you run a lot of servos. If you only use the board for spec scan or telemetry you may not have this problem at all.

As you can see here, the SPI clock out from arduino (blue) is distorted when it gets to the RF22 module (yellow). This screen shot is a bit exaggerated because I was using X1 probe, it's better with X10.

Solutions:

  1. Software solution: reduce SPI speed, change the SPI speed down to 2MHz in the RF22.cpp file. Change the line in RF22::init() to SPI.setClockDivider(SPI_CLOCK_DIV8);
  2. Hardware solution: reduce resistor values. I tried halving the resistor divider values (R2 - R7), and it works much better. Replace 1K with 470 Ohm, and 1.5k with 680 Ohm.
  3. Both. <-- I recommend this for best reliability

Hello
Can you show yours antennas ? :slight_smile: