Author Topic: Help with Resistor divider  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

Offline hanno00Topic starter

  • Newbie
  • Posts: 3
  • Country: nl
Help with Resistor divider
« on: March 04, 2019, 11:47:22 am »
For my project I have a 5 Volt output, a ground and two inputs.
I want to give 3.3V to one of the inputs at a time.
I need to scale the %v down to 3.3 Volt using a resistor divider.
The LEDs I use for testing havent broken yet so I think its working, but when I'm trying to measure the voltage with a multimeter, I keep getting 0 V.

So my question is:
Should this resistor divider technically work?

TLDR;
Does this scheme work?

PS:
I know I used outputs for the Inputs but that was just to make it more clear for myself.
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Help with Resistor divider
« Reply #1 on: March 04, 2019, 01:16:03 pm »
you should get 2.5V not 3.3V (same value resistors divide by 2)

if you're getting 0:
1) check multi meter leads, they might be broken
2) check for shorts to ground
 

Offline hanno00Topic starter

  • Newbie
  • Posts: 3
  • Country: nl
Re: Help with Resistor divider
« Reply #2 on: March 04, 2019, 01:20:25 pm »
you should get 2.5V not 3.3V (same value resistors divide by 2)

if you're getting 0:
1) check multi meter leads, they might be broken
2) check for shorts to ground

Yes sorry, I meant a maximum of 3.3 Volt, but thanks for the help. Really appreciate it!
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Help with Resistor divider
« Reply #3 on: March 04, 2019, 07:49:34 pm »
Your voltage divider does give you 2.5V, which the inputs (assuming they are 3.3V CMOS inputs) will interpret as a logic "high". But in the alternate state of the switch in your schematic, the inputs will be open. Depending on your chip, this may result in an undefined state, or may be interpreted as a logic "high" as well.

So in this respect your scheme does not work. You want to switch the inputs between 0V (GND) ad 2.5V. Alternatively, connect a pulldown resistor form each input to GND permanently. That resistor's vaule needs to be significantly higher than the resistors in your voltage divider -- a few kOhm.
 

Offline hanno00Topic starter

  • Newbie
  • Posts: 3
  • Country: nl
Re: Help with Resistor divider
« Reply #4 on: March 05, 2019, 07:42:07 am »
Your voltage divider does give you 2.5V, which the inputs (assuming they are 3.3V CMOS inputs) will interpret as a logic "high". But in the alternate state of the switch in your schematic, the inputs will be open. Depending on your chip, this may result in an undefined state, or may be interpreted as a logic "high" as well.

So in this respect your scheme does not work. You want to switch the inputs between 0V (GND) ad 2.5V. Alternatively, connect a pulldown resistor form each input to GND permanently. That resistor's vaule needs to be significantly higher than the resistors in your voltage divider -- a few kOhm.

So when the inputs aren't connected at all, there isn't necessarily 0V, at least what the chip can detect?
 

Offline jmaja

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: fi
Re: Help with Resistor divider
« Reply #5 on: March 05, 2019, 08:50:07 am »
You have told too little to know would it work or not. What is S2? A mechanical switch? Input goes into a pin of a chip. What chip and what does it do with the input?

The chip may or may not have internal pull-ups or pull-downs. If it's just an high impedance input, without any connection the input floats and can be whatever. Measuring to GND or VCC (3.3) you get zero voltage difference.

Anyway it is unnecessary to have the resistor divider before the chip. Either you only need one of the resistors before the switch or you have just a resistor to 5 V before the switch and one resistor from each input pin to GND.

The switch may or may not bounce causing several pulses at each switch. This may cause problems to whatever you do with the input. This can be dealt with in software (if there is software) or in hardware.

There is rather high current (4.5 mA) in your 560 + 560 ohm divider. That may be much more than needed depending on what you are doing.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Help with Resistor divider
« Reply #6 on: March 05, 2019, 09:17:34 am »
So when the inputs aren't connected at all, there isn't necessarily 0V, at least what the chip can detect?

jmaja has explained it in more detail. But in short: Correct, the input will not necessarily be at 0V when it is unconnected. Depending on the specific chip, it can be high, low, either high or low at random, or oscillating (driven by external noise which gets picked up).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf