View Single Post
  #41   Report Post  
Posted to uk.d-i-y
newshound newshound is offline
external usenet poster
 
Posts: 8,019
Default Logging mains voltage: Arduino or Raspberry Pi?

On 14/04/2018 11:42, The Natural Philosopher wrote:
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


Thanks very much, that makes sense now!