Solved my own problem, but would like some verification: voltage regulators

Hello!

I’ve been building a board using the bare Arduino approach (mostly for the fun of it, frankly). I built a working prototype on one of my breadboards and then used it as a model to reproduce a much more compact, refined, soldered version for real-world use.

I’m using a couple of voltage regulators (5v for the main power and a downstream 3.3v for a Nordic wireless unit that can’t tolerate 5v). Everything tested fine on my breadboard version, but I ran into all kinds of wild problems as I completed the soldered version. Not appearing to power on, erratic behavior (mostly visible with the 16x2 LCD acting nuts) and even a couple of cases where I thought I’d blown the AT328 but, apparently, just hosed the code in flash and was able to reload my program via my stable breadboard unit.

ANYWAY… turns out my problem was leaving out the input/output 10uf caps on the main 5v regulator. What was getting me was that the board simply would not work when using an external 9v adapter… but if I put the FTDI board on the header I designed into the board, it would work fine (NOT attached to USB… just mounted bare on the header). Remove the FTDI and it crapped out again. I realized that my breadboard version had the same problem, but I hadn’t been testing it without the FTDI prior to discovering this. One of the ways I wigged out the AT328 was stupidly popping the FTDI off the running unit while powered by the capless regulator. The AT328 required a reload of code after that move.

I ran in circles for a good while. But, that’s why I’m doing this… the running in circles = learning. :slight_smile: This was my first use of voltage regulators, BTW.

So my theory is that the cap-less regulator was dropping out immediately causing a reset or other under-voltage condition on the AT328. When the FTDI was connected, however, I was unknowingly adding caps or in some other way stabilizing the circuit.

Does this sound correct? I’d appreciate any other advice and hindsight-insights that might come to mind in a situation like this. On a related note - what measures should one take for the safest coexistence of a power supply w/regulator and USB attached simultaneously? Diodes in various spots, for instance?

Thanks!

  • Aaron

That sounds entirely plausible. Without the capacitors recommended by the manufacturer of the voltage regulator IC, the regulator may oscillate. Whether it does so, and the amplitude of the oscillations, depends on the load (which accounts for why connecting the FTDI board made it work).

Always use the recommended load capacitors, decoupling capacitors etc. recommended by the manufacturer of the IC concerned.

Need to read the specs on your regulator - some clearly call out that caps are needed as part of the regulation, others can get by without. I always put some on whether needed or not, like 10uF on input and 1uF on output. Then a 0.1uF at Vcc pin of each device.

Diode seperation between supplies would be sufficient - find a good schottky so you only lose 0.31V across it.

Aaron, What kind of 3.3VDC regulator did you use? Can you send me a link?

I'm using the nRF24L01+ (probably similar to yours). Are you using the external antenna one or the lower power one without the external antenna? I posted a question about whether you need a separate 3.3VDC regulator, or if you can just use the 5V source from the arduino to power this.

Thanks for the replies! Glad to know my theory is sane. Understanding the behavior is as important to me as getting it working… never been a fan of just moving on once something is fixed if I don’t understand the cause in some detail. :slight_smile:

This is what I found in the spec sheet for the 5v regulator:

In many low current applications, compensation capacitors are not required. However, it is recommended that the regulator input be bypassed with capacitor if the regulator is connected to the power supply filter with long lengths, or if the output load capacitance is large.

I think my mA draw is pretty low overall, but I don’t know now they define “low” here. I’m not quite sure how to interpret the rest of that in this context.

Arusr: I am using a LD1117V33 for the 3.3v needs. Yes, this is a nRF24L01+ without the external antenna. Range isn’t enormous, but better than expected. The ones with antennas might be quite impressive all things considered (at the cost of higher draw, of course). I have seen these sold on 5v-capable breakout boards (SparkFun) , but the one I am using (super cheap one from yourdruino.com) is strictly 3.3v so, coupled with my bareduino design, I have to provide my own 3.3v.

