Go Down

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

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

Go Up