Power supply for analog and digital - Page 1
Forum section: electronics / projects

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 23, 2012, 12:48:04 am
content: Soo ive been working on a power supply for my robot. Basically the thing needs a few different power rails the 19.2v directly from the battery, Then a regulated 5v and 3.3v for an arduino, a propeller chip and basically all the other chips and sensors.I plan to use the built in adc on the arduino to monitor my battery packs tempature/voltage and current draw. Then im going to use an mcp3208 in conjunction with the prop chip to read analog sensors. I will also be building some analog circuits using 555s and opamps all that good stuff.Right now im using lm2574 switching regulators along with the optional ripple filter shown in the data sheet, to create my 5v and 3.3v rails. What im wondering is would it be a good idea or even beneficial to add another 5v rail specifically for the adc power and grounds along with all the other analog circuitry? I had planned on doing this originally but im running tight on enclosure space.

author: UPI
author_rank: Regular Contributor
timestamp: December 23, 2012, 02:47:35 am
content: See the attached power supply I am using on a mixed digital/analog circuit.You may want to do as I did and put a 10uf inductor and 10uf and .1uf caps right at the inputs of your chips. We did it on both the analog and digital.We also kept the analog and digital ground traces separate all the way back to the point where it enters the board.Link to inductor:http://www.mouser.com/Search/ProductDetail.aspx?R=MLZ2012M100Wvirtualkey52130000virtualkey810-MLZ2012M100W

author: Rudolfo
author_rank: Contributor
timestamp: December 23, 2012, 04:04:13 pm
content: You might use a DC/DC converter followed by LDOs for separated analog/digital supply voltage, like described here:http://eetimes.com/design/power-management-design/4011582/How-to-integrate-3-3-and-5-5V-analog-and-digital-supplies.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 24, 2012, 08:29:43 am
content: @UPI, why does your analog VCC have outputs everywhere? That is what those arrows mean correct?@Rudolfo, Thanks for the link, its the same basic idea that I had planned on doing, either using a seperate switching regulator with a filter to supply analog power or even taking a low power LDO on the output of one of the switchers to get an even cleaner analog signal.I actually like UPI's technique better since it doesn't require any extra regulation, just filtering caps. Even if I use an LDO connected to a buck converter I will have to add yet another switching rail with a high enough voltage to power the LDO, I need 5v analog power. If I needed a 3.3 voltage source for analog this whole mess would be really simple and I would just use a small to92 type regulator connected to the 5v switcher.Im not sure the best approach to take here, Im thinking I should have set up one big switching rail like a 6.5v 1.5amp supply to chain of to a bunch of LDO regulators, instead I have 500mA 5v and 3.3v switched and filtered rails ( ie these rails output to a 20uH coil in series with the main switched output, and two 47uF filter caps to ground), the only option is to add yet another rail or to do some good filtering work for a clean analog supply and im not really sure how to go about that other than UPI's type of solution.

author: UPI
author_rank: Regular Contributor
timestamp: December 24, 2012, 02:28:59 pm
content: Quote from: rwgast_lowlevellogicdesin on December 24, 2012, 08:29:43 amThere are 3 upward arrows that supply power to different parts of my circuit:The one labeled "5V" just after the regulator is only used to power some off board heaters.The one labeled "AVCC" is used to power the analog power input of an ATmega328, analog voltage dividers and an external analog voltage reference IC.The one labeled "+5V REG" is used to power the digital power of the ATmega328, DS18B20 temp sensors, LEDs, and push button switches to the digital inputs.There are 3 different downward arrows for different grounds (not all were labeled in the JPG attached):The one labeled "AGND" supplies ground to the analog ground of the ATmega328, voltage dividers, and analog voltage reference IC.The one labeled "PGND" is used to supply ground to the off board heaters.The one labeled "DGND" is used to supply ground to the ATmega328, DS18B20 temp sensors, LEDs, and push button switches to the digital inputs.In other words, all digital circuits have their own power and ground traces all the way back to the regulator and incoming ground. All analog circuits have their own power and ground traces all the way back to the regulator and incoming ground. The external heaters also have their own power and ground traces all the way back to the regulator and incoming ground. The point is to reduce surges in any power or ground trace from inducing noise other parts of the circuit.My circuit's main point is to monitor analog voltages and then output errors on LEDs and a buzzer. I did not want the digital or high power circuits to induce noise into the analog reads.Since you are working on a robot, LDO regulators may consume too much power from your battery since their efficiency is not so great. I would think that switching power supplies would be the way to go but then filter the individual traces going to the digital and analog circuits to prevent induced noise. So, in addition to the recommended filter just after your LM2574, you may want to filter with 10uh inductors along with a tantalum 10uf and ceramic .1uf caps right at the point of use.BTW - The Arduino boards tie the analog and digital power and grounds together on the board so you can't filter them individually. In this case, just supply good filtering right at the input of the Arduino. This is OK for most projects but in my case I am using the ATmega328 by itself so I can separate these power and grounds for reduced noise.I am still waking up so I hope this makes sense.

author: penfold
author_rank: Frequent Contributor
timestamp: December 24, 2012, 02:45:21 pm
content: It would be definitely beneficial, but unless you're going for very high performance, a bit of good analogue design should mitigate all but very sever noise problems. Keep an eye on the bandwidths of your opamp circuits and use plenty of decoupling on board.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 24, 2012, 08:01:30 pm
content: Ok thank you guys very much this info is all very beneficial!!Im actually not using an arduino board so running seperate analog traces is going to be easy. I just slapped an atmeg168 on protoboard with some other components and then programmed it with the Arduino boot loader to make life simple. The atmega is just a secondary controller to monitor batterys and recive serial commands to control the motors!!I chose to stick away from LDOs becuase I wanted the bot to be as power efficient as possible so your comment is basically right on the money with my thinking. You mention using 10uH/10uf LC filters, I dont have any 10uH inductors on hand, would an RC filter with the same 16khz cut off work? Also the old arduino uses a .1uf and 10uh LC filter on the ADC which is 160khz vs 16khz... which should I be using and why?

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 24, 2012, 11:48:37 pm
content: I ordered a USB DSO, its no RIGOL or LeCroy but im hoping it will be able to help me, Im totally new to using a scope and have been reading the book on it while waiting for the mail. Can one of you guys tell me if is going to be good enough to check my ripple current and help me with filtering/decouplinghttp://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/586/Default.aspx?txtSearch=prop+scopeEven if it is I have no idea what an acceptable amount of ripple will look like, Im sure its not that easy to or necessary to filter your signal down to a flat DC line is it?The accuracy of the ADC's in this project isnt to important, I dont even need 10 or 12 bits of resalution, Im really just going through the effort so I can learn more about making nice clean power supplys. Id eventually like to make multi rail 5 amp desktop supply using switching regulation, or even convert an ATX supply and filter it. So im looking at this as a good start to make clean power signals. Just throwing a .1uf cap on everything is a good rule of thumb but doesnt solve every issue so I feel its important to learn how to properly deal with and clean up power sources, especially with higher 100+ mhz micros!Ive successfully overclocked a propeller chip from 80mhz up to 112mhz, and I have a feeling that with a cleaner PLL signal and good stable power I could probably get another 3 to 8mhz.

author: ptricks
author_rank: Frequent Contributor
timestamp: December 25, 2012, 01:17:14 pm
content: Quote from: rwgast_lowlevellogicdesin on December 24, 2012, 11:48:37 pmFor the money it isn't a good choice for analog work like measuring ripple. Cheaper digital scopes are not that great at providing an accurate picture of what is going on inside the circuit.Everyone should have an analog scope, you don't need anything high bandwidth .For less money you can get a used analog scope off ebay, some samples:http://www.ebay.com/itm/TEKTRONIX-2215A-OSCILLOSCOPE-DUAL-CHANNEL-60-MHZ-VERY-CLEAN-WORKING-TESTED-/271125680594?pt=BI_Oscilloscopes&hash=item3f205991d2http://www.ebay.com/itm/TENMA-72-1030-OSCILLOSCOPE-100MHZ-4-CHANNEL-/221169586849?pt=BI_Oscilloscopes&hash=item337ebc12a1

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 29, 2012, 12:23:58 am
content: Ok well I got my scope for extremely cheap I only paid $50 dollars so it will have to do, seems fairly decent so far, although im still learning how to use it.Anyways I measured the amount of ripple I got from my power supply rails, and compared it to the ripple of a 15 dollar adjustable wal wart from wal mart, under load my my power rails have way less ripple, the AC RMS of the wal wart is about a half of volt! Anyways I took some screen shots of my 3.3v rail with no load and under load with AC coupling turned on, I was hoping if someone could tell me if what im seeing is pretty decent or if I need alot more filtering. I threw a random tiny inductor in series with the load and it seemed to kill the ripple i see in half, the AC went from around 60mv to 30mv. Anyways heres two shots, of how the switching regulators perform currently, hopefully its pretty good I put alot of work into building and filtering a regulator module. for my bothttps://dl.dropbox.com/u/27653605/Load.GIFhttps://dl.dropbox.com/u/27653605/noLoad.GIF

author: andyturk
author_rank: Frequent Contributor
timestamp: December 29, 2012, 01:02:05 am
content: It looks like you've got 60mV of peak-to-peak ripple (according to the measurement on the scope). Depending on what you're doing, that may be fine. But you said that you plan on using using ADCs to read sensor values. That power supply ripple will probably end up messing with your ADC readings.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 29, 2012, 01:19:50 am
content: So what is a acceptable amount of ripple?

author: andyturk
author_rank: Frequent Contributor
timestamp: December 29, 2012, 07:52:53 am
content: Quote from: rwgast_lowlevellogicdesin on December 29, 2012, 01:19:50 amRoughly speaking, 60mV is between 3 and 4 bits of error on the Arduino's 10-bit ADC (i.e., you'll get only 6 bits of signal), and between 5 and 6 off the mcp3208. You can certainly knock that 60mV down with some simple filtering if you need do--it's low-hanging fruit.But you'll have to decide what's acceptable, based on what you're measuring.