Pages: [1]   Go Down
Author Topic: Simple wireless transmitter and receiver?  (Read 10758 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I'm playing with a project of making my own security system powered by arduino.  I've got most everything running fine if done with wires, but I don't want to have to run a wire to every window in my house so I'm looking at cheap wireless alternatives.  Cheap being the keyword here, I could probably make it work using XBee or WiFly, but both of those are kind of expensive to have at each entry point.

I was looking at these on sparkfun:

http://www.sparkfun.com/products/10535
http://www.sparkfun.com/products/10533

The question is, is it possible to use the transmitter on the switch side without a controller?  In it's simplest form while wired, all I would do is have a reed switch and detect when it's closed vs open.  Going wireless, I have to have a way to send this state through the transmitter, and preferably also a way to send when the state changes back to the original state as well.  Also going wireless I need a way of identifying what is sending the signal.  I'd want to to have each transmitter be able to transmit a unique ID so the main system will know where the alert is coming from.  One last thing that I'd ideally like to be able to do is every so often (maybe like a minute to 5 minutes, but it would have to be a fairly accurate and reproducible amount of time) simply transmit an "alive" signal so that the main system knows the unit still has power and has not been tampered with.  There would also be IR motion sensors which would have the same basic setup, they would just have an output pin instead of having to read if voltage is making it through or not.

Also, I'm assuming a single receiver would be able to receive signals from multiple transmitters as long as they are all on the same frequency.  But I'm guessing I have to worry about signal overlap if two transmitters transmit at the same time.  Not really sure if there is anyway to handle that or not without getting into more expensive programming frequency transmitters?

Keep in mind in your answer, that I'm not extremely fluent in electronics.  I'm still learning and this project is one of my learning projects (completely within my grasp already if I stuck to wired).  So if you recommend anything if you could please explain the function of what you are recommending that would be awesome!


In other aspects of the project (this is just me kind of rambling but I recommend feedback as well), I'm planning on putting a WiFly chip in the main system to connect it to my network in order to enable sending out emails and such if an event occurs.  Eventually I'm hoping to get some IP cameras to add to the system to trigger recording and things of that nature as well.  Probably will add some external motion activated lights, but that part is easy enough without a controller.  I know on that part I can just use a relay attached to the motion sensor to feed power to the lights.  I'd have to figure out some way of making the relay stay active for a set amount of time after the motion sensor stops sending a signal down the output pin though.  Do they make timed relays?  Or perhaps timing chips or something like that?

Thanks for any assistance!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Could look into transceivers instead
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53
Master could ping each one individually, then only one a time would answer.
Use with a Promini for smarts and a wallwart for power at each station.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Australia
Offline Offline
Sr. Member
****
Karma: 11
Posts: 488
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You cant do this without some kind of intelligence at the Transmitter end.
Transmitters cant transmit by themselves, they need some data fed into them.
Are the Transmitters going to be powered by batteries or mains.
The simplest system would be some kind of very basic controller,maybe a 12F675  PIC and the Transmitter Module.
This isnt a trivial project for a beginner
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I was planning to power them with a 9 volt or possibly something even smaller since nothing in them would use much power.

Putting a pro mini at each unit would get rather expensive that's 20 dollars by itself at each unit.  Another 4 for the transmitter (or 7 if I went with a cheap transceiver), The actual detection device would probably be around 2 (10 in the case of IR motion sensor), and the miscellaneous stuff like the battery, casing etc.  That would end up being around 30 to 40 dollars per unit.  I was hoping to keep it closer to around 10 to 15.  I've got 10 windows in my house + 2 doors, spending 400 dollars just to cover all the windows is kind of steep, < 200 would be a lot more bearable lol.  Also I'm concerned with a pro mini at each station, if I used a 9 volt battery instead of draping power wires at every window, it's going to be a lot larger constant power drain on the battery.

I found this post saying it could be done without a controller, but the way the guy talks about it in the post it's over my head.  I don't understand exactly what components he's using or how.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293839127

Can anyone break that post down into simpler terms (and a component list) for me?


EDIT:
Oh as for it not being a trivial project for a beginner, maybe I'm not a beginner anymore lol dunno.  I know that guys post I linked confuses me, but I also know that if I used a pro mini at each transmitter then I could do it easily, just very costly.

EDIT2:
Could I get away with using something like the ATTiny85?  http://www.sparkfun.com/products/9378

It's a pretty cheap simple micro-controller which should be sufficient for what I'm doing I think.  And I found posts on how to be able to use an arduino to program it as well as load a modified arduino bootloader on it.  I'm just trying to figure out what the bare minimum I would need to use it.  According to another page I found, I just need the chip and a voltage regulator, 1 uf capacitor, and 10k resistor.  If this is all I need then I can put this in as a controller into each unit for less than 4 dollars.  But the sparkfun page says something about an external crystal, not sure if that is necessary?
« Last Edit: July 04, 2012, 12:53:30 pm by steven6282 » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get '328P (pico power) $2.08 qty 10+
http://www.mouser.com/ProductDetail/Atmel/ATMEGA328P-PU/?qs=K8BHR703ZXhdUS2n3IW%2fRITwfrPGjO%2fc
8 mhz xtal  $0.17 http://www.dipmicro.com/store/index.php?act=viewProd&productCode=XC6-80000
Run at 8 MHz to save power, get max life out of the batteries.
2x 22 pf cap $0.05 http://www.dipmicro.com/store/C1K22-1000
3x 100nF cap $0.05 http://www.dipmicro.com/store/C5K10-50
10K resistor $0.02 http://www.dipmicro.com/store/R4J10-8
perf board to build it up on $0.30 http://www.dipmicro.com/store/PCB-UNI7H
socket for uC $0.17 http://www.dipmicro.com/store/ICS328
header strip to connect sensors to $0.18 http://www.dipmicro.com/store/HEADS40G
AAA battery holder $0.577 http://www.dipmicro.com/store/BHAAA3W

Total: <$4 for qty 10-12 units

 
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The nrf24l01 has been used many times with good results and at <3$ ea its really cheap, just that and an attiny and your set, + battery ofcourse, probably a small lithium would be best but that'd be expensive
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get '328P (pico power) $2.08 qty 10+
http://www.mouser.com/ProductDetail/Atmel/ATMEGA328P-PU/?qs=K8BHR703ZXhdUS2n3IW%2fRITwfrPGjO%2fc
8 mhz xtal  $0.17 http://www.dipmicro.com/store/index.php?act=viewProd&productCode=XC6-80000
Run at 8 MHz to save power, get max life out of the batteries.
2x 22 pf cap $0.05 http://www.dipmicro.com/store/C1K22-1000
3x 100nF cap $0.05 http://www.dipmicro.com/store/C5K10-50
10K resistor $0.02 http://www.dipmicro.com/store/R4J10-8
perf board to build it up on $0.30 http://www.dipmicro.com/store/PCB-UNI7H
socket for uC $0.17 http://www.dipmicro.com/store/ICS328
header strip to connect sensors to $0.18 http://www.dipmicro.com/store/HEADS40G
AAA battery holder $0.577 http://www.dipmicro.com/store/BHAAA3W

Total: <$4 for qty 10-12 units

 

What is the purpose of the crystal?  I still don't understand that.  Looking again at the ATTiny85, I can get it for only 81 cent each at digikey if I order 25 of them (less than half the price of the 328P that you linked), which I think I'd consider ordering 25 of them just because they seem like they can be very handy for any small project that needs only a little programming behind it.  Even if I didn't order 25 of them they are still a bit cheaper at only 1.36 each.  And I've been reading about other projects done with it that are not using a crystal.  Plus a Mega328 just seems like way way overkill for what I'm doing here?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you don't need highly controlled serial speeds, than drop the crystal and just use the internal oscillator.
I've not done anything with as little as 6 IO. I mostly do bigger stuff, where chips like the Atmega1284 with 32 IO and dual hardware serial ports come in handy.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Australia
Offline Offline
Sr. Member
****
Karma: 11
Posts: 488
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are going to run small Transmitters and microcontroller off batteries, its critical to look at the power
consumption of what you are running, otherwise you will be replacing the batteries every week.
This means running the microprocessor in ultra low power consumption mode, and running the transmitter
as infrequently as possible.
For example, the little  transmitter you are considering, draws 8 ma when transmitting.
Running this off a 9V battery, if its a small transistor radio type battery will drain the battery in just 12 hours.
Even running the Transmitter for just 1% of total time will drain the battery in just under 2 months.
Its critical to minimise battery consumption which means using the lowest possible supply voltages and keeping the transmitter
on time as low as possible.
Id be looking at running off 3 V which you can get from 2 AA cells in series, using the highest data rate you can manage
and thoroughly understanding issues like manchester coding,CRC error checking, and microcontroller power management.
Also, the frequencies that these small transmitters use , are commonly used by many common household appliances like garage door openers
car entry systems, wireless door alarms, wireless security systems etc so you must be able to recognise your data from everything else thats around.
The better transmitters like the Xbee use 2.4 Ghz and do all the hard work for you, which is one of the reasons they are more expensive.
They also draw 45 ma which means close to useless for running off batteries, unless you use a car battery.




Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are going to run small Transmitters and microcontroller off batteries, its critical to look at the power
consumption of what you are running, otherwise you will be replacing the batteries every week.
This means running the microprocessor in ultra low power consumption mode, and running the transmitter
as infrequently as possible.
For example, the little  transmitter you are considering, draws 8 ma when transmitting.
Running this off a 9V battery, if its a small transistor radio type battery will drain the battery in just 12 hours.
Even running the Transmitter for just 1% of total time will drain the battery in just under 2 months.
Its critical to minimise battery consumption which means using the lowest possible supply voltages and keeping the transmitter
on time as low as possible.
Id be looking at running off 3 V which you can get from 2 AA cells in series, using the highest data rate you can manage
and thoroughly understanding issues like manchester coding,CRC error checking, and microcontroller power management.
Also, the frequencies that these small transmitters use , are commonly used by many common household appliances like garage door openers
car entry systems, wireless door alarms, wireless security systems etc so you must be able to recognise your data from everything else thats around.
The better transmitters like the Xbee use 2.4 Ghz and do all the hard work for you, which is one of the reasons they are more expensive.
They also draw 45 ma which means close to useless for running off batteries, unless you use a car battery.






Yes, I've given much thought to the battery usage.  But I know it must be possible.  There are small electronic devices like this that run on batteries for months before needing to be replaced.  For instance, my parents have one of those Lunar clocks at their house that has a temperature sensor outside.  It runs off a battery and is able to transmit the temperature back to the clock in the house and they don't have to replace the batteries in it but maybe once a year.  It uses two AAA batteries.

What I'm thinking is as you said, keep my transmissions as short and fast as possible, and between transmissions put the controller into sleep mode with an interrupt set up.  I know I can do an interrupt based on the reed switch being tripped, but I still have to figure out a way to do an interrupt on a time basis in order to send status updates.  Which I'm thinking I'll do more like once an hour or maybe even once a day instead of ever 5 minutes like I previously mentioned.  Just to cut down on battery usage.  Also I think in the status update I'll send the current battery level so that the main system can alert when a battery is getting low in one of the wireless units.

By my calculations, which this is just an estimate and based on fully charged batteries at room temperature and such, 3 AAA batteries should be able to power one of these units for around 400 days (thats assuming 1 second data bursts once an hour).  This is assuming around 1000 mAh Alkaline batteries.  With everything in sleep mode it should be drawing < .1 mA, which would last 416 days under perfect conditions.  If it used 12 mA for 1 second each hour, over 416 days it should only decrease the battery life time by around 14 days if that long.  (This is figured basing it on taking 150 days to gather enough 1 second bursts to equal a full hour, so in 300 days the total drain from bursts would be 24 mAh, or ~34 mAh over 425 days.  So I just figured 1000 - 34 = 966 mAh / .1 = 9660 hours / 24 = 402.5 days)

If I went with Lithium batteries, which I know is more expensive, the time should be tripled at least.  Even if my estimate is double what I can actually achieve 200 days still isn't terrible, although shorter than I'd like.  My goal if I can figure out a way to do it will be to make the batteries last for at least a year.
« Last Edit: July 04, 2012, 11:39:03 pm by steven6282 » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or go with larger batteries, like C or D, lot more capacity. If you can live with a little more bulk.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or go with larger batteries, like C or D, lot more capacity. If you can live with a little more bulk.

I'm considering that as well.  It's all going to depend on just what kind of time I can achieve and all.  If the chart I'm looking at is accurate C batteries have a 6000 mAh capacity typcially, and Ds have 12000.  But I'd want at least 3 of them to get proper voltage to the transmitter, and that is getting rather bulky.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Tons of battery choices here
http://www.onlybatteries.com/rechargeable-batteries.asp
poke around, see if there is some form factor that catches your eye.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: