Computing stuff tied to the physical world

Back to basics

In Hardware on Oct 5, 2011 at 00:01

After all this messing around with 220V, and none of it working out so well, it’s time to simplify. I had a 17 VAC transformer lying around, so I decided to first get rid of all that risk. The goal remains the same: trying to reliably determine whether a low-wattage appliance is on or off. Here’s what I’m going to use:

DSC 2664

That’s a 75W lightbulb, hooked up to that AC power supply. It’s drawing 100 mA, as you can see. Unloaded, the voltage is a bit higher (as usual with transformers) – bit still harmless to experiment with:

DSC 2667

So now I can go back to a more convenient setup, and measure directly:

DSC 2668

Note that the light bulb is not on, but it does get hot to the touch. It’s still generating 20 V x 0.1 A = 2 Watts of heat, after all. Except that in this case the heat only rises, so it’s just the top of the light bulb which heats up.

It’s pretty odd that this draws only 3x as much current at 220V as at 20V. The reason for that is that the resistance of a lightbulb filament increases considerably when glowing. When a light bulb is turned on, it creates a “cold surge” which heats it up – at which point it’ll start drawing less current – a light bulb is a NTC PTC resistor!

Good, now we’re cookin’ again. I can hook up the USB scope at last:

Screen Shot 2011 10 04 at 14 19 58

Oooh… if that’s similar to the signal I’ve been measuring so far, then no wonder my amplitude algorithm was bad. Yikes… this thing is full of noise and spikes!

There are some nice features in the DSO-2090 software. Here’s the same waveform averaged over 128 scans:

Screen Shot 2011 10 04 at 14 43 22

Which shows that the signal indeed has non-repetitive noise superimposed on it.

Here’s something interesting. The purple line is an FFT spectrum analysis (the input signal was resized/moved):

Screen Shot 2011 10 04 at 14 26 40

There’s one spike in that spectrum. No idea what it is, but I bet that’s what’s messing up the sine wave.

Good. At least these different readings are consistent.

  1. Remember: I x V != watts (That only applies to DC power)

    watts = (I x V) x cos(phase angle)

    Big difference. You need both current and voltage measures and at precisely timed intervals to actually determine when power is being used at low levels. Something with a 10W switch mode power supply could look the same as a 1.5W standby phone charger if you aren’t correcting the measurements properly.

    Noise is only half your problem here.

    • Ah, yes, of course – thanks for the correction.

      I think the light bulb is purely resistive, so I should be ok for now, but you’re absolutely right. For more exact results later, I’ll need to detect zero crossings to synchronize to, I guess. Hm… more work ahead.

  2. Experienced the same problem, was mostly caused by laptop inverters.. Solved it by adding a low pass filter to the input stage with a cut-off frequency at roughly 100Hz.. Doesn’t require many components.. :)

    BTW: Don’t you mean a PTC resistor? :)

  3. This one spike in the FFT, wouldn’t that be the AC’s basic frequency at 50Hz ? It’s hard to tell without any scale displayed along with the graphics. If it’s not 50Hz, what’s its frequency? (and where on the graph is the 50 Hz spike, then?)

    • Yes, it’s unfortunate that there is no scale on the display. There’s a setup window, so I do have some extra info: the FFT detects all the first harmonics, and they are way to the left of the display (I compressed the horizontal scale to catch that extra spike). I don’t know where the spike lies. but my impression is that at this scale it is well over 10 KHz.

  4. As an alternative to the analogue filter suggested a JeeNode should be able to digitally filter fast enough for your intended purpose – if you haven’t already ;-)

    A useful free etext is ‘The Scientist & Engineer’s Guide to Digital Signal Processing’ available at

    See the chapters on Recursive Filters and Chebyshev Filters. HTH

  5. 10KHz could well be a neighbour with Power Line Networking?

  6. Your “well over 10 kHz” spike couldn’t be one of these, could it?

  7. Induction stoves use frequencies around 20 kHz, and some switching power supplies use these kinds of frequencies as well. If you can afford to do so, what would happen if you switch off every electric device in your home (don’t forget the fridge and the freezer) and make the measurements again?

Comments are closed.