Software Support > Automated Projects

PC Smart Switch

<< < (3/3)

DaOld Man:
Updated code to use either switch (on/off) or push button (push on release off)
If you use a push button that is maintained (push on push again off), then you will need to select the switch mode.
See the code above.

I have tested it on my cabinet and it works great for me.

Zebidee:
All I was going to say is, make sure to put a reverse-biased diode across the DC input terminals for your relays. I'm guessing it is already there as part of that relay symbol on your diagram, but not sure.

Protects your ICs and other sensitive parts, including the relay coil itself, from high voltage spikes as the EM field collapses (when you turn it off). It will still work and test fine without the diode, but damage will be cumulative.

DaOld Man:

--- Quote from: Zebidee on April 08, 2026, 05:23:59 pm ---All I was going to say is, make sure to put a reverse-biased diode across the DC input terminals for your relays. I'm guessing it is already there as part of that relay symbol on your diagram, but not sure.

Protects your ICs and other sensitive parts, including the relay coil itself, from high voltage spikes as the EM field collapses (when you turn it off). It will still work and test fine without the diode, but damage will be cumulative.

--- End quote ---

Yes. Always! I have the diode across the relay coil terminals. Thanks for bringing that up, it is very important when working with electronics.

Navigation

[0] Message Index

[*] Previous page

Go to full version