Tag Archives: wireless

Review: An Inexpensive Wireless Relay

As you know, I’m all for DIY projects.  But sometimes, I’ve got to say, it’s just easier/better/cheaper to buy things.  For instance, let’s say you need the ability to remotely activate/power/E-stop a project you’re working on.  There are literally hundreds of ways you might accomplish this.  The wireless product offerings from SparkFun are quite extensive, and a very simple transmitter/receiver pair can be had for less than a five spot.  But don’t forget, you’ve still got to generate the appropriate signals to the transmitter, and then process those signals at the receiver.  Plus, you’ll want to add a couple of buttons, a relay/MOSFET, perhaps an LED, and of course a case.  By the time all’s said and done, you’ve spent three or four times your initial budget, not to mention all the hours consumed.  Now granted, if you’ve never done something like this before, it’s a great learning experience.  Seriously, if that’s the case, by all means, go for it.  But if your not interested in the experience, why not give this a shot:

Logisys RM01/RM02 Wireless Relay

This is the Logisys RM01/RM02 wireless relay.  It operates from a 12V source, such as a car battery.  The RM01’s relay can handle up to 6 amps and costs just $15.99 at Amazon.  The Logisys RM02 can take 15 amps and sells for $18.99 at Amazon.  I’ve recently purchased the RM01 for a project that has since been cancelled.  However, I’ve still gone ahead and done a little testing.  Here are the key points:

  • In the off state, the RM01 will draw 7.4mA from a source ranging from 8V to 15V (which leads me to believe it’s using a simple linear regulator).
  • When turned on, the RM01 itself will draw between 36 and 64mA as its supply voltage ranges from 8 to 15V respectively (so its coil resistance is about 280Ω).
  • The relay will not fully close until the input voltage exceeds 8.2V.
  • Indoor range (worst-case) with a 12V supply is about 30′ to turn on, 20′ to turn off (I haven’t explored this odd difference, so I’m not sure why it happens).  Outdoor line-of-sight range is about three times that.

I’m pretty pleased with this little guy.  It’s fantastically simple to use, and the two fobs even have red LEDs which light when their buttons are pressed, to let you know that their batteries are still good.

Honestly, I’ve been looking for an excuse to purchase one of these for quite some time.  Ever since a college friend of mine used them to control the power to his self-balancing transporter, they’ve been on my wish list (along with a few other things):

So despite the fact that the project I was going to use them with is no longer proceeding, I’m still happy to have them.  If you have any questions or would like me to do any other testing with the RM01, feel free to leave a comment.

Home Sweet Garage

Alright, I think it’s about time for this silly article on plasma arc waste disposal to get knocked off the top of my site, don’t you?  It’s just fluff, honestly.  Filler.  And I’m tired of looking at it.  So how about a post on a real project for a change?  Sound good?  Great.

First though, a quick gripe.  I hate waiting for parts to arrive.  Specifically “last” parts.  Like that final DigiKey order, or in my case, a shipment of PCBs from Advanced Circuits.  You see, I now have everything I need to complete this really exciting new device I’m designing at work, except for the PCBs.

Assorted parts, but no PCBs...

And not having boards is kindof a show-stopper.  So I’m crossing my fingers and hoping that Advanced Circuits gets them shipped out early, as they so often do (because they’re totally awesome).

But let’s get down to business.  If you happen to have been reading my blog about six months ago, you may remember that I recently moved to the middle of nowhere Waterloo, Iowa to start working for John Deere.  Now prior to moving here, finding a place to live has been, for me, frustrating.  “Oh, here’s a place that’s nice, but it’s too far away,” or, “That’s way too expensive,” or, “Uh, what’s that growing on the ceiling?”

Not so this time.  Deere actually provided a relocation assistant to show me several nice places around town.  All I had to do was tell her what I was looking for and BAM, there we were.  Plus, the cost of living in Iowa is virtually zero.  So here I am, renting a lovely townhouse, about ten minutes’ drive from work.

Now, nothing’s ever perfect, and this place is no exception.  For instance, it’s got a nice single-car garage with an opener, but there are two problems.  First, the remote control has terrible range.  My landlord warned me about this, but explained that I just needed to find that “sweet spot” for it in my car.  But this thing is kindof a brick and looks rather like some RadioShack project box.

This really is a garage door opener.

The second problem is lighting.  The garage door opener does have a single light bulb which comes on when the unit operates, but it’s pretty anemic.  This isn’t helped by the fact that the inside of the garage is almost all dark wood, either.  Plus it seems to take a few seconds for this light come on, and it only stays on for a few seconds afterwards.

