0
\$\begingroup\$

I'm building this circuit, which converts a toggle switch to a momentary one, which sends a key to a USB keyboard PCB by connecting 2 contacts together:

I just wanted to check, how do I know the keyboard PCB won't get fried when I flip the switch to 12v DC? Or worse my motherboard?

\$\endgroup\$
2
  • \$\begingroup\$ Using a USB hub to protect your computer is always a good idea \$\endgroup\$ Mar 17, 2014 at 2:16
  • 1
    \$\begingroup\$ @ScottSeidman only if the usb hub follows spec and is well engineered with protection features. Some hubs are a hub ic, 2 caps and an led, with VUSB directly wired from upstream to downstream ports. \$\endgroup\$
    – Passerby
    Mar 17, 2014 at 3:28

3 Answers 3

1
\$\begingroup\$

The momentary buttons make a physical connection when pressed. The relay's actuating part, does the same. And unless you short a wire out or physically connect them wrong, you won't fry the computer or keyboard. The relay provides physical isolation between the coil and the actuating part.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Also known as "galvanic isolation". \$\endgroup\$ Mar 17, 2014 at 1:42
1
\$\begingroup\$

If nothing but the contacts goes to the PCB you won't hurt the computer.

If you want to be super-cautious, add a 0.1uF capacitor across the relay coil. That will ensure that when the switch opens, no serious spikes get coupled to the keyboard scan lines.

\$\endgroup\$
2
  • \$\begingroup\$ So how do I know I won't fry the PCB? \$\endgroup\$ Mar 17, 2014 at 1:06
  • \$\begingroup\$ Because the contacts are not connected to the rest of the circuit (use your ohmmeter to test it!). OTOH, if you connect the 12V to the keyboard lines, for even an instant, very Bad Things will happen. \$\endgroup\$ Mar 17, 2014 at 1:18
0
\$\begingroup\$

It seems a resettable polyfuse would do the trick:

USB Overcurrent Protection

The Arduino Mega2560 has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.