How to clean up a serial data radio signal?

TERD

New Member
i ripped a very small (postage stamp sized) 1.2ghz transmitter out of a wireless pinhole camera. I am using it to transmit serial data. When the data comes out of the receiver module, it is slightly noisy.

I've tried cleaning it by readadc then switch on output0 if the result is over a certain level. it works but only at a baudrate of 300 with is far off the 9600 i require :(

Here is the code i'm using to clean the signal

Symbol Signal = b0
Symbol CutOffLevel = 130
Symbol Out = 0

setfreq m8

Clean:

readadc 0,Signal
if Signal > CutOffLevel then
high Out
else
low Out
end if

goto Clean


What is the best way of cleaning a radio signal for speed?
 

MFB

Senior Member
Not so simple

Well, this is a pretty big topic! The simple way to clean-up digital signals is to use a Schmitt trigger circuit. The 74HC14 chip contains six such circuits but they also act as inverters. It may therefore be necessary to use two in series if you need to maintain the polarity of the signal. A series input resistors, with a capacitor to ground, can also be added to reduce high frequency noise (but too much filtering will also kill your signal).

This simple stuff works well on boards or when using cables but is unlikely to be the only conditioning that you will need to reliably transmit data over a wireless link. Basically the complication is due to the fact that the average dc level seen at the output of the wireless receiver is dependant on the characters being sent and it becomes difficult for the decoder to decide if a level is a logical ‘1’ or ‘0’. Do a forum search for ‘433 MHz and communication’ as the necessary encoding and decoding technique have been covered many times in the past. I normally overcome this problem by using frequency modulation (FSK) and forgetting about amplitude.
 

manuka

Senior Member
Range,speed,cheapness. Choose 2 of 3... However well done on this hack! Any pictures? Aside from this trade off, 9600bps with cheap RF data units is beyond spec. I'm afraid, as the PICAXE family normally communicate reliably over wired links at just 2400bps. Even with gold plated 433MHz modules, lowering the baud rate (to often 300bps) is typical when the going gets tough. And with RF it WILL get tough, thanks to "noise" polluting the spectrum.

If you want speed consider 2.4Ghz XBee "ZigBee" etc, although links will be rather line of sight(LOS). What range are you after?
 

TERD

New Member
I'm getting about 200 meters range which is ok for what i need it for. I've done relable tests with picaxe at 19200bps @ 16Mhz over wired links: you just need to fine tune the frequency with calibfreq command. If i can get a clean enough input signal then speed won't be a problem. i'm always expecting there to be some noise, just need the data comming in to resemble the data transmitted.
 

Attachments

moxhamj

New Member
Have you got a CRO? If not, it will help a lot with debugging.

Re noise, there are several sorts of Tx/Rx units and they go noisy in different ways. The modules Manuka mentioned already have schmitt triggers in them so they are already cleaning up a noisy signal. Thus they go further than you expect and then fail rather spectacularly beyond that point with random highs and lows that can't be cleaned up.

But you are dealing with the raw RF signal so you should be able to clean it up. It will have a DC output value when no data is being transmitted that might be 0V or might be 2.5V or might be some other value. When data comes through this DC point will vary - eg if it was at 2.5V it might go +/- 0.5V so from 2 to 3V. You need to know the DC value and the AC voltage swing. Then you can set up a comparator (eg a 741 or 1/4 of a 324) with the input going to the + and the - connected to a reference voltage.

If the DC values varies all over the place it is possible to use AC coupling with a 1uF greencap or bipolar capacitor.

Then you need a preamble to set the bias - usually a string of ascii U characters which are 01010101 in binary. Send 5-10 of these before the data.

There are other more complex error correction systems but for starters, can you post your picaxe code please?
 

jglenn

Senior Member
You have adapted a video transmitter to send slow data, perhaps you need some kind of filter set for the data rate, to exclude noise outside of that band.

The zigbees look very attractive, 1 mile range and low cost, but I have read the specs and you almost need a pHd to figure out the operation. There might be canned routines available to run them on a cpu, but will involve a high level language platform, like c.

