1
\$\begingroup\$

I designed a circuit for a portable infinity mirror tetrahedron. It includes a battery to power it while it isn't docked, a pi pico W to run the 6 APA102 based LED strips, some contacts on the outside for docking, and a whole bunch of small buck converters to power the LED strips.

Overall Schematic

Video of Gadget

All the buck converters except the one that charges the battery are a 'mini360' board bought off ebay that use an MP2307 IC. Output voltage is set via a small pot on the board that I manually adjusted to get 5V output. Link to the ebay page for this module.

The buck converter for charging the LiPo battery had to include a current limit function. Found another module on ebay that says it uses an "XMLSEMI XL4015 DC-DC buck converter IC with a TI LM358 Op-Amp for stable current regulation". Link to ebay page. My understanding is that this module detects current via the ground connection so I deliberately didn't tie the grounds together.

The BMS is an HX-2S-D01 from ebay. I notice now that it includes some overcurrent protection of its own. Didn't notice that when I designed this circuit.

Not shown in the schematic are the connectors I used to put it all together. I foolishly chose to put the buck converters close to the LED strips they drive and so the connector carries +18V right next to lines from Pi Pico GPIO. I killed one Pi Pico by accidentally shorting the pins. But I killed a couple more pi picos and I'm pretty sure I didn't short the pins on those. Did I do something wrong in my circuit that would cause extra power to feed through the Pico's GPIO pins?

Update

It doesn't look like low-load power spikes. This is what the power looks like on startup enter image description here

Update 2

Well, another microcontroller died. Definitely while I had it hooked up to both my crazy circuit and a computer via USB simultaneously. It was connected through a USB hub, which has switches that turn off power to each port (but apparently leave the data connections alone). noticed that the microcontroller got very hot so I disconnected it and now any time that controller runs it gets much much hotter than other microcontrollers running the same code. Could it be that power is flowing through the ground channels into the USB port because the 'ground' in my circuit is actually 0.6V higher than the USB ground due to the diode?

Update 3

I measure a 0.25V differential between the USB connector's ground and the ground of BC6. Seems like a very likely candidate for my microcontroller deaths. I've had a microcontroller running in a modified version of this circuit (replaced BC4, BC5, and BC6 with a single larger module that can power all the LED strips and the microcontroller) all weekend no problem (no USB connection).

To answer some other questions:

  • the +19V and GND connected to the 6 diode bridge is provided by an old laptop power brick. My multimeter indicates continuity between that GND and the redundant ground of the AC connector.
  • The computer that I foolishly connected to the Pico in this circuit is a desktop plugged into the same power strip as the 19V power brick
  • I'm in the US, so the AC power connected to both computer and 19V power brick is 120V, 60Hz with redundant ground (3 prong)
  • Not quite asked, but I'll make sure it's clear. The 6 diode bridge is a deliberate feature so that I can have this device dock in any orientation. The dock has 3 legs: 1 with +19V, 1 with GND, 1 without any power. The orientation the device is set into the dock determines which leg of the bridge gets power, etc. I didn't want to fuss with having to flip the thing around several times to get the right orientation.
  • I double checked and it turns out my diagram was wrong, all the diodes in my circuit are actually 1N5822 Schottky diodes (3A, 40V). Sorry!

New question: Would it be logical to replace the 6 diodes in the bridge with 'ideal diode's like this one from ebay?

