On 13/04/2018 11:45, The Natural Philosopher wrote:
On 13/04/18 10:24, newshound wrote:
On 13/04/2018 07:48, Halmyre wrote:
On Thursday, April 12, 2018 at 1:59:45 PM UTC+1, newshound wrote:
On 12/04/2018 12:51, The Nomad wrote:
On Thu, 12 Apr 2018 12:37:06 +0100, newshound
wrote:
For reasons I won't bore you with, I'm interested in building a
cheap,
simple data logger to monitor mains voltage, ideally two channels
(live
to earth and neutral to earth). In the dim and distant past I have
designed and built such things more or less from scratch, but surely
someone has already done this.
I havn't used either Arduino or Pi before, but I assume one or other
would be the obvious starting point.
However ATM google isn't giving me a strong lead. Thoughts?
A quick google came up with:
https://openenergymonitor.org/forum-archive/node/58.html
https://circuitdigest.com/microcontroller-projects/arduino-ac-voltmeter
https://www.briandorey.com/post/ardu...e-and-current-
logging
Avpx
Thanks, that second one looks like a good basis.
Won't the capacitor smooth out any transients you might want to observe?
I am looking for transients longer than maybe a second or so.
Obviously, might need to experiment with capacitors a bit.
Hmm. My instinct would be to sample MUCH more frequently than that and
sample AC as well so that you get a really good set of smaples, and then
do any filtering in 'software'
I dunno how long an arduino trakes to do a sample but it cant be that long
Oh. It seems you can sample at up toÂ* 9.6Khz...that should do nicley -
and take an RMS value of the waverorm and moving average it out over the
last say one second...and use that to store.
Or uses a shirfter period for more sensitivity to transients
Basically you need a smallÂ* mains transformer to step down to about 5VAC
or so, then a voltage diveider to set the mean voltage in the middle of
the arduino range, and a pot to scale the output to - say 0-5V
representing up to say 500V peak...
If say you are taking 5khz samples you will need a nmemoiryy buffer of
5000 16 bits (10k of RAM) to store theÂ* samples and a further location
to do the running average in.
Well within an arduino I'd say.
Thanks, yes I agree completely about the sampling strategy, but I'd sort
out details once I knew the capability of the device. My point was that
I think I am looking for slowish variations rather than microsecond
transients. (I am trying to find what is killing electric kettle elements).
As you say, small mains transformer, a few resistors and of course a 5
volt Zener on the ADC input.