Radio is very problematic, and more so when you mix in serial data. Typical difficulties are antenna orientation, noise, and signal loss and corruption.
I am considering this unit for future use:

http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/27985/List/1/ProductID/440/Default.aspx?SortField=ProductName,ProductName

Don't really need a transceiver, but it might be useful. Could send the data twice in a small block, the chip at the receiving end would compare to make sure they are the same, if not, request retransmission. This technique should prevent any errors, if enough signal is getting thru.

If anyone knows of cheaper radios that will go 800' like this one, even just xmtrs and receivers, please let me know!
 

moxhamj

New Member
I'll second that comment about zigbees needing a PHD. I have a couple of zigbees sitting in a parts drawer but they just seem too complex. Manuka is the expert on turning the complex into something simple...

My current experiment at the moment is modifying 3W 2.4Ghz video/audio transmitters for data. I've certainly got some great range - 400 metres through trees. However, when using the audio channel for data the Rx unit turns off after 5 seconds if it doesn't get a valid video signal. So I am probably going to have to hook up a video camera just to get the video signal to keep the system awake.
 
Last edited:

hippy

Ex-Staff (retired)
I'll second that comment about zigbees needing a PHD. I have a couple of zigbees sitting in a parts drawer but they just seem too complex.
That's what comes from reading the XBee manuals :)

Forget the reams of technical description; once configured ( that's stored in Eeprom so a one off operation ), they are very simple in practice - transparent bi-directional serial bridges.

Configure them as 'broadcast' on the same RF channels and you effectively have 433MHz but easier to use.

Getting more complex you can create matched pairs, groups and so on, but it's not a necessity. It's like ethernet, there are loads of options you could set on your PC/NIC to configure that but in reality most people don't.
 

leftyretro

New Member
I'll second that comment about zigbees needing a PHD. I have a couple of zigbees sitting in a parts drawer but they just seem too complex. Manuka is the expert on turning the complex into something simple...

My current experiment at the moment is modifying 3W 2.4Ghz video/audio transmitters for data. I've certainly got some great range - 400 metres through trees. However, when using the audio channel for data the Rx unit turns off after 5 seconds if it doesn't get a valid video signal. So I am probably going to have to hook up a video camera just to get the video signal to keep the system awake.
Ha, try as we might to stay with the Picaxe philosophy that simple is best, sometimes the world just doesn't seem to want to play along ;)

Maybe you just need to send a pulse stream to the video input that looks like a video frame, say at mixed horzontal and/or vertical sync timings ?
 

Wrenow

Senior Member
With the Nordics from Sparkfun http://www.sparkfun.com/commerce/product_info.php?products_id=151
you have a range of 280m, should get you close. With a suitable external antenna version, and good antenna, perhaps even better. One think I like is the burst mode. Haven't gotten/played with them yet, but on the agenda. Surprisingly, cheaper than the Xbee/Zigbee. Both seem to have some error correction built in.

Just a thought.

Cheers,

Wreno
 

jglenn

Senior Member
Lizzie/wrenow: thanks for that suggestion, I will check those radios out.

In case anyone doesn't know the story of Sparkfun, it was begun by a couple recent college grads who wanted to see if they could start a company instead of getting a real job!

They have a knack for finding unusual goodies for the hobbiest and pro alike, the co. took off and now has 15 people. They are all over the internet and hobby boards, even Nuts and Volts and Servo mags here in the USA.

I will also be perusing this board for serial comm software and techniques.
Always seems to be a barrel of monkeys to me!

I've mainly used RS232 and 485, plugged in ethernet cables, and dabbled in milstd1553A, a 1MHZ bit rate LAN for uncle sam goodies...
:cool:
 

jglenn

Senior Member
here's a cool radio

Zigbee made easy! A few digital I/O's and analogs, simple operating system to set up. Don't have to use the zigbee protocol, costs 20 grand anyway..

http://www.dlpdesign.com/rf/rf2.shtml

Still trying to find an app for my PICAXE chips. Probably will use for serial something or another. But it looks like serial ties it up pretty much, so it will be hard to use for any other real time stuff at the same time. Not sure really.
:confused:
 
Top