Shop OBEX P1 Docs P2 Docs Learn Events
Voltage Divider and Pot Strategy Question... — Parallax Forums

Voltage Divider and Pot Strategy Question...

idleupidleup Posts: 46
edited 2005-10-24 13:51 in General Discussion
I need to reduce voltage from 5 volts to 0-3volts on a Pot (controls brightness on an LCD). I have made the conclusion that reducing the 5v to 3v using a voltage divider, then running the 3v through a Pot would be the best strategy for this. I looked at several documents on the internet about creating the voltage divider. I have the following problems:

1. In order to figure out what resistors to use on the voltage divider, you must know the desired current output. The schematic for the LCD does not specify what current I need for Pin 3 (the brightness control). So how do I calculate which resisters to use in my voltage divider?

2. Am I correct in my conclusion on the best strategy for this (reducing voltage using voltage divider·then running through pot) or is there a better way, maybe using an IC?

3. Once I have the voltage reduced to 3v, how do I determine which Pot to use? I read some about the POTS but it is not clear how the impedance of the wiper plays into the selection of the POT since I am interested in 0 to full range (full is 3v). Would any Pot do the job? Is there a Pot that takes 5v source and outputs only 3v at its max thereby eliminating the need for a voltage divider?

- Matt

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-10-18 01:46
    I guess one note on using a POT is to be sure you still have an inline resistor for when the pot is at ZERO ohms (which would cause a straight short....so if you just have power on one leg and ground on the other, you'll fry your power supply right quick when putting that POT to zero).

    Have you tested the contrast/backlight yet? Get it working with regular resistors and then put a meter in series and measure the current....that will let you know how much it draws.

    Lets assume a draw less than 1mA.

    3Volts / 1mA is 3000ohms. This 3000ohms would be for the bottom resistor, which means that the top resistor would have to be about 2000ohms. So you'd get 2Volts dropped across the top resistors (1mA * 2000ohms) which leaves 3Volts across the bottom resistor.
    Now, if you put a POT in place of the 3000kohm resistor, you should be able to bring that 3volts up and down as you wish.

    I don't know what happens to the brightness pin when it's connected to ground....cuz, when you drop that POT to zero, it'll be a short to ground....so you might have to put a small resistor in there to keep the current from zapping your backlight pin (I DON'T KNOW IF THAT IS TRUE....DON'T KNOW THE CHARACTERISTICS OF THE BACKLIGHT PIN)....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • pjvpjv Posts: 1,903
    edited 2005-10-18 05:47
    Hi Idleup;

    I'm going to presume that you have an SX handy when you are going to deal with that LCD display, and that the 3 volts need not supply much current.

    If that is the case, then why not simply GENERATE the desired voltage (adjustable from 0 volt up), directly from a pulse-density modulated DAC output from that SX?

    It takes one resistor, say 1K, and a small capacitor, say 0.1 uF, and 4 or 5 or so software instructions, and you're done. Shortcircuit proof to boot.

    Pick the duty cycle to select your voltage; what could be simpler.

    Cheers,

    Peter (pjv)
  • idleupidleup Posts: 46
    edited 2005-10-18 14:44
    I am not using an SX but a BS2pe. I believe they support the same instruction set though. I thought about doing it how you are mentioning but I wanted to have the ability for the user to manually adjust the brightness. I guess I could have the stamp read in a pot and output a pulse. Put now I am using 2 pins for something that shouldnt need any.

    I am not sure I understand why using a pot and setting it to zero would short it. Wouldnt that just make the wiper pin show 0v. How would that short it. Also, to prevent it would you put a resister in series from the wiper pin on the pot to pin 3? I guess I just cant picture what it would look like and why. I still have my original questions on how to pick the correct POT and if you can use the POT as a voltage divider as well...

    - Matt
  • pjvpjv Posts: 1,903
    edited 2005-10-18 16:04
    Hi Matt;

    If you set the pot up as a variable voltage divider sourced by 5 volts, then that would work fine. It is common however to place that "silly ***" resistor in series with the wiper to prevent "oopses", but it's not absolutely neccessary.

    So the values can be calculated with conventional formulas, and of course are dependent on the load presented.

    On the other hand, the approach using the generated PWM voltage is less susceptible to that issue, and in fact it can likely be ignored for small currents.

    Cheers,

    Peter (pjv)
  • nick bernardnick bernard Posts: 329
    edited 2005-10-18 19:34
    supposing that the load is 1k ( and linear), if you put a 1k pot between the supply and the backlight and short the wiper to the unused end of the resistor you'd get a voltage swing of 2.5 - 5v.

    also you could put 3 diodes in series to get a 2.1v drop and short it with a switch when necessary

    roxon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
  • idleupidleup Posts: 46
    edited 2005-10-18 21:55
    I found out today from the manufacture of the display that the pin in question pulls 320uA at 3v (which is the max brightness). So would the best strategy be to use the 1k pot with a 4.7k resister in series between the pin and the pot wiper?

    I dont feel clear that I undestand the resistance ratings on a pot, does 1k mean it is 1k resistance at full "on"? and I assume they are all zero resistance when in full "off"?

    - Matt
  • nick bernardnick bernard Posts: 329
    edited 2005-10-19 13:22
    the resitance of the pot is constant. the wiper provides variable resistance by sliding up and down the resistor.

    try this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
    390 x 238 - 10K
  • idleupidleup Posts: 46
    edited 2005-10-19 16:19
    Nick,

    I am just learning about schematics, in this diagram do I understand correctly that both·terminal A and the·wiper are connected to the V+ (5v) source?

    Also, with Pots terminal A and terminal B are interchangeable right?

    So this diagram helps me understand much better, you are creating a voltage divider by using a 10K resister and a 10K pot. The output then connects to the pin 3 of the LCD, correct? with this circuit is the pin protected from the straight short that steve_b and pjv were talking about? or do I need to put another resister in series on the output to the LCD pin (I would assume it would be a small one like 1k)?

    - Matt

    ·
  • steve_bsteve_b Posts: 1,563
    edited 2005-10-19 17:28
    what's your definition of terminals A & B.

    typically POts have 3 legs. The outside 2 legs always show the rated resistance (in your case 1k)....but from either of the outside legs to the middle leg is where you would measure the 'adjusted' resistance from when you turn the dial on the pot.

    If you use nicks drawing...the bottom resistor (R=10k) will protect you from shorting the pot out.
    Do you really forsee a need to adjust contrast? Why not hardwire it for a fixed setting or let the stamp do it for you. Play with a photocell and use it as an ambient light sensor by which you could then use the stamp to set the contrast!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • idleupidleup Posts: 46
    edited 2005-10-19 17:52
    Steve,

    my definition of Terminals A and B are the two outside pins on the POT.

    I do have a need to adjust contrast because this is going to be in an airplane. It would be impossible to determine what brightness the pilot (me) would prefer based on a photocell. All other instruments lighting is adjustable by the pilot using a rheostat so I would like to maintain that same functionality with this.

    - Matt
  • steve_bsteve_b Posts: 1,563
    edited 2005-10-20 04:34
    The addition of a photocell would be something you'd need to experiment with.
    The photocell produces a voltage based on the light it sees...hmm...or does it change resistance by the light it sees?? Dang....I shouldn't be trying to reply when I'm so tired...

    Anyhow, in either case you could use the RCTIME function to read the sensor....then adjust the PWM signal when the lighting changes....just an idea!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • nick bernardnick bernard Posts: 329
    edited 2005-10-24 13:51
    the bottom resistor IS the lcd.
    short the wiper to the other side of the pot turns the pot into a variable resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
Sign In or Register to comment.