4.5v AtMega with 5v FTDI

Hey guys,

I have an AtMega328 running at 16mhz, which I plan to power with a 4.5v regulator running off either 4 AAAs or a 9v battery, and I was wondering if I was going to have any problem programming it with Sparkfun’s 5v FTDI basic breakout.

I assume the breakout provides 5v directly to the Arduino rather than going through the voltage regulator. So when my Arduino is connected to it, it would be running off 5v. The regulator would still be connected though. Do you think this will harm the regulator? Should I remove the batteries before I connect the USB since the voltage differs? Or will it not really harm anything to have it connected in this way for short periods?

Not sure where you got a 4v5 regulator from it's not a standard value. Anyway, there is no problem with doing what you say. Applying 5V to a 4v5 volt regulator will not do any harm to the regulator.

The regulator is an LM317T.

The reason I want to run it at 4.5v is because my servos need 4.5v and I don't have the room for a seperate battery pack for them, and I would rather have only a single regulator on the board.

I am assuming that with the standard caps on the regulator, and a 47uf cap across the power lines going to the servos that doing this won't be an issue.

Nothing else in my circuit needs more than 4.5v that I know of.

Got the voltage reg hooked up to the circuit now.

When running off a 9v battery, LEDs dim when servos activate.

Initially, I didn't place any capacitors on the LM317, because the datasheet seems to indicate they aren't needed for stability. The one on the input seems to be in case the voltage source is noisy, and I'm using batteries so I assume that isn't an issue. And the one on the output is said to improve transient response, which I don't know much about but it seems to mean it will provide current when the LM317 is unable to to smooth things out.

However 1uf which is what is reccomended on the output is pretty small, and I'm pretty sure 47uf is reccomended for motors and things, so I threw one of those between the output and the ground.

It seemed to have no effect though. And I doubt adding that little 1uf and the 0.1uf is gonna do anything considering how much they dim.

So I'm thinking the 9v can't supply enough power. Which is odd considering I know others have built circuits just like this, powered off a 9v battery.

But I guess I'll pull out the AAAs and see if powering it with 9v off a bunch of those will do the job.

Hm. That appears to have done the job! But I don't think I have room for 6 AAA's in the prop I'm building. If what I know about batteries is correct however, I should get the same amount of current out of 4 as I do out of 6.

But I'm not sure 6v is enough to get 4.5v out of this regulator.

Here's the datasheet: http://www.fairchildsemi.com/ds/LM/LM317.pdf

I can't seem to find the dropout voltage. There's a chart that says dropout voltage but it's graphed against temperature and drops as the temperature rises which seems odd. And if the chart is right them the dropout voltage would be like 2v if I expect to get 500mA out of the regulator? That would put me over 6v needed.

I'm still getting a slight flickering of the leds when the servos move. Putting a 47uf cap across them and a 1uf cap from the output on the regulator to ground didn't help.

My touch switches seem a little less reliable as well, though looking at the numbers there's not a huge change, and with some code to debounce them that issue is easy enough to mitigate.

Should I be using an even larger cap here than 47uf? Or do I need to use an inductor as in your motor example here? http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

Also, I don't know anything about inductors. How do I select one?

Hm, I notice your article mentions 1mH for the inductor. Not sure what that means but I guess it's a starting point. Unfortunately, I don't have any on hand, so I'll have to go get one, but before I do that I'd like to know if it'll even help in this instance.

I'm particulary interested to know if it'll help with the 9v, but I don't suppose it will. From what I'm reading these aren't used to store current to provide it when needed, they're used to store it when the motor is putting too much back into the circuit too quickly. Maybe one wouldn't help in this situation then.

I am assuming that with the standard caps on the regulator, and a 47uf cap across the power lines going to the servos that doing this won't be an issue.

I think maybe you are being too consumed with voltage and ignoring current requirements. Standard 9v and AAA batteries can't supply a lot of current, especial with servo and other motor loads.

How many servos are you trying to drive and what is the maximum current demand for the servos? Only then can you determine what size batteries and voltage regulator is proper for your application.

Lefty

The reason I want to run it at 4.5v is because my servos need 4.5v

Are you sure about that? Most r/c servos I have seen will operate between 4.5v - 6.0v - you typically want to operate them at 6.0v in order for them to develop maximum torque...

I think maybe you are being too consumed with voltage and ignoring current requirements.

I think maybe I don't know the difference between voltage and current. :)

Don't capacitors supply current? Now that I think about it, I'm not sure. I guess when I see a pic of noise on an oscilliscope, that's probably plotting voltage over time, and if the cap is supposed to smooth that out, then it's smoothing out the voltage, not the current. Then again maybe it is plotting the current. I don't know. :/

