Hi,
Does anyone know if there is a problem having both the USB cable and a Vin connected simultaneously?
I tried it briefly and smelled smoke!
Thanks,
Bob
USB and Vin connected simultaneously
Re: USB and Vin connected simultaneously
Smoke is usually an indication of a problem, and in this case, sadly unsurprisinggratefulfrog wrote:Hi,
Does anyone know if there is a problem having both the USB cable and a Vin connected simultaneously?
I tried it briefly and smelled smoke!
Thanks,
Bob
The question now is where the smoke came from, and I can offer a few guesses depending on what you had connected to Vin.
On the pyboard, USB VBUS (5V nominal) is connected to the Vin bus via D1, a 1N5819 Shottky diode. D1 is oriented to allow current to flow from VBUS to Vin, but not the other way around. Vin is the unregulated power for the 3.3V regulator, nominally it can be anywhere from 3.6V up to a limit of 10V (at which point the 3.3V regulator risks overheating). If you had a power supply connected to Vin that was less than 5V, then you could have had unrestricted current flowing from your USB port through D1 to your power supply. This could burn your USB port's power pin, D1, or your power supply. Or, if you are very lucky, you got a smell of hot electronics which didn't get quite hot enough to produce actual smoke.
D1 is there to protect the USB port from having current injected from a power supply on Vin providing more than 5V; even if D1 is burned out, current usually shouldn't be able to go that direction.
The way to test is to see if your pyboard will still power up from your USB port; if it does, then at worst you fried the power supply connected to Vin. If not, try another USB port. If neither works, you probably blew out D1. If you are careful and have access to a soldering iron, you might be able to fix it; otherwise you will be stuck powering your pyboard from your external power supply. The good news is that now that D1 has acted as a protective fuse, you probably can't damage anything further.
-Bryan
Re: USB and Vin connected simultaneously
I should add a bit of advice: if you want to set up your pyboard to fall back to an external power supply when USB is disconnected, you can use something called a "Diode-OR" circuit. Half of the diode-OR is already there; this is D1 which allows current to flow from USB VBUS to Vin, but not the other way. To implement the other half of the diode-OR, provide a 1N5819 or similar Shottky diode between your external power supply and Vin, again oriented so that current can only flow from the power supply to Vin. This way the Vin bus will get power if either VBUS _OR_ the external power supply is present, and will draw power only from the supply providing the higher voltage.
-Bryan
-Bryan
-
- Posts: 149
- Joined: Sun Mar 01, 2015 12:10 pm
Re: USB and Vin connected simultaneously
Hi,
Thanks for your advice. I'm not exactly sure what you meant, though.
You say:
I guess that a diode between the PSU and Vin is what I should test? My stock is very low, I can choose from below :
Thanks so much for all this help!
Ciao,
Bob
Thanks for your advice. I'm not exactly sure what you meant, though.
You say:
The PSU produces around 4.93v, so it is indeed less that 5v. Do you think that reverse potential could be heating up the LM2596 regulator?if you had a power supply connected to Vin that was less than 5V, then you could have had unrestricted current flowing from your USB port through D1 to your power supply.
I guess that a diode between the PSU and Vin is what I should test? My stock is very low, I can choose from below :
- BAT46 Schotky diode, with a forward current rating of 150mA, which is low for my application
- IN4004 rectifier diode, with much higher rating, but not Schotky...
Thanks so much for all this help!
Ciao,
Bob
-
- Posts: 149
- Joined: Sun Mar 01, 2015 12:10 pm
Re: USB and Vin connected simultaneously
I added a Schottky diode between the input and output of the LM2956 and everything is cooooool!!
Thanks so much for the tip!
Ciao,
B
Thanks so much for the tip!
Ciao,
B
Re: USB and Vin connected simultaneously
@gratefulfrog - Good to hear it! I suspect that the problem has more to do with the LM2956 latching up because its feedback pin is energized before it gets turned on, and less to do with reverse current from the USB being injected to the ML2956 because of the voltage difference, but either way it's good that you have it working!
-Bryan
-Bryan