Hello, I'm currently attempting to interface an Arduino with a device that utilizes 120V AC signaling to detect which button is being pressed (inputs). I've explored a few methods, but each has its own set of problems. Here's a summary of the issues I've encountered with each approach:
AC → Full bridge rectifier → voltage divider → Arduino: The main problem with this method is that it requires sharing a common ground, making it non-isolated. This raises concerns about safety and interference, which can become quite complicated to address.
AC → Rectifier → voltage divider → Optocoupler → Arduino:
In this approach, using an optocoupler introduces isolation, but it draws a significant amount of current (8+ mA) from the voltage divider. This leads to heat dissipation issues and necessitates higher wattage resistors, which may not be optimal.
AC → Hall effect sensing IC → Arduino:
While the Hall effect sensing IC is accurate in measuring current, it may not be the ideal choice for detecting voltage signals since the signals usually have minimal current draw (perhaps a few mA at most).
Digital isolator: I'm not very familiar with this method, so I am unsure of its suitability and how it addresses the challenges posed by the other methods.
I would appreciate any advice or suggestions on how to effectively interface the 120V AC signaling device with the Arduino while ensuring safety, isolation, and minimal interference.
Thank you!
I'm not sure I understand: are you simply trying to gauge if mains voltage is on or off, or does the AC signal vary (i.e. are you measuring AC voltages that change)?
10 mA is not needed, especially if detection is the only goal. You could probably get away with 1 mA peak, which requires a 120K resistor, dissipating much less heat.
A capacitor can also be used to limit current, and dissipates no heat.
not an option. System already uses 120v ac signaling. Do not want to modify existing circuitry, only interface. Arduino is powered with isolated DC power supply.
Right... Bad idea! The problems come when the neutral and hot get mixed-up (which can happen with certain power plugs or extension cords). It's illegal to make a "product" like that unless the entire thing is enclosed in an insulated box with no connections coming-out (no USB, etc.).
This seems to be the most popular solution. The "voltage divider" is usually just one resistor in series with the the opto-isolator's internal LED. But it needs to be a 1 or 2W resistor. And if you don't have an "AC" opto-isolator, You also need a reversed diode across the LED to protect against reverse voltage.
You can also use a step-down transformer (with a rectifier, and usually a voltage divider, etc.). A long time ago I made a light dimmer (with a different microcontroller) and since I built my own power supply, I tapped-into the transformer secondary to get an isolated zero-crossing/phase-detection signal. But if you don't already have a transformer this is probably less energy-efficient than a resistor feeding an opto-isolator. And it' bulkier and more expensive.
How is this not an option? If you are trying to determine if a 120 VAC signal is present, it is the same as determining if mains voltage is present in a receptacle.
USB power cubes are cheap and include a transformer and associated circuitry: cut one open and take out the guts. Where the prongs connect, connect two wires instead (or whatever you require to connect to the circuit you are trying to gauge). The output is simply two wires (Vcc and GND) which you interface to your Arduino as a digital signal. Add a current limiting resistor and a 100nF decoupling capacitor for safety.
I am talking about a system that has multiple buttons. Having a power cube connected to each input is impractical plus these are just signal circuits, not power.