Author Topic: Trying to understand voltage divider circuit  (Read 3414 times)

0 Members and 2 Guests are viewing this topic.

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Trying to understand voltage divider circuit
« on: April 25, 2018, 03:40:10 am »
I'm trying to understand some of the nuance of Voltage divider circuits. I drew a simple circuit in LTSpice (attached) that I'll use for my references. I'll divide this post into assumptions and questions. Assumptions are things I think I know/understand based on the little bit that I know of electronics and some inferences. Please review and correct any misunderstandings. I understand that there may be a lot of corrections if one of my early assumptions is incorrect.

Assumptions:
  • Both R2 and D1 drop 5v because voltage is the same in a parallel circuit
  • Whatever D1 is (diode, LED, Arduino, etc) it probably has lower resistance than R2. So D2 would be paired with a resister (R3) for current limiting.
  • If there is no resister in series with D1 and it's internal resistance is negligible compared to R2 then effectively all of the current goes through D1
  • The combination of D1/R3 drops 5v because they are in series.

Questions:
  • Why is R2 even necessary? If D1/R3 are dropping 5v what's the point of R2?
  • If D1 needs 5v but we throw R3 in there too it's not getting the full 5v. Am I imagining a need for R3? If not how do we compensate for that?
  • Maybe I'm misunderstanding how things rated for 5v work. If a component is rated for 5v does that mean it's rated for 5v with 0 resistance? i.e. it can handle all of the current that 5v produces?

Thank you for your patience with my super newb-ness.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11853
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #1 on: April 25, 2018, 04:13:47 am »
You think R1 and R2 are set up to divide the voltage into 7 V and 5 V. But they will only do that as long as D1 is not present. If you include D1 in the circuit then the R1/R2 voltage divider will no longer do what you think and everything changes.

In the real world voltage dividers are not used in this way, for this reason. They don't work effectively of the goal is to power something that will draw significant current. If you want to power something like an Arduino then you need to use a voltage regulator. If you want to power an LED then you need a current limiting circuit, not a voltage regulating circuit.

So your circuit basically is hopeless and cannot do what you want. Trying to analyze it will not be fruitful.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Trying to understand voltage divider circuit
« Reply #2 on: April 25, 2018, 04:16:53 am »
How I would analyse this....

D1 is the 'right' way around, so will start conducting when (if?) about 0.7V is over it. It will take a lot of current before the voltage drop to rise over 1V - over 1A. So assume that the node where R1,R2 and D1 will be 0.8V or so.

It will be relatively 'stiff' - it will require a big change in conditions for the voltage at that point to change much - when conducting diodes let "a lot" of current flow through them with ease - many amps for power diodes..

If the supply voltage is 12V, and there is 0.8V over D1 (and also R2) then there must be 11.2V over R1.

If R1 has a high resistance it might be closer to 11.3 V.

If R1 has a low resistance (say 10 Ohms) it might be 11V.

R1 will never have as little as 7V over it - unless the doide has failed, or is installed backwards.

The only exception would require very high currents - tens or hundreds of amps. Enough that all the magic smoke will escape from all the components.

The other (less intuitive) way of looking at is would be that the R1+R2 voltage divider is a voltage source of 12V * (R2/(R1+R2)) volts, with a source impedance of (R1*R2)/(R1+R2) ohms.  When you connect this to the diode, enough current flows through the diode to drop the voltage down to 0.8V.

« Last Edit: April 25, 2018, 04:24:19 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #3 on: April 25, 2018, 04:26:16 am »
So your circuit basically is hopeless and cannot do what you want. Trying to analyze it will not be fruitful.

Hmm good to know. If this type of circuit is more or less useless why do I find so many damn tutorial videos about it then :(
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Trying to understand voltage divider circuit
« Reply #4 on: April 25, 2018, 04:36:41 am »
Oh, I see what you are getting at.

Using two resistors to drop 12V to 5V works, but it is very dependent on the ratio of current flowing through the load (in your picture D1) vs the current being 'wasted' in R2.

So if R1 is 7 ohms, and R2 is 5 ohms, 1A will be flowing through the divider and with no load connected you will have 5V.

If you draw of any appreciable amount of current to power an LED or Arduino or something it will cause the voltage at that point to drop. As a rough rule of thumb for this case, drawing off 10% of the current (100mA in this case) will cause the voltage to drop by 10%.

If the load current jumps around (e.g. an Arduino blinking an LED) then the voltage will also jump around. If you want a stable 5V, and don't want to waste a lot of current, then you need a voltage regulator.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline Bratster

  • Regular Contributor
  • *
  • Posts: 246
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #5 on: April 25, 2018, 04:38:55 am »
So your circuit basically is hopeless and cannot do what you want. Trying to analyze it will not be fruitful.

Hmm good to know. If this type of circuit is more or less useless why do I find so many damn tutorial videos about it then :(
They (resistor dividers, no diode) are used frequently to level shift voltage signals.

Random example:

You have a 0 to 10v signal that you want to measure with a microcontroller.

Use a resistor divider with 2 10ks, you now have 0 to 5v signal to send to your micro.

Sent from my Moto x4 using Tapatalk

 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11853
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #6 on: April 25, 2018, 04:44:00 am »
Hmm good to know. If this type of circuit is more or less useless why do I find so many damn tutorial videos about it then :(

No, they are not useless at all. Voltage divider circuits are very useful and are used all the time. The key thing is they are not used to power things that consume current like Arduinos or LEDs. Voltage dividers are used to produce different voltages that might be needed by things like op amp or comparator inputs that consume negligible current and that won't upset the operation of the divider.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #7 on: April 25, 2018, 05:01:18 am »
Ok well it seems that I'll need to use a voltage regulator instead of a divider circuit. Thanks for the responses guys but I don't think there is a need to continue this thread.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Trying to understand voltage divider circuit
« Reply #8 on: April 25, 2018, 05:05:12 am »
Ok well it seems that I'll need to use a voltage regulator instead of a divider circuit. Thanks for the responses guys but I don't think there is a need to continue this thread.

It might only be worth continuing to say....

For small loads, where efficiency is not key, the part you want is "7805". You can get them nearly anywhere.

Here's a link to a datasheet: https://www.sparkfun.com/datasheets/Components/LM7805.pdf - use the design at the top of page 7
« Last Edit: April 25, 2018, 05:07:30 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4027
  • Country: gb
Re: Trying to understand voltage divider circuit
« Reply #9 on: April 25, 2018, 07:06:00 am »
An option, though I can't think why you wouldn't use a variable regulator instead, is to put the output of the voltage divider into an opamp in voltage follower config.  This way the voltage divider provides a reference voltage (signal, very little current) and the opamp tracks that voltage on it's output but can supply current.

If R1/R2 were actually a potentiometer it would allow you to get a fairly stable variable voltage.

However, there are ICs designed for this purpose such as the LM317 et. al.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16600
  • Country: us
  • DavidH
Re: Trying to understand voltage divider circuit
« Reply #10 on: April 25, 2018, 07:52:27 pm »
Do your analysis in a different way using the Thévenin equivalent circuit to understand why this circuit configuration might be used.

Ignore the diode for the moment.  R1 and R2 form a voltage divider with an output voltage of Vin*R2/(R1+R2).  The Thevenin equivalent resistance of R1 and R2 is calculated as if they are in parallel so 1/(1/R1+1/R2).  What the diode actually sees then is the output voltage from the calculated voltage divider through the Thevenin equivalent resistance which is the parallel resistance of R1 and R2; we are down to a single voltage source, a single resistor, and a single diode.  We can now pick what maximum voltage is applied independently of what current is applied.

Why might this be used in real life?  If the diode was an LED to which power might be applied backwards, the voltage divider limits the voltage applied to the LED but the forward current can still be set as if a higher voltage is used because the equivalent resistance is lower.  This might also be done when forward biasing a base-emitter junction so that if power is reversed, the base-emitter junction cannot reach reverse breakdown which will damage it.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #11 on: April 26, 2018, 12:51:08 am »
Ok well I guess let's continue a little more. The reason I was looking into voltage dividers is because I'm working on a project that will use RGB LED strips (9-14v) and Arduino (5v) to control it. I'd like to power it off of a single wall plug. So I was thinking about going to the local thrift shop and seeing if I can find any electronic device with a wall brick that outputs something like 12v and scavenging that. Then I would use a "thing" (voltage divider, voltage limiter, whatever the right thing is) to run the arduino and some transistors to control the LED strips so they can operate at 12v.

A) will that even work?
B) if so is a voltage limiter the thing I want to use there? Is the 7805 the right thing to use?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Trying to understand voltage divider circuit
« Reply #12 on: April 26, 2018, 01:23:49 am »
Ok well I guess let's continue a little more. The reason I was looking into voltage dividers is because I'm working on a project that will use RGB LED strips (9-14v) and Arduino (5v) to control it. I'd like to power it off of a single wall plug. So I was thinking about going to the local thrift shop and seeing if I can find any electronic device with a wall brick that outputs something like 12v and scavenging that. Then I would use a "thing" (voltage divider, voltage limiter, whatever the right thing is) to run the arduino and some transistors to control the LED strips so they can operate at 12v.

A) will that even work?
B) if so is a voltage limiter the thing I want to use there? Is the 7805 the right thing to use?

A) Yes.
B) Yes, some sort of voltage regulator is what you want. You could even get an inexpensive prebuilt module such as https://www.aliexpress.com/wholesale?SearchText=lm7805+module&opensearch=true that includes an 7805 regulator and the other required components.

Edit: Corrected link.
« Last Edit: April 26, 2018, 02:00:57 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #13 on: April 26, 2018, 01:50:24 am »
A while ago for a different project I got some thing which I think was a voltage regulator from a RC hobby shop so I could run my arduino from a LiPo RC battery pack. I can't seem to find that thing anymore but that's probably what you are talking about Hamster.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #14 on: April 26, 2018, 04:16:14 am »
Started looking into the power supply for this project. Went to the local thrift shop and found a wall adapter from something that supplies 12VDC and 500mA. My RGB LED strip runs on 12v. Also got a food saver vacuum that runs on 5v but I scavenged the barrel plug from that so I can have something to plug into. Pulled the plug out of the sealer and connected it to my adapter. Was able to power the segment of LED strip using this setup. Yay!

Now I just need to get a voltage regulator and some transistors and start working on a circuit diagram.
 

Offline Jwillis

  • Super Contributor
  • ***
  • Posts: 1710
  • Country: ca
Re: Trying to understand voltage divider circuit
« Reply #15 on: April 26, 2018, 04:46:23 am »
You can use a  LM78xx series voltage regulator.If you need 5Volts A LM7805 is all you need and they're really easy to use and cheap.http://www.mouser.com/ds/2/149/LM7812-461970.pdf
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16628
  • Country: 00
Re: Trying to understand voltage divider circuit
« Reply #16 on: April 26, 2018, 05:36:00 am »
It's very simple: The resistance of the part I drew the circle around is not equal to R2 therefore the voltage at the point in the middle won't be whatever the result of a calculation done with only R1+R2 gives you.


« Last Edit: April 26, 2018, 05:39:33 am by Fungus »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11853
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #17 on: April 26, 2018, 05:43:13 am »
Started looking into the power supply for this project. Went to the local thrift shop and found a wall adapter from something that supplies 12VDC and 500mA. My RGB LED strip runs on 12v. Also got a food saver vacuum that runs on 5v but I scavenged the barrel plug from that so I can have something to plug into. Pulled the plug out of the sealer and connected it to my adapter. Was able to power the segment of LED strip using this setup. Yay!

Now I just need to get a voltage regulator and some transistors and start working on a circuit diagram.

While you are in the thrift shop, or anywhere else you can scavenge stuff, look for a 12 V USB adapter for use in automobiles. This contains a module that will take 12 V in and give a regulated 5 V out. If you are anything like me, you may have such a thing lying around in your junk pile.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4027
  • Country: gb
Re: Trying to understand voltage divider circuit
« Reply #18 on: April 26, 2018, 06:47:09 am »
What kind of LED strip.  How long?  How many LEDs and more importantly how much current is needed?

The RC component is probably a BEC (Battery eliminator circuit) usually a regulator 6V or 7V from 12-24V module for powering the radio gear from the main motor power pack LiPo.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #19 on: April 26, 2018, 08:01:48 am »
 

Offline Belrmar

  • Regular Contributor
  • *
  • Posts: 70
  • Country: es
Re: Trying to understand voltage divider circuit
« Reply #20 on: April 26, 2018, 08:28:34 am »
Quite a lot of arduinos have some kind of integrated voltage regulator , check what regulator it is, it should be able to work with 12V unless china does its thing
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4027
  • Country: gb
Re: Trying to understand voltage divider circuit
« Reply #21 on: April 26, 2018, 08:50:02 am »
It's going to be two of the segments of this: https://www.superbrightleds.com/moreinfo/flexible-led-strip-lights-color-changing/rgb-led-strip-light-flexible-custom-length-led-tape-light-with-9-smds-per-ft-3-chip-smd-led-5050/3502/

"9 RGB LEDs (5050 SMD) per foot.":  so that's 9 * 18 * 3 mA per foot = 486mA per foot.  If you are going for 3 feet you will need 1.5Amps to be safe.  This current is required to run it at full bright white.

Note the link you shared is for the 12V strip which uses less current due to the 50/50 SMDs being in series.  It will use about 9 * 18 mA per foot = 162mA (for full bright white).

I have a circuit you can use including gerber files for the PCB.  It will run the 12V strip from a 12V supply and power it's own ATTiny85 Arduino compatible microcontroller with a 5V regulator.  You can find the most of it here:
https://www.eevblog.com/forum/kicad/correct-way-to-show-screw-holes-for-manu/

If it is of use to you I would happily send you the project files, schematic and gerber files, with the bugs fixed :).  I'm not 100% sure if the schematic is on that thread, as I'm in work, but I can upload it when I get home if it's not.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #22 on: April 26, 2018, 11:41:19 pm »
"9 RGB LEDs (5050 SMD) per foot.":  so that's 9 * 18 * 3 mA per foot = 486mA per foot.  If you are going for 3 feet you will need 1.5Amps to be safe.  This current is required to run it at full bright white.

Oh sorry; not 3 feet. 2 segments; as in the length shown in the image I posted above. The segment only has 3 LED in it. The final product is only going to be 30x20cm.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4027
  • Country: gb
Re: Trying to understand voltage divider circuit
« Reply #23 on: April 27, 2018, 06:57:04 am »
"9 RGB LEDs (5050 SMD) per foot.":  so that's 9 * 18 * 3 mA per foot = 486mA per foot.  If you are going for 3 feet you will need 1.5Amps to be safe.  This current is required to run it at full bright white.

Oh sorry; not 3 feet. 2 segments; as in the length shown in the image I posted above. The segment only has 3 LED in it. The final product is only going to be 30x20cm.

Ah okay.  The LEDs are 12V.  The easiest way to run them is to provide 12V straight to the strip also take the 12V through a 5V voltage regulator to the Arduino.  It will also be easier if you put the 3 segments in series so you only need one DATA pin to run them.  I recommend the FastLED library.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline YoukaiTopic starter

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Trying to understand voltage divider circuit
« Reply #24 on: April 27, 2018, 05:35:41 pm »
It will also be easier if you put the 3 segments in series so you only need one DATA pin to run them.

Series would mean I would wire the R+G+B from one strip to the 12V of the next one correct? That would prevent me from having any color but white wouldn't it? I am going to want to have it do cool color effects so I need to be able to control the RGB led independently.

I'm going to use the smallest arduino I can which probably won't have enough PWM pins to run even 1 LED strip and the 3 servos for the project. so I'm going to use a PWM driver chip which means that the number of PWM pins is essentially a non-issue. Though if I can run the Red LED from each strip off the same pin that would save me some duplicate lines of code.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf