I have a circuit I need the functionality of a SPDT switch that is flipped a couple of seconds after power is applied. It is just switching data lines on a USB port so there is no current being switched.

Actually, I need it to short the data lines on the USB port and then 2 or 3 seconds later connect the data lines to a USB hub.

Currently I am using a SPDT switch to accomplish this.

Thanks in advance!


I would like the process to be automatic. i.e. plug the USB cable in and it just works.

Long explanation. I have a windows tablet pc that has only one micro USB port on it. It uses this port for charging as well as USB OTG to connect USB peripherals. The problem is it won't usually charge while in OTG mode. Just applying 5v to the power lines of the USB port won't make it charge.. To get it to charge, you have to short the data+/- lines together. Then as long as you keep power applied to the Power +/- lines it will continue to charge without shorting the data +/-. You can then connect usb devices to the data lines and the PC and they work.

The purpose of this is so that I can charge the tablet and use USB devices at the same time. As it is now, I have to plug the usb hub in with the SPDT switch in shorted position and then flip the switch every time I connect the hub. I want to make it all automatic. It needs to have the lines shorted for a few seconds and then switch in the lines for the USB hub.

Detecting the USB plug in is easy, just use the USB shield and USB ground pin as a switch.. i.e. leave the ground wire disconnected in the USB cable. The shield wire is used to carry ground. When you plug it into the tablet pc it connects the shield to the GND wire (since they are tied together on the tablet's USB port) and completes the circuit.

Hopefully this makes this all clear. I'm not sure how this forum works to get your thread unlocked after its has been flagged as unclear. :/

  • \$\begingroup\$ I am not sure what you're asking for here. But my first impulse is to ask why you are doing this? Your requirements are very board and without any more informaiton I don't see why you can't carry on using the switch? \$\endgroup\$
    – Puffafish
    Commented Feb 24, 2016 at 12:08
  • \$\begingroup\$ Updated and added info. Please see above. \$\endgroup\$
    – Mike
    Commented Feb 25, 2016 at 0:20

1 Answer 1



simulate this circuit – Schematic created using CircuitLab

Figure 1. SPDT CMOS time delay.

This circuit may do the trick.

The circuit is shown in its steady state.

  • R1, C1 form a 2s time delay on power-up. During this time delay NOT1 out will be high turning on SW1 and shorting out the TX and RX lines. SW2 will be open.
  • When C1 reaches 2/3 supply NOT1 out will swich low, turning off SW1 and removing the short. Simultaneously NOT2 out will go high connecting SW2.

The 40106 is a Schmitt trigger to give clean switch-over.

  • \$\begingroup\$ Looks promising. I will try and see if this works.. May even have the 4000 series logic on hand! Thanks! \$\endgroup\$
    – Mike
    Commented Feb 26, 2016 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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