Why don't you try sketching a circuit diagram, and calculating the input voltage for each switch, yourself? You'll learn far more that way.If someone could sketch me up a diagram, I can do some testing on this today.
Of course, you can post it here for checking before you try it and blow up a Pico or two.
Hints:
- I'm not sure which program is best for drawing circuit diagrams. I have used several, most of which are old and clunky. Fritzing is newer, but no longer entirely free.
- Use a 3V3 supply from the Pico, where it is also used as Vref, unless you do something to change that.
- Guess a value for the 3V3 pull-up resistor, write a spreadsheet to calculate the voltages, and see what happens to the margins between voltages as you changes the value.
- For extra bonus points, write your software to detect fault conditions (input open or short to ground) as well as the valid conditions.
- For a de-luxe version, try to arrange that a "guard band" between each pair of adjacent valid voltages is regarded as a fault. Testing this, however, gets interesting.
Statistics: Posted by davidcoton — Fri Jun 14, 2024 10:15 pm