Pages: [1]   Go Down
Author Topic: 240 Volts ac variable voltage measurement  (Read 1212 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, how would you build a circuit that measures the voltage of a variable speed fan where the voltage varies from 240 volts ac at 100% fan speed to about 75 volts ac at 40% fan speed?  I don't want a non-linear response from a transformer, accuracy is important to me.  But a one second lag in response time would be fine.  I am stocked with rectifiers, resistors, and capacitors, but not a working cicuit....
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12483
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Warning 240 volts is dangerous - you probably knew that allready - both for humans and Arduino's. So use an optocoupler.

If you attach a small 240 V lamp parallel to the fan and an LDR to the analogRead() from the Arduino you have an optocoupler that follows the voltage.

To solve the non linear mapping of the light to voltage, you could use - http://arduino.cc/playground/Main/MultiMap -

Another way could be: (you should check the numbers first.
=>> AC to DC   (some diodes, and a capacitor or so) followed by a voltage divider 50:1 [1 MΩ - 20KΩ ]  and you will get ~0~5V

my 2 cents...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Edison Member
*
Karma: 35
Posts: 1429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
accuracy is important to me
How much accuracy and why is it important?

Pete
Logged

Where are the Nick Gammons of yesteryear?

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 691
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, how would you build a circuit that measures the voltage of a variable speed fan where the voltage varies from 240 volts ac at 100% fan speed to about 75 volts ac at 40% fan speed?  I don't want a non-linear response from a transformer, accuracy is important to me.  But a one second lag in response time would be fine.  I am stocked with rectifiers, resistors, and capacitors, but not a working cicuit....

Well, I have used a AC-AC transformer with 1% results on a bog-standard 328P Atmel running the Arduino IDE and using the openenergy monitor basic sketch + suggested hardware (a few resistors, a cap, and an external AREF source to maximize the current sensing happiness). A transformer seems like a wise investment considering the voltages involved and the isolation it brings to your circuit.
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 13
Posts: 1325
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What makes you think a transformer is a non-linear device.  The turns ratio of a transformer is what determines the ratio of input to output and this is physically fixed during manufacture.  The series resistance/inductive reactance of the secondary winding will introduce some voltage loss when you draw current but for sensor purposes you may assume the current draw is near enough zero so the voltage loss is also zero.  Using a precision rectifier circuit on the transformer output will eliminate any diode loss.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Similar problem... I am building an Electric Vehicle charging station.  I need to detect if the input line is 120v or 240v AC so I can tell the car to take it easy on 120V (limit to 10A).

To measure the AC side of the line, I'll start with a ~10:1 transformer, diode rectify & cap the AC to nice smooth(enough) DC, v-split to 0-4.5vdc for measurement.

Now why do I need the transformer... just rectify/cap/v-split.   My math on the voltage splitter seems reasonable

800kOhm top resistor
15kOhm bottom resistor
They are seeing 290 uA => 100mW (1/8watt resistors should work)
btw.. 220nF on the capacitor



Thoughts?


* vsense.png (7.56 KB, 600x247 - viewed 87 times.)
« Last Edit: August 10, 2013, 06:42:04 pm by bruceme » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Now why do I need the transformer... just rectify/cap/v-split.   My math on the voltage splitter seems reasonable

I can see two three issues:

1. The sense output is not isolated from the mains. You can't ground the bottom end of R2 because it is connected to mains live or mains neutral, depending on which way round you connected the mains.

2. Resistors have a voltage rating as well as a power rating. Most 1/8W resistors are not rated to take 380V.

3. You need a diode with at least an 800V reverse voltage rating for that circuit. The voltage rating of 1N4148 is must less than that.
« Last Edit: August 11, 2013, 12:33:46 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, how would you build a circuit that measures the voltage of a variable speed fan where the voltage varies from 240 volts ac at 100% fan speed to about 75 volts ac at 40% fan speed?  I don't want a non-linear response from a transformer, accuracy is important to me.  But a one second lag in response time would be fine.  I am stocked with rectifiers, resistors, and capacitors, but not a working cicuit....

How is the fan voltage being controlled: by a variac or similar (in which case the voltage will be sinusoidal), or by phase control (in which case the voltage will be an interrupted 240V sinusoid)?

Do you want the to measure the peak voltage, the RMS voltage, or something else?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 691
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't want a non-linear response from a transformer, accuracy is important to me. 

Interesting proposition that is not born out by my experiments, BTW. Using a small 0.08VA transformer, a 16-bit front end, and appropriate resistors, caps, etc. results in a linear R^2 of 0.999989 line fit. Measured from 10VAC to 130VAC using a variac and a Fluke 87 DMM. Seems pretty linear to me. The key here appears to be to keep the transformer as lightly loaded as possible, I've got over 50K in resistance across the secondaries, so the current flow is very low.
Logged

Pages: [1]   Go Up
Jump to: