# Voltage Divider Questions

Discussion in 'General Electronics Discussion' started by EasyGoing1, Nov 27, 2014.

1. ### EasyGoing1

16
2
Nov 27, 2014
Hello,

My skills in electronics are mediocre at best. I received my CET back in 1993 and haven't really used the knowledge since. My bread and butter comes from computer networking.

I am trying to build a fairly simple power supply for charging devices such as iPones, iPads etc. I am aware of the requirements on pins 2 and 3 of the USB cable, and how they relate to 'instructing' an Apple device when it comes to how much current to draw from the power supply. So, I was basically considering using one of those DC to DC voltage circuits sold on Amazon for a few bucks to take a stable 12 volt source and bring it down to 5 volts, then make two division points using resistors to provide 2.8 and 2 volts respectively from the 5, so I could place 5 volts on pin four, 2 volts on pin three, 2.8 volts on pin two then ground on pin 1 (that pin order might actually be reversed but you get the point I hope).

What dawned on me today, is that when I chose resistance values (which I have yet to figure out those values - I've been playing with the formula Vi = Vt(Ri/Rt) but still haven't been able to make it work because I'm obviously doing something wrong. But as I was reading a breakdown of voltage divider circuits on allaboutcircuits.com, I began to think that the resistances that I chose should be extremely small due to the fact that these devices need to draw up to 2.1 amps of current, and if the resistances are over 1 ohm, the current in the circuit (before connecting a device to it) will end up being less than 1 amp, and this won't do for my purposes.

So my question is ... is my thought process correct? or will the current in - lets say a three resistor series circuit change significantly when a device is attached across a single resistor, realizing that the net resistance across a single resistor will be reduced because of the parallel resistance effect when attaching a load across one of the resistors? And if that is the case, would it not be better to chose resistances in the thousands of ohms, so as to not burn a ton of energy when the power supply has power applied to the input while there is no device plugged in to be charged?

Any feedback or comments on this would be greatly appreciated.

Sincerely,

Michael Sims

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,500
2,840
Jan 21, 2010
That's the big issue with voltage dividers. Any load on them will change the voltage.

A rule of thumb is that the current through the voltage divider should be about ten times (or more) the sum of any currents drawn from any points along it. This will maintain the voltage within about 10% of what you calculate.

So, in general, high value resistors waste less power but for a given absolute load, will be less accurate than lower value resistors (but they will waste more power).

It's a tradeoff. If the constraints become tricky then you might employ some sort of regulator.

Edit. The above is generally true however in this case the current required would be no more than some fraction of a mA for the data pins. In that case the larger current through the voltage divider would be no more than a couple of mA. It bears no relation to the charge current.

Last edited: Nov 28, 2014
3. ### Gryd3

4,098
875
Jun 25, 2014
I need to slow you down for a sec.
You're right in that the iPhone will pull 2A... you're wrong in that 2A will flow through the resistors to pins 2 or 3.
Remember that pins 1 and 4 are providing power, and 2 and 3 are simply sense pins. Because of this, there will be very very little current flowing into pins 2 and 3 to be able to sense the voltage there. Keep the larger resistor values in place. If you can, measure it with a multi-meter though when you plug it in to test it. Perhaps you have pins 2 and 3 hooked up backwards, you should double check your source to make sure it's correct.

EasyGoing1, KrisBlueNZ and BobK like this.
4. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
Hi Michael and welcome to Electronics Point

Ignore Steve's post; I think he just read the question too quickly. This is the first time I've seen him get the wrong end of the stick and give an inappropriate answer. As Gryd3 said, the heavy current doesn't flow through those resistors.

I think the resistors are typically around a few kilohms. You can probably find reverse-engineered schematics for Apple chargers, etc, to see what values they use. Google teardown along with the relevant product name.

An easy way to calculate the resistor values for a voltage divider is to work out their ratio. For example, for the data line that needs to be at 2V, the top resistor will have 3V across it (calculated from 5V - 2V) and the bottom resistor will have 2V across it. So the voltage ratio is 3:2 which is 1.5:1. The resistances are in the same proportion to the voltage, so the resistance ratio is also 1.5:1. Then you need to look at the preferred value table to find out what values are available with a 1.5:1 ratio. 1.5k and 1.0k are both readily available and would probably be appropriate in this case. That's 1.5k from +5V to the data line, and 1.0k from the data line to 0V/Gnd.

For the 2.8V line, the voltages are 2.2V and 2.8V which is a voltage and resistance ratio of 2.2:2.8 which is 1.1:1.4 which is 1:1.2727273. I wrote a little Python program to do the grunt work; it's attached (remove the .txt extension).

File size:
6 KB
Views:
141
5. ### Gryd3

4,098
875
Jun 25, 2014
I found one here...
Be careful looking for these... as there are a lot of charging 'schemes' out now for USB...
http://www.wabbitwanch.net/blog/?p=767

Common setups include:
-Tying both data lines directly together.
-Putting a resistor across the data lines.
-Building a 3 step voltage divider and putting the data lines on the top and bottom half of the divider. (across the middle resistor)
-Then of course there is Apple's schemes... One puts 2V on each Data wire... and the other changes this up by putting 2.8V on one of the data wires instead.

Worst case, is that your device will only draw 500mA if you pick the wrong scheme
You get it right and the device will pull 2000mA.
Let us know what you find out.

KrisBlueNZ likes this.
6. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,500
2,840
Jan 21, 2010
I completely missed the third paragraph.

7. ### EasyGoing1

16
2
Nov 27, 2014
Thank you! I had "kind of" considered this when I thought about current flow through the whole circuit with the iPad attached, but I wasn't thinking in terms of pins two and three simply needing the voltage there for the purpose of the iPad merely looking at the voltage. Realizing the charge current is only going to run through pins 1 and 4 makes perfect sense (no pun intended).

So in that case, this simple circuit SHOULD do what I need it to do assuming the source can supply enough current. I know from watching a video where a woman reverse engineers an Apple charger, that 2.8 volts with 2 volts tells the idevice to go ahead and use 2.1 amps, where a voltage of 2 and 2 tells it to use only .5 amps.

8. ### EasyGoing1

16
2
Nov 27, 2014
Thank you KrisBlue... I actually worked out the above circuit based solely on Gryd3's reply before even reading your reply. And as you said, Steve's reply was a tad confusing, so I just went to the next one where the light bulb came on in my head (no offense Steve, I absolutely appreciate you taking the time to reply). I did, in fact, use the ratio method as you suggested to find my resistance values, but I did it like this:

Take the desired voltage of 2.8 volts and divide it by the source (5v) yielding a ratio of .56 ... therefore, my first resistor was chosen at 56kΩ and the second resistor in that series would be the difference at 44kΩ. I followed the same pattern for the 2 volt drop and VIOLA!

9. ### EasyGoing1

16
2
Nov 27, 2014
All good Steve, thank you again for taking the time to respond.

10. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
... No pun detected...
I think you may want to use lower resistor values. You have the right ratio but the values are significant too.
Except that you can't easily buy a 44k resistor. That's why I suggested that you reduce the ratio to a single number and use my Python program to suggest suitable resistor values.

11. ### Gryd3

4,098
875
Jun 25, 2014
It looks good, but based completely on the fast you have the voltages there. I am unsure if pin 2 needs 2.8V or if that's pin 3...
It's hard finding a reliable source, and I don't have any apple products to test with. So if that does not work, swap pins 2 and 3 and give it another go!

12. ### EasyGoing1

16
2
Nov 27, 2014
Gryd was the first one to mention the fact that pins 2 and 3 are only for voltage 'sensing' ... so when I said it makes perfect 'sense' ... I kinda made a punny...

And I can find this program where, exactly?

13. ### EasyGoing1

16
2
Nov 27, 2014
That screen shot was taken from my iPad while running the circuit in simulation using the iCircuit app. The voltages are correct, but as KrisBlueNZ pointed out, finding those resistor values will be difficult if not impossible, so I will obviously need to find more common resistor values that will yield the same results.

In this video, which reverse engineers the Apple charger, she does say at the end of the video that for an Apple device to draw more amperage, pins two and three should be set to 2.8v and 2.0v, but she doesn't say which voltage should be applied to which pin. I already have a bread board setup with a USB female port on it and my DC to DC voltage stepper / regulator. I'll play with it as soon as I find some values that make sense, and of course have on hand.

Gryd3 and KrisBlueNZ like this.
14. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
Ah, you're right. I missed that.
In post #4 as I mentioned. You need to remove the .txt extension - the forum software is fussy about filetypes.