Detecting button presses on a 120V button

At work we have a large industrial mixer that I use. It's from probably the 1960s and everything is ancient on it. I've already set up a modern thermocouple setup to take temp readings and log them on a laptop. I realized it'd be nice to detect button presses on the control panel (start/stop, plus 4 speed buttons, plus clock start/stop and a clock reset button) and tie that into excel macros to record the status along with temp and time.

I thought that'd be relatively easy, connect all the buttons to an arduino in parallel to their existing circuits. But then I opened the cabinet up and realized this isn't low voltage signal buttons. They're switching full 120V AC and sending that as signals over to the electrical panel that actually runs the motor.

So, is there an easy, cheap, safe way to detect button presses on something like this? I haven't mapped out the buttons fully yet (they've got 4 connections on the back, not two, and it looks like maybe they're wired in series somehow, but the wiring is very nicely done with no slack in heavy-gauge wire and the labels are so old they've mostly fallen off, so it'll take some time to trace it all out and figure out what it's doing. On the other hand, the wires go from the buttons over to a nice terminal strip, so wiring in would be dead simple....)

timropp:
They're switching full 120V AC and sending that as signals over to the electrical panel that actually runs the motor.

So, is there an easy, cheap, safe way to detect button presses on something like this?

I AM NOT A QUALIFIED LICENSED ELECTRICIAN! DO NOT TAKE ANYTHING I SAY AS ANYTHING MORE THAN 'PSEUDOCIRCUIT!'

Pseudocircuit, like pseudocode, meaning an outline of how to do something, not the actual specific parts to use. This is the outline but there are 50 other safety and reliability aspects that need to be taken into account. For example, you don't want to tap into the system in a way that could -break- your lovely vintage mixer is something fails.

You need to detect whether a wire has 120V on it or not. Tap into it with a tiny 120V-6V transformer. Rectify that to make DC. Plug that into an optocoupler, and send the output from that to the Arduino.

Maybe a 7/8/9V transformer, because there will be losses losses during rectify. That's why you need an actual Electrician to design this.

There are probably black box module style off the shelf parts that can do this, with mains in and TTL out. Still need an Electrician to pick the right module for your exact situation because the integrity of your mixer is your ultimate responsibility.

You can also use a part of this schematic. Description is in dutch.
http://users.telenet.be/on1bte/Domotica/Spanningsdetectie%20op%20impulsrelais.pdf
Use 120k for 120VAC in stead of 220k for 230VAC.

because there will be losses losses during rectify.

No, the other way round. If the transformer is rated at 6V RMS the rectifying that will give you the peak voltage 8.4V. That is what you will see.

Plug that into an optocoupler,

If you have a transformer then there is no need for an opto coupler.

Grumpy_Mike:

because there will be losses losses during rectify.

No, the other way round. If the transformer is rated at 6V RMS the rectifying that will give you the peak voltage 8.4V. That is what you will see.

I forgot about that. I don't mess with AC very much especially rectifiers. That's why I'm here to write the ouline and fill in most of the blanks, and the guy who gets the Really Big Bucks corrects my errors. LOL!!

If you have a transformer then there is no need for an opto coupler.

-I- don't trust -anything-. If I'm patching a $30 consumer grade widget into a system that if the widget fails might shut down my business for a month for repairs, then I want as much protection as is reasonably possible. The opto protects in both directions. Imagine a series of errors/failures from the Arduino power source side towards the system that 'tries' to blow up the interface transformer. Insurance is priceless.

The transformer actually scares me the most because it's the only part directly connected to the system. That should be as industrially graded and tested as possible - nunna that CCC Cheap Chinese Crap from ebay.

The transformer actually scares me the most because it's the only part directly connected to the system.

But there is no physical direct contact between the primary and secondary coils.
Belt and braces if you like but there is no rational about it.

Grumpy_Mike:
But there is no physical direct contact between the primary and secondary coils.

The only separation is the tiniest fraction of an inch of two layers of insulator. I keep going back to the sentence '...a large industrial mixer that I use. It's from probably the 1960s and everything is ancient on it.' The grandkids of the people who designed and built that machine could be operating it today. The laptop that OP plugs into it today has more computing horsepower by itself than existed in the entire world at that time. With care it'll last another couple of generations. (The machine that is, CERTAINLY not the laptop! LOL!!!)

Belt and braces if you like but there is no rational about it.

One little oopsie and the machine is toast. I'd go along with three condoms but be much more comfortable with four. :slight_smile: I'd bend rebar with my teeth before I'd risk that machine.

jbarchuk:
One little oopsie and the machine is toast. I'd go along with three condoms but be much more comfortable with four.

It is not recommended to "double up" on condoms. The explanation is that the different layers "cinch" against each other and the persistent abrasion is likely to wear through them. :wink:

On the other hand it is a common practice to "double glove" in the operating theatre. The extra layers do tend to become uncomfortable, especially over three or more hours. The under-gloves are black or green to make tears visible. It is however a spurious argument for the practice, to suggest that this could reduce the risk of needle-stick injury (as should be fairly obvious).


Current practice would be to use opto-couplers - alone - for this sort of monitoring. Capacitors plus a protective resistor can be used instead of just resistors to limit the current to the opto-couplers though the circuit cited above utilises high-value resistors with little heat dissipation to make use of the fact that you require only a tiny current to control CMOS logic inputs.