Go Down

Topic: Cheap UHF spectrum analyzer (and RC tx rx) using RFM22 module (Read 53095 times) previous topic - next topic

Nandox7

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

Measuring: 34.08 x 53.75 x 17mm


Devonian

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.

Devonian

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.

Nandox7

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

See here: http://www.rcgroups.com/forums/showpost.php?p=3954001&postcount=2

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.

zitron

#110
Jul 18, 2012, 04:21 pm Last Edit: Jul 18, 2012, 05:14 pm by zitron Reason: 1

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.

Devonian

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:
http://arduino.cc/forum/index.php/topic,93777.msg767772.html#msg767772

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
http://proto-pic.co.uk/arduino-pro-mini-328-3-3v-8mhz-new/

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.

zitron

#112
Jul 19, 2012, 11:40 pm Last Edit: Jul 19, 2012, 11:47 pm by zitron Reason: 1
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 http://arduino.cc/forum/index.php/topic,80462.msg607817.html#msg607817 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.

Devonian

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.

zitron

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: https://vimeo.com/43210881

Devonian

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

Nigel.

zitron

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.

msev

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.

zitron

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??



msev

#119
Oct 05, 2012, 08:56 am Last Edit: Oct 05, 2012, 09:01 am by msev Reason: 1
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.

Go Up