EmbeddedRelated.com
Forums

How would you do radio data links?

Started by Tim Watts January 27, 2010
Hi,

Quick intro - I'm a linux progammer/sysadmin. I play with AVRs (ATMegas 
mostly) for fun and have got on well with them.

I'm looking to set myself a moderate project next year which is to do with 
home automation (thermostats etc). Although I *could* use RS485, CAN or some 
other wired links, I rather fancy playing with radio for the educational 
value.

So I'm after something that's:

1) Cheap hardware - say $20 or less for the radio module;

2) Usable data rate around 100kbit/sec

3) Range: 10-20m through brick walls (no foil/rebars etc)

4) Half duplex

Did ask this on sci.electronics.design - they produced some good ideas 
(summarised below) but suggested asking here too...

So it seems to be a toss up between:

a) simple tincan radio transceiver (433/868MHZ or somesuch unlicensed band 
in the UK) that can send a 0 or a 1 over the carrier by flipping a digital 
input.

b) Zigbee, eg an Xbee module.

a) Involves obviously, timing sensitive programming, computational overhead 
and supporting some form of OSI Layer 2 in software. This is doubtless the 
cheapest solution assuming I don't cost my time (hey it's a hobby).

b) By my reading, Zigbee does all the packet framing, collision 
detection/retries and deals with all the wibbly timing sensitive stuff for 
you. Cost seems very reasonable for what it does, but obviously puts a high 
capital overhead on a module based on a cheap-as-chips AVR.

So the question is: what would you do, assuming cost was an important 
priority, or perhaps what have you done successfully, along these lines? 
Maybe there's a c) option I haven't considered...

I should note I don't have spectrum anaylsers/debuggers to hand, though at a 
pinch I could go to an ex company and use theirs - but not too many times! 
So I have to work blind most of the time as far as the RF stuff goes, 
preferably without Ofcom knocking on the door ;->

Many thanks for any random thoughts :)

Cheers

Tim

-- 
Tim Watts

Managers, politicians and environmentalists: Nature's carbon buffer.

Tim Watts wrote:
> Hi, > > Quick intro - I'm a linux progammer/sysadmin. I play with AVRs (ATMegas > mostly) for fun and have got on well with them. > > I'm looking to set myself a moderate project next year which is to do with > home automation (thermostats etc). Although I *could* use RS485, CAN or some > other wired links, I rather fancy playing with radio for the educational > value. > > So I'm after something that's: > > 1) Cheap hardware - say $20 or less for the radio module; > > 2) Usable data rate around 100kbit/sec > > 3) Range: 10-20m through brick walls (no foil/rebars etc) > > 4) Half duplex > > Did ask this on sci.electronics.design - they produced some good ideas > (summarised below) but suggested asking here too... > > So it seems to be a toss up between: > > a) simple tincan radio transceiver (433/868MHZ or somesuch unlicensed band > in the UK) that can send a 0 or a 1 over the carrier by flipping a digital > input. > > b) Zigbee, eg an Xbee module. > > a) Involves obviously, timing sensitive programming, computational overhead > and supporting some form of OSI Layer 2 in software. This is doubtless the > cheapest solution assuming I don't cost my time (hey it's a hobby). > > b) By my reading, Zigbee does all the packet framing, collision > detection/retries and deals with all the wibbly timing sensitive stuff for > you. Cost seems very reasonable for what it does, but obviously puts a high > capital overhead on a module based on a cheap-as-chips AVR. > > So the question is: what would you do, assuming cost was an important > priority, or perhaps what have you done successfully, along these lines? > Maybe there's a c) option I haven't considered... > > I should note I don't have spectrum anaylsers/debuggers to hand, though at a > pinch I could go to an ex company and use theirs - but not too many times! > So I have to work blind most of the time as far as the RF stuff goes, > preferably without Ofcom knocking on the door ;-> > > Many thanks for any random thoughts :) > > Cheers > > Tim >
eZ430-RF2500
mike <spamme0@go.com>
  wibbled on Wednesday 27 January 2010 22:09

Hi Mike,

