desperadogear
New Member
hello folks,
im planning to build an energy meter for 230V, 2A and around 5% accuracy using an 8bit AVR microcontroller. My inspiration is AVR465 application note .. https://www.electro-tech-online.com/custompdfs/2007/02/doc2566.pdf
The first challenge that i faced is whether to use a tranformerless powersupply or not..
In the application note mentioned above, a transformerless power supply was used (see power supply.png attachement) where this was the description given "The power supply is based on halfway rectification. During negative half-wavescapacitor C1 is charged and during positive half-waves the capacitor is drained.Zener diode D1 (minus the forward voltage of diode D2) dictates to which voltage C2 is charged. Voltage regulator U1 uses the energy stored in C2 to produce a stable output voltage. Resistor R1 controls the charge and discharge of C1 and also limits the current flow through zener diode D1."
where C1 is 0.68uF Metallised Polyester Capacitor, R1 is 470ohms , D2 1N4004 is Diode, 1A, 400V, D1 is Zener Diode , 500mW, 15V .
C2 is 470 uF electrolytic capacitor, U1 is Linear Regulator, 3.3V.
I wish to replace U1 with 7805 regulator to get 5V output.
I trust Atmel people very much but wished to hear from Senior members of electro-tech-online. please see this and review the circuit( is it safe, would it have any side effects ?)
The second challenge is the current front end. I have a 10:1 current transformer and the one that was specified in the application note was 2500:1 far different from the one i have... So i have decided to use a series resistor 0.1 ohms between line,load and neutral and measure the voltage across the resistor(refer to current.png in attachments) by giving it to microcontroller's inbuilt analog to digital converter through an amplifier built using lm358 with gain just enough to bring it in the range of the in built voltage reference 2.56V in the microcontroller.
for example max current =2A rms
voltage across resistor=2A * 0.1 ohms = 200 mV rms
after an opamp amplifier with gain 4. voltage is 200 mV *4= 800 mV rms=2 *square root(2) *.8 peak to peak approx 2.56 V
I was wondering if this would be a safe way to measure current
suggestions and advice greatly appreciated...
im planning to build an energy meter for 230V, 2A and around 5% accuracy using an 8bit AVR microcontroller. My inspiration is AVR465 application note .. https://www.electro-tech-online.com/custompdfs/2007/02/doc2566.pdf
The first challenge that i faced is whether to use a tranformerless powersupply or not..
In the application note mentioned above, a transformerless power supply was used (see power supply.png attachement) where this was the description given "The power supply is based on halfway rectification. During negative half-wavescapacitor C1 is charged and during positive half-waves the capacitor is drained.Zener diode D1 (minus the forward voltage of diode D2) dictates to which voltage C2 is charged. Voltage regulator U1 uses the energy stored in C2 to produce a stable output voltage. Resistor R1 controls the charge and discharge of C1 and also limits the current flow through zener diode D1."
where C1 is 0.68uF Metallised Polyester Capacitor, R1 is 470ohms , D2 1N4004 is Diode, 1A, 400V, D1 is Zener Diode , 500mW, 15V .
C2 is 470 uF electrolytic capacitor, U1 is Linear Regulator, 3.3V.
I wish to replace U1 with 7805 regulator to get 5V output.
I trust Atmel people very much but wished to hear from Senior members of electro-tech-online. please see this and review the circuit( is it safe, would it have any side effects ?)
The second challenge is the current front end. I have a 10:1 current transformer and the one that was specified in the application note was 2500:1 far different from the one i have... So i have decided to use a series resistor 0.1 ohms between line,load and neutral and measure the voltage across the resistor(refer to current.png in attachments) by giving it to microcontroller's inbuilt analog to digital converter through an amplifier built using lm358 with gain just enough to bring it in the range of the in built voltage reference 2.56V in the microcontroller.
for example max current =2A rms
voltage across resistor=2A * 0.1 ohms = 200 mV rms
after an opamp amplifier with gain 4. voltage is 200 mV *4= 800 mV rms=2 *square root(2) *.8 peak to peak approx 2.56 V
I was wondering if this would be a safe way to measure current
suggestions and advice greatly appreciated...