[ale] My Raspberry π is here
Alex Carver
agcarver+ale at acarver.net
Fri Oct 19 01:01:28 EDT 2012
On 10/17/2012 13:17, mike at trausch.us wrote:
> On 10/17/2012 11:06 AM, Michael H. Warfield wrote:
>> On Wed, 2012-10-17 at 10:11 -0400, Derek Atkins wrote:
>> A much more difficult straw man idea I've been wrestling with:
>>
>> (This one I believe Mike T will relate to immediate based on some of our
>> recent discussions...)
>>
>> How about a DIY power line disturbance analyzer? Take your AC power
>> line signal (both phases) and divide it WAY down (say 1000:1) so it fits
>> within range of an audio signal. If you're not really concerned too
>> much, some nice resisters will do along with some micro-fuses and
>> transorbs. If you are paranoid about playing with high voltage, some
>> linear opto-isolators are even better, just more complicated. Now feed
>> those two signals to the stereo input of a USB audio adapter. It's just
>> a 60Hz signal, after all, with the two phases 180 degrees out of phase.
>> Most ADC (analog to digital converter) daughter boards I'm seeing for
>> the RP are two slow for what I want (15 samples per second for a 16 bit
>> 8 channel board is NOT going to hack it).
>
> Can we build it? Can we build it? Please? :-)
>
>> Now you can monitor and measure things like...
>>
>> * Surges
>> * Sags
>> * Spikes
>> * Dropouts
>> * High frequency noise (notch for X10 and Insteon if desired)
>> * Frequency
>> * Voltage
>> * THD (Third-order Harmonic Distortion)
>> * Imbalances
>>
>> Basically the things that a decent line disturbance analyzer does only
>> without the $10,000 price tag. Commercial units I've worked with will
>> handle more phases and more inputs at higher voltages, are hipot (hi
>> potential) tested and isolated for workplace safety, and are often
>> calibrated and tracible back to NIST standards, which are not
>> necessarily things we need (hipot isolation is desirable to protect the
>> device but may not be necessary as a safety feature do to more limited
>> voltages in the home). That could be in the price range where you
>> install it near your breaker panel and just leave it there and download
>> data occasionally.
>
> Can we install it? Please? :-D
>
>> You can not measure things outside of the audio range of the device.
>> Things like DC offsets and very low frequency that an ADC could measure
>> but are generally not of serious concern.
>
> It would be possible to make an add-on board with a microcontroller or
> two that can then simply interface with the Rπ. Something that would be
> permanently installed like that could have the footprint on the wall
> that is a bit bigger than the Rπ, perhaps the size of a normal
> proprietary software box or so, meaning that if you really wanted to,
> you could have the external board communicate signal levels to the π
> using the GPIO pins, without such large division and keeping things in
> more-or-less digital integer land.
>
> I wonder, actually: I have a multimeter that the screen is borked on
> (was left in the car and crystals in the screen burst). I wonder if the
> circuitry in there, which handles up to 500V AC (as well as DC) would be
> useful, though it's a black box to me. That said, it's not a very
> stable reading even on known-stable voltage sources like a brand-new DC
> battery, so I don't know if it'd be very much quality.
>
>> Add another audio input and some induction picks and you could add
>> current monitoring. Another audio input and you can have neutral to
>> earth ground (common mode) monitoring. Some nice beefy batteries can
>> keep it going through some long power failures. With enough on-board
>> horsepower to do a decent FFT and you could store large amounts of
>> signal data and events.
>
> I don't understand much of how that'd work, but I do know that the thing
> is supposed to be able to run on 4 AA batteries. If that's the case,
> then it should run on the (way too many) rechargeable cell phone
> batteries that I have, when put together in a pack and with a suitable
> charging circuit for them. Alas, I have a lot of learning to do before
> I could even think about attempting something like that.
>
>> Yes, I've read the articles indicating that audio input to the RP has
>> been less that sterling (sucks? still?) and may be rather
>> problematical. That's something I really want to test and compare to a
>> more general purpose device.
>
> I've not interfaced with either the analog audio or video outputs, but
> it strikes me as a very powerful device with the GPIOs that are
> available, and almost all the applications I can think of that'd involve
> extra hardware are things I think I'd want to be implemented in an
> add-on board using the GPIO as an interface. The only reason for that
> is that I would want to protect the device from any external sources,
> and use fused links for each of the GPIOs. I've read that this board is
> quite sensitive to out-of-spec-ness.
Suggestion:
Use transformers to step down the voltage instead of resistor dividers.
They will provide galvanic isolation and are easier to interface.
It's much safer and easier to implement than optoisolators (though that
is possible but requires a more complicated powered circuit). Most of
the commercial monitors just use small-signal transformers for the
voltage monitoring. There's no appreciable power draw through the
transformers so something like a tiny toroid wound transformer about the
size of an audio transformer would work.
I'd have to look at the specs on the R-pi daughter board but you might
consider making your own ADC daughter board from something a bit faster
like a Linear Technology LTC2309 (12-bit comms via I2C) or one of the
Texas Instruments ADCs that are designed for this application. A couple
would be the ADS130E08 (8-channel, 16 bit, 8 kS/s), ADS130E04
(4-channel, 24-bit @ 16 kS/s or 16-bit @ 64 kS/s) (all with SPI). The
TIs have a few GPIOs on them and also some noise suppression.
Granted you'd have to solder a TQFP but they're quite nice. :)
More information about the Ale
mailing list