Teaching a power strip new tricks

The new aquarium I am setting up has dual 250W Visa-Therm (now Marineland) Stealth heaters to keep the temperature up at around 82F, even though my house is often only 60F when I am too cheap to run the heat. Being a geek, I wanted to be able to tell how often the heaters are running. Thanks to an aborted project to monitor power usage of the server rack in my basement I have a spare iButtonLink MS-TC Temperature and Current MultiSensor, which measures how many amps are passing through a wire using a DS2438. This is done using a clamp-on current transformer with a 1-20A range (under 1A the values are erratic), which translates into 120-2400 VA, or the same range of Watts if the power factor is at unity (1.0). A heater is an inductive electrical device which thankfully does run at unity, making this the perfect device for measuring the draw. The trick with a clamp-on current transformer is that you have to wrap it around just the hot line, not the ground/neutral. This means you need to split apart a cord to isolate the hot line. In order to do this safely I decided to try to cram the transformer inside of a power strip.

I started with a Belkin surge-protected power strip, since the bulge from the surge protection circuit looked like it would be big enough to stick the transformer:

Inside the power strip

The surge protection circuit was yanked to make room for the transformer, and a new hot wire was added since the existing ones were too short (due to the hot going through the surge protection circuit). I also drilled a small hole in the side of the power strip casing to feed through the output terminals from the current transformer, to attach to the 1-wire current MultiSensor (these wires are low voltage/current, and are safe to have exposed, they do not directly connect with the 120V AC line). It was a tight fit, but everything fit with just the removal of one unused bit of plastic in the power strip case. The ground of neutral wires go under the transformer, while the hot goes through it. The switch still works too:

Transformer crammed into the power strip

The back of the power strip case was reattached, the transformer attached to the and the sensor attached to my home 1-wire network (already in use monitoring temperatures in parts of the house). The finished device actually looks decent:

Finished power strip, with sensor

Reading of the values was done with digitemp in Linux (version 3.5.0). The output looks like this:

japiserv:/tmp# /usr/bin/digitemp_DS2490 -q -A -c /data/sensors/digitemprc_tank -t0
Oct 13 05:58:22 Sensor 0 VDD: 4.57 AD: 0.39 CAD: 1 C: 20.78

The AD field is the voltage output from the current transformer. If it is 0.20V or above (indicating at least 1A), you do this transform:

$amp = (($AD - 0.20) / ((3.78 - 0.20) / 19)) + 1.00

The zero value is 0.09V, so if the volt is between 0.09 and 0.20 then the reading is below 1 amp (and out of spec of the current transform), but to get some sort of value I used this transform:

$amp = ($AD - 0.09) / (0.20 - 0.09)

Anything 0.09V and below is just considered zero. The numbers that came out were actually fairly accurate when compared with the output from my Kill-a-Watt meter. I used a 100W incandescent light bulb for a low-power test, and a 1300W toaster oven for a high power test. Both of these devices have a power factor of 1, and the results were within 5% of the Kill-a-Watt meter. I might be able to get more accuracy by tweaking the 0/1/20 amp voltage points to match exactly with loads taken at normal temperature conditions in my house. To convert the amps to VA (which is the same as Watts at PF=1), I multiplied with 120V (my house line voltage).

What did not work at all was measuring the power consumption of the Coralife Lunar Aqualight that I use to light the aquarium. This light uses 4 65W compact fluorescent bulbs, driven by two electronic ballasts (with independent switches). The power factor on these is about 0.57 (which would cause a huge difference between real power (wattage) and apparent power (VA), but even the VA readings from the MultiSensor were completely off, reading 763 VA compared to 318 VA on the Kill-A-Watt. I think this is because the CF ballasts are non-sinusoidal (power consumption is only a specific points on the 60Hz AC wave), and to read those you need a true RMS ammeter. A true RMS ammeter measures the current on the line many times per second, then uses a root-mean-square calculation on that data set to output a more accurate number. So, measuring load from the heaters works fine (PF is constant, and the power draw is the same across the AC wave), but measuring the lights was definitely not possible.

For data logging, I wrote a cron job that retrieves the amps from the MultiSensor once a minute, and uses RRDtool to log the values. RRDtool also generates nice graphs, and I can generate nice graphs, and put them in a status page for the tank:

Aquarium heater power draw

The graph should have 3 general data levels: 0 watts when neither heater is on, 215W when one heater is on, 430 W when both heaters are on. Values between these points indicate that there were two data points in the same step, that were at different levels and RRDtool has averaged them. As you can see the heaters have to do quite a bit of work to keep the temperature up at 83F (the room was around 68-70F during this testing), but on average one heater could keep the tank at temperature, it would just need to run nearly constantly.

Leave a Comment