Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Basic Question I never got my head around... (Dont laugh)

Status
Not open for further replies.

iso9001

New Member
SO..... There is this basc resistor / resistance deal I never really understood... AndI hoping someone can just answer the question and not tell me over and over what ohms law states. But since I know that'll happen, Here is the setup:

I have this system that has a processor and a multiposition switch. Inside the switch are 5 resistors, depending on what switch you press, current from the processor flow through a different resistor. Inside the processor (this is all speculative since I cant open it up) is a 5V pullup and an ADC to read in the voltage. The ADC does NOT read the return wire from the switch. The swtich is grounded where it is. So that there is one 5V signal wire coming from the processor to the switch.

Now... When pressing the switch you can dmm the signal wire and watch it go from 5V to 4 or 2 or 1 or .5 or 3.5 etc etc (depening on switch possition).

Now when ' I ' take a 5V source and put it through a resistor, the voltage never drops, just the current.... What is going on here ?
 
you say the chip has an internal pullup?

sound like it just sets up a voltage divider
 
I simplified the system there are actually many many switches connected to this processor, all do the same thing

But i think see what your saying.... If the pullup resistor on one side of the voltage souce and the switch resistor is on the ground side then voltage will drop between them... ? (Why doesnt the current just drop a bunch?)
 
I don't see what you are asking, or why you are confused?.

There's probably a pullup resistor inside the micro, and an external resistor switched down to ground - these two resistors form a basic potential divider, with the voltage at their junction dependent on the two resistor values. By switching different values for the resistor down to ground you get different voltages at the junction. The A2D in the micro reads this voltage, so it can tell which resistor is in circuit by the corresponding voltage.

It's a VERY common technique, I first say it in the early VHS JVC VCR's, they used a cable remote with a single screened wire. In the remote the switches simply grounded different value resistors.

It was actually a really poor piece of design, one of the buttons (which was a commonly used one, I can't remember which one after all these years!) shorted directly to ground. Unfortunately as the cable started to wear, it's resistance increased - after a while pressing this one particular button set the VCR to record by mistake, as the first resistance value was for record. BAD! choose of button functions!.
 
How many wires going to the processor? If it is one, then the resistors in the switch body are wired in series as a voltage divider network. All five resistors are probably the same value to get your 1 volt divisions. The switches determine which of the points between the resistors is connected to the output wire to the processor. The processor then only needs a simple DAC to convert the voltage level to a digital value so that it can process the command.
 
Re: Basic Question I never got my head around... (Dont laugh

iso9001 said:
SO..... There is this basc resistor / resistance deal I never really understood... AndI hoping someone can just answer the question and not tell me over and over what ohms law states. But since I know that'll happen, Here is the setup:

I have this system that has a processor and a multiposition switch. Inside the switch are 5 resistors, depending on what switch you press, current from the processor flow through a different resistor. Inside the processor (this is all speculative since I cant open it up) is a 5V pullup and an ADC to read in the voltage. The ADC does NOT read the return wire from the switch. The swtich is grounded where it is. So that there is one 5V signal wire coming from the processor to the switch.

Now... When pressing the switch you can dmm the signal wire and watch it go from 5V to 4 or 2 or 1 or .5 or 3.5 etc etc (depening on switch possition).

Now when ' I ' take a 5V source and put it through a resistor, the voltage never drops, just the current.... What is going on here ?
easy.. one of the resistors in the switch is connected to 5V or whatever voltage you have..the swich chooses the other resistor .. and sets up a voltage divider..
if you count the number of resistors i bet there is one more than the number of switch positions...
 
"these two resistors form a basic potential divider"
"voltage divider"

Ah.... makes sense now. Thanks
 
I think you are getting confussed between two very differnt setups. The 5V pullup inside your processor works like a resistor to 5V, not a 5V supply. Its actually a small transistor that is truned on with a fixed voltage but since the gate voltage doesn't change it works like a resistor. So when you add the external resistor you get a voltage divider. If you set up the processor pin to be an input without the pullup the switch would just pull the input to ground.

The second case you are talking about is like using the processor pin as an output to drive 5V. In this case there is a big transistor pulling the pin up to 5V. A big transistor works like a low ohm resistor so you still have a voltage divider but the transistor's resistance is so small compared to the added resistor that you can assume that the transistor has 0 resistance.

In the case of a voltage supply the supply varies internally to keep the voltage the same regardless of the current being drawn out. A voltage regulator for example uses a transistor as a variable resistor. It changes the transistor's resistance to keep the output voltage the same regardless of the output current.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top