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....
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 - Arduino Playground - 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...
accuracy is important to me
How much accuracy and why is it important?
Pete
pbendel:
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.
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.
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?
bruceme:
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:
-
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.
-
Resistors have a voltage rating as well as a power rating. Most 1/8W resistors are not rated to take 380V.
-
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.
pbendel:
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?
pbendel:
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.