So in Iowa, winters are long, dark, and cold.  Not unlike a mine shaft, I imagine.  But I like light.  So I took a trip to Home Depot one weekend, and for about $50 (those motion-detecting switches are kindof steep) solved problem number two quite simply.

Let there be light!

Yep, that’s a Lutron motion-sensing light switch, wired into an extension cord, and a simple reflective lamp fixture.  And it’s all just clamped to the top of a set of shelves I already own.  Easy peasy.  And it works like a charm.  The switch has two little pots to control sensitivity and on-time.  Which is great, because I love adjusting things.  So now I can pull into the garage, catch those last few minutes of Wait Wait, Don’t Tell Me, and then hop out and voilà, let there be light.  And I saw that it was good (enough).

Now for a while, I lived with problem number one without much complaint.  I had to be in my driveway before the remote would trigger the opener, but it wasn’t a huge deal.  Then for some reason, it routinely started failing me.  My car actually had to be within a few feet of the door for it to open.  And more than once I had to get out of my car (heaven forbid) and wave the remote around in front of it.  I replaced the battery, but this made no apparent difference.

So again, one weekend I decided I’d had enough and sat down at my workbench to sort out the problem.  I popped the project box remote open and started probing.

A very simple garage door opener

To make a long story short, I discovered that the transmitter was simply broadcasting a repeating pulse train via (I believe) amplitude modulation.  Somewhere in the 800kHz range, although I don’t have equipment capable of measuring such high frequencies with any sort of precision.  I can tell you that the DIP switches you see control the sequence of the transmitted pulses to match a particular receiver.

Get on board the pulse train!  Woo woo!

Since I know virtually nothing about RF amplification, and didn’t want to risk damaging the remote, I decided to piece together my own remote from components I had lying around.  Here’s what I used:

Transmitter:

  • SparkFun 315Mhz ASK transmitter module ($4)
  • AVR ATTiny13 8-bit, DIP8 microcontroller ($2)
  • 5V Regulator
  • 9V Battery
  • Protoboard
  • Button

Receiver:

  • SparkFun 315Mhz ASK receiver module ($5, discontinued)
  • Olimex AVR-MT-128 development board ($75)
  • 12V wall-wart power supply

Now the precise components specified here aren’t really too important.  I used what I had.  I would recommend the RF transmitter and receiver though (except that the receiver has been discontinued).  These are both pretty amazing for the price; I got them a number of years ago and haven’t yet put them to much use.  But they’re fantastically simple.  Just apply TTL-level serial data to the input of the transmitter, and watch it appear at the output of the receiver.  That’s it.  No configuration/setup required.  The only complication is that there is no error checking.  So you’ll need to be clever about dealing with the occasional garbage data.

So how does this all work together then?  Well, when you press the button on the prototype remote, the 9V battery is then connected to the transmitter module and the MCU (via the 5V regulator).  The MCU then sends out a slew of bit-banged (since the ATTiny13 has no hardware UART) serial data to the transmitter, which then sends it wirelessly to the receiver.

Now this is a garage door opener!  Well, sortof...

The receiver then sends this data to the ATMega128 (on the AVR-MT-128 dev board), which does have a hardware UART.  If the received data is correct, a relay on the dev board is quickly closed and then opened again.  The relay terminals are wired up in parallel with the door open/close button inside the garage.  Thus, the action of the relay simulates a real button press and causes the garage door to open/close.

The receiver

That’s it.  Again, pretty simple, right?  The receiver, since it’s got an LCD display, also indicates how many times the door has been actuated (either opened or closed).  This was a comforting feature during initial testing, because it allowed me to determine whether or not my garage had been opened at any unexpected time.

Sophisticated, yes?Well I’ve been driving around with this silly protoboard taped to my center console for about two months now.  It’s been working great; I can now operate my garage door reliably from the street (a distance of probably 50′), and this little gadget has made for such a nifty conversation piece that I might just leave it in protoboard form.  I mean, a small enclosure would be nice and stuff, but…

Seriously though, if you have any cheap and cheerful ideas for housing the transmitter in a more elegant and robust manner, do let me know in the comments.  By the way, at this point in a post I’d usually provide links to my code, but I’m not going to do that this time.  I’d rather not make it too easy for the tech-savvy thief to break into my garage, you know?  Yea, I’m probably just being paranoid, but still.  Lots of crime in Iowa you know. 🙂

Now ultimately I’d like to extend the functionality of my device so that it automatically opens and closes the door when I come and go.  If you’re curious about how that might be done, take a look at one of my older posts on the subject.  Thanks for reading though, and feel free to pose any questions below!