Home automation, JeeNode, X10
In Uncategorized on Mar 8, 2010 at 00:01
Let’s go some more into home automation – the X10 power-line system in this case.
Here’s is a sketch which turns a remote appliance on and off every 3 seconds:

I used the Arduino X10 library (had to mess around with the use of headers to get rid of compile errors, and enable the pull-up on the zero-crossing input).
This sketch runs @ 3.3V on a JeeNode with some stuff attached to port 1:

It’s just a simple re-wiring to an RJ11 connector. This in turn, plugs into the XM10E opto-isolated interface:

There’s also a X10 receiver built into the XM10E, which I’m going to ignore for now.
X10, in its simplest and oldest form, is a power-line transmission system, i.e. the signals to control a switch are sent over the same wires as the AC power itself (using a 120 KHz signal injected at the zero crossings). Proper mains isolation is essential, of course – as built into the XM10E unit.
The result is that you can plug this device into any outlet in the house and it’ll switch on and off as defined in the above sketch:

It’s hard to miss – the relay built into that thing switches on and off with a very loud “clunk”!
The power consumption of this switch is 0.6 W off and 0.9 W when on, according to the Cost Control. Not bad, until you start installing many dozens of these switches around the house … then it will add up!
JeeHub
In Uncategorized on Jan 16, 2010 at 00:01
Yesterday, I mentioned the SheevaPlug. Today, I tried it out:
- Plug in Ethernet, plug in power, done.
- The box registers via DHCP.
- Figure out its IP address, and follow the New Plugger instructions.
- That’s it. Ubuntu 9.04, running on a pretty amazing little box. Effortless!
Here are some system details, once you log into it via SSH:

Upgrading to the latest software packages went flawlessly, using the normal Debian/Ubuntu apt-get update/dist-upgrade/autoremove commands. Once done, there is still plenty of room left on the internal flash ROM:

According to this post, power consumption is really low:

I’m seeing about 3.5 W, doing nothing and hooked up to 100 Mbit ethernet. Close enough.
Mighty impressive for a 1.2 GHz processor with 512 Mb RAM. Here’s a brief review of it.
This could make a pretty nifty “home monitoring and control center”. I’m not going to limit my options to this, the plan is to support a wide range of platforms – but still, this ShevaPlug sure is a comfy unit, almost like a desktop!
JeeNode
In Uncategorized on Jun 19, 2009 at 00:01
What a waste… this box arrived today:

Stuffed with lots of brown paper.
And the contents was that single item laid out in front: a 15 ml resin flux pen!
Flammable, sure. But does it really have to be delivered that way? As a separate shipment and delivery? And by UPS, those huge brown trucks – always the largest delivery vehicles coming here.
Does that make me a major carbon emitter, energy waster, and polluter? I guess in a way it does :(
JeeNode
In Uncategorized on Feb 16, 2009 at 00:01
Spot the difference:

… versus:

The regulator on the top is an LP2950-3.3, the regulator on the bottom is an MCP1702-33. Same voltage, same TO-92 package, different pinout. The board was designed for the LP2950, but the MCP1702 is cheaper and can supply more power (250 mA vs. 100 mA). Haven’t compared dropout voltages yet – if either one can deliver 3.3V from a 3.7 V LiPo battery or even from 3.6 V NiMh’s, then that would be a plus.
JeeNode
In Uncategorized on Feb 4, 2009 at 13:40
Whee, here’s a picture of my PCB:

Still in manufacturing, but it’s becoming very real now!
Update, Feb 6 – the solder mask has been applied:

In Uncategorized on Dec 14, 2008 at 15:49
These last few days, a little application has been running here which tracks energy (i.e. electricity) and gas consumption in the house, in a little window of its own:

That’s 640 watt and 1.333 m3/hr. These values are normally updated a few times a minute. There are still some wrinkles in the software, such as the gas consumption not adjusting properly when the meter stops fully, i.e. when no pulse is received once the central heating turns off.
The following systems are involved in this setup:
- some sensors and a transmitter based on an RBBB Arduino with an RFM12B
- a USB-powered receiver based on an Arduino Mini Pro with its own RFM12B
- a Linux server, i.e. a modified version of the Bubba/II NAS in this case
- the Mac notebook I usually work on, though it could be anything really
Only the first 3 items above need to be always on, with a combined power usage of less than 10W. Every 3 seconds, sensor readings are transferred and stored on the server, using a trivial text format for now. This proof-of-concept setup uses rsync to transfer the log from the server to the notebook every 20 secs, so the above window isn’t yet as real-time at it could be.
But even with such a crude setup it is easy to keep an eye on consumption – and by simply switching appliances on and off one can deduce their approximate power consumption.
Metering, Sensors
In Uncategorized on Dec 8, 2008 at 15:35
Here are two new home-made sensors, improving on this one they will soon replace:

The top one uses a QRD1114 sensor, which produces an analog signal, whereas the lower one is based on the SY310 with a built-in comparator to generate a digital output. The intended range is around 5..15 mm, hopefully just right to detect the 0-digit reflector on the gas meter and the the rotations of the energy meter, respectively.
Both of these sensors are connected to a 3-wire audio jack cable: shield = ground, ring = +5V, and pin = signal. Both sensors use a 330..470 Ω resistor to drive the IR-LED and a second one of 10..100 KΩ as pull-up for the output signal.
In Uncategorized on Nov 25, 2008 at 00:59
Ouch. It looks like there are two different Arduino Mini Pro’s around – a 5V @ 16 MHz and a 3.3V @ 8 MHz version. I thought I had the latter, but a quick check tells me otherwise. Which is no good when you’re trying to hook up 3.3V modules that do not tolerate 5V levels!
Oh well, just order the right one and wait for it to arrive…
Meanwhile, here’s another kind of impedance mismatch:

The obnoxious 2 mm vs. 2.54 mm pinout. Yuck.
In Uncategorized on Nov 1, 2008 at 00:39
Intrigued by LadyAda’s description of the Minty Boost kit, I ordered and built one. It delivers a stable 5V supply from 2 AA batteries to a USB plug, so you can use it to charge/power USB devices.

Trivial to build and works as advertised.
In Uncategorized on Oct 31, 2008 at 00:37
Solder fumes, ahhh that brings back memories…
Today, I built a little ultrasonic sensor to help me park the car. Took the easy way out and just purchased a simple kit from Conrad:

Now, instead of driving the car up to the point where some cardboard boxes leaning against the wall move, and then backing up, I can drive until a red LED comes on, and then, ehm… back up ever so slightly until the LED goes off. Progress!
Well, at least it gets rid of the old cardboard junk I was using as “bumper”.