I have a servo-centric circuit which uses an external power supply. I need to add an LCD display which has a maximum voltage of 5.5V. I'd rather use the external power supply and not the Arduino 5V. I'm not sure if I needed a voltage regulator (7805, 7804) or if a simple voltage divider with a couple of resistors will do.
If you have a minute and could explain the fundamental difference between these two methods, it would be very helpful to me.
A resistor divider will change the 'divided' voltage as the current changes E = I X R so when the current changes so must the voltage. A Linear Voltage regulator like a 7805 can be thought of as a Voltage controlled resistor, constantly comparing the output voltage to an internal constant (regulated) voltage and adjusting it's internal resistance to keep the voltage output constant. There are some things that you just might need to know. 1. All regulators have a minimum input voltage sometimes called the I/O differential or "Drop out" voltage this is the lowest voltage that can be applied to the input and have the output be the right voltage. 2. ALL Linear Regulators require some bypassing on the input and output connections... for many reasons but take my word for it the device WILL NOT work as advertised under ALL circuit conditions without them so just add them and be glad you don't need to know why... someone else already did that work and told you what values to use. For an easy example copy the DC input circuit for the Uno, that diode is somewhat optional as it is for preventing damage from an accidental reversed battery and YES use 4 caps, 2 47uF and 2 .1uF. One of each value on the input and one each on the output. remember that a 7805 (there is no 7804) REQUIRES that the input voltage be a minimum of 2.5 V greater than the output. For best results copy the Uno exactly, wire for wire and part for part. The NCP1117-5.0 has a 1 volt IO differential and is easier to use than the '7805 is to use. And the circuit works well... unless you overload it.
Thanks, I was intending to ask for some more details at the electronics shop... because I'm using a 6V power supply, which I need to drop to 5V, so obviously not enough difference to make the regulator work correctly. But I only need the 5V so I don't damage the LCD display (5.5V max) while building the circuit for servo control (6V) — what do I do, then? Up the power supply to 9V and use two different regulators (one for the 6V parts, the other for 5V), or do I just send 6V to the LCD and hope that 0.5V over the maximum isn't too much?
As to the caps, I've read 10 different explanations describing 10 different capacitor setups. It's a real mess trying to understand how to best make this but I'll just trial-and-error my way through this.
No don't do that as the parts will soon become too expensive to keep replacing. There are several things you might do depending on what you are doing and how you do it... First why not power the device from the Uno (or which ever 'O' you are using, just the Vcc and ground... power the backlight from your 6V source and increase the current limiting resistor by 6/5 or 20% so If your backlight resistor was 150 ohms make it a 180 or 220 ohm resistor... 1.2 X = 1 - 1.2 or .2 = 20% X 150 ohms is 30 ohms additional resistance you wouldn't do much beyond slightly dimming the backlight by a factor of ~20% more... from the 5V 150 ohm level (180/220 = .019 or 19% decrease in current to the LED backlight.
Using a 5V reg from the 9V battery is worse... say the LCD and backlight draws 150 mA .15A from 5V... the regulator is regulating 9V @ .15A to 5V @ .15A... the LCD see's .15A X 5V or .75W but the regulator see's 1.35W of power from the battery or .6W wasted energy as heat + .75W for the LCD and backlight. better to use a bigger resistor to the 5V source. If you were qworried about spikes from the servo's damaging the backlight you could use a 1N4728 3V3 1W Zener diode across the backlight... that would limit the max voltage to 3V3 on the backlight. The part I mentioned is NOT being used as a regulator rather it is a clipper or a safety valve as it will not begin to conduct until the voltage on the backlight exceeded 3V3... Use a 1W diode for safety (hint... put the recommended resistor in series with the backlight and measure the voltage across the backlight (usually pins 15 & 16) and pick the closest higher value Zener diode to that voltage. There are several different strategies to solve your problem I picked the two that were easiest and IMO best for you and your project.
I don't want to power the device from the Uno because I'd like to (1) learn how to properly control voltage in my circuits from one single power source and (2) possibly recreate the environment with a blank Atmega and keep the Uno for prototyping.
increase the current limiting resistor by 6/5 or 20%
I don't understand what you wrote about the current limiting resistor: if I increase the resistance I'll reduce the current, yes, but voltage will remain the same. The datasheet says 5.5V max, it doesn't say anything about maximum current (although I presume there is one). So how does the resistor help here?
You mentioned one available... I quote from your original post
I'd rather use the external power supply and not the Arduino 5V. I'm not sure if I needed a voltage regulator (7805, 7804) or if a simple voltage divider with a couple of resistors will do.
a servo power supply is 6V... no? my comment was based on the supposition that your available power was 6V. The LCD itself draws very little power and is most sensitive to spikes on it's supply so power the LCD from the 5V '328 PSU and the backlight which draws a great deal of power but doesn't care about spikey power can be powered from the servo power, the value of the dropping resistor must be changed by the proportion that it is different from 5V if your servo or available power isn't 6V then plug whatever it is into the simple proportional formula, determine the proportional difference and multiply the 5V lcd backlight dropping resistor by that value thus Servo power = 6V back light = 5v so 6/5 = ? X the 5 v resistor = new dropping resistor value.
Also it is not a great idea to try to use a servo supply for the source for a 5V source the servo power supply will be far too noisy for anything but servo's.
If you must use a common supply make certain it is high enough to supply 2 different regulators, one for 5V and a separate one for Vservo...
@Pokey: thanks. The power supply actually outputs 6.22V and the 1N4007 I have only drops 0.5V — can I put two of those in series, and if it's so simple, what's the point of a voltage regulator?
You can put two in series, but all that does is drop by a fixed amount. It doesn't guarantee an end voltage. Also, the diodes will warm up, depending on the amount of current going through them.
Also, the diodes will warm up, depending on the amount of current going through them.
Something I noticed when I tried to draw 12A through some 1A diodes They got a tad hot. Now I have some 40A diodes that are the size of a small rodent...
I'm using a 6V power supply, which I need to drop to 5V,
Using a diode between your supply and the device will drop the voltage by 0.7 giving you 5.3v. Also a 1v zener could work too.
If a 1V zener existed (the lowest one I can find is 1.8V). Zener diodes rated less than about 3 or 4V seem to have very poor voltage regulation anyway, you might as well string ordinary forward biased diodes together.
because I'm using a 6V power supply, which I need to drop to 5V, so obviously not enough difference to make the regulator work correctly.
You seem to be generally unaware that there are zillions of LDO [low-dropout]
v.regs available that will operate with well under 1V differential between
Vin and Vout.
Doc mentioned an smt part, but there are many TO220 and T092 [100mA
max] parts that have been around for many decades. LM340, LM2950,
LD084 series, on and on. Note that some have 7805 pinout and others
have LM317 pinout.
Yes in fact Bazillions of likely unsuitable parts as the person is trying to use a PSU that will power Servo's as well and that is the reason why I wrote two books about the issue here in this thread. If you must use the servo supply you might use a 1N4733 a 1W 5.1V zener and a 22 ohm resistor and 2 4700 uF 15V cap on each end of the resistor to ground. One end of the resistor goes to 6V DC and the other end goes to pin 2 of the lcd with one of the 4700 uF caps to ground and the Zener cathode the anode is grounded. the other capacitor goes from the point where the resistor is connected to 6V DC to ground. Power the backlight as I recommended in response #1, it doesn't really care about a noisy supply.
The zener will have 40 mA current flow to ground and .2W dissipation quiescent you can pull about 5 10 ma from this point (I calculated both the zener current and dissipation and both look ok. My real concern is the stability of the 6V supply when the servo's are working. This was the reason that I recommend 2 4700 uF caps. The display won't mind its voltage being momentarily dropped a little BUT transient noise from the servo's WILL scramble your display. This was the reason I suggested an isolated supply for the LCD. The difference, 1V is just too small to make a reliable clean power supply for the LCD. I did the parts location and I did the math for a zener regulated (shunt regulated) power supply. Should this not be enough filtering then lower the resistor to 10 ohms and split it in two... 2 4.7 ohn 1/2 watt resistors in series and an extra 4700 uF cap from the middle of the resistors to ground. This will double te zener current and you will be dissipating .4W now but you are still very much in the 'Good' area of the zener and by splitting the resistors and adding an additional cap in the middle to ground you have a 4 pole filter that should be reasonably clean.
DO NO NOT ATTEMPT TO POWER THE BACKLIGHT FROM THIS POINT IT WILL NOT WORK.
My design assumption was for about 10 mA @ 5V for the LCD control electronics only. The split resistors are simply a multiple pole filter to remove as much of the servo noise as possible.
You seem to be generally unaware that there are zillions of LDO [low-dropout] v.regs available
I was indeed unaware of that until yesterday, since I'm a complete beginner in electronics and haven't heard the term "voltage regulator" until two weeks ago...
Actually the guy in the electronics shop told me about the low-dropout ones and even sold me a LM2940CT which is supposed to give 5V whatever Vin is (within reason). I'll try this out and see if I can get it to work.
LM2940 is a good device. As long as you're gonna be playing around with electronics,
you should start downloading the datasheets for the parts you are using, and start
learning how to interpret the specs. Look for the dropout voltage value, then
you'll know what "whatever Vin is (within reason)" means.
I used the LM2940 in a TO220 case about 10 years ago it is a first generation PNP pass transistor type design and it is a little fussy... it wants to see a min of 10uF (used to be tantalum) although the data sheet says .47 use 10 on the input and the output wants to see a Min 22 uF very local (NEAR) to the regulator. The data sheet Here: National Semiconductor DS008822 datasheet pdf specs it @ .2V dropout and should work very well for you. At least read the first page carefully. When I try for a solution to a problem I try to take all I know and find the simplest solution I can. The Zener and those big caps I mentioned is Low Tech on purpose. It is the simplest solution I could advise and know in my mind that it WILL work 100%, 100% of the time. The center (in my mind) issue was that the 6V supply would likely dip below 6 V and very likely go as far as 5V for two reasons, 1. the peak current drain and the wire itself supplying the distribution or connector point for the servo's. The servo will make a reverse pulse equal to the energy used to activate the coil. now when you activate the coil for a move of a step or two the pulse is caught and clamped by the diode (If you have one on each servo) BUT it is clamped @ -.6 / -.7V this will along with the forwards pulse will serve to momentarily 'bump' the supply down a little more. the series resistors and capacitors provide a sort of battery or storage and filter for the LCD power and prevent noise from the servo's from scrambling the LCD display. As I said the backlight doesn't care it just needs a larger resistor to lower the required current from the LED's in the backlight... Better to offload that from the LCD supply if you can and in this case the primary supply voltage (6V) was close enough to work for the backlight... Does this answer your unspoken concerns... Any 5V (5.1) 1 watt Zener would work, it's just that I remember the 4733 because I used it frequently when I had to drive relays, I would place them across the coil and another one where my Vcc source went to the digital stuff... A little overboard... Perhaps but I never had any problems. The regulator (LM2940) will certainly do the job for you and if you power the backlight directly from the 6V supply you won't need to heat sink the LM2940. It will dissipate .18 W under worst case W/Backlight and 30 mW With the LCD only (@ 10 mA for the LCD) and 10 -20 ma for the regulator IQ or quiescent current.
What Doc is alluding to above is power dissipation. After voltage and current, the
next thing to consider is power dissipation. [Then, for signal circuits, the next
thing after that is frequency-response].
In general, you can dissipate maybe as much as 1 Watt with a TO-220 package
[LM7805, LM2940], and only about 0.2 - 0.3 Watt with a smaller TO-92 package
[78L05, also typical plastic NPN/PNP transistors like 2N3904], before the parts
start to heat up excessively.
For your LM2940, with 6V in and 5V out, you can conceivably push close to 1 Amp
of current before it gets hot. PD = Vdrop * Current.
However, if dissipation is more than 30-50% of this value, you should think about
using heatsinks.