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.

57 thoughts on “Garage Monitor Has an Extra Arduino”

Comment navigation

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.

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!

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?

@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

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.

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.

@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.

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.

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

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.

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.

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.

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)

@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.

@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

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.

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?

@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!

@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.

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.

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 :)

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.

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?

@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.

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)