Home |
Search |
Today's Posts |
|
UK diy (uk.d-i-y) For the discussion of all topics related to diy (do-it-yourself) in the UK. All levels of experience and proficency are welcome to join in to ask questions or offer solutions. |
Reply |
|
LinkBack | Thread Tools | Display Modes |
#1
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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? |
#2
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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 -- And the child had a permanently runny nose and ought to be provided with a handkerchief or, failing that, a cork. (Lords and Ladies) 12:45:01 up 13 days, 23:13, 15 users, load average: 1.66, 1.05, 0.76 |
#3
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. What do you want to do with the data when you've measured it? Theo |
#4
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. |
#5
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 12/04/2018 12:37, 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? Unless you are wedded to doing it with an RPi it might be easier to use something that comes with ADCs as standard. ARM evaluation board maybe. Learning curve for getting anything to work is a bit steeper. eg. https://uk.rs-online.com/web/p/proce...-kits/1501738/ I have one of the STM ones which ISTR are about £20. -- Regards, Martin Brown |
#6
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 12/04/2018 13:05, Theo wrote:
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. What do you want to do with the data when you've measured it? Theo I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. Would you go for Arduino rather than adding an ADC to a Pi? |
#7
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
I was just wondering in what way you want to log it, RMS peak or cycle
differences, leakage or impedance of earth/Neutral etc. Brian -- ----- - This newsgroup posting comes to you directly from... The Sofa of Brian Gaff... Blind user, so no pictures please! "newshound" wrote in message o.uk... 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? |
#8
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
I was just thinking, if I were trying to do this, I'd be needing to measure
live to neutral on a small load, and the resistance of the earth to neutral or maybe anything that is being generated between them. anything else will be seen by the other measurement. However its important to run a load realistically during the times of monitoring and also switching any loads that could be connected to see how it responds. I've measured lots of spikes on mains when very little is actually running, but when things are running particularly resistive loads like heaters or cookers, the spikes are fewer, making me think much of it is just generated by some other reactive loads switching. Not able to do this now of course, but look on a scope at unfiltered and unloaded mains and its a wonder that it works! Brian -- ----- - This newsgroup posting comes to you directly from... The Sofa of Brian Gaff... Blind user, so no pictures please! "newshound" wrote in message o.uk... On 12/04/2018 13:05, Theo wrote: 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. What do you want to do with the data when you've measured it? Theo I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. Would you go for Arduino rather than adding an ADC to a Pi? |
#9
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
newshound wrote:
I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. OK, so how do you intend to get the data from the widget into Excel? Plug into a USB port? Write to an SD card? Wifi? Email? Internet? How reliable does it need to be? Can you cope if it reboots occasionally? How slow is a slow transient? Would you go for Arduino rather than adding an ADC to a Pi? It depends what you want to do. Theo |
#10
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
In article ,
newshound writes: 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? Funny, I've just built some hardware to do this on a Pi for a presentation and demo I'm doing later this month. However, the object was to demonstrate using an ADC on a Pi rather than specifically to measure the mains voltage, although I thought it might be fun to record mains voltage. As has been said, the Pi doesn't have native ADC built-in, so you would need to add on ADC's. However, another significant factors would be which of these platforms you have familiarity with, and if having a linux OS there would be useful for the project, or not. -- Andrew Gabriel [email address is not usable -- followup in the newsgroup] |
#11
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 12/04/2018 12:37, 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? Thinking outside the box a bit, many line interactive UPSs come with voltage logging and can be connected via USB. -- Cheers, John. /================================================== ===============\ | Internode Ltd - http://www.internode.co.uk | |-----------------------------------------------------------------| | John Rumm - john(at)internode(dot)co(dot)uk | \================================================= ================/ |
#12
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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 I have an openenergy Arduino. It sends data to a Raspberry Pi running Openenergy software. For a while I was using a public Openenergy server. Readings are recorded every second. I record live to neutral voltage. To record other voltages I would need an irregular 13 amp socket. If I am away from home in the winter I can see whether my boiler has been running. -- Michael Chare |
#13
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
In article , Theo theom+news@chi
ark.greenend.org.uk scribeth thus newshound wrote: I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. OK, so how do you intend to get the data from the widget into Excel? Plug into a USB port? Write to an SD card? Wifi? Email? Internet? How reliable does it need to be? Can you cope if it reboots occasionally? How slow is a slow transient? Would you go for Arduino rather than adding an ADC to a Pi? It depends what you want to do. Theo More or less any old APC UPS wll tell you what the voltage is over time least the few i have do that show you over and under volts... -- Tony Sayer |
#14
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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? |
#15
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. |
#16
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 12/04/2018 17:58, John Rumm wrote:
On 12/04/2018 12:37, 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? Thinking outside the box a bit, many line interactive UPSs come with voltage logging and can be connected via USB. Others have made that point. I don't have one and don't really think I need one. I think I should be able to "DIY" a solution which would also serve as an introduction to this new kit: I've been thinking for a while that it would be nice to have a portable data logger that I could use to monitor the heating system, etc. I have an old PicoLog system somewhere that came in handy when diagnosing a combi boiler problem, but of course that had to be hooked up to a rumning netbook so it was all a bit cumbersome. |
#17
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 12/04/2018 15:41, Andrew Gabriel wrote:
In article , newshound writes: 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? Funny, I've just built some hardware to do this on a Pi for a presentation and demo I'm doing later this month. However, the object was to demonstrate using an ADC on a Pi rather than specifically to measure the mains voltage, although I thought it might be fun to record mains voltage. As has been said, the Pi doesn't have native ADC built-in, so you would need to add on ADC's. However, another significant factors would be which of these platforms you have familiarity with, and if having a linux OS there would be useful for the project, or not. I've not touched either platform before, one of my reasons I'm interested in the views of those who have. I converted an old desktop into a Ubuntu box so that I could have a play, and I've also got a Mint stick that I have used occasionally. I'm not particularly bothered about getting into Linux, but I'd do it if I had a project that needed it. I havn't done any serious coding for more than 30 years, but I imagine I could pick it up without too much difficulty (especially now that it's easy to find examples on the net). |
#18
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 10:36, newshound wrote:
On 12/04/2018 17:58, John Rumm wrote: On 12/04/2018 12:37, 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? Thinking outside the box a bit, many line interactive UPSs come with voltage logging and can be connected via USB. Others have made that point. I don't have one and don't really think I need one. Fair enough - just thought I would mention it in case you had one knocking about and had not thought about it. I think I should be able to "DIY" a solution which would also serve as an introduction to this new kit: I've been thinking for a while that it would be nice to have a portable data logger that I could use to monitor the heating system, etc. A roll your own solution will obviously be more versatile (and probably fun!) -- Cheers, John. /================================================== ===============\ | Internode Ltd - http://www.internode.co.uk | |-----------------------------------------------------------------| | John Rumm - john(at)internode(dot)co(dot)uk | \================================================= ================/ |
#19
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly |
#20
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On Thursday, 12 April 2018 14:18:33 UTC+1, newshound wrote:
On 12/04/2018 13:05, Theo wrote: 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. What do you want to do with the data when you've measured it? Theo I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. Would you go for Arduino rather than adding an ADC to a Pi? The problem I'd see with an Arduino would be Time in that it;s not very good as a clock but this would only be important if you wanted to know what time an event happend rather than it just happening and being recorded. |
#21
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. |
#22
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 12:23, whisky-dave wrote:
On Thursday, 12 April 2018 14:18:33 UTC+1, newshound wrote: On 12/04/2018 13:05, Theo wrote: 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. What do you want to do with the data when you've measured it? Theo I'm trying to see if there are overvoltage transients on a farm site, and/or what the neutral is doing. Slow, rather than fast transients. I recognise that the arduino analogue inputs are multiplexed. So, I want to collect data for a week or so, then pop it into Excel to see if anything is going on. Would you go for Arduino rather than adding an ADC to a Pi? The problem I'd see with an Arduino would be Time in that it;s not very good as a clock but this would only be important if you wanted to know what time an event happend rather than it just happening and being recorded. Yes, I'm not necessarily worried about exact time. Unless I suppose I want to escalate the results to the distribution company. |
#23
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 11:43, John Rumm wrote:
On 13/04/2018 10:36, newshound wrote: On 12/04/2018 17:58, John Rumm wrote: On 12/04/2018 12:37, 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? Thinking outside the box a bit, many line interactive UPSs come with voltage logging and can be connected via USB. Others have made that point. I don't have one and don't really think I need one. Fair enough - just thought I would mention it in case you had one knocking about and had not thought about it. Â*I think I should be able to "DIY" a solution which would also serve as an introduction to this new kit: I've been thinking for a while that it would be nice to have a portable data logger that I could use to monitor the heating system, etc. A roll your own solution will obviously be more versatile (and probably fun!) Fun is good :-) |
#24
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. Only a couple of resistors required to set the voltage range to be within the ADC input range. A nodeMCU will almost certainly do everything you want including logging to a remote database. |
#25
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. 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. 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. |
#26
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/18 15:02, newshound wrote:
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). My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! As you say, small mains transformer, a few resistors and of course a 5 volt Zener on the ADC input. Well i'd just clamp that to the 5V rails. You will run at a high impedance so no damage dumping the odd mA into the supply -- €œSome people like to travel by train because it combines the slowness of a car with the cramped public exposure of €¨an airplane.€ Dennis Miller |
#27
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On Friday, 13 April 2018 15:44:58 UTC+1, The Natural Philosopher wrote:
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). My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Depending on how long it takes you. The idea device would just be a pen holder that respondened to changes in the voltage a bit like an old chart recorder and I'm still not sure how you'll detect what's blowing a kettle elimante I wouldn't have thought they'd be suseptable to transients. Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! I'm still note sure how you'll know what caused teh transcient even after detecting it. How long will this kettle element be ON for ? |
#28
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 16:44, whisky-dave wrote:
On Friday, 13 April 2018 15:44:58 UTC+1, The Natural Philosopher wrote: 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). My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Depending on how long it takes you. The idea device would just be a pen holder that respondened to changes in the voltage a bit like an old chart recorder and I'm still not sure how you'll detect what's blowing a kettle elimante I wouldn't have thought they'd be suseptable to transients. Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! I'm still note sure how you'll know what caused teh transcient even after detecting it. How long will this kettle element be ON for ? OK, it's not an element in a kettle. It's in a wallpaper stripper, used as a steam generator. They are typically failing after half a dozen (separate) 20 minute sessions. They are not being boiled dry, they are on a timer to prevent that. Oh, and nothing else seems to be blowing. I *originally* thought it must be a problem with the chemistry of the local water supply but two separate chemists with long experience are convinced that this is unlikely. I just thought that for less than £100 worth of re-useable bits it would be nice to investigate the electrics. |
#29
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 15:44, The Natural Philosopher wrote:
On 13/04/18 15:02, newshound wrote: My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! Let's park that for the moment As you say, small mains transformer, a few resistors and of course a 5 volt Zener on the ADC input. Well i'd just clamp that to the 5V rails. Clamp what? I'm confused. You will run at a high impedance so no damage dumping the odd mA into the supply |
#30
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/18 17:24, newshound wrote:
On 13/04/2018 15:44, The Natural Philosopher wrote: On 13/04/18 15:02, newshound wrote: My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! Let's park that for the moment As you say, small mains transformer, a few resistors and of course a 5 volt Zener on the ADC input. Well i'd just clamp that to the 5V rails. Clamp what? I'm confused. The input. resistor and reverse biased diode to +5V. If it goes above 5V the diode clamps it to the suplly rail plus half a volt or so. Standsard technique. https://i.stack.imgur.com/LfzyT.png is a perfect example from a similar app. https://electronics.stackexchange.co...erence-voltage -- €œA leader is best When people barely know he exists. Of a good leader, who talks little,When his work is done, his aim fulfilled,They will say, €œWe did this ourselves.€ €• Lao Tzu, Tao Te Ching |
#31
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On Thu, 12 Apr 2018 12:37:06 +0100, newshound wrote:
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? Arduino, hands-down. Otherwise you're paying about 3 times the price for a lot of fancy graphics rendering power you will not be needing. Personally I also much prefer C to Bash. -- This message may be freely reproduced without limit or charge only via the Usenet protocol. Reproduction in whole or part through other protocols, whether for profit or not, is conditional upon a charge of GBP10.00 per reproduction. Publication in this manner via non-Usenet protocols constitutes acceptance of this condition. |
#32
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On Fri, 13 Apr 2018 07:38:11 -0700, whisky-dave wrote:
Problem is dealing with mains AC voltages and having to reduce them first. Not really. Loads of suitable sub-min mains transformers in every local recycling site; help yourself for free. Or just a couple of quid new from China through Ebay. -- This message may be freely reproduced without limit or charge only via the Usenet protocol. Reproduction in whole or part through other protocols, whether for profit or not, is conditional upon a charge of GBP10.00 per reproduction. Publication in this manner via non-Usenet protocols constitutes acceptance of this condition. |
#33
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/18 20:45, Cursitor Doom wrote:
On Fri, 13 Apr 2018 07:38:11 -0700, whisky-dave wrote: Problem is dealing with mains AC voltages and having to reduce them first. Not really. Loads of suitable sub-min mains transformers in every local recycling site; help yourself for free. Or just a couple of quid new from China through Ebay. Or 3 and a bit quid from Rapid https://www.rapidonline.com/vigortro...a-0-6v-88-3700 -- How fortunate for governments that the people they administer don't think. Adolf Hitler |
#34
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
In article ,
newshound scribeth thus On 13/04/2018 16:44, whisky-dave wrote: On Friday, 13 April 2018 15:44:58 UTC+1, The Natural Philosopher wrote: 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). My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Depending on how long it takes you. The idea device would just be a pen holder that respondened to changes in the voltage a bit like an old chart recorder and I'm still not sure how you'll detect what's blowing a kettle elimante I wouldn't have thought they'd be suseptable to transients. Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! I'm still note sure how you'll know what caused teh transcient even after detecting it. How long will this kettle element be ON for ? OK, it's not an element in a kettle. It's in a wallpaper stripper, used as a steam generator. They are typically failing after half a dozen (separate) 20 minute sessions. They are not being boiled dry, they are on a timer to prevent that. Oh, and nothing else seems to be blowing. I *originally* thought it must be a problem with the chemistry of the local water supply but two separate chemists with long experience are convinced that this is unlikely. I just thought that for less than £100 worth of re-useable bits it would be nice to investigate the electrics. So let me get this right your trying to find out why a steam wallpaper stripper is failing?. I'd ask what make is it ?. Where is it made? What's the actual specified mains voltage of the element in use for it? What the local mains voltage as measured over few days sampling and are you in a rural overhead line fed area or urban underground? And has the same thing happened to any like for like replacements?... Finally does it take any RCD trip out when it fails?. -- Tony Sayer |
#35
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
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. 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. 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. |
#36
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 20:38, Cursitor Doom wrote:
On Thu, 12 Apr 2018 12:37:06 +0100, newshound wrote: 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? Arduino, hands-down. Otherwise you're paying about 3 times the price for a lot of fancy graphics rendering power you will not be needing. Personally I also much prefer C to Bash. https://learn.openenergymonitor.org/...-power-adapter |
#37
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 13/04/2018 18:47, The Natural Philosopher wrote:
On 13/04/18 17:24, newshound wrote: As you say, small mains transformer, a few resistors and of course a 5 volt Zener on the ADC input. Well i'd just clamp that to the 5V rails. Clamp what? I'm confused. The input. resistor and reverse biased diode to +5V. If it goes above 5V the diode clamps it to the suplly rail plus half a volt or so. Standsard technique. https://i.stack.imgur.com/LfzyT.png is a perfect example from a similar app. https://electronics.stackexchange.co...erence-voltage OK perhaps I am getting my Zeners and Shottkys mixed up, it is a long time since I actually built anything like that. But that's the principle I was trying to convey. |
#38
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
"newshound" wrote in message news On 13/04/2018 16:44, whisky-dave wrote: On Friday, 13 April 2018 15:44:58 UTC+1, The Natural Philosopher wrote: 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). My point is, do the low pass filtering in software, though. A bridge rectifier and smoothing cap is a peak voltage reading abortion for this: you want to do an RMS average especially for kettle elements. My solution is less components, but more code. Code is cheap! Depending on how long it takes you. The idea device would just be a pen holder that respondened to changes in the voltage a bit like an old chart recorder and I'm still not sure how you'll detect what's blowing a kettle elimante I wouldn't have thought they'd be suseptable to transients. Only issue is doing a square root in binary integers...arduinos don't have native floating point ****! I'm still note sure how you'll know what caused teh transcient even after detecting it. How long will this kettle element be ON for ? OK, it's not an element in a kettle. It's in a wallpaper stripper, used as a steam generator. They are typically failing after half a dozen (separate) 20 minute sessions. They are not being boiled dry, they are on a timer to prevent that. Oh, and nothing else seems to be blowing. I *originally* thought it must be a problem with the chemistry of the local water supply but two separate chemists with long experience are convinced that this is unlikely. I just thought that for less than £100 worth of re-useable bits it would be nice to investigate the electrics. It's ridiculous to imagine that mains quality has anything to do with your wallpaper strippers failing. Failing in what way? Permanently? Open circuit? Short circuit? Resettably? What make & model? -- Dave W |
#39
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
"Dave W" wrote in message
news It's ridiculous to imagine that mains quality has anything to do with your wallpaper strippers failing. Failing in what way? Permanently? Open circuit? Short circuit? Resettably? What make & model? If it is failing open or short circuit, that suggests that the element is "burning out" - that its temperature is rising to a point that it melts and either breaks or else makes contact with earth. Over-voltage would seem to be a plausible cause of this. But with a large amount of water around it (the water that the wallpaper stripper is boiling) and presumably good conduction from the element wire to the surface and from there to the water, I'd be surprised if over-voltage would cause *that* much of a temperature rise. Sounds an intriguing problem. I'll be interested to hear whether the mains voltage *is* varying that much, if you manage to get a data logger working. |
#40
Posted to uk.d-i-y
|
|||
|
|||
Logging mains voltage: Arduino or Raspberry Pi?
On 14/04/18 09:34, newshound wrote:
On 13/04/2018 18:47, The Natural Philosopher wrote: On 13/04/18 17:24, newshound wrote: As you say, small mains transformer, a few resistors and of course a 5 volt Zener on the ADC input. Well i'd just clamp that to the 5V rails. Clamp what? I'm confused. The input. resistor and reverse biased diode to +5V. If it goes above 5V the diode clamps it to the suplly rail plus half a volt or so. Standsard technique. https://i.stack.imgur.com/LfzyT.png is a perfect example from a similar app. https://electronics.stackexchange.co...erence-voltage OK perhaps I am getting my Zeners and Shottkys mixed up, it is a long time since I actually built anything like that. But that's the principle I was trying to convey. No: using a zener is a completely different technique. There you aim to divert extra overvoltage current to ground. The clamp diverts it to the power supply first. Shottkys are only necessary to clamp fast transients, also: Ordinary diodes work OK. Just put a small cap after the resistor. Like this http://vps.templar.co.uk/Odds%20and%...nput-stage.png -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|