> > eZ430-RF2500
Wow. I am seriously impressed with the CC2500 chip. 500kbit/sec or 250 with manchester encoding. Found a module with civilised headers for people like me who can't solder 4mm surface mount (!): http://www.quasaruk.co.uk/acatalog/FM_Transceiver_Module.html 5.50 UKP - very cheap too. OK - I'm sold. I should get a devel kit and try this out :) Thanks for that Cheers Tim -- Tim Watts Managers, politicians and environmentalists: Nature's carbon buffer.
In article <hjqc88$5tq$1@news.eternal-september.org>, tw@dionic.net 
says...
> Hi, > > Quick intro - I'm a linux progammer/sysadmin. I play with AVRs (ATMegas > mostly) for fun and have got on well with them. > > I'm looking to set myself a moderate project next year which is to do with > home automation (thermostats etc). Although I *could* use RS485, CAN or some > other wired links, I rather fancy playing with radio for the educational > value. > > So I'm after something that's: > > 1) Cheap hardware - say $20 or less for the radio module;
Look for wireless modules on Farnell/RS/etc...
> 2) Usable data rate around 100kbit/sec
At those data rates you will be in the 2.4GHz band (zigbee/wifi/bluetooth) In UK at least very little above 25KHz channel bandwidth is allowed. Primarily because most of the original international allocations where based on speech/music/TV. Using some other bands could well get you into trouble. See IR2030 document and similar on www.radio.gov.uk . Unless you have something in home automation that uses a hell of a lot of data I do not see why you need 100kbps. There are plenty of cheap 433/459 that can do 4800bps or maybe more with modem chips.
> 3) Range: 10-20m through brick walls (no foil/rebars etc)
Short range data/telemetry
> 4) Half duplex > > Did ask this on sci.electronics.design - they produced some good ideas > (summarised below) but suggested asking here too... > > So it seems to be a toss up between: > > a) simple tincan radio transceiver (433/868MHZ or somesuch unlicensed band > in the UK) that can send a 0 or a 1 over the carrier by flipping a digital > input.
In UK 433MHz is pretty full of all sorts of things from Radio Ham to car key fobs. 459MHz is available also Have a look also at http://www.lprs.co.uk/ http://www.woodanddouglas.co.uk/ -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
Hi Paul,

Paul Carpenter <paul@pcserviceselectronics.co.uk>
  wibbled on Thursday 28 January 2010 00:14


