Go Down

Topic: on/off switches in resistor voltage divider (Read 12534 times) previous topic - next topic

Grumpy_Mike

Quote
the bottom two (or three) bits of your measurement will be noise

Depends on how you design and build your circuit.

Quote
plus you won't be able to get the exact resistor values you want to make a perfectly linear array

You use an R2R ladder so all the resistors can be the same.

Quote
the resistors will have tolerances

They will which is why you should get a R2R ladder of known accuracy, or trim you own resistors.

Quote
Anyway, the OP seems to have disappeared.

I think that is the only thing we agree on.  :)

TomGeorge

Hi, its as though the OP is trying to build not a simulator but a complete Ilyushin-Il in his bedroom.

Even in real life they must have been a nightmare to wire up.

Tom....... :)
Everything runs on smoke, let the smoke out, it stops running....

vffgaston


fungus

Advanced Arduino

torvaldsjay

hmmm.. what about using 5v and 3.3v as well as resistors to create more pin options? you know, so that way you can use 2 of every resistor in your group by just making another voltage available to another set of switches. it takes a lot of trial and error to make sure you are reading the voltage right and that you dont have a 3.3v powered switch that at lower resistance is similar voltage of 5v with more resistance, but once you figure that out, you just duplicate it acrossed your pins. just an idea, keep on making the dream. -jay

vffgaston

Quote
There's only one OP.


Keep being lost.

(¿Sabes el chiste que termina con "¿y, entonces, qué hacemos Ud. y yo hablando en inglés todo este rato?)

fungus


Quote
There's only one OP.


Keep being lost.


El "Posteador Original"...el que empezó el hilo.
Advanced Arduino

fungus


Quote
the bottom two (or three) bits of your measurement will be noise

Depends on how you design and build your circuit.


Sure, but we're talking about Arduinos (and probably using them with breadboards...)
Advanced Arduino

vffgaston

Quote
El "Posteador Original"...el que empezó el hilo.


¡Jodó!

Qwseyvnd


Hi, its as though the OP is trying to build not a simulator but a complete Ilyushin-Il in his bedroom.

Even in real life they must have been a nightmare to wire up.

Tom....... :)

Correct.
I see the easiest solution to use just two switch toggle for each analog pin.

To Torvaldsjoy:
It is a good idea!!! I will trying that.

fungus


To Torvaldsjoy:
It is a good idea!!! I will trying that.


So....still nothing about what you're trying to do?

Advanced Arduino

Qwseyvnd

I said that... building an Il-62 home cockpit... So you should get a idea what I am trying to do.
Well... building a power station full of toggle switches that detect which instrument is activated or deactived. It is because if something fail in flight, I need to deactivate the instrument in flight, or in practice situation. For example, if I need to landing this airplane immediately, I need to activate some fuel tanks to simulate fuel dump. So, I want to detect which toggle switch, 10 might are used for fuel dump, are activated using only 1 pin.

Qwseyvnd

I am thinking to make 1.8v, 3.3v, 5v, 7v, 12v, to make the program detect which voltage and  two toggle switch each volt, so I make just one pin to the arduino card instead one volt and many pins.

krupski


I thinking this:
Switch #1 1
Switch #2 2
Switch #3 4
Switch #4 8
Switch #5 13
Switch #6 29
So, the Arduino card can detect which switches are activated, for example #1 to #5 give me 28 as a value which the Arduino card can read.
#1 to #6 is 57 as the value if I activated all together. If #2 and #5 and #6 are activated, I get 44 as one value to the Arduino card.

I am doing this to save pins. If I am using each pins; that would be need maybe 400 pins, so I am using maybe 30 pins.

So, which resistors do I need ?



I don't understand why your last 2 values are 13 and 29. I would have expected 16 and 32.

What you're talking about is an R-2R ladder. Each switch will have a power of 2 value.

Just use values like 1K, 2K, 4K, 8K, 16K, etc..., all pulling down on a current source.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Qwseyvnd



I thinking this:
Switch #1 1
Switch #2 2
Switch #3 4
Switch #4 8
Switch #5 13
Switch #6 29
So, the Arduino card can detect which switches are activated, for example #1 to #5 give me 28 as a value which the Arduino card can read.
#1 to #6 is 57 as the value if I activated all together. If #2 and #5 and #6 are activated, I get 44 as one value to the Arduino card.

I am doing this to save pins. If I am using each pins; that would be need maybe 400 pins, so I am using maybe 30 pins.

So, which resistors do I need ?



I don't understand why your last 2 values are 13 and 29. I would have expected 16 and 32.

What you're talking about is an R-2R ladder. Each switch will have a power of 2 value.

Just use values like 1K, 2K, 4K, 8K, 16K, etc..., all pulling down on a current source.

So I still need two toggle switches for each pin?

Go Up