Wednesday 11 June 2014

arduino - Detect one out of five distinct voltage levels


I got a fan on my roof which is powered via a five step manual transformer to control the speed. The transformer outputs a voltage of either 0, 90, 110, 135, 165 or 230V AC. I would like to use an Arduino to detect which level is currently selected. What would be the easiest way to accomplish this? Preferably using some non-intrusive method if possible (measure electric field somehow?).




Answer



I don't have the means to draw a circuit at the moment, so here's a list of bits...




  1. smallest 6V transformer that you can get




  2. smallest bridge rectifier





  3. smoothing capacitor, say 200uF




  4. potential divider using a 1K trimmer to output 4.5V when the input is 230VAC




  5. series of if - then tests to measure the output of this circuit connected to an analogue input




  6. Arduino output to taste





You might want to include a low pass RC or LC filter after the smoothing capacitor (item 3) to get a faster response. This is a direct connection and you wanted indirect, but it's a lot simpler and more reliable than some magnetic coupled device. That might require amplification and further processing. Plus the transformer provides safety isolation.


This circuit effectively converts the AC input voltage to a 0 - 4.5VDC signal for direct input to the Arduino's ADC pin. So you'll get a reading of 0 to 922 units which you can then bracket in software. Remember that just before the trimmer, you'll get root(2) times the transformer output voltage. I'd leave a little headroom and not try to read ADC input right up to 1023 units. That allows for useful feedback if the voltage overshoots a little, rather than maxing out at 1023.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...