0
\$\begingroup\$

This is my first question on here. I am good at programming but am a little stuck when it comes to electronics and connecting two circuits together. I would like to interface a spa controller with 3 basic elements - increase temperature button, decrease temperature button and “currently heating” LED. The MCU I am using runs on 3.3V and the physical controller runs on low voltage (12v I think).

I can access the back of the PCB on the physical controller and can see the 2 push buttons pads behind each button. I also have access to the + - controlling the red LED. The voltage reading is 0.45v when the LED is turned on and -0.29v when the LED is turned off. Logically to me there is a voltage change detected on my multimeter so there must be a way to interface this to an input of 1 or 0 on the micro. Also not sure if it helps but I got a reading of 135mA across the two pads while the LED was off.

The button pads are joined when I hit the key on the front of the controller unit. I would like the ability to simulate a button press from the micro (so I can change the temp up and down from the micro). I would also like the ability to sense if someone has pressed the physical button so I can update the current temp stored in the micro to keep them in sync. I realize this would require 4 pins (2 for input to the micro and 2 for output from the micro).

I have researched other questions here and on the net and am having trouble finding anything to do with interfacing with external circuits. I have found some information on 4N35 optoisolators and also reed relays.

Thank you

Horatio

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

The voltage reading is 0.45 V when the LED is turned on and -0.29 V when the LED is turned off.

To make any sense of these readings we would need to know where in the circuit they were measured. In any case you need to find the circuit common or GND - usually DC negative and take all readings referenced to there. (Multimeter black COM lead on circuit GND for all readings.)

A better way to avoid any risk of damage with the original system is to isolate the control (buttons) and feedback (LED) between the spa controller and your micro.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Spa interface schematic.

  • Micro OUT1 and OUT2 switch relays. Relay contacts in parallel with the original up and down buttons simulate button press.
  • For heating feedback an opto-isolator is wired in parallel with the original LED. The opto-isolator LED is infra-red and will have a forward voltage (1.2 V) which is lower than the visible LED on the original panel (1.8 to 2.0 V). The opto-LED will hog all the current and the original LED will not turn on brightly.

This scheme gives full electrical isolation between the two systems and saves trying to figure out how the original buttons and LED are monitored and controlled.

If you put the six interface wires on a plug connector you can restore original operation at any time by pulling the plug.

I would like the ability to simulate a button press from the micro (so I can change the temp up and down from the micro). I would also like the ability to sense if someone has pressed the physical button so I can update the current temp stored in the micro to keep them in sync. I realize this would require 4 pins (2 for input to the micro and 2 for output from the micro).

This isn't possible with my simple interface. Solving this aspect requires much more analysis of the original circuit.


The big flaw in the design is keeping the two systems in synch. On power up certain conditions would have to be assumed and problems with contact bounce, etc., would make keeping track very uncertain. It all sounds mildly dangerous as someone jumping in without checking the temperature could suffer severe scalding.


schematic

simulate this circuit

Figure 2. Opto version. Note polarity of wiring to opto-transistors.

To test whether the optos will work instead of relays make up a test connection as shown in Figure 3.

schematic

simulate this circuit

_Figure 3. Opto test circuit.

\$\endgroup\$
2
  • \$\begingroup\$ Would I be able to use optoisolators instead of relays in this situation? I have been reading this: electronics.stackexchange.com/questions/198228/… \$\endgroup\$
    – Horatio
    May 9, 2016 at 11:39
  • \$\begingroup\$ You might be able to. First problem is that the opto-transistor will only conduct current in one direction whereas the relay doesn't care. Second problem is that when fully on they still have a voltage drop across them. You'd have to test. Step 1 is to get wires from the existing buttons outside the box. You can then test very simply. I'll update my answer shortly. \$\endgroup\$
    – Transistor
    May 9, 2016 at 15:57
0
\$\begingroup\$

There are lot of things which needs to be answered here. Firstly,the thing about the detecting changes in the LED voltage and the pressing of the switches, all of them can be monitored by the MCU(Microcontroller). You need to refer to the schematic or can directly verify from the PCB whether the LEDs used are pulled up or pulled down. I say so, assuming that you are using a development board. Accordingly, you can set the pins of the microcontroller as Input Ports and then code according to your need.

Secondly, the pressing of the buttons can be dealt in a similar way. Again, you need to check the connection of the button in the schematic. On pressing the button, check the voltage across the switch. You can then determine whether the switch is pulled up or pulled down. Accordingly, you can code the microcontroller (by setting the pins as input) and store the value as per your needs.

Also, I think you need to try some basic codes on LEDs and their interfacing. Once you learn LEDs and their interfacing, buttons will be a cakewalk.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.