the original switch (as it looks good) which it turns out, does not really appreciate having to switch 230V instead of the 12V (or 24V?) it was designed for. I believe I can patch up the switch to work as designed, however I do want a better solution to switching the lamp on and off.
Please, please do not ever subject electric components to more than their rated voltage. Unless the switch has an overt label that says it is rated for: 1) 230 volts, and 2) AC, this is a recipe for tragedy.
I will briefly explain why, and then get to the suggestions. In a nutshell, components designed for 12 volts use closer spacing between conductors, premised on air’s natural insulating ability. Likewise, the insulation and plastic housings are designed to withstand that low voltage without becoming a hazard. But higher voltage means the spacing must be wider, the insulation thicker, and above 60 volts is when more strict regulation come into effect, because that’s the international threshold for where there is a serious risk of fatal electric shock.
As for DC vs AC switches, they are built differently to suppress arcs that form when opening the contacts. When a manufacturer gives the voltage rating for both DC and AC, it is often the case that one is substantially lower than the other, depending on which type of arcs they intended the switch to safely suppress. This is a worst-case rating, though, and a modern LED light bulb is unlikely to cause arcs (except when it’s dying).
To my knowledge, there are no common pre-built relays that provide their own low-voltage DC supply. Some relays do provide low-voltage AC (eg 24 VAC to control 240 VAC), but that doesn’t help you since that’s still putting AC into a DC switch.
However, a fairly safe approach would be to use a 230 VAC relay with the most common, safe power supply in the world: a USB phone charger. Provided that your relay can switch on 5 VDC, it should be easy enough to find a small USB charger that can be hidden inside the lamp, wired safely to 230 VAC, and that feeds 5 VDC to your existing tractor switch, which connects to the relay.
Onomatopoeia@lemmy.cafe 1 week ago
Yea, I’d just revert the entire setup to 5v DC, and get a 5v DC power supply - less than the voltage it was all designed for, and an led lamp. Or even go 12v and find a 12v led.
Pumping AC, 230v at that, through switching and wires meant for 12v DC just yells “I want a big nasty shock”. (Not that doing it with 120v would be any better).
I can only imagine the arcing happening in that switch