My 5v regulator providing the board-wide power is a L7805CV: http://www.mouser.com/ProductDetail/STMicroelectronics/L7805CV/?qs=sGAEpiMZZMtUqDgmOWBjgNedF5UBsYhVzhrcsEyhlP4%3D

And the 3.3v is here:
http://www.mouser.com/ProductDetail/STMicroelectronics/LD1117V33/?qs=sGAEpiMZZMsGz1a6aV8DcCz10aAT%2bcfyfixmM%2FM6hTA%3D

Thanks again and hope this is useful!

  • Aaron

Aaron, Thanks for the response. I'm trying to do kind of what you're doing. The voltage regulators you're using uses a "TO220" package. Do those pins fit on bread boards? They look too fat to fit breadboards. But maybe you're only using these on the soldered version of the prototype boards which have bigger thru-hole holes?

Yep, they fit on the standard breadboards I was using. The legs taper a little. Just know they can get hot depending on your parameters. When I had a 12v supply, the 5v one got pretty hot to the touch, but not dangerously so (didn't hurt the breadboard).

Hope this helps! - Aaron

When I use regulator's I always use the caps. 10uf on the in and 1uf on the out if its noisy I'll use 0.1uf..

I if your using a wall-wart power supply..dont assume its clean..always use the caps even on a breadboard..

on the bright side..you have been given a glimpse of a future project.. power supply ..for your bread board.. just grab a regulators of different values do'em up nice so you can just plug your power supply in .or build a bench power supply.. I love this hobby..

Regulators are a pain in the butt for breadboarded projects - I use 5V wallwarts for that. If making a PCB, then adding a spot for a regulator is okay - but even then I plan the design so that a wallwart can be used without the regulator. You're not going to bring 120V into the board, and use a transformer, and bridge rectifier, and regulator, and smoothing caps - so why not just bring in the right voltage to start instead? Switching regulators run cool, are very precise, and have output short circtuit protection built in. 5V, 2A: http://www.dipmicro.com/store/DCA-0520 5V, 1A: http://www.dipmicro.com/store/DCA-0510

Higher voltages are good when driving strings of LEDs, motors, etc, and have transistors or open collecter drivers or open drain drivers for sinking current. And you can still run them thru an onboard 5V regulator to have a 1 supply design. 7.5V, 1A: http://www.dipmicro.com/store/DCA-07510 9V, 1A: http://www.dipmicro.com/store/DCA-0910 12V, 1A: http://www.dipmicro.com/store/DCA-1210

I agree on using a 5v supply from the outset. I did this as an experiment and for versatility so I could use something higher than 5v if that's what I had on hand. I still have a box of orphaned wall warts from life's collection of retired, dead and throwaway gadgets. So I ransack that and sometimes end up with something more than 5v as a result. Yes, I know it means more heat and is less efficient. I am driving this with a 9v supply.

Sadly, I tossed a ton of old dusty wall warts a few months before the arduino bug bit me. :(

I needed the 3.3v regulator regardless on this project, though, even if I had used a 5v wall wart and skipped the 5v regulator.

The caps fixed my issue, but what bugs me is that I had the issues described in my original message even with my bench supply. It's not a high end pro unit, but certainly more stable than a typical wall wart. Looks very clean on my scope.

Puzzling...

  • Aaron

halfpress: The caps fixed my issue, but what bugs me is that I had the issues described in my original message even with my bench supply. It's not a high end pro unit, but certainly more stable than a typical wall wart. Looks very clean on my scope.

Whether your bench supply is good or not is irrelevant. The datasheets for most voltage regulator chips say that you can omit the input capacitor only if the regulator is situated close to (in wiring terms) the reservoir capacitor of the incoming supply, otherwise the regulator may oscillate. Which means you need an input capacitor unless the regulator input is fed directly from the reservoir capacitor through no more than a few cm of pcb trace.

Ah! That helps a lot to know. The reservoir capacitor in this case is an element of the wall wart several feet away?

Thanks! - Aaron

halfpress:
Ah! That helps a lot to know. The reservoir capacitor in this case is an element of the wall wart several feet away?

Yes, that’s right.