voltage drop on h-bridge enabling - Page 1
Forum section: electronics / beginners

author: Imstevil
author_rank: Newbie
timestamp: October 16, 2021, 01:28:06 am
content: Hi,First off, apologies if this is being posted in the wrong place. Happy to delete and re-post if required.Basically I'm very new to electronics and been playing with a design to control fairy lights using a few h-bridges and a ESP8266. This project is purely educational / fun to play with during lock down. Not for other people, or to sell, just something for me to play around with and teach myself as I go.So the idea behind it is you connect up to 5 sets of xmas lights (just fairy lights) they each have a LM317 and a variable resistor so you can adjust the voltage to suit that set of lights (I'm sure this would be better using a buck converter, but this was cheaper and xmas lights are very low amp) this then goes to a h-bridge which controls which strand of lights are on (they reverse polarity to swap colours illuminated) these h-bridges are controlled by a ESP8266. I could use it to make sure strands stay in sync, or make patterns across different strings, or anything I wanted really.I tested all this on a breadboard and things generally worked fine, thought I'd put it on a PCB and now things aren't working correctly (it's worth noting I've had to use different parts so I could have SMD components). I've attached the EASY EDA design that I used. I did realise AFTER the fact that each h-bridge should have had ISEN connected directly to ground, I have since hard wired this.So the problem I'm having is for starters the variable resistor seems to be having no effect on the voltage. I get a small voltage drop on the output from the LM317 (36v goes in 30v comes out) but not mater my adjustment the voltage stays the same. I'm not ENTIRELY fussed about this, I could just make sure all the string I use are the same voltage but this could be a factor as to what my main problem is which is I'm getting a random voltage drop when I enable the h-bridge. So if I enable either input on the first h-bridge the output is only 17V, I checked and the output from the LM317 has actually dropped to 17V as well (this value also isn't affected by the variable resistor). So enabling the bridge is affecting the voltage BEFORE it actually goes into the bridge. This also makes the voltage go UP on the bridges which aren't enabled, they all go up to 33V which is appears to be where the extra voltage goes to causing the drop on bridge 1.I'm unsure how the h-bridge being enabled would cause this but I'm guessing I need to separate them all somehow to prevent this happening (in my breadboard tests I will admit I used a l298n so even though there was different channels it was still all one input into the bridge. So that's one mistake I'll learn from for next time! )Any advice on how to work around this would be greatly appreciated. Even if you can point me in the right direction of what to research would be great, as I said this is a learning project.Some notes about my schematics, P1 - P5 are where the xmas lights are plugged in. P6 and P7 are female headers on the PCB that I plug the ESP into.Here is a link to the data sheet for the hbridge used as wellhttps://datasheet.lcsc.com/lcsc/1809050151_Texas-Instruments-DRV8870DDAR_C86590.pdfThanks in advance!Stevil

author: langwadt
author_rank: Super Contributor
timestamp: October 16, 2021, 02:18:27 am
content: vref on the bridges need to be connected to a voltage between 0.3V and 5Vthe center pin on the variable resistors need to be connected to one of the endsan LM317 needs a minimum load of something like 10mA to do regulation

author: Imstevil
author_rank: Newbie
timestamp: October 16, 2021, 05:32:51 am
content: Thanks heaps, what you have said has fixed all of it. I can now adjust the voltage and I can now pass the correct value through. I totally missed the connection on the variable resistor... that is something I should have known but just missed. I had misread the data sheet on the vref and thought it was only if you were using current regulation, re-reading it, it makes sense to have it on.Now I'm having the opposite problem which I think is being caused by what you said about the LM317 needing current to regulate it. When the lights first start they are hit with the max voltage, not the adjusted voltage. I'm guessing it's charging the capacitor with the 35V volts because there isn't enough to regulate the voltage at that point, so when the bridge first turns on it is hit with the max voltage which could in turn blow all the lights. I thought maybe I could shift this to after the bridge, but this won't work as the negative and positive sides are being swapped. I thought maybe I could add a LED or something just to get some current flowing but this feels a bit messy. Another option I thought of was a transistor to prevent current going through until it's turned on, but I'm not sure if that will get a spike of voltage or not still.Any advice or suggestions to help prevent this?Thanks again for the very speedy and helpful reply!Stevil

author: langwadt
author_rank: Super Contributor
timestamp: October 16, 2021, 02:02:09 pm
content: the minimum load is why you almost always see a 240R resistor used as the top resistor on an 317, it gurantees ~5mA at any outputyou could solder resistors across the decoupling capacitors, chose a value keeping in mind how much power it'll dissipate at max voltage