\$\endgroup\$
20
  • 3
    \$\begingroup\$ Please embed the schematic as an image in your post instead of a Google drive link that could go anywhere and could become non-functional at some later time. \$\endgroup\$ Commented Jun 6 at 23:15
  • \$\begingroup\$ We don't know anything about your buck converters. It is possible they lose regulation at low output currents, and thus could possibly give overvoltage to your pi pico. But we don't have hard info on that. \$\endgroup\$ Commented Jun 6 at 23:20
  • 1
    \$\begingroup\$ @vir - Hi, FYI I've just noticed that the SE image server uploads aren't working, so the OP can't upload the images onto the usual place. And since it's Friday night, SE staff have gone home :( I'm seeing if I can find anyone but even if I find someone to tell, they would have to find an SRE or similar person to actually investigate. TL;DR - we may be stuck in this situation for a while :( \$\endgroup\$ Commented Jun 6 at 23:28
  • 2
    \$\begingroup\$ How can you kill a dead Pi Pico. I mean, isn't it already dead? Or maybe you made a tautology? \$\endgroup\$ Commented Jun 6 at 23:37
  • 1
    \$\begingroup\$ @vir - Hi, Just FYI I've posted this on our meta: electronics.meta.stackexchange.com/questions/10215/… \$\endgroup\$ Commented Jun 7 at 1:58

2 Answers 2

2
\$\begingroup\$

That dock arrangement is why I need the 6 diode bridge. Each dock leg contacts a copper bar on my blinky LED device, one leg has power, one leg has ground, one does nothing.

Unfortunately, the ground on your computer is your mains AC ground, but the ground on your Pi Pico differs from that by one Schottky diode drop. Depending upon current through the diode, it could be around 0.5 V. Switching to MOSFETs for your connection between the power supply ground and the PICO ground could possibly (hopefully) solve your problem. Here is one way you could do that.

schematic

simulate this circuit – Schematic created using CircuitLab

You could omit 3 of the diodes to the MOSFET gates if you can guarantee which line will be positive when another given line is "ground".

One concern with that circuit is the fact that you might be using a 19 V supply. The maximum Vgs of most MOSFETs is 20 V. That doesn't give you a lot of headroom. A solution would be to add Zener diodes to lower the gate voltages.

schematic

simulate this circuit

Explanation of resistors

R4,R5 and R6, serve double duty. First, they allow the gate capacitance to discharge when the device is not connected to any power. Otherwise, a MOSFET may remain on when there is no power. If at a later time, with the MOSFET still on, a high voltage is applied to the conductor connected to that MOSFET, a high current may ensue from that high voltage through the MOSFET to ground, resulting in possible destruction of the MOSFET and/or fire.

Second, in the case where there is a 19 V supply and Zener diodes, R4, R5, and R6 provide current for the Zener diodes to ensure that they have a voltage across them, so that the full 19 V (or possibly more) is not applied to the gates. If there were no resistors, as the gate potential rises, the current would fall off to 0, in which case the voltage across the Zeners would fall off to 0, and the gate voltage would rise to 19 V. Having the resistors present ensures that there will be some current flowing through the Zeners, to ensure that there is a voltage drop across them.

\$\endgroup\$
7
  • \$\begingroup\$ Awesome, I didn't have any suitable mosfets onhand, so I've ordered some and breadboarded your schematic, should be able to test it next week. To make sure I understand things. R4 is just a pulldown resistor to make sure M1 won't get triggered by transients, right? And R1 just limits how fast M1's gate can be pulled to zero so , correct? How did you choose 100 Ohms for R1? \$\endgroup\$ Commented Jul 3 at 17:41
  • \$\begingroup\$ @ashbygeek I added an explanation of the purposes of R4, R5, and R6 to the answer. As you surmised, R1 just limits the current into the gate so that the diodes don't burn out from excessive current. PS, don't use the Zeners if you are going to use a low voltage supply, for example 12 V. If you shave 5 volts of the 12 volts, you only get 7 V, and while that will turn on the MOSFETs, there will be more resistance than necessary, and this resistance will have some voltage drop. Remember getting rid of the voltage drop was the goal of this redesign. \$\endgroup\$ Commented Jul 3 at 18:09
  • 1
    \$\begingroup\$ Tested the circuit. I implemented your second circuit, the voltage difference between ground coming to my circuit and the ground at the pico dropped to 0.15V with the pico up and running and 0.1V with no load. So I went ahead and tested the USB and didn't seem to have any trouble. I'll do some more testing, let it run longer to make sure, but I went ahead and accepted your answer. Many thanks for all the help! \$\endgroup\$ Commented Jul 11 at 4:27
  • \$\begingroup\$ Would it make sense to swap the Zener and resistor of those voltage dividers, so that the gate drive voltage is constant across a range of charger voltages? \$\endgroup\$ Commented Jul 11 at 19:09
  • 1
    \$\begingroup\$ @BenVoigt That was my original thought. It would work (with say 12 Volt Zeners or more), but I have a somewhat stingy attitude toward power. A Zener shunt regulator for the gate (Zener between ground and gate, resistor between gate and power rail) has a constant current draw, that needs to be a least as great as the maximum draw of the MOSFET gate. I would want peak current into the gate to be at least 200 mA, to ensure quick turn on. (The whole point is to protect other components). But 200 mA dropped across 19 V is 3.8 W! That seems excessive to me. \$\endgroup\$ Commented Jul 11 at 21:17
1
\$\begingroup\$

I can't give you a definitive answer, but I have a few observations, and ideas to "harden" your circuit.

  1. Is the ground of your 19V supply tied to mains ground? If so, and if your computer's ground is also tied to mains ground then the current returning to your 19V supply may find going via the USB ground and mains ground a preferable route to going the intended way round.

  2. wires have resistance and inductance. This can cause issues when sharing a ground between systems operating at different voltages. If there is a short circuit, a power-on current surge or just a heavy load this can cause a voltage gradiant in the shared ground wire.

  3. If a ground connection shared between systems of different voltages breaks then the high voltage will start looking for "other ways back". Those other ways back will likely include the signal lines of the lower-voltage system.

Hardening.

  1. Check if your 19V power brick has a floating output, if it doesn't consider replacing it for one that does.
  2. Decide whether you really need D1-D6, if you do then I would at least consider swapping them for Schottky types to reduce their volt drop.
  3. Protect IO lines running in and out of the Pico with Schottky diodes to power and ground. It's easy to find shottky double diodes intended for this purpose in SOT-23, but unfortunately hard to find them in hobbyist friendly through hole packages.
  4. Always run a ground line alongside signal or power lines, don't rely on "garden path" routes for grounds. Don't worry about "ground loops", they are a concern in some situations, but in this application bad grounds are a far bigger concern than ground loops.
  5. If signals of different voltages are passing through a connector, don't rely on a single ground pin. Use at least two pins, preferably at opposite ends of the connector.
  6. Protect power rails with zener diodes to limit the possible overvoltage if something goes wrong in a power supply, or if a protection diode back-feeds power into a power rail.
\$\endgroup\$
1
  • \$\begingroup\$ Many thanks for the suggestions. As noted in my updated above, I really do need D1 through D6, but I double checked and discovered that I actually did use Schottky diodes. Would it be worthwhile to swap those for 'ideal diode' ic's of some sort? Or perhaps even just the 3 diodes that connect directly to the 'In-' side of the buck converters? Update 3 above includes a link to an ideal diode module on ebay that advertises 20-50mV voltage drop. \$\endgroup\$ Commented Jul 2 at 1:19

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.