Power supply decoupling - Page 1
Forum section: electronics / beginners

author: SenSeS
author_rank: Contributor
timestamp: January 18, 2016, 06:55:22 pm
content: i' ve created a PCB and part of the schematic for the power supply can be found below. I have a number of questions about this.General infoThe battery represents 4xAA (alkaline) batteries in series outputting roughly 6V.The diode D1 is to protect against reverse polarityC6 is power supply decoupling cap, no idea which value I had to use here, I've seen lots of different possibilities, ranging from 460uF to 3x0.1uF, 100uF was my best guess, other suggestions always welcome.Voltage regulator (to 3.3V) with the two caps (C7 and C9), got these from data sheet. This where I connect my micro controller and other electronics.Diodes D2 and D6 is what's frustrating me, added these to prevent brownout.V_DCM is supply voltage for DC motor. I got the 100uF (C8) from the data sheet of the H bridge which said there should be a 100uF cap in addition to the 0.1uF cap over vcc and gnd of h bridgeProblemI understand the point of diode D1, you never know if someone inserts batteries the wrong way. I added D2 and D6 to prevent brownouts because without them, every time I turned on the motor, the MCU would reset. However, I can't help but feel that these diodes would not be needed if I had good decoupling. Is this correct or should I always keep the diodes there? I don't like the fact that the power given to the DC motor goes through a voltage drop of 2 diodes because of this.Extra infoIn case it matters, I will still add a fuse and will replace the voltage regulator with a DC-DC switching converter as i' ve read they are a lot more efficient.EDIT 1: I forgot to mention that I had these brownout issues when using a 12V, 1.5A power supply and my LDO was outputting 5V instead of 3.3V as in the schematic.EDIT 2:https://www.pololu.com/product/3080is the motor I am using.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 18, 2016, 07:10:41 pm
content: You're riding right on the threshold for the input voltage to that LDO.AA Alkalines are rated at 1.5v, but spend most of their life between 1-1.3v. That gives you a "VBAT" of 3.3-4.5v once you factor in the diode. That LDO has a dropout voltage of 1V, so it needs at least 4.3v in order to maintain 3.3v at the output, plus you have ANOTHER diode dropping to 2.6v for the MCU.What MCU are you using? What voltage does it need on Vcc?

author: SenSeS
author_rank: Contributor
timestamp: January 18, 2016, 07:14:22 pm
content: Sorry, I forgot to say that the battery came later, initially I was using a 12, 1.5A power supply.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 18, 2016, 07:17:40 pm
content: What's the DC motor you're using?

author: SenSeS
author_rank: Contributor
timestamp: January 18, 2016, 07:21:07 pm
content: I am using an atmega328p and this motorhttps://www.pololu.com/product/3080

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 18, 2016, 07:31:05 pm
content: It looks to me like you were trying to power a 3-9V motor with 12V. It also has a 1.6A stall rating (at least the standard one does). This 1.6A is close to what it'll draw on startup as it accelerates, and you were feeding it with a 1.5A supply. Or am I misunderstanding something?

author: SenSeS
author_rank: Contributor
timestamp: January 18, 2016, 07:34:16 pm
content: Sorry for the confusion, but at the time of my tests, the motor came after the 5V LDO instead of connected to battery directly. So I was powering it with 5V via a 5V LDO connected to a 12V, 1.5A power supply.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 18, 2016, 07:58:58 pm
content: The 1.5A power supply current limit is still a problem when trying to power a motor with a 1.6A stall requirement. Did you try any supplies with at least a 2A limit?

author: SenSeS
author_rank: Contributor
timestamp: January 18, 2016, 08:34:10 pm
content: No, I didn't, it seemed like a very small difference to actually make a difference.. Would the battery solve this?Also, in my new test I have a motor that theoretically could go to 4A, I can't imagine a battery can deliver this, so wouldn't i still have issues with brown outs then? it seems like I need a way to fix the brown outs in absence of a power supply that can deliver infinite power.

author: ice595
author_rank: Regular Contributor
timestamp: January 18, 2016, 08:52:56 pm
content: do you have access to a digital storage oscilloscope?if so, try and probe the power supply rail for the microcontroller and see if it dips below the brown out reset voltage.for brown-out voltage, refer to page 305 table29-12 in the atmega328p datasheet(spoiler: they're programmable)