66% or better

Garage Monitor Has an Extra Arduino

[Jody] wanted to know when his garage door was open. He details his setup which uses a temperature sensor read by an Arduino to send over XBee radio to a computer running a Windows Service. We have seen this twice before, and is noteworthy as a lesson. The XBee radios have the ability to read analog data, relay digital signals, and a lot more. This means the Arduino is completely unnecessary. For example, the Tweet-a-Watt uses two of an XBee’s ADCs to measure voltage and current in a Kill-a-Watt power meter. Programming an XBee is really simple, with the help of tutorials from SparkFun and Adafruit. A bit of programming and soldering should get [Jody] back his Arduino. We hope this note will help you find more creative uses of XBees without microcontrollers.

[Via Make]

Comments

  1. John Avitable says:

    Where are all the comments about HAD and arduino hacks?

  2. macegr says:

    This preemptive criticism is a new direction for Hackaday…and one I like. Don’t be afraid to point out inefficient methods of doing things, it’s the best way to encourage progress and streamlined solutions.

  3. addidis says:

    I also like the demeanor of the post. Commend hard work, and provide a next step.

  4. therian says:

    but arrrdhhhino there is for points !

  5. Scuzz says:

    Huzzah! A HaD post pointing out how stupid it was to use an Arduino! Thank you!

    Arduino: That which makes the phrase “if all you have is a hammer, everything looks like a nail” completely true.

    I don’t mean to hate on Arduino too much, it’s a very useful tool, very inappropriately used. A $30 microcontroller platform is not needed for every project.

  6. BiOzZ says:

    everything can use another arduino!

    @John Avitable
    the people who normally complain are to busy resetting AVR fuses right now
    they will pointlessly harass arduino around 6 :3

  7. Spork says:

    Haha BiOzZ wins best comment award.

    Very good post Devlin. I see HaD as a community of very knowledgeable people as well as beginners. This takes [Jody]‘s work and explains to a beginner why this implementation was overkill and how to easily solve that problem, saving an Arduino for a more resource-intensive project!

  8. anon says:

    yo dawg, i saw you like arduino’s…

  9. Whatnot says:

    Two pieces of metal making contact will tell you if the door is closed, I guess this helps the economy though, pfff

  10. MRE says:

    So…. no one has anything to say about using a temperature sensor to signal that a door is open?

  11. MRE says:

    I did check the post. Using a switch for the door, and reading temp for some other reasons.
    Love that had writing style.

    Anyway, nifty use of xbee. I didn’t know about the on board adc.

  12. Bill Porter says:

    The Xbee is overkill too!!!

    You could use an $25 Xbee like HAD says, or a $20 Arduino and a $5 RF link since it only has to be one way.

    OR you could use a $4 ATtiny and a $5 link and achieve the same result. If we are going to pick on people for overkill, why draw the line at an expensive Xbee?

  13. Devlin Thyne says:

    Or you could use a spark triggered by the door and calculate the temperature based off of the background noise relative to the spark’s signal. But that would not use much of the existing hardware and operation, now would it?

  14. BiOzZ says:

    @Bill Porter
    an avr + board + powersupplly + crystal and misc components will run you WELL over $4 (maybe over $20) and even more if you dont own an ISP

    the link will be $10 with both transmitter and receiver than you need a second controller to convert the RF link in to serial than serial to usb and on top of that a bunch of pointless coding and pointless time wasted for a simple 2 xbee 1 breakout board $40 project and not have to deal with the troubles of AVR programming and canceling the noise that can be picked up by the cheep RF transmitter and receivers

    you got to think these things threw before ranting about it

  15. Lenny says:

    This thread made me think of an interesting idea (stop me if it already exists… and share the link)

    There should be a section of HAD (or an entirely separate site) dedicated to showing how to de-arduino projects… The arduino is a great platform for rapid prototyping but a lot of people don’t know how to function without it.. what about a site dedicated to informing arduino users instead of just bashing them

    ps… this is nothing against anyones comment or this post. I think this post / thread was mostly constructive and infomative. It just sparked the idea in my head.

  16. Bill Porter says:

    @BiOzZ,

    Over $20? No way. I build projects with ATtiny’s well less then $20. Crystal and a 7805 don’t cost over a few bucks. Your right about the RF links though, they are more like $7-8 total.

    And ‘ease of programming’ is relative. I could much more easily program an AVR then I could program those blasted Xbees. I find there manuals confusing and over-complicated; as well as X-CTU a not very beginner friendly interface.

    @Devlin, Huh? You would still need hardware to sense the spark and run the calculations, so how does that make sense, even for a rhetorical post?

    HAD is making fun of this guy for overkill in hardware, when my solution is even less overkill in hardware then HAD’s solution. Yet you pick on me for my way not being ‘easy enough’ and I can argue the the original solution is even more easy than HADs for the guy that did it(newbs), and we’ve come full circle.

    So who gets to decide where the acceptable ease/degree-of-hardware line is? I say it varies by person.

    • Caleb Kraft says:

      @ALL,
      I do believe Devlin was commending this guy on a good job, while also pointing out that he could reclaim his arduino for another project. There was nothing negative here and yes, there are a multitude of ways this could be accomplished if you were starting from scratch.

  17. Bill Porter says:

    @Lenny,

    It’s called college, getting an engineering degree. Then you learn to use uC without crutches.

    Mostly joking, but you are right, that would be a good idea, if it’s not already somewhere.

  18. Osgeld says:

    to be fair you dont need a crystal as avr’s will run upto 8mhz with the internal oscillator, so that saves a couple right there BiOzZ

    I like the use of a solderless breadboard in an installation that has a perfboard stuck in it along with much of what has already been pointed out

  19. kernelcode says:

    @Bill Porter:
    Would I be right in assuming you went to college a few years back?
    All you need is an internet connection, Google, and half an idea on how to construct meaningful search queries.

    (ps. lol @ Chrome thinking Google is a spelling mistake)

  20. addids says:

    @billporter

    First off he didnt make fun of any one. He said its over kill. It is.
    second. . .
    The solution suggested by the author of the post was a simple next evolution of the project. NOT jumping into an engineering degree . Lighten up.

  21. Bill Porter says:

    @kernelcode,

    I’m a little lost, are you saying the internet + Google is a acceptable solution to Lenny’s idea, or is one of my posts off? And yes, you are correct.

  22. Taylor Alexander says:

    Aside from the flame bait potential, I like that this post really drills down the idea that you *really* don’t need an Arduino for some things. I mean, everyone already knows anything an Arduino is doing can be done more cheaply with an AVR, but to point out that, in fact, no microcontroller at all is needed, is really good.

    Not because people rely too much on Arduinos, but because people don’t read the datasheets on things they’re using often enough. Like the FTDI bitbang mode, the digital and analog inputs on an XBEE are one of those really nice features that people might not realize unless they read the manual. If they just buy a couple of boards and run serial data, they may not feel the *need* to read the manual, but it is often very helpful.
    -Taylor

  23. Bill Porter says:

    I like this information to be out there too. I’m really playing devils advocate here because I think the Xbee is one of the best solutions out there for HAD’s target audience.

    My point is if we are going to take the time to teach people to better understand the hardware to avoid overkill, let’s give them a few more depths of possible solutions as well. There are tutorials on using ATtiny’s (or equivalent small MCUs) and on using the cheap $8 RF links. Hell, there’s even Arduino cores for ATtinys, and Arduino libraries for the $8 RF links. It nearly as easy to do that as it would be to use an Xbee alone.

    After-all, the Xbee is the Arduino of the RF world; it has a microprocessor and RF radio that just happen to be on the same chip. It makes wireless easy for those that want it to be easy.

  24. Erik Johnson says:

    I made something similar back when I was a little kid, except it was an FM transmitter and I had a radio tuned to it inside the house. The transmitter would power off of the door was opened (simple loose wire switch) then the radio would blare static if the garage door was opened.

    ‘Twas good to know when the parents were rolling home ;)

  25. J Harton says:

    For the door, just attach a small permanent magnet. Place a reed switch on the wall next to the door and run the wires back to where you want them or use an xbee or an rf transmitter/receiver pair to get the signal.

  26. Wibble says:

    Ermmm I have a solution that costs £0.00 simply get off your arse and take a look!

    But still nice post… How about giving Jody a kick in the nuts while your on, imagine if you will, my 5yr old son came up to me and asked about making a torch, after listening to him tell me about how the batteries all go in and the need of some wires and things, I had not said well done son here you go lets try it shall we, but instead just gave him a withering look and said but why use this, that and the other… And then sent him packing tail between his legs, never to bother to try to think about a solution to a problem… (clap clap clap)

  27. Whatnot says:

    @Taylor Alexander: What you say is true of course but what’s even weirder is that many companies, and sometimes quite big ones, and sometimes big ones with lots of experience in electronics pull stunts like that, most peculiar.

  28. Ekaj says:

    “a temperature sensor read by AND Arduino…”

    No one has noticed this yet? Am I just OCD or does that bother other people too?

  29. BiOzZ says:

    @Bill Porter
    lets do some math!
    ATtiny85 $3
    LM7805 $2.50
    16mhz OSC $1
    common IC pref board $3
    250ma PTC $1.25
    IC socket $1
    180uH inductor $2
    standard headers for programming $2
    a few filtering caps $5
    basic FTDI breakout $15
    thats 35.75 than shipping than you need 2 of them (ignoring the second FTDI) thats $56.75 than if you include a RF Link 2400bps Receiver and Transmitter thats about $10 so its $66 when just 2 xbees totaling $40 can do the same exact thing with out all the painful soldering and breakouts

    so tell me how your idea is any more efficient?

  30. Spork says:

    Woah BiOzZ,
    Not sure where those numbers came from but they’re wayyyyy out there from what I’d spend. Also, no FTDI breakouts, why would you need two of those? He uses a virtual COM port… you can use a REAL COM port!

    Even digikey has transceivers for 7 bucks… comes with all the extra components.

    Point is, you can definitely make it cheaper if you want to handmake everything. If you want to buy the low level stuff and only work on software/implementation strategies, then xbee or arduino is the way to go.

  31. Bill Porter says:

    Um, because you don’t need 3/4 that crap.

    ATtiny85 $3
    LM7805 $2.50
    IC socket $1
    common IC pref board $3

    and done. You don’t even need a crystal.

    And where are you getting your prices? $5 for filtering caps? Even at Sparkfun’s prices it’s only $.75 for 2.

    You can partialy argue for programmers/FTDI, but the savings you get from not having to pay for the same hardware on every Arduino negates that.

  32. BiOzZ says:

    @Bill Porter

    you dont need anything but water and food but you want all of that

    if you dont use a crystal the chance of a program fault is very high requiring a reset expecally when dealing with a non-temperature controlled environment like a garage
    you want an FDTI breakout because you need to communicate to a computer via USB just like he is doing with his arduino
    you need a PTC or else the IC can fry from any power surge or have the potential
    you need the inductor because of the noise generated by just about every power supply and produced by the IC
    for the lm7805 you need 2 104s and 2 electrolytic caps of about 47u to keep things nice and smooth and i buy my 47uf caps in bulks of 2000 so i dont know the price of one but im guessing about $0.50 a peace than a second 104 for the transmitter and receiver so im probably a few dollars off there im sorry?
    than on top of all of this the avr programmer it self will run you $20 it self

    @Spork
    i only included breakout once in the final price i stated that clearly
    i got my prices form radioshack and sparkfun to cut down on shipping
    and he used a USB port … most modern computers dont have an RS232 port so i guessed that if he had the option he would spring for the RS232 arduino and an RS232 level converter is like what $10 if you get the breakout?

    come on guys where did you leave your freshmen EE? XD

  33. Anonymous says:

    “i got my prices form radioshack…”
    Well THERE’S your problem. They scalp you for everything.

  34. Scuzz says:

    @BiOzZ
    “if you dont use a crystal the chance of a program fault is very high requiring a reset expecally when dealing with a non-temperature controlled environment like a garage” — BUH?! I dunno what you mean by this. If you’re running at a low speed this shouldn’t happen. Same goes for a PTC, and frankly, if you’re worried about a surge killing your project, put it on a surge protector! If you lose the project you lose the project, if you invest less money in it you’ll also be less attached to it dying and having to replace some parts.

    You really don’t need that much smoothing for something like this, unless you’re in desperate need of really smooth power for highly accurate ADC readings, which in this case they can be off a degree or two and he’d be fine. The same thing here goes for the inductor: low frequency noise will be pretty well filtered out by the 7805 and high-frequency noise won’t really effect the circuit.

    And you are also kind of ignoring the fact that things like an FTDI breakout or “standard headers for programming” are only 1 time costs (assuming he’s using a breadboard). A good hacker should already have a lot of that at his workbench! If he needs a permanent header he could also just buy a huge pack of machine pin headers. Those come in handy all the time and cost next to nothing.

    Anyway, I think that the point here is really that this project was a bit overkill with the Arduino thrown in there, and that assuming he hacks regularly, there’s not really a good reason not to just buy the parts separately. Especially because it wouldn’t deprive him of future use of the Arduino!

  35. Spork says:

    @BiOzZ
    I didn’t mean to flame, the pricing just seemed outrageous to me. Also I am biased against FTDI chips for USB; people pop them on every board they make and it’s often an unnecessary cost. You could add a ARM processor for under 4 bucks and use it in place of an FTDI if you were going for cheap and effective. — But then you’d want to skip the uC all together because the ARM would do anything you want except the radio.

    I did forget my freshmen lit class where I learned to read your post (missed the radioshack part), but I haven’t forgotten my EE.

  36. smoker_dave says:

    “can do the same exact thing with out all the painful soldering and breakouts”

    Come on Biozz, you can admit the truth here. You are not capable to solder. Am I right? You can admit it, we will not laugh at you.

  37. Bill Porter says:

    “come on guys where did you leave your freshmen EE? XD”

    I left it in the past many years ago.

    Well, many others have pointed out the ridiculousness of your comment, I won’t bother repeating; other to say I have used ATtinys in many projects with less then $10 worth of parts with no problems.

  38. echodelta says:

    Sorry but I just don’t know what all these CAPS devices are about, and probably never will. Nobody has mentioned the price of the 2 transformers to power all this stuff. Wall warts…power vampires! Even the simple reed switch is not needed. The door opener has logic in it and limit switches all ready in place. Open it up and hack to an idiot light. Wires! Any radio link unless xtal controlled will drift, witness those worthless 300mhz cap and coil tuned remote devices. Here in the Midwest it effing cold right now. Piece.

  39. Kris Lee says:

    Is there anything that can provide the same functionality as XBee but would be a wired solution?

    I mean something really simple and cheap with option to read an analog values over the serial connection.

  40. blue carbuncle says:

    Beyond that there is a $8.00 unit at Target that does the same thing. Even has a nice little LED thingy to stick to your wall that has lights for open or closed…
    I am still a fan of the old Anarchist Cookbook clothespin/slip of paper switch. I have used those things so often lol. Had several usable as sustain pedals where you simply stretch out the clothespin spring. :)
    All for these De-Ardy posts :)

  41. fartface says:

    $225.00 in parts to do this… wow.

    Tomorrow on HAD how to use a $4500.0 Cisco Router as a 2 port ethernet switch!

  42. ZotDitzMyo says:

    I am curious about the precision of the door position. Is a switch with this little action sufficient? Or should something with a longer throw be used to be safe?

  43. fartface says:

    12f675 – $1.25
    DS1820 – $1.99
    434 RF transmitter $4.00
    battery holder case for project -$4.00
    perf board to build it. $0.90

    All done and it will run for 2 years on a set of 3 AA batteries.

  44. fooo says:

    So is it possible using the XBEE only to also control the garage door? I’ve been wanting to wire my garage door and write an android app to open and close it (and to tell me weither it’s open or closed) so I can use my phone as a garage door opener.

    I was initially thinking about using an arduino and a wifi shield but that seemed pricey.

  45. you know… I bought a sensor for my garage door that tells me if it’s open or closed. it’s a little adhesive backed device that sticks on the door, and a receiver in the house with a red/green LED pair (red= open, green = closed)

    It’s cost me $12 at home depot, took less than 2 minutes to “install” and it’s run for the last 5 years on the originally included set of batteries.

    I’m all for hacks, but when something so simple, cheap, and ubiquitous already exists, why spend the time and money reinventing the wheel?

  46. a canuck says:

    @fooo: yes it is possible to control the garage door with the XBee. There are several digital I/O pins on the XBEE which you should be able to connect to the back of your garage door opener. (properly buffered or via a relay etc.) I think you may need one of the API supported models to remotely query or set a digital I/O pin over serial.

  47. Doc Oct says:

    Community Service Announcement for those of you who don’t speak British: A torch is a flashlight.

  48. d3c4f says:

    WOW!

    This went from someone using what they had/knew to accomplish a simple task to an EE pissing match. They may not even want to redesign the whole project as it is working. Their time is worth something, I highly doubt this is being mass-produced as a product (which could be done for $2-4/set). It may not be the way some of you would do it (with a greater understanding of electronics, etc); however, I highly doubt that in this instance the person wanted to spend hours/days/weeks/years learning how to do this for $20-30 cheaper and just wanted to make it work now.

    I mean if you want to go lowest price, the simplest thing may be to install a pulley and a flag so they can look out the window and see if the door is open. Or a mirror out on the sidewalk. Or run some cheap 24ga wire to the sensors. Or use a $7 pair of Wal-Mart walkie-talkies,a couple wal-warts, switches, transistors, and lights.

    Bottom line is he got it done how he wanted. The ‘next step’ for him may be just to leave it. (Though I would reclaim the Arduino. lol)

  49. tehgringe says:

    Its probably the dudes first project. It’s an arduino kit board, with the protoboard glued onto some black plastic.

    Well done HAD, a good reference and what I like to see. How to progress, a nice approach to balance the accurate, but unhelpful observations normally made in these comments.

    Also, +1 to the yo dawg reference I spotted further up in the comments.

  50. Jody says:

    Hey guys, thanks for the comments, criticism and all. Yes, I could have built this w/o an Arduino but it was my first attempt at solving an actual problem instead of just making some lights blink.

    Feel free to drop me a line on the blog with suggestions. For me it’s all about learning how it’s done.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s