> At those data rates you will be in the 2.4GHz band > (zigbee/wifi/bluetooth)
OK
> In UK at least very little above 25KHz channel bandwidth is allowed. > Primarily because most of the original international allocations where > based on speech/music/TV. > > Using some other bands could well get you into trouble. > > See IR2030 document and similar on www.radio.gov.uk .
I'll try when the server isn't down.
> > Unless you have something in home automation that uses a hell of a lot of > data I do not see why you need 100kbps. > There are plenty of cheap 433/459 that can do 4800bps or maybe more with > modem chips.
I'm allowing for a couple of dozen devices (and long term, many more) on the same RF channel. Allowing for collisions, and protocol overhead, 4.8k won't be anywhere near enough. Granted you're not a mind reader so you don't know exactly what I'm envisaging, 100k was a sensible estimate to allow for that and making further allowances for occasional bulk data transfer like firmware updates (so might want to shovel 32kB across the link to a dozen deices in succession in a timely manner without drowning out the channel). "Lightweight cheap radio network" rather than "telemetry" would probably be a fair description.
>> 3) Range: 10-20m through brick walls (no foil/rebars etc) > > Short range data/telemetry > >> 4) Half duplex >> >> Did ask this on sci.electronics.design - they produced some good ideas >> (summarised below) but suggested asking here too... >> >> So it seems to be a toss up between: >> >> a) simple tincan radio transceiver (433/868MHZ or somesuch unlicensed >> band in the UK) that can send a 0 or a 1 over the carrier by flipping a >> digital input. > > In UK 433MHz is pretty full of all sorts of things from Radio Ham to car > key fobs.
That occurred to me.
> 459MHz is available also
That's useful - thanks. I had a look at the Ofcom document, but it's not very easy to read for someone not used to it.
> Have a look also at > > http://www.lprs.co.uk/ > http://www.woodanddouglas.co.uk/ >
There have some interesting kit - thanks. I think I'm settled on the CC2500 chip now - 2.4GHz and more bitrate than I could use with a uController. I'm ploughing through the datasheet to decide if it really is the one. Many thanks for your thoughts, Tim -- Tim Watts Managers, politicians and environmentalists: Nature's carbon buffer.
Tim Watts wrote:
> Hi Paul, > > Paul Carpenter <paul@pcserviceselectronics.co.uk> > wibbled on Thursday 28 January 2010 00:14 > > >> At those data rates you will be in the 2.4GHz band >> (zigbee/wifi/bluetooth) > > OK > >> In UK at least very little above 25KHz channel bandwidth is allowed. >> Primarily because most of the original international allocations where >> based on speech/music/TV. >> >> Using some other bands could well get you into trouble. >> >> See IR2030 document and similar on www.radio.gov.uk . > > I'll try when the server isn't down. > >> Unless you have something in home automation that uses a hell of a lot of >> data I do not see why you need 100kbps. >> There are plenty of cheap 433/459 that can do 4800bps or maybe more with >> modem chips. > > I'm allowing for a couple of dozen devices (and long term, many more) on the > same RF channel. Allowing for collisions, and protocol overhead, 4.8k won't > be anywhere near enough. Granted you're not a mind reader so you don't know > exactly what I'm envisaging, 100k was a sensible estimate to allow for that > and making further allowances for occasional bulk data transfer like > firmware updates (so might want to shovel 32kB across the link to a dozen > deices in succession in a timely manner without drowning out the channel). > > "Lightweight cheap radio network" rather than "telemetry" would probably be > a fair description. > >>> 3) Range: 10-20m through brick walls (no foil/rebars etc) >> Short range data/telemetry >> >>> 4) Half duplex >>> >>> Did ask this on sci.electronics.design - they produced some good ideas >>> (summarised below) but suggested asking here too... >>> >>> So it seems to be a toss up between: >>> >>> a) simple tincan radio transceiver (433/868MHZ or somesuch unlicensed >>> band in the UK) that can send a 0 or a 1 over the carrier by flipping a >>> digital input. >> In UK 433MHz is pretty full of all sorts of things from Radio Ham to car >> key fobs. > > That occurred to me. > >> 459MHz is available also > > That's useful - thanks. I had a look at the Ofcom document, but it's not > very easy to read for someone not used to it. > >> Have a look also at >> >> http://www.lprs.co.uk/ >> http://www.woodanddouglas.co.uk/ >> > > There have some interesting kit - thanks. > > I think I'm settled on the CC2500 chip now - 2.4GHz and more bitrate than I > could use with a uController. I'm ploughing through the datasheet to decide > if it really is the one. > > Many thanks for your thoughts, > > Tim >
The demo kit that came with the TI chips had a USB dongle with radio and another remote controller with radio that measured temperature. Seemed to work just fine. I assume they included all the source code, but I decided bluetooth better suited my needs. Doesn't meet your cost goals and maybe not data rate, but one interesting thing to look into is RS-232 to bluetooth adapters. They're spendy at retail, but come in oem versions. If you troll EBAY, I've bought 'em for as little as $15. I build all my PIC projects with serial interfaces and let a $1 PDA do all the user interface, storage and math work. I can plug on a bluetooth/serial converter and go wireless without writing a bit of radio code or changing anything but the serial port number on the PDA end.
mike wrote:
> > I build all my PIC projects with serial interfaces and let a $1 PDA do
What $1 PDA have you found ?? don
don wrote:
> mike wrote: >> >> I build all my PIC projects with serial interfaces and let a $1 PDA do > > > What $1 PDA have you found ?? > > don
That's not a simple question in context. Depends a lot on the software you have available. There's a trial version of Hotpaw BASIC that runs on the Palm and the limits are tolerable. Little more complex to program than visual basic, but has similar functionality to create the user interface. Supports serial bluetooth and serial infrared for close work. So, my favorite Palm is the PalmIIIxe. Has good battery life and is pretty-much indestructible. They have a real serial port inside. That may or may not be good. For RS-232, you want that. For direct connection to a microcontroller, you might want inverted TTL outputs that you get from newer machines. Problem is that there's no usable backlight and it's 160x160 pixels. The good news is that they're under a buck at garage sales. Free if they left the battery in and you show them all the corrosion. Pita to clean up, but rarely hurt anything. ASKING prices are typically $25-$100, but most people realize that's insane if you talk to them about keeping it outa the landfill. The Handspring Visor has similar capability, but the cables for serial interface are much less available. Non-volatile memory modules are cool, but rare. Palm m500 has a SD card slot if you need it. About the same price but less available. Stay away from the Palm V/Vx. It's an orphan that's not hardware compatible with any other palms. The PalmIIIC has a MUCH better Backlit color display. They go for about the same price, but are much less common. For Bluetooth, the sweet spot seems to be the Tungsten T3. Bought one of those last week for a buck at a recycler. Got another for a buck at a garage sale last year. I haven't found a decent "legal" compiler for Windows CE PDA's. The chip and OS changes over the years don't help. Sweet spot for windowsCE is the Dell Axim X5. Good capability, nice display, but those will set you back $3-$10. The X5 is a good choice because it's rugged. Has a barrel connector for the charger. Has a relatively large, rugged data connector. Gomadic has data connectors for cheap. I'd switch all my stuff to the X5 if I could get my hands on a legal version of Basic4PPC or similar compiler. Older HP Jornada's can be had dirt cheap. Make excellent mp3 players, but the SH3 chip and old version of the OS make them different to program with different tools. Not worth the effort. Stay away from the Viewsonics. One of the most serious issues for this kind of application is the flimsy data connector. They seem to get smaller and more delicate every generation. That was my motivation for switching to ir or Bluetooth. The Dell Axim X51v is an extremely nice PDA for use as a user interface, but the darn things cost $50. They never made a serial interface cable for it. I never had the motivation to build one. Buetooth works and there are no issues with breaking the electronics or the connector. So, bottom line is that you can't get on ebay and have a decent pda delivered to your door for a buck. But they ARE everywhere at that price. Just gotta keep your eyes open. Stand on your front porch and yell, "I need an old PDA." You'll probably collect more than you could ever use. If you're in a hurry, $10 will get you one off craigslist... Remember, Grasshopper, ASKING price very different from TRANSACTION price. Reason they're selling it is cause their phone does everything. They don't want a PDA any more...and neither does anybody else...except me. Sure, they want the $500 that they paid back, but that ain't gonna happen. Big supply + Zero demand + Excellent negotiation skills >> Low transaction price.