Resistor ladder assistance please

Click For Summary
SUMMARY

The discussion centers on creating a resistor ladder circuit to generate 16 distinct voltage levels using a DIP switch with 8 channels. The user, Jonathon, encounters issues with voltage combinations that are too close for a microcontroller to differentiate. A solution proposed involves utilizing an R-2R ladder configuration, which can effectively manage multiple voltage outputs without the complications of ghosting that arise in traditional switch setups.

PREREQUISITES
  • Understanding of resistor ladder circuits
  • Familiarity with DIP switch configurations
  • Knowledge of microcontroller voltage measurement
  • Basic principles of R-2R ladder networks
NEXT STEPS
  • Research R-2R ladder configurations for voltage generation
  • Explore microcontroller voltage reading techniques and calibration
  • Investigate keyboard rollover mechanisms to prevent ghosting in switch circuits
  • Learn about analog-to-digital conversion methods for precise voltage measurement
USEFUL FOR

Electronics hobbyists, circuit designers, and anyone involved in creating voltage-dividing circuits or interfacing with microcontrollers for precise voltage readings.

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:

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K