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

zitron:
Wait are you sure you measured the Futaba modules?

I have a 9X which I think uses JR modules, but also measures 54x34??

Just re-checked and the absolute maximum space inside the Futaba module case is 34mm wide and 53mm length.
I can just get an Arduino Pro Mini board inside the case, positioned with the length of the Pro Mini across the case, so giving ~34mm of available space inside the case.
5v version

or
3v3 version

Maybe I'll hack a Pro Mini and RFM22B onto a bit of Vero board and see what happens...

Nigel.

Huh so futaba and JR use the same size boards...

A 50x33mm board is definitely doable with through hole 328, I can start working on it if you still want one. We can split the cost of ~£20 for 10 boards.

Which pro mini do you have? If you have the 5V version you will need to use a 3.3V reg for the RF22, and some resistors to divide the arduino SPI output to 3.3V. It could be quite simple if you have the 3.3V version, but I am not sure if my code will work at 8MHz.

I have a 5v Pro Mini that I used on an early WiiCopter - still have a couple of Jussi's PCB's if you want one FOC?

I'm happy to split board costs with you for something that will fit both Futaba and JR.

Look at the case photo I posted a couple of posts back, it would be great if the board would fit and be able to connect the Tx pins into the board.
It will need a 5v reg as the Futaba Tx has battery supply voltage on one of the pins.
I can send you a spare Futaba case for testing.

Flytron makes a JR to Futaba adapter board for the Tx
http://www.flytron.com/123-futaba-jr-module-adapter.html

Perhaps we can continue this by PM and personal email exchange?

Nigel.

A Futaba module would be perfect. (I have a 9C) :slight_smile:
If needed I can measure the module box.

The only thing is that the module has a odd pin spacing for the connector.

Btw one cool thing would be to have a smaller RX pcb, will less pins to be able to easily fit into a plane, quad,...

If you can confirm that a 50x33mm board will fit inside your Futaba module it will be great.

I think you will have to solder your own connectors, because I'm pretty sure JR and Futaba pins are different.

I may look into smaller SMD versions if there people are interesed.

I opened my 35Mhz module and inside I find a PCB covered with a metal casing.

Measuring: 34.08 x 53.75 x 17mm

Hold fire on a new Tx PCB for a bit Zitron.
I'm building a test Tx rig to fit inside the module case.
I'm going to try it with an Arduino Pro Mini board at 3v3 & 8Mhz (wired 'dead bug' style) as the board will just fit across the Tx module case.
Should make the design simpler if it works out.
I'll post my findings here...

Nigel.

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.