Shop OBEX P1 Docs P2 Docs Learn Events
Resistor Reader — Parallax Forums

Resistor Reader

krzykrzy Posts: 3
edited 2012-06-28 12:36 in General Discussion
Hi

I'm new here and a beginner to programming and custom hardware.

Can anyone here recommend me hardware which can get a readout from multiple variable resistors (potentiometers) for a PC?

Will appreciate any help Thanks

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-26 16:28
    What microcontroller would you like to use?

    Jeff did a project with a Propeller which "speaks" the resistor's value.

    Do you want the resistance displayed on a computer screen?
  • krzykrzy Posts: 3
    edited 2012-06-26 16:37
    Thanks for a Reply

    i'm looking to read a few resistors at once (like 10) and I want the values to be sent to computer via usb port and then I could get those values by writing a custom program.

    edit:
    I think the one in your link reads only 1
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-26 16:54
    The speaking resistor project reads a handful of resistor values, but could be easily expanded. There is instructions in the last page of the project. In addition it already sends data back to the PC which could be altered slightly for your purposes. Just ditch the talking object and continue on.

    OBC
  • krzykrzy Posts: 3
    edited 2012-06-26 17:14
    The speaking resistor project reads a handful of resistor values, but could be easily expanded. There is instructions in the last page of the project. In addition it already sends data back to the PC which could be altered slightly for your purposes. Just ditch the talking object and continue on.

    OBC


    Thanks for a reply.

    would that schematic work?

    xp8t2q.jpg
    400 x 450 - 16K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-06-26 17:17
    A Propeller Protoboard has a USB port and you could use a few ADC chips to read the pots. Or you could set up a Sigma-Delta ADC for each pot.

    I thing using the ADC chips would be easier if you have 10 pots as the ADC chips can easily read 8 or less.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-27 05:38
    For measuring the resisters value one can use the RC, Resister Capacitor, method.

    RC.png


    Algorithm:
    1. Set pin to output
    2. Set pin low
    3. Reset time counter and wait a bit for the capacitor to discharge
    4. Set pin to input
    5. increment time counter
    6. if pin reads low goto 5
    7. when pin reads high stop

    The time counter now represents the value of the resister.

    The technique is:
    1. quite accurate at reading resisters
    2. takes only 1 pin (so 28 resisters could be measured with a Prop)
    3. very simple algorithm

    Duane J
    87 x 157 - 2K
  • Mark_TMark_T Posts: 1,981
    edited 2012-06-27 09:10
    For measuring the resisters value one can use the RC, Resister Capacitor, method.

    RC.png


    Algorithm:
    1. Set pin to output
    2. Set pin low
    3. Reset time counter and wait a bit for the capacitor to discharge
    4. Set pin to input
    5. increment time counter
    6. if pin reads low goto 5
    7. when pin reads high stop

    The time counter now represents the value of the resister.

    The technique is:
    1. quite accurate at reading resisters
    2. takes only 1 pin (so 28 resisters could be measured with a Prop)
    3. very simple algorithm

    Duane J

    Perhaps a small value resistor should be added at the pin, or in series with the capacitor to limit the current when the cap is discharged - the pins are rated for 40mA only remember. This then needs a correction in the formula to calculate the unknown resistance...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-27 09:41
    I wonder if the OP is really about reading resistance or about looking for a way to use analog input devices.

    If the OP is about using a knob type input, then there are other options besides potentiometers.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-27 11:52
    Hi Mark;
    Mark_T wrote: »
    Perhaps a small value resistor should be added at the pin, or in series with the capacitor to limit the current when the cap is discharged - the pins are rated for 40mA only remember. This then needs a correction in the formula to calculate the unknown resistance...

    Generally you don't need series pin protection resistors to discharge the capacitor as the capacitor is:
    1. Fairly small
    2. Discharged relatively infrequently
    3. The pin has a series impedance of around 140 ohms as measured by others.
    4. The 40mA limit is basically a static current limit which doesn't really apply when discharging small capacitors.

    That being said, yes there should be a 150 ohm resister in series with the measured resister if it has the ability to go to zero.

    Duane J
  • piguy101piguy101 Posts: 248
    edited 2012-06-28 12:21
    I thought the Prop could only do 16 RC circuits at once. (2 counter modules per cog)
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-28 12:36
    Hi krzy;

    That's true if your trying to read RC circuits as fast as possible and use all 8 cogs.
    However, if you don't mind doing it a bit slower and you want to do it with a single cog you can do all 28 pins sequentially. Usually fast enough for most things.

    Duane J
Sign In or Register to comment.