View Single Post
  #76   Report Post  
Posted to uk.d-i-y
whisky-dave[_2_] whisky-dave[_2_] is offline
external usenet poster
 
Posts: 10,204
Default Logging mains voltage: Arduino or Raspberry Pi?

On Friday, 13 April 2018 22:22:14 UTC+1, dennis@home wrote:
On 13/04/2018 15:38, whisky-dave wrote:
On Friday, 13 April 2018 15:23:29 UTC+1, dennis@home wrote:
On 13/04/2018 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.

You need a simple mains transformer to a few volts and feed it
into the A-D converter on an arduino and do some maths on the
samples.


How often will it sample and what sort levels of spikes and
transcients. And don't forget the ADC can only really 'see' DC
voltages.


AC is just DC with an offset.


Yeah sure it is.

Idiot.

In direct current (DC), the electric charge (current) only flows in one direction. Electric charge in alternating current (AC), on the other hand, changes direction periodically. The voltage in AC circuits also periodically reverses because the current changes direction.


Offset has nothing to do with it.


Only a couple of resistors required to set the voltage range to be
within the ADC input range.


doesn't help much though, in fact depending on these spikes you might
not 'see' much after reducing it through a transformer and
rectifier.


So we have something else you don't know much about.


but still a lot more than you do.
DC is NOT AC with an offset.


A nodeMCU will almost certainly do everything you want including
logging to a remote database.


Problem is dealing with mains AC voltages and having to reduce them
first.


Isolating transformers isolate the mains and reduce them to safe levels.


Isoltaing transformers isolate that is why they are called Isolating
transformers. It is NOT always about reducing to a safe level, because there are pulse isolating transformer nothing to do woith isolating for safety reasons.

http://uk.farnell.com/wurth-elektronik/760301301/gate-driv-transfrmr-1-1-1-750uh/dp/2431618?mckv=z8r992i2_dc|pcrid|78108291069|&gross_ price=true&CATCI=pla-131232739029&CAAGID=14983516629&CMP=KNC-GUK-GEN-SHOPPING-WURTH_ELEKTRONIK&CAGPSPN=pla&gclid=EAIaIQobChMIyIX t7cu-2gIVY7HtCh3HSw7qEAQYASABEgJiZvD_BwE&CAWELAID=12017 3390000290019

No who knows nothing.
isolating transformers aren't just about safer voltages.