I built a project with an Atmega328 on a copper protoboard and all the circuitry on it works out fine except this one anomaly...
I have two leads coming off the board that attach to a 5v regulator which powers the whole project.
I have an arduino board I attached to a 9v power supply (9v 650mA, sparkfun).
When I plug the leads from my project into the vin and ground of the arduino, it comes to life no problems.
When I touch the leads to the + and - of the barrel jack it comes to life no problems.
But...
When I touch the leads to the + and - of the power supply plug I get nothing.
When I touch the leads to a 12v 7Ah battery the leds in my project blink quickly like everything is resetting over and over.
So the question is this...
What does the arduino do between vin and ground that the power supply doesn't do?
I quick look at the schematic (http://arduino.cc/en/uploads/Main/arduino-uno-rev2-schematic.pdf) shows a 47uf decoupling cap.
I added a 47uF capacitor both before and after the 5v regulator, to no avail.
I found a 5v 2a power supply and hooked it up to my project (with a diode for voltage drop... just to be safe) and it worked just fine... the problem is obviously my voltage regulator.
NTE960 is the voltage regulator.
Still would love to know why it's doing this to the project... it outputs 5v just like it's supposed to...
nte960 provides +5v DC current. Accepts ranges from 7-30 volts.
I threw a diode on one of the leads leading to my project to emulate the one on the arduino, no dice.
I'm getting voltage to the regulator from all sources, I'm getting 5 volts out of the regulator from all sources, but only from the arduino board will the lights come on (except the battery causing the blinking).
Somehow the NTE960 is causing the problem. Be it faulty, not the right part for the job (should be...), or just doesn't play nice with the circuitry from some reason.
I'm one of those people who wants to learn from something like this... so I hate to just walk away because I found a workaround.
Just so I understand:
You measured the voltages before you connected the nte, to your project, or after (under load) or both?
You used the 5V 2A supply instead of the nte?
Your project is just an Atmega328 with a few leds (less than a 1/4 Amp load) ?
I tested the nte before I added it to the project, and after adding the nte to the project I tested it under load (for voltage).
The workaround I'm using is to find a 5v supply and use it.
It drives 25 LEDs for about .5 amps of current total, but the power supply is rated 650, and the regulator 1A+.
It shouldn't be a matter of the power supply, because a 9v 2a supply hooked up to this project still doesn't make everything light up.
You don't show the 9vdc negative connection to the board.
You don't show or have input and output caps shown for the voltage regulator.
You don't have .1ufd power bypass caps shown for the AVR voltage input pins.
That transistor is probably too small to drive the number of LEDs you plan on,
Not enough current gain and would be working too close to max current rating.
How about this?
With the 9V 650mA hooked to the Uno and the nte:
The 9v 650mA was loaded just enough to keep the nte and your crt. happy (you got lucky).
With the 9V 650mA hooked to the nte only or the 12V 7Ah battery to nte:
Nte not happy, too much input voltage to output 5V @ >500mA
To get the rated 1Amp from the nte you need:
A heat sink, not much more than 7V on its input and perhaps a small sacrifice to the electron god.
The more voltage you input to the nte the less current it can provide.
You can test this by disconnecting some of the leds (decrease the load).
You could try using the nte to power the 328 only and use an unregulated supply to power the leds (but you would have to change your 25 led resistors).
You do need to have a regulator for the 328. You might not want to use a supply rated for less than 1 amp. When you used your 9V 650mA it was getting pretty warm and working too hard. Everything (like the diodes in your power supplys and the nte itself) will last alot longer if you don't run it so hard (hot).
When I got everything working 100% I wasn't using the the input/output caps or bypass caps, so I didn't include them here.
I'll look into a higher rated transistor, I'm kinda limited by what I have in 2 stores near me.
Robcam:
With the 9V 650mA hooked to the Uno and the nte:
The 9v 650mA was loaded just enough to keep the nte and your crt. happy (you got lucky).
You may be right. I ordered a 5V 1A power supply from sparkfun to swap out with this one.
With the 9V 650mA hooked to the nte only or the 12V 7Ah battery to nte:
Nte not happy, too much input voltage to output 5V @ >500mA
The spec sheet rates this regulator at 35V max input voltage and "Output Current in Excess of of 1.0 Ampere".
To get the rated 1Amp from the nte you need:
A heat sink, not much more than 7V on its input and perhaps a small sacrifice to the electron god.
The more voltage you input to the nte the less current it can provide.
Don't need the whole amp, just .7 or so. And would the the 2 extra volts over its minimum operating voltage cause that much of a problem?
I didn't heatsink the regulator because I figured I was operating pretty well under tolerance... didn't notice anything heating up, but maybe it would have under a longer test run.
Thanks for bouncing all these ideas off me guys. So far I'm going to look into a sturdier transistor to solder in this one's place.
The spec sheet rates this regulator at 35V max input voltage and "Output Current in Excess of of 1.0 Ampere".
It also states with proper heat sinking.
Don't need the whole amp, just .7 or so. And would the the 2 extra volts over its minimum operating voltage cause that much of a problem?
Use some math to see:
Linear amps have the same amount of current In and they do Out. So using system current and the voltage drop across the amp, you can calculate how much power the amp is dissipating.
With 9V in:
Vdrop = 9V - 5V = 4V
Power = Voltage * Current = 4V * 700mA = 2.8Watts
With 12Vin:
Vdrop = 12V - 5V = 7V
Power = Voltage * Current = 7V * 700mA = 4.9Watts
That's 1.75 times the power which, in this case, is just heat. The regulator is likely going into thermal shutdown in both cases.
When I got everything working 100% I wasn't using the the input/output caps or bypass caps, so I didn't include them here.
That doesn't eliminate the need for the regulator input and output caps. A circuit not using them is bound to be unstable and the regulator likely to break into oscillation at any instant. Find a good datasheet for a 7805 voltage regulator and it will show and explain the need for the caps. The NTE device is just a 're-branded' 7805.
Looked at the fairchild datasheet and it agreed that one was needed on both sides if the regulator is an appreciable distance from the power supply filter.
I'll do some more research into regulator oscillation.
I looked at the datasheet for the thermal issues and I see my error there.
If I read it correctly it gains 65C/watt and has a maximum operating temperature of 150C.
So anything 2.3+ watts needs a heatsink, though logically anything over 1.5 should have one...
If you are switching 0.5A of LEDs at logic speeds you need substantial decoupling on your 5V, start with 0.22uF ceramic close to 328 + 47uF electrolytic for the board as a whole. A ground plane is wise.