Pages: [1] 2   Go Down
Author Topic: Seriously Cheap Arduino Based Remote Sensor  (Read 7492 times)
0 Members and 1 Guest are viewing this topic.
Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or SCABRS for short (don't you just love Acronyms ? ).  Several threads recently have inquired about Wireless remote sensors especially at the low cost end of the market.  This is my take on how to do it really cheaply, total outlay around £20 ($32 ish).  Its 2 parts, the home made Arduino clone which uses the same circuit as the Modern Devices RBBB ( http://moderndevice.com/RBBB_revB.shtml ) which is helpfully in the public domain (it has a pin 13 LED and resistor, which the RBBB doesn't have) , and its shield which contains a Dallas DS18B20 digital thermometer, a Seeed Studios 433 mHz transmitter  ( http://www.seeedstudio.com/depot/433mhz-rf-link-kit-p-127.html ) and a LDR. Both are built on offcuts of stripboard with a few components I bought especially. If you're in the UK http://www.bitsbox.co.uk/ sells everything (they didn't have a 328 with a bootloader which I bought off ebay) they do sell a plain 168 if you're prepared to burn your own bootloader. The transmitter came straight from Seeed.  

  It measures the light level and temperature of anywhere in range of the receiver.  The Main board has a standard 6 pin interface for a FTDI Cable or similar USB to TTL serial interface so it can be programmed without too much difficulty although if you really wanted it as cheap as possible, program the ATMEL 328/168 in a separate Arduino and plug it in.  



The 'shield' , an even smaller offcut of stripboard with a socket for the transmitter (disn't fancy soldering it directly), dallas DS18B20 and its 4.7k pullup resistor, and an LDR with a 10k resistor in a voltage divider.The  8 pin shield cunningly straddles 2 Analogue pins, 2 Digital (3 including 13), 5v and ground altogether on one side of the chip. The transmitter and the Dallas use a digital each and the LDR uses an analogue - 1 spare for future expansion smiley-wink .   In true cheapskate fashion, the pins on the shield are resistor lead offcuts soldered straight into the stripboard using a socket as a jig.  The brown and white wire is a 35cm long (half wave ;D )antenna for the transitter.



This is for the reasonably experienced, if you're struggling coming to terms with Blink and an LED, leave it alone.  smiley-wink  Stripboard needs a steady hand to solder if you're used to nice solder resist commercial boards....

The transmitter uses the virtualwire library (linked from the Seeed page above) and onewire for the Dallas. If you're experienced enough to make the board, writing the sketch is easy.  

Enjoy.

« Last Edit: September 26, 2009, 04:22:18 pm by stephen_t » Logged


Spokane, Washington
Offline Offline
God Member
*****
Karma: 1
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Heyy, very nice! I just might have to steal your LDR and Temperature sensor idea for my ghetto-duino! smiley-grin

The biggest problem I've had so far is using the VirtualWire to receive something.. then do something based on what it received, I've only got into comparing Strings.. but seems like there's an easier way! smiley-grin

I'm curious, are you using the 5v to power the Transmitter too? Or do you have that running off the power supply itself? The transmitter can handle 12v safely, just ups the range.

One thing I would look at.. I know it's probably not the best idea.. but for my antenna for my transmitter, I tried using a Transformer with half the coil, and the range was nearly tripled from just a regular 17cm wire. (I'm not sure about the transformer specs, it's built into my Electronics Learning Lab from Radioshack) But that just adds to the price smiley-razz
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, the transmitter is just running on 5v, it saves getting involved with getting another line up to it.  It has adequate range for what I have in mind.  The virtualwire library is a bit obscure (to my mind at any rate) but I've got it transferring integers happily enough now which is all it needs to do.  I've turned the bitrate down to 500 since there isn't much data to transfer.  It helps the reliability of the transfer.  Its prone to dropouts when bodies get in the way, but it seems to go through walls without too much difficulty.  I just send the data over and over and if the receiver gets one in ten its OK.  It makes it fairly flexible having an Arduino at each end, but a back channel would be nice.....

I saw your ghetto-duino, but it grates against my cheap skate nature paying radio shack prices and they closed my local branch down years ago anyway.  I bought a protoshield once but having to run links everywhere makes them very messy. Stripboard makes a far neater job and its cheap, doctoring it to get around the Arduino pin spacing cockup when making a shield is a pain but it still makes a tidy job.

This is the underside of the clone. odd messy bits where I got 'track cutter happy'  smiley-wink

« Last Edit: September 27, 2009, 10:24:31 am by stephen_t » Logged


tytower
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks good again pluggy. I' m putting a transmitter on my project atm so Ill follow you.

Just worth a note -IMO the 1/2 wave antenna would not be too efficient would it ?
They say 10~15cm on their web site but they are talking 433/315 Mhz so I dont know which length is for 433, maybe 10mm hey.  see  http://www.seeedstudio.com/depot/images/product/315433RF.jpg


I have found with verticals 1/4 wave or 5/8ths work best electrically. Normal coax with its continual capacitance around the wire stops it transmitting until the capacitance stops.
Then its open slather and the exposed metal from that point starts to radiate.

Also as your antenna doubles back on itself against the plastic pin holding ANT pin that length  would count as half . You can shorten an antenna electrically by doubling the end of it back on itself ,thus not having to cut it . I would move it furthe down the board

So I hav'nt got mine yet but I would guess they start radiating from where they emerge from the transmitter chip on the ANT pin. So in calculating the antenna length I would measure the length from there.

You probably know  this anyway . Here is a link to a site which gives their length from the end point of the coax . It is what I will try first.
http://www.active-robots.com/products/radio-solutions/antennae/433-antennae.pdf

 CaptainObvious's idea of using a transformer is good too. Any long wire antenna works better usually as it picks up much more of the voltage available in the air. I used to use my paddock barbed wire fence and it was extremely directional sending its signal in the direction the fence ran . people behind me could barely hear me .

Such an antenna needs a variable capacitor accross the base  to tune it. I might try a small one at the base of the ANT pin on mine.

The secret of radio is antennas are everything , You need an identical setup on the receive end
« Last Edit: September 28, 2009, 05:58:30 am by tytower » Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like a radio amateur smiley-wink

No. a half wave end fed isn't a good antenna , much better a half wave centre fed (a dipole). In reality it was a lump of wire that looked like it would do the job in my 'box' and I couldn't be bothered to cut it.  Having just measured it, its 20 cm long (+ 2 cm extra to the pin), so its closer to a quarter wave anyway.  These unlicensed radio transmitters on the Amateur 70CM band, whats the world coming to ? smiley-grin

It works well enough as it is, although I'm looking at finding something else because I could really do with a back channel so I can pass instructions to the remote end for the project I have in mind.  I suspect buying another TX-RX pair is going to cause problems.  I doubt such simple radio receivers are very good in the presence of a strong local signal and the actual frequency is pot luck.
« Last Edit: September 28, 2009, 03:32:39 am by stephen_t » Logged


B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool!

Isn't SeedStudio based in China?  Any chance of buying those in the USA?  I hate buying things from China smiley-razz.

I've seen the ones from SparkFun, they're about twice as much though.  I suppose it's still only $10 total.. smiley-razz
« Last Edit: November 28, 2009, 03:02:37 pm by Tchnclfl » Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Serious cheapskates often buy from China and live with the 2 week shipping..........  smiley

You're very fortunate in the US, compared with much of the world an awful lot of Microcontroller stuff is cheaply available locally.  Even the UK is much better off than parts of Europe and Asia and all of Africa.  
Logged


B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You're very fortunate in the US, compared with much of the world an awful lot of Microcontroller stuff is cheaply available locally.  Even the UK is much better off than parts of Europe and Asia and all of Africa.

We do have a lot of places to get general components (LEDs, Resistors, Transistors, etc.), but no really good places (that I know of) to get things like this smiley-razz.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - this is almost exactly what I want to set up for my house.  Its an old home and I need to prioritize which rooms I work on w.r.t drafts, etc.

This post is a great example!  Thanks for sharing.

I have ordered a similar set of parts to get started.  I'm new to Arduino and electronics in general, but am picking things up fast.

Question: where and how did you interface the receiver?  I want to read it through USB, since I have lots of free USB ports.  Could I use a USB to Serial breakout board for this and read that with a library similar to the one used for Java -> Arduino communication?

This is what I was thinking of:

robotshop.ca/sfe-ft232rl-usb-to-serial.html

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - this is almost exactly what I want to set up for my house.  Its an old home and I need to prioritize which rooms I work on w.r.t drafts, etc.

This post is a great example!  Thanks for sharing.

I have ordered a similar set of parts to get started.  I'm new to Arduino and electronics in general, but am picking things up fast.

Question: where and how did you interface the receiver?  I want to read it through USB, since I have lots of free USB ports.  Could I use a USB to Serial breakout board for this and read that with a library similar to the one used for Java -> Arduino communication?

This is what I was thinking of:

robotshop.ca/sfe-ft232rl-usb-to-serial.html

Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The receiver end is very similar to the transmitter, it uses the same virtualwire library.  Its documented (to a degree) in the Library itself.  It just uses one digital pin, as well as  5V and ground.  Its a pretty rudimentary protocol (glorified morse code wouldn't be too far off the mark).

As far as interfacing the receiving arduino to the outside world, you could look at my all system writeup (although it doesn't include any wireless devices).

http://pluggy.is-a-geek.com/arduino/index.html

I didn't actually implement this in the end, the lack of back channel was a major hurdle and I wired it using serial in the final item. My receiving end is a real arduino so I use its own USB, although there wouldn't be anything stopping you using your linked USB breakout board.  I'm a big fan of building my own arduinos, but if I needed one with fulltime USB, I'd buy a real one (or cheap clone at any rate.).  I have a very similar breakout board I use for programming my homebrew boards.
« Last Edit: January 05, 2010, 04:37:13 am by stephen_t » Logged


Milano, Italy
Offline Offline
Faraday Member
**
Karma: 11
Posts: 3091
Sideralis Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How long are the cable sensors in your house system?
Fede
Logged

Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The longest I have in my house are around 6 metres. I have a project at church which has sensor leads up to around 10 metres.  I have two arduinos in that which are around 45 metres apart to keep the sensor leads at a workable length.  The Dallas one wire thermomters I use don't like very long cables.  The 2 arduinos communicate via serial at 9600 baud (the cat 5 cable also powers one end from the other - saves another PSU.)
Logged


Saint Petersburg, Russia
Offline Offline
Full Member
***
Karma: 2
Posts: 105
Amateur
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why FTDI but not ICSP?
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

At the time I didn't have a programmer, so ICSP was a bit of a waste of time, now I have one I'd probably put one on.  I put the FTDI on for ease of programming the thing, pulling the chip and swapping it slows development down an awful lot. As it is, it behaves exactly like a Duemilanove with a 328.
Logged


Pages: [1] 2   Go Up
Jump to: