smps cockup versus AVR - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: August 27, 2014, 04:27:12 pm
content: I designed a SMPS to supply a board running an atmel AVR (ATMega168), but I made a mistake in the design of the control circuitry and it does not run at a fixed frequency but is essentially a bang-bang converter. The result is a 500mV sawtooth ripple sitting on top of the 5V.Now at some point I accidentally shorted the output and the inductor short circuited. All of a sudden the output became nice and smooth as I'd essentially converted it to a charge pump i guess. I replaced the inductor and it went back to being very noise.Now can my AVR put up with the 500mV ripple ? or should i just go with the charge-pump version again ? I'm actually considering just smacking a 10uH inductor in there instead of the existing 900uH to get something inbetween a bang-bang converter and a charge pump. Either way because i have not done proper gate drive the efficiency is err, non existent and it's the same either way.I'm supplying 5V 20mA, I tried using the MC34063 formula's for the inductor and capacitors.

author: jlmoon
author_rank: Unknown
timestamp: August 27, 2014, 05:11:51 pm
content: "bang-bang converter" I like to use one of those with sub-sonic .308's on my AR-10. I know this was OT .. but couldn't resist!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 28, 2014, 12:09:54 am
content: Sounds like you need a non-shitty circuit...The MCU itself is just CMOS and will probably tolerate that well enough. But don't count on the clock behaving very well (internal or external), let alone if you run any analog stuff from unfiltered VDD.Tim

author: IanB
author_rank: Super Contributor
timestamp: August 28, 2014, 01:20:27 am
content: If you're only supplying 20 mA, why on Earth are you going to all the trouble of designing and using a switched mode converter? Why don't you just bang in a 7805 and be done with it?

author: Simon
author_rank: Unknown
timestamp: August 28, 2014, 05:55:22 am
content: Quote from: IanB on August 28, 2014, 01:20:27 amFind me one to work under -46C and that at 86C can dissipate 0.7W with no heat sink. If I take out my inductor a linear reg is pretty much what I get.

author: c4757p
author_rank: Super Contributor
timestamp: August 28, 2014, 05:59:10 am
content: Quote from: Simon on August 28, 2014, 05:55:22 am1. Under -46C? Where are you getting a 34063 rated for that?2. It's alinear regulator, it'll warm up. That's the point. Stick a load on it to make sure it does, if you're worried.

author: Bored@Work
author_rank: Super Contributor
timestamp: August 28, 2014, 06:07:28 am
content: Quote from: Simon on August 28, 2014, 05:55:22 amWell, you wrote:Quote from: Simon on August 27, 2014, 04:27:12 pmYou are aware that non-existing efficiency means you are generating heat? So, does it really make a difference if a linear regulator or your crocked SMPS generates the heat? You have to solve that problem anyway. And the SG7800 series works from around -55C onwards.

author: boz
author_rank: Regular Contributor
timestamp: August 28, 2014, 06:09:03 am
content: Use a BFC.

author: Simon
author_rank: Unknown
timestamp: August 28, 2014, 06:10:16 am
content: Well I already have the PCB, so if I'm going to have the same sized device making the same heat then it's the same either way. realistically the power used should be much less so not so much of a problem.

author: Bored@Work
author_rank: Super Contributor
timestamp: August 28, 2014, 06:16:27 am
content: Quote from: Simon on August 28, 2014, 06:10:16 amRespin it. It is not unheard of during development ...

author: Simon
author_rank: Unknown
timestamp: August 28, 2014, 06:46:45 am
content: Well it's not the final version anyway so not going to be the a long term solution. I will have to redesign power regulation for the next one for more power anyway.

author: AndyC_772
author_rank: Super Contributor
timestamp: August 28, 2014, 07:24:13 am
content: You've described an absolute train wreck of a design and you're asking if it's OK to use it?Really...?At risk of sounding harsh - which, under the circumstances, is both appropriate and necessary - you need to man up, admit you've screwed up, and redesign the circuit so it works properly. The boards you have now may be useful learning and prototyping tools, or they may be junk.Either way, they're *not* shippable product!We all make mistakes, it's part of the job and nothing to be ashamed of. Hardware design is particularly unforgiving in this regard; it's not like we can compile code, try it, fix a typo and try it again two minutes later. Our mistakes are set in stone and are there for all to see.The trick is to get the balance right between checking and reviewing a design before it goes to manufacture, and testing of a real, physical prototype when it comes back. I've worked for people who insist that even the first prototype has to "just work", and it's a nightmare.You'll look back on this as a valuable learning exercise. You'll learn more about how to design a power supply (and how not to!), and more importantly, the people you work for will learn that even though you sometimes make mistakes, your standards are high enough that you won't let them go out the door.Ultimately it's the quality of what you let go out the door that really counts.

author: Simon
author_rank: Unknown
timestamp: August 28, 2014, 09:04:39 am
content: The purpose of this board is to test the design so far (the interfacing and software) and then move on to the next phase of development.I have established the problem. I have installed my uC 90 degrees out. i was aware that it was getting very warm but had to work through the power supply problems first but it's obviously overloaded.I have swapped my 940uH with 10uH and i have changed the resistor values that drive my mosfet switch from 4.7K to 330R so now the mosfet is working much more efficiently and although not perfect (not necessary at 20mA) the heat generated has gone down considerably. output ripple is now down to 100mV and that is with an overloaded supply because the chip is in round the wrong way and I am using as much as 100mA so once the chip is removed and I put another in round the right way the current draw will reduce drastically and so should the ripple and load on the switch mosfet. The ripple at the overloaded chip's bypass capacitor is actually 40mVpp now.

author: sunnyhighway
author_rank: Frequent Contributor
timestamp: August 28, 2014, 11:39:16 am
content: Quote from: Simon on August 28, 2014, 09:04:39 amSo, essentially the failure in the smps is blocking the advance towards the next phase of development.Why not simply cut some traces to isolate the faulty smps and hook-up a bench power-supply for the time being and move the final design of the smps into the next phase of development?

author: Simon
author_rank: Unknown
timestamp: August 28, 2014, 04:53:54 pm
content: No providing I get the power supply working as well as necessary we can run the circuit and test the program and interfaces. When i do the next version the power supply will be done again along with other changes we already have planned.