Looking to wire relays on top of existing momentary switches

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
Hi, all! I'm looking to automate my standing desk and have wired up most of what I need already (and written the code) - height sensors, etc. are all done and working. The final piece is to jumper the relays I have to the existing microswitches, and I can't quite seem to get the wiring right. I've confirmed the relays are firing and can connect other devices (simple lamps, etc.) - just can't get them working in conjunction with my desk controller.

My first attempt of just wiring Switch C to Relay C / Switch NO to Relay NO didn't work, nor did the second attempt adding Switch NC to Relay NC into the mix (which temporarily rendered the button non-functional, understandably; de-soldering NC resolved that).

Pictures attached of the relay board I'm using, as well as three views of the controller itself. From what I can see on the traces, it almost looks like one switch has NO/C on the same trace, with NC separate; the other has NO and NC on another trace, with C separate. Not sure if that makes sense. Any advice you can offer would be appreciated! The goal is to have height controllable through EITHER the buttons or the relays (which I've wired up to Home Assistant).

Relay board:
Relay Board.jpg
Desk controls:
Desk Controls 1.jpgDesk Controls 3.jpgDesk Controls 2.jpg
 

sghioto

Joined Dec 31, 2017
5,376
My first attempt of just wiring Switch C to Relay C / Switch NO to Relay NO didn't work,
Why wouldn't that work if the system works with the micro switches?
One switch maybe wired Normally Closed and the other Normally Open on the circuit board.
If that's the case the NC switch may need to be wire in series with NC contacts of the relay.
 
Last edited:

sghioto

Joined Dec 31, 2017
5,376
Can't tell for sure from the photo but it looks like both switches are wired Normally Closed on the board.
Again if that's the case the C and NC contacts of the relays will need to wired in series with the switches.
 

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
This is excellent, thank you both for the quick replies @sghioto and @bertus!

This may be a bit much to ask, but is there any chance you could mock up a quick diagram of this for me just to confirm my understanding?
 

sghioto

Joined Dec 31, 2017
5,376
Doesn't matter which wire you cut into as long as you use the COM and NC contacts on the relay module.
1612681071176.png
 
Last edited:

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
Thanks, @sghioto. That helps, but I feel like I'm still lacking a fundamental understanding here due to my beginner's level of knowledge, admittedly.

In the diagram you show above, I understand going from the C through-hole of the switch into NC on the relay, and it looks like do nothing with the NO pole. What I don't understand is the terminus of the other points:

- From the NC pole of the switch, connect to where?
- From the C contact on the relay, connect to where?

...or should these be connected to each other?

Thanks again; I've appreciated your help and will continue to research the topic.
 

sghioto

Joined Dec 31, 2017
5,376
- From the NC pole of the switch, connect to where?
- From the C contact on the relay, connect to where?
Those are the wires that connect the switch assembly to your existing setup.
You have two wires coming off each switch. You just need to cut one of those wires ( doesn't matter which one) and connect the relays as shown for both switches
 

sghioto

Joined Dec 31, 2017
5,376
Should have also mentioned do not change anything on the switch assembly, leave as is.
Just insert relay contacts as described above.
 

Art Mezins

Joined May 26, 2019
11
Too much is still left unsaid (unknown). For example, does this use AC/Mains or DC? I'm guessing that to change direction, the momentary switch has to be pressed continuously, since otherwise it would required more control overhead to do its job.

Also not stated is what happens when you press both switches? That's important for safety so that you don't short out the AC/Mains or DC power supply. AC motors don't reverse easily as they rely on a starter winding of some kind (even lowly induction motors use a "shorted" winding that is the reason they are so inefficient). I suspect this uses an AC/DC "Universal motor" because it's cheap and has lots of starting torque, but you could have a high speed DC motor that geared down or even two AC (or DC) motors. In all single motor cases, changing directions requires the reversal of two sets of windings (a Universal motor needs the stator and rotor windings reversed), unless this uses two motors instead -- does it? Generally, safe control systems make sure that only one motor can be energized at a time. The simplest way to do this is to wire the switches and relays in series so that ONLY one "wins" when both are pressed.

Having said all that, have you checked YouTube to see if anyone has already done this? You'd be amazed how often the solution is up there.
 

PadMasterson

Joined Jan 19, 2021
63
I thought it was the "Green Wire" it's always the Green wire. :) Sorry, couldn't resist. If you have an Ohm meter you should be able to ring out just how those switches are wired pretty quick.
 

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
Thanks, all! I've done a bit more troubleshooting this week and while I haven't made progress, I do have information.

I've confirmed that wiring the relays up in parallel disables the switch and causes the relay to do nothing, even though I've confirmed connectivity on my wires when the button is pressed (C/NO) or not (C/NC).

The controller uses 29 V DC. Haven't tested behaviour yet when both buttons are pressed, an interesting thought experiment. I do have a diagram I drew of the state of various button presses though, and connectivity between which solder pads.

Left three pads are "up" switch
Right three pads are "down" switch

Six pads left to right are:
C NO NC NC NO C

There's constant connectivity between the two NC and NO pads between each switch, according to the multimeter.

I've looked at YouTube but haven't found anything particularly useful yet; I'm sure it's out there waiting to be found!

Thanks again, I'll keep on plugging.
 

Attachments

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
Quick additional update: switching NO/NC to the relay did allow the down button to work! But not the up button if it wasn't also connected, and I had to wiggle due to some crummy soldering on my part. Seems like it could be down to my own bad connections...
 

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
None of this makes much sense.
Forget the relays for the moment. Does the system operate using just the switches?
I know, right?? I thought I knew a bit about this stuff until this happened.

Yes, the system works with just switches. I disconnect it from the relays when I'm tired of tinkering so that I can still have a functioning desk.
 

Thread Starter

Don_Thate

Joined Feb 6, 2021
10
You have two wires for each switch coming from the switch assembly correct?
Off in the direction of the motor/power, or off into the relays from the pads?

Four wires total are coming from the motor assembly into the switch housing.

Each switch has three pads as they're SPDT (like in your diagram).

It didn't seem to matter how many wires I branched off the pads and to where on the relay, unfortunately.
 

sghioto

Joined Dec 31, 2017
5,376
Look at the last photo in your first post. That's the switch assembly I'm referring to.
If you have your ohm meter I can explain what to measure to see how those switches are wired
 

Art Mezins

Joined May 26, 2019
11
Thanks, all! I've done a bit more troubleshooting this week and while I haven't made progress, I do have information.

I've confirmed that wiring the relays up in parallel disables the switch and causes the relay to do nothing, even though I've confirmed connectivity on my wires when the button is pressed (C/NO) or not (C/NC).

The controller uses 29 V DC. Haven't tested behaviour yet when both buttons are pressed, an interesting thought experiment. I do have a diagram I drew of the state of various button presses though, and connectivity between which solder pads.

Left three pads are "up" switch
Right three pads are "down" switch

Six pads left to right are:
C NO NC NC NO C

There's constant connectivity between the two NC and NO pads between each switch, according to the multimeter.

I've looked at YouTube but haven't found anything particularly useful yet; I'm sure it's out there waiting to be found!

Thanks again, I'll keep on plugging.
Still missing are the two connections to power. Since this has a DC power source, that requires the power's polarity to be reversed to change the (DC) motor's direction. This is normally done with a cross-connected DPDT center-off momentary switch. For more details, see: https://forum.digikey.com/t/polarity-reversal-using-a-dpdt-switch/626
 

Attachments

Top