0
\$\begingroup\$

I'm designing a Split keyboard where each half can be connected to USB, or to the other half, or both. If one half is not connected to USB, it receives its power from the other half. 99% of the time these will probably be connected to the same computer, so simply connecting all 5V together only has the effect of connecting the 5V and Ground of two USB ports on the same computer (potentially on different USB hubs/controllers). This doesn't feel very safe, especially since I might connect each half to a different computer while the halves are connected to each other.

Each half is an instance of the same identical circuit, so there is no asymmetry in design possible. A symmetrical design, each with a USB port, a connector to the other side, and a resistor modelling the load of the system.

While the USB port will only supply 5V (if plugged in), J2 and J3 can either supply or recieve 5V depending on whether the other side is plugged in to USB.

I investigated using an ideal diode solution, but the problem comes when supplying the power back to the other side: A single side showing 2 ideal diodes which can select a 5V source, but not supply it to the other side The LM66100 datasheet is available here. If +5V were connected to EXT_5V, I'm not sure of the effects on IC2 as VOUT is connected to VIN. Perhaps with a resistor it would be okay?

Essentially there are three situations that each half can be in:

  1. This half has USB power: it should use the USB power, and supply USB power to the other side. This half should not accept power from the other side.
  2. This half does not have USB power: it should accept power from the other side
  3. Both halves have USB power: they should run off their own USB power, and the two power supplies should not be connected.

Is this possible over a single shared 5V conductor? I'm open to all suggestions, not just modifications to the ideal diode setup. It would be very inconvenient to use a different connector to the TRRS shown, but if that's what it takes... The 5V will be used for a 3.3V regulator for the microcontroller, as well as powering WS2812b LEDs. If the LEDs will work off a slightly reduced voltage then solutions involving a diode might be okay.

Thanks in advance for your helpful responses :)

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

You shouldn’t need an ideal diode on the unit-to-unit link, just one on each of the USB inputs and have the +5V bus shared between units. There might be a concern with connecting the grounds to each other though.

\$\endgroup\$
5
  • \$\begingroup\$ imgur.com/a/ZplmEIs is this what you mean? Could you explain how this works? Does the ideal diode behave when you connect VOUT to ¬CE? Essentially there are 3 situations: (1) When this board has USB, but the other doesn't, this works fine. (2) When the other board has USB, but this doesn't, this also works fine. (3) When both boards have power, surely both diodes will let current flow, and both USB_5V will be connected together? \$\endgroup\$
    – Luke Moll
    Aug 13, 2020 at 21:50
  • \$\begingroup\$ Also, could you elaborate the problem with connecting the grounds together? I'd like to catch as many problems in the design stage \$\endgroup\$
    – Luke Moll
    Aug 13, 2020 at 21:54
  • \$\begingroup\$ You're essentially implementing figure 15 on the datasheet where VOUT is the shared +5V bus between the halves of the keyboard. For this particular component, they recommend connecting the !CE pin to the opposite diode's VIN, but it looks like you've got two unused pins in that connector unless you're using them for data. \$\endgroup\$
    – vir
    Aug 13, 2020 at 22:10
  • \$\begingroup\$ As for connecting the grounds together, the potential problem is the formation of a ground loop, where the USB ground of each system is at a different voltage relative to the "true" ground connecting the systems. This can cause problems ranging from benign to fairly severe. A 100% answer would be to have each input powering its own isolated DC-DC converter and to only share the ground between these (you'll still need the OR-ing diodes), but I wouldn't be surprised if someone here has a more convenient solution. \$\endgroup\$
    – vir
    Aug 13, 2020 at 22:15
  • \$\begingroup\$ They will be used for data, yes \$\endgroup\$
    – Luke Moll
    Aug 13, 2020 at 22:15

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.