How many servos are you trying to drive and what is the maximum current demand for the servos? Only then can you determine what size batteries and voltage regulator is proper for your application.

I'm trying to drive two sub-micro servos. I don't know how much current they require, because servos don't come with datasheets, and the current varies depending on the load. Also, I cannot be sure the same servos will be used by everyone. So I have to make a guess as to the current requirements.

If you take a look at this you can see the stall current of a number of servos plotted on an oscilliscope: http://homepages.paradise.net.nz/bhabbott/Servo.html

The ones at the top are smaller servos, the ones at the bottom are larger ones. The servos I'm using are even smaller than the smallest servos shown here, and the peak current is when the servo arm is being prevented from moving. Based on these numbers, I'm assuming that the sub-micro servos I'll be dealing with probably won't ever draw more than 500mA each. Also, based on other sources, I believe I can expect the servos to draw less than 200mA each when active normally.

So the current draw I'm looking at for the two servos together is anywhere from say 400mA to 1A. And the voltage regulator I have is supposedly good to 1.5A, though I have yet to check the datasheet to see exactly how much current it can handle without a heat sink as I have it set up now.

(When I get the boards made, I may leave some bare copper there as a heat sink if I have the space. But I'm not sure yet if I'll have space in the prop for a real heat sink. The voltage regulator gets hot to the touch when I use the servos for a whiile, but not too hot.)

Are you sure about that? Most r/c servos I have seen will operate between 4.5v - 6.0v - you typically want to operate them at 6.0v in order for them to develop maximum torque...

Well, the truth is the servos I'm using CAN handle 6v, but I'm designing the circuit with 4.5v in mind because many sub-micro servos can't handle more than 4.5v, and I may need to use different servos.

Also, torque isn't a huge issue here because the servos will just need to move a couple arms with leds on them back and forth. I can tell just by trying to prevent the servo horn fron turning with my fingers that it's got plenty of torque for the job.

Well I think you have a good handle now on the current requirements. I think if you reseach standard 9 volt batteries you find they will be almost useless at these current levels and very expensive on a mah vs $ cost and very limited duration at these current demands. Even AAA cells will have a pretty limited duration, however they might be able to supply that current demand, for awhile.

PS: I think even micro micro servos are designed to work in the 4.5 to 6volt range. Almost all R/C type servos are designed to work with a standard 4 AA cell flight battery that most users use.

Lefty

Well, I'm just going by the info here: http://www.servodatabase.com/servos/all?sort=height&page=4

Page 4 is servos around the size I need, and as you can see most only support 4.8v.

...

Ah crap.

I did my resistor calculations for the voltage regulator to get 4.5v out of it. I need to power this thing with 4.8v!

I wonder if that will have any effect on how much current is being drawn? I'm guessing no.

[edit]

Hm, looks like I need a 680 ohm for R2 to give me 4.79v with a 240 ohm for R1. Do I have a 680?

Why yes.... I have 200 of them. Woo!

Page 4 is servos around the size I need, and as you can see most only support 4.8v.

No, that is misleading chart data. What it’s telling you is the minimum speed and torque values if you run the servos at 4.8volt. All those servos can be run at up to 6 volts and their speed and torque values will be higher as you run them above 4.8volts.

I would just run it all with a standard 5vdc regulator as most such projects do.

Lefty

Maybe you're right, and the chart is simply missing data.

But here are some Futaba servos from Tower Hobbies which specifically state they can't handle 6v: http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXDTB5&P=0 http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXLLA8&P=0 http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXNCV8&P=0

I couldn't find many more which specifically said they didn't handle 6v, but there were a few from GWS, if you go to their website and look at the data there.

So, there's some at least. And Futaba is one of the most popular brands out there.

But anyway...

Running off 5v. Why do you reccomend that? Is there any reason I shouldn't run off 4.8v?

The way I see it these are the options I have:

We've already established that the 9v battery isn't gonna provide enough juice. So that leaves AAAs.

If I stick three AAAs in there, I've got 4.5v. I can use that to run the servos and the Arduino without a voltage regulator. But while I've established that's enough to run these servos, I don't know if it would be enough to run all servos. Digital ones are of particular concern.

I should be able to fit four AAAs. That would give me 6v. If I want to run off 6v though I need a voltage regulator, and it would have to be LDO, whether I want to run at 5v or 4.8v. I don't know if they make LDO regulators with selectable voltages though, so I may have no choice but to run at 5v if using one of those.

Six AAAs, I'm not so sure about being able to fit. But with 9v I can definitely use the LM317 and run off 4.8v if I wish. Regulator gets a bit warm having to burn off all that extra voltage though. Not sure yet if that is a problem.

So... hm. Not sure what I ought to do. Running off 4 AAAs with a 4.8v or 5v LDO regulator seems like the most likely soluton though.