Shop OBEX P1 Docs P2 Docs Learn Events
Simple ADC — Parallax Forums

Simple ADC

LafetLafet Posts: 23
edited 2007-10-15 06:41 in Propeller 1
Hi,

How it is possible please simply read voltage on resistive divider - potentiometer? I need potentiometer regulate engine speed.

Very thanks, Lafet

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-14 22:13
    Have a look at the circuitry on the Propeller Demo Board for the microphone. There are demo programs in the Propeller Object Exchange for microphone to VGA and microphone to headphones which illustrate how to use this for ADC. Also look at the Propeller Education Kit lab on the counter modules.
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-14 22:18
    If you only want to determine the value of a resistor, the Education Counters Lab will be fine for you:
    750 x 400 - 28K
    RC.JPG 28.5K
  • BTXBTX Posts: 674
    edited 2007-10-14 22:25
    Hi.
    I did it using RCTime object, similar schematic as deSilva.. but don't·forget to insert a serial resistor in the I/O pin to be used, then make some touchs at the RCTime code, to get·better stability with the potentiometer control.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-14 22:29
    Oh, Alberto, I think loading the cap with 40mA is quite o.k. smile.gif
    Just take a smal one: 10 nF and 10k will be fine.
  • BTXBTX Posts: 674
    edited 2007-10-15 00:48
    Sorry deSilva.... once more time I don't understand your mean... but mine, is to avoid get a "0" Ohm R directly to gnd & directly to the I/O pin.
    You could fried the I/O pin in that situation. Look at the RCTime object....it has that R=220 Ohm in serial with the I/O pin to use.
    So for that case, if the R value of the potentiometer -> 0 => Imax in the I/O pin will -> 15mA... only.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-15 06:41
    You are right Alberto, It will not even work with 0 Ohms in the first place smile.gif
Sign In or Register to comment.