Resistor ladder assistance please

AI Thread Summary
The discussion revolves around creating a resistor ladder connected to buttons to generate 16 distinct voltage combinations for a microcontroller. The user is currently using a dip switch setup but is encountering issues with achieving the desired combinations without overlap in voltage readings. Suggestions include exploring R-2R ladder configurations to improve accuracy and avoid "ghosting" effects similar to those in computer keyboards. The user is seeking advice on optimizing their circuit design or alternative solutions to achieve the required functionality. Overall, the goal is to ensure clear voltage differentiation for accurate microcontroller measurements.
jsguitar93
Messages
1
Reaction score
0
I am trying to create a ladder of resistors that is connected to a set of buttons where when pushed (by themselves or in combination) will give me different voltages (which will then be measure by a micro controller). I need 16 combinations in total. I am currently using the attached circuit, I am using a dip switch with 8 channels to attempt the 16 channels, but I can't get to 16 without weird combinations (problem). If anyone can think of a way to fix this with my current setup I would be very happy, but if you have a better idea (circuit, switch, etc) please let me know.

http://s46.photobucket.com/user/rocker_j_batman/media/image.png.html?filters[user]=14513887&filters[recent]=1&sort=1&o=3

http://s46.photobucket.com/user/rocker_j_batman/media/image.png.html?filters [user]=14513887&filters[recent]=1&sort=1&o=3

here is the setup

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2356.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=0



http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2357.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=1

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2356.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=0

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2358.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=2

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2357.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=1

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2358.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=2


all the pins on one side of the dip are connected together acting as the hot rail (green wire).
The yellow on the bottom is ground, and the last green wire which is at the same node as the last resistor is the v out with is being measured by my micro cont. with respect to ground.

There are some combinations that are almost exactly the same (1,2 = 5) that I would like to use, but they are so close even the micro (which reads to the thousandths place) can't tell them apart.

Thanks

Jonathon
 
Last edited by a moderator:
Engineering news on Phys.org
jsguitar93 said:
I am trying to create a ladder of resistors that is connected to a set of buttons where when pushed (by themselves or in combination) will give me different voltages (which will then be measure by a micro controller). I need 16 combinations in total. I am currently using the attached circuit, I am using a dip switch with 8 channels to attempt the 16 channels, but I can't get to 16 without weird combinations (problem). If anyone can think of a way to fix this with my current setup I would be very happy, but if you have a better idea (circuit, switch, etc) please let me know.

http://s46.photobucket.com/user/rocker_j_batman/media/image.png.html?filters[user]=14513887&filters[recent]=1&sort=1&o=3

http://s46.photobucket.com/user/rocker_j_batman/media/image.png.html?filters[user]=14513887&filters[recent]=1&sort=1&o=3

here is the setup

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2356.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=0



http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2357.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=1

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2356.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=0

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2358.jpg.html?filters[user]=14513887&filters[recent]=1&sort=1&o=2

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2357.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=1

http://s46.photobucket.com/user/rocker_j_batman/media/IMG_2358.jpg.html?filters [user]=14513887&filters[recent]=1&sort=1&o=2


all the pins on one side of the dip are connected together acting as the hot rail (green wire).
The yellow on the bottom is ground, and the last green wire which is at the same node as the last resistor is the v out with is being measured by my micro cont. with respect to ground.

There are some combinations that are almost exactly the same (1,2 = 5) that I would like to use, but they are so close even the micro (which reads to the thousandths place) can't tell them apart.

Thanks

Jonathon

Welcome to the PF.

The photobucket links don't work for me. Have you looked at how regular computer keyboards work, including the x-key "rollover" mechanisms (that's what let's you press several keys at a time and still decode them correctly without "ghosting")?

http://en.wikipedia.org/wiki/Rollover_(key)

:smile:
 
Last edited by a moderator:
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top