1
\$\begingroup\$

I have a project where I need to interface with a machine that was never built to be interfaced with.

I basically want to programatically press physical buttons on the machine(critical) and also sense(optional) when they have been pressed.

The circuit below shows a circuit that I've been thinking of (blue represents existing circuitry): enter image description here

To press the button, I was thinking of simply adding a solid state (or normal) relay in parralel with the switch (press button).

My question is about sensing that the physical button was pressed.

Option 1 in the image above shows that I would have to cut into the circuit and insert a relay in series.

Is option 2 possible? Can I coil a wire around the existing wire and so induce a voltage/current in the coil that I could read from a MicroController? I don't yet know what voltage or current will be running through that cable. Not sure if it's going to be 5V or 35v, but it would probably be DC though. How many turns would be required if the MicroController is runnning on 5v or 3.3v?

I've seen this type of sensing on some taredown videos online of high end lab equipment, but never tried it myself.

I'm trying to leave as much of the existing circuitry in place as possible so as to (ideally) fully preserve any warranties that come with the machine.

Assumption

  1. The switches will be low current micro swicthes as this is a high-end consumer device.
  2. The in existing circuit VCC will not be at the same voltage as my MicroController
asked May 15, 2014 at 8:06
\$\endgroup\$
8
  • \$\begingroup\$ Do you have any idea about the current through that switches? Also use a continuity tester to check if the switches are connected to either VCC or GND (if the circuit requires high or low signals to trigger). \$\endgroup\$ Commented May 15, 2014 at 8:08
  • \$\begingroup\$ @Cornelius: I don't have the machine yet so hard to tell. My assumption would be that these would be low current micro switches as this is a high-end consumer device. Does it matter if the switches are connnected to VCC or GND? Would you not sense the change when the switch is pressed? \$\endgroup\$ Commented May 15, 2014 at 8:15
  • 1
    \$\begingroup\$ Rewire the existing switch to activate a relay, which closes the 'old' circuit. Your interface can sense either the rewired switches, or an extra relay contact, and it can activate the relay. \$\endgroup\$ Commented May 15, 2014 at 10:22
  • 1
    \$\begingroup\$ @Gineer . Is the switch intended to START the machine? Be very careful here. National Electrical Code requires that ONLY one switch is permitted to start a machine. Other start switches are permitted, however only one of them may work at any time. Your additional switch AND the existing switch in the design would each be enabled to start the machine. \$\endgroup\$ Commented May 15, 2014 at 22:36
  • 1
    \$\begingroup\$ @Gineer . NEC (national electric code) sometimes is difficult to interpret. I do believe that any function that initiates motion or heating does fall into the "only one" start switch permitted. \$\endgroup\$ Commented May 16, 2014 at 16:40

2 Answers 2

2
\$\begingroup\$

If the switch is connected to a pin of a microcontroller, then the lead will have very little current, and will not be able to drive a relay or otherwise be current-sensed. However you should be able to sense whether the switch is pressed or not by looking at the voltage of the switch terminals.

With the switch open, measure the voltage on the two pins. One might be ground (0), and the other a voltage like 3.3v or 5v, usually referred to as Vcc Then close the switch. Depending on whether there is a pull-up or pull-down resistor, one of the leads will change to match the other (both will now be ground, or both will be Vcc). You can then use that lead as the indication of your switch closure.

As you proposed, you can use a solid-state relay across the contacts to simulate the switch closing.

answered May 15, 2014 at 8:23
\$\endgroup\$
2
\$\begingroup\$

Assuming you have a circuit that has switches connected to GND and is supplied to the same voltage as your MCU:

schematic

The software:

  • pin should be configured as input and as IRQ. When it is 0, the switch was pressed
  • when you want to simulate switch toggle configure pin as output and write 0 to it. Then make it input pin.

Assuming that the switch is connected to VCC:

  • the circuit changes (R1 to GND, MCU Pin connected to floating end of switch)
  • pin should be configured as input and as IRQ. When it is 1, the switch was pressed
  • when you want to simulate switch toggle configure pin as output and write 1 to it. Then make it back input pin.
answered May 15, 2014 at 8:23
\$\endgroup\$
11
  • \$\begingroup\$ Thanks for the input but my main concern is that I doubt that the circuit would be at the same voltage as my micrcontroller. I was hoping to keep it as isolated as possible. If it is at the same voltage, this does seem like a good solution though. \$\endgroup\$ Commented May 15, 2014 at 8:37
  • \$\begingroup\$ @Gineer in that case an optoisolator will work. \$\endgroup\$ Commented May 15, 2014 at 8:38
  • \$\begingroup\$ What if the signalling is 24V AC? What if it is 240V AC? \$\endgroup\$ Commented May 15, 2014 at 8:38
  • 2
    \$\begingroup\$ The point I'm making is that this question is pointless answering until the OP has told us what the current signalling method is OR, provide an answer that covers most bases. I'm saying this because the OP doesn't currently know and might try your circuit and end up with a small melted chip!! \$\endgroup\$ Commented May 15, 2014 at 8:40
  • 1
    \$\begingroup\$ @Gineer I and others give up our free time to help you guys. The least you could do is provide the necessary information to make answering relatively straightforward. After all it's you who is gaining the benefit and asking me to speculate on this method or that method is not getting you an answer nor is it fulfilling this site's objective of having great questions answered with great answers. Consider this please. \$\endgroup\$ Commented May 15, 2014 at 9:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.