Instructables

Semiconductor based switching with a different power source?

Lets say I want to switch on a circuit, that runs on one power source, with a different power source. I know this can be done easily with relays with the coil attached to one power source and the remaining pins to another power source. However, I want to know if something like this possible with electronic semiconductor based switches too.

I am trying to make a USB based power outage detector for my computer that can help me in safely shutting down my computer automatically when I am not there to manually shut it down. A male-female USB extension cable of a very short length can be stripped and the red wire (+ve) can be split and connected to an electronically controlled switch which will remain closed as long as it receives current from an external power source say a wall adapter. As soon as the power fails, the switch is opened. A simple USB device like a flash-drive can then be connected to the female end of the cable and the male end of the cable to the computer. A simple C program will check at specific time intervals if the flash drive is accessible. As long as there is power, the program will be able to access the flash drive. As soon as there is a power failure, the program will no longer be able to access the flash drive and start the shut down process.

Do have any suggestions?

mpilchfamily10 months ago

One problem. If the power fails the PC will instantly shut off preventing the PC from detecting a power failure. For this kind of thing to work you'll need a UPS. For a few dollars more you can get a UPS that will shut down the PC for you when the power fails.

raftor (author)  mpilchfamily10 months ago

Hi mpilchfamily, I already have a UPS. Without that there is no question of safely shutting down the PC. This can be understood by the nature of my question therefore I skipped that part. Anyway, I have already made a power failure detector device with a relay and a flash drive and it works quite well. Its just that relays are known to be unreliable in a lot of ways so I was looking for better alternatives.

If the relay gets worn out from lots of use than yes there can be reliability issues. But how often do you expect that relay to engage? It's not like your going to keep the coil constantly charged right?

raftor (author)  mpilchfamily10 months ago

The relay will be constantly active. The heating of the coil, current surges, back emfs. There are certain things that need to be taken care of before plugging it into the precious USB ports. I have tested the device and it works fine now but I am not sure about its long term reliability.

Designed right, and with the component ratings obeyed, it might safely switch over 100,000 cycles - and maintain complete circuit isolation while its doing it.

raftor (author)  steveastrouk10 months ago

Does the relay circuit need any other components in this case? What would be the right design in your opinion?

Can the back emf and the current surge be a problem for the components connected to the coil pins only or to the components connected to the other pins of the relay as well?

Keeping the coil energized on the relay will be a problem. It would be better to only activate the relay (i.e. energizing the coil) when you need too. Just a matter of finding the right relay. As long as you only activate the coil as needed the relay will last longer than your UPS will. Keeping the coil energised drastically reduces the life of the coil and you'll burn it out.