What microcontroller or relay to use to control 120v tools with these switches?  - Page 1
Forum section: electronics / beginners

author: artvandalai
author_rank: Regular Contributor
timestamp: October 01, 2025, 12:11:34 am
content: What type of microcontroller or relay would I need to control inline on/off 120v appliances with these type of 12v rocker switches?

author: Psi
author_rank: Super Contributor
timestamp: October 01, 2025, 01:42:08 am
content: I assume you mean mains voltage, so AC at 120V?Do you know the current draw at 120VAC and the type of load that will be controlled? eg heater, electronic device, motor...The type of load is important because some loads draw a huge amount of current when you throw the switch before lowering to a normal current once moving (like motors)If you don't know the current draw, or this thing will have a plug on it to connect any 120V device, then you have to use a relay that can handle the max amps that any appliance will draw from a 120V wall socket. So you'd probably want a relay that has a 12V coil (for control using your switches) and with relay contacts that can switch 120VAC at 20A.(But if you want to switch a big motor that will draw 10+amps then I would get a bigger relay, maybe 35A.)Keep in mind that working with mains voltage is dangerous.Always consider that whatever you make may be used by someone else who might get hurt if it's not made correctly and safely.There's also might be laws in your area about what you can/cant do, and definitely laws about what you can make to sell.Two important safety things that come to mind are- Making sure the mains cables is held properly inside the device so it wont pull out and leave exposed live wires.- Making sure the device is earthed correctly if it has exposed metal.- The earth wire connection to the case should be longer (have some slack) so the earth wire remains connected even after others are pulled out.But there are many more important safety things.

author: tunk
author_rank: Super Contributor
timestamp: October 01, 2025, 02:40:33 pm
content: Couldn't give you any advice about "microcontroller or relay",but I think I would take it apart and see if the switches arerated for 120/230Vac (not very likely, but worth a check).

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 01, 2025, 04:18:43 pm
content: There are also solid state relays that can be used for this. Something like you can find here:https://www.futurlec.com/Relays/SSR25A.shtmlThe benefits over a normal relay with contacts is that there are no contacts that can wear out due to sparking. But make sure that the connected load does not draw so much current that it kills the relay. The same applies here as for normal relays like stated by Psi.

author: artvandalai
author_rank: Regular Contributor
timestamp: October 02, 2025, 04:46:38 am
content: Quote from: Psi on October 01, 2025, 01:42:08 amI was looking for an alternative to this type of inline foot switch with a more organized way to control a few devices under 5 amps like a soldering iron, exhaust fan, lights

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 02, 2025, 09:00:50 am
content: Maybe a remote control set like for example this onehttps://www.aliexpress.com/item/1005006990135279.htmlor this onehttps://www.aliexpress.com/item/1005007065128961.htmlcan do the job for you.There are a lot of these kind of remotes to be found. You can also search for home automation type devices that have the switch build in with the outlet and an option for remote control.

author: xvr
author_rank: Frequent Contributor
timestamp: October 02, 2025, 11:38:53 am
content: Quote from: artvandalai on October 02, 2025, 04:46:38 amSo, you need relays for 120VAC/5A contact rating and coil voltage in range 5-24V. Any of these:https://www.digikey.ie/en/products/filter/power-relays-over-2-amps/188?s=N4IgjCBcoOwExVAYygMwIYBsDOBTANCAPZQDaIcAbDJQAwCsIhAHDM5c0%2BPfXDACxcwPOMwgBdQgAcALlBABlGQCcAlgDsA5iAC%2Bhao2ggUkDDgLEyIAMzNa1uLRCSQs%2BUrVbdhMPzBOjEzM8QhJIcnoAAgBBLkoYuIA6GATCFNi0xKiMkGZU3MT%2BfOYs-IBOfP9KsEq4WtKcsGtKosbsoXjGvJzHfLganrqe5p7Wrjh2lzdIEABVdVUZAHlUAFlcdGwAV2Vcb3A-CEC0LBDLcJB6f2trRhZ%2BG4h726fch95naTkZjw1tPXAZWYZUQxhO5lCVic4gBAFoEMdICothYwhFnDpMUAAlso you need PSU for relays colis (for appropritae voltage).

author: Psi
author_rank: Super Contributor
timestamp: October 03, 2025, 12:28:12 am
content: Could do it with Home Assistant plus some switching multi-boards without having to deal with mains voltages.Just need a multi-board with switchable outputs that HA can control. Then any low current switch/button module that HA can also read to control it.But it's way overkill to implement Home Assistant just for this, however if you've been wanting to play with Home Assistant anyway them it might be a good opportunity .