Go Down

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

zitron

Feb 25, 2012, 09:10 pm Last Edit: Nov 18, 2012, 06:49 pm by zitron Reason: 1
I was inspired by the OpenLRS project to make my own UHF remote control and telemetry for my FPV planes, but much cheaper!

You can get the RF22B 100mW (20dbm, many km range) tranceiver modules from HopeRF very cheaply, I got 6 for ~30 Euro. They are great transceivers, and there is a arduino library for them: http://www.open.com.au/mikem/arduino/RF22/. In the example code, there is a spectrum scanning demo. I changed the code a bit and wrote a PC program to make it easier to use:

250MHz to 960MHz sweep:


Close up at 434MHz:


Pictures of the board:




The PC program (in C#, a modified version of my plotting program: http://arduino.cc/forum/index.php/topic,80462.0.html) and arduino code are attached.

Have fun!


Edit: The arduino code posted here may have some problems, see this post for the new code: http://arduino.cc/forum/index.php/topic,93777.msg767772.html#msg767772

New version of PC program: http://arduino.cc/forum/index.php/topic,93777.msg767889.html#msg767889

Update on potential board problem: http://arduino.cc/forum/index.php/topic,93777.msg989562.html#msg989562

New version with telemetry support: http://arduino.cc/forum/index.php/topic,93777.msg1000972.html#msg1000972

msev

Interesting, so this is a spectrum analyser....Have you also made the openlrs tx and rx yourself?
I would like to try and make my own openlrs boards and need some help, since the guys at the flytron forum are not answering my questions  :)..
Firstly, one the original openlrs board, he is running the atmega328 at 3.3V and 16MHz right? Since he needs 3.3V for rfm22..Do I see correctly in the schematic?

zitron

Yeah he uses 3.3V at 16MHz, which is not recommended, I run mine at the normal 5V. Also, he uses software spi which I find kind of weird, I use hardware spi...

I've made some boards (see attached picture) I tested to 600m range on the ground, through some houses. I also tested it on my helicopter last weekend, works great!

msev

#3
Mar 14, 2012, 08:39 am Last Edit: Mar 14, 2012, 08:45 am by msev Reason: 1
Very nice lookin' boards really  8).... So you have some LLC to convert the 5V to 3.3V or so to not damage the rfm22b? I see the pcb is soldering friendly :D..
Did you have to modify the code in anyway to make it work on your boards, are is the board layout, per schematic and per code - just that it runs on 5V?
Are you willing to contact me by mail with some more details?

Do you sell the pcbs?

Another question about Melih's boards,...Does he have to use a 3.3V ftdi basic breakout to upload code or can he use 5V? I'm asking this because I don't know if current is flowing through the circuit while uploading a sketch, in that case 5V would damage the rfm22b.

A online friend of mine also build a spectrum analyser using openlrs...you guys are smart....I would  need one for 5.8ghz but he said it would be  hard to source parts for 5.8ghz... =(

zitron

My boards are laid out completely differently compared to the OLRS, I did not used his code at all, but wrote my own code using the arduino RF22 library instead. I have attached my schematics. Flytron's code will not will on mine without significant modifications, and vice versa. My atmega328 runs at 5V, and the RF22 runs at 3.3V from a SMD regulator on the back of the board, the 5V SPI commands from arduino are sent to the module after going through a voltage divider.  My boards are a little to big, I'm planning to make them smaller the next time.

I can send you a couple of the boards free if you pay for the postage, but please understand that I don't really want to start a business selling boards!

msev

#5
Mar 15, 2012, 03:59 pm Last Edit: Mar 15, 2012, 04:32 pm by msev Reason: 1
Thanks for the schematics! I would be interested :) in a few (3 or 4), I don't care about size, for me bigger is better since its easier to solder slightly bigger stuff..Very nice!

Would you also share the code? Is your code also frequency hopping? Do you have failsafe implemented? Do you have rssi implemented (would it be possible to have an audible alarm, if I connected a buzzer to the board), can rssi be taken from the board (on the plane or heli) to an osd? Is it possible to configure the power output of the module - for example to use a booster.

Are you familiar with multiwii (http://code.google.com/p/multiwii/ , http://www.multiwii.com/ )? Probably it would be possible to incorporate multiwii in your design, because the relevant pins (SDA and SCL) for interfacing with sensors are free right?
I would like to have my plane stabilized and autolevel,...Since your board is 5V unlike Melihs, I can use a original wii-motion+ as a gyro,...and as a accellerometer I will use a adxl345 which has already an LLC and voltage reg. on board.

Instead of using a SMA connector like on your photo, could I just solder the coax directly to the pins? (central conductor+shielding)

Are those two leds on the board useful for diagnostic if the boards are working, for example uploading blink sketch?

How far away did you go with your heli :D?

zitron

#6
Mar 15, 2012, 11:57 pm Last Edit: Mar 15, 2012, 11:59 pm by zitron Reason: 1

Would you also share the code? Is your code also frequency hopping? Do you have failsafe implemented? Do you have rssi implemented (would it be possible to have an audible alarm, if I connected a buzzer to the board), can rssi be taken from the board (on the plane or heli) to an osd? Is it possible to configure the power output of the module - for example to use a booster.


Ok lots of questions...

I yeah I will share the code, there are some problems with it. The arduino servo library creates weird glitches, so I had to use software servo. I would also like to test it some more before I give to other ppl. I don't have FH right now, but the RF22 library supports it, so will not be too difficult if you want to add it yourself. RSSI yes, you will have to use analogWrite and low pass filter it if you want to output a voltage though. I actually have a header to add a switch to change the power from 1db to 20db for range testing.


Are you familiar with multiwii (http://code.google.com/p/multiwii/ , http://www.multiwii.com/ )? Probably it would be possible to incorporate multiwii in your design, because the relevant pins (SDA and SCL) for interfacing with sensors are free right?
I would like to have my plane stabilized and autolevel,...Since your board is 5V unlike Melihs, I can use a original wii-motion+ as a gyro,...and as a accellerometer I will use a adxl345 which has already an LLC and voltage reg. on board.

Instead of using a SMA connector like on your photo, could I just solder the coax directly to the pins? (central conductor+shielding)

Are those two leds on the board useful for diagnostic if the boards are working, for example uploading blink sketch?


Ok a bit of bad news. I planned to use the arduIMU for stabilization, so I did not really want to use I2C. So although you can use SDA and SCL, they are also used for the LEDs! So if you want to use I2C, you can't use the on-board LEDs.

Yeah you can definitely just solder coax directly to the board, that's what I did on my prototype.


How far away did you go with your heli :D?


Not very far, maybe 25m. It's a small HK450, I can only see it that far...

msev

Hi.. What about failsafe? Do you have it already implemented, could it be implemented that one would preconfigure the arduino sketch to a certain level of rssi, and it would go in to failsafe then...

Did you make your own antennas for your LRS? Are you planning to make a LOS test? People get about 4km with openlrs on omnidirectional antennas..


zitron

No I do not have failsafe yet, I've only just started the project! I have the bare minimum: a tx which reads PPM and a rx that drives servos (and some basic mixing). If you want failsafe you will have to do it yourself. Are you able to write code for arduino?

I did make my own antennas, see the pictures in the first post. I want to do a LOS test but it will be difficult where I live.

I have another person ask me for some boards, I only have 4 boards left, if he still want them, you can each have 2. PM me where you live I'll look up how much it costs to post from the UK. Or I can give your the gerber files so you can have boards made yourself. Make sure you can source all the components, I have attached a bill of materials.

zitron

#9
Mar 17, 2012, 03:26 am Last Edit: Mar 17, 2012, 03:30 am by zitron Reason: 1
Here's a scanned picture of the board, so you can see the details. Note that there is a mistake, R1 should connect to the atmega reset pin (the square pin), not to C5. It still works, but if you have problems with serial auto-reset, you should cut the trace and connect R1 to reset directly.

msev


zitron

Good news, I decided to make a new version of the board (just smaller and fix the reset resistor). So if you guys still want the current boards you can all of them (3 each).

Mauzer


Devonian

Hello Zitron,

Great work and very interesting that you made your own design boards.

I see you are in the UK, have you seen the FPVUK forum post(s) regarding 459MHz use?
It would be good to see you over there.

http://www.fpvuk.org/forum/index.php?topic=2551.new;topicseen#new

What are your plans for the smaller PCB?

I'd be very interested in a couple of smaller (Futaba module compatible) boards - I'm willing to assist with costs.

Regds,

Nigel.

msev

#14
Mar 21, 2012, 04:31 pm Last Edit: Mar 21, 2012, 04:38 pm by msev Reason: 1
Devonian are you willing to modify the interesting features of openlrs firmware (failsafe, rssi etc.) to work on this nice hardware?

Edit: Zitron hope you received my pm with my address. Zitron hope you retain the same connections on your board so more code fluent friends on this forum can help me out with the code :D

Go Up