Shop OBEX P1 Docs P2 Docs Learn Events
Potentiometer Question — Parallax Forums

Potentiometer Question

Technic-R-CTechnic-R-C Posts: 117
edited 2009-06-25 20:30 in BASIC Stamp
Hello,

I have a potentiometer that I found and need to use with my BS2.· However I tried connecting the BS2 to the potentiometer and I am not seeing any results.

i first tried a basic test:

connecting wiper terminal to I/O pin along with 10K resistor and then connecting the ground to the ground of the BS2 board with a LED in between.· (Positive Cable not connected) I attempted to dim the light but nothing.....

Its looking like the Potentiometer is rated for a much higer voltage or amperage than the BS2 can supply.·

However the problem is that I HAVE to use this potentiometer with my BS2.· I have looked online for circuits or ideas on how to accomplish this but I have not come across anything.

Is there a circuit that could help me use this high rated potentiometer with the BS2.· Maybe the unregulated voltage coming out of the BOE (Vnn I believe..)

Thank you

Technic-R-C

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-25 18:47
    If you're just trying to read the value of the potentiometer, read the chapter of the Parallax Stamp Basic Manual on the RCTIME statement. You'll need a capacitor and a small value fixed resistor.

    If you want to dim the LED based on the potentiometer value, you'll need to have a separate circuit to dim the LED. The Stamp can't light the LED while it's reading the potentiometer value, so you'll see short interruptions in the light output.

    You could use an external LM555 timer controlled by the potentiometer to dim the LED by producing pulses of different widths or different frequencies. The Stamp could also read the pulses to produce a value from the pulse width or frequency.

    Basically, LEDs don't dim very well by just putting a resistor in series with them. Dimming works much better by controlling the amount of time the LED is on vs. off. The eye and brain smooth out the pulses of light and roughly averages the on/off time.
  • Technic-R-CTechnic-R-C Posts: 117
    edited 2009-06-25 19:17
    ·

    Thank you Mike, for your quick response,
    If you're just trying to read the value of the potentiometer, read the chapter of the Parallax Stamp Basic Manual on the RCTIME statement. You'll need a capacitor and a small value fixed resistor.
    At the moment, the·goal of my project is to·read a potentiometers value and send it to a Pulsout command that controls the speed at which a motors spins.· I have tried the RCtime tutorial in the Whats·a Microcontroller text and it has worked perfectly.· However this tutorial used the 10K potentiometer provided in the kit, however I really need to use the potentiometer in my possession which has unknown ratings.
    If you want to dim the LED based on the potentiometer value, you'll need to have a separate circuit to dim the LED. The Stamp can't light the LED while it's reading the potentiometer value, so you'll see short interruptions in the light output.
    I see what you mean.· However there was a tutorial in the Whats a Microcontroller text that did exactly this in one circuit.· The wiper terminal was connected to VDD (resistor in between),·the ground to an LED, and then to VSS ground.· Once again the 10K worked great in dimming the light but I recieved no response from my own potentiometer.
    You could use an external LM555 timer controlled by the potentiometer to dim the LED by producing pulses of different widths or different frequencies. The Stamp could also read the pulses to produce a value from the pulse width or frequency.
    Great suggestion!· However, all I am trying to do is monitor the potentiometer for values coming in and then use them to controol the speed of a motor.· I was only considering doing the LED dimming to figure out wheter or not my pot worked.
    Basically, LEDs don't dim very well by just putting a resistor in series with them. Dimming works much better by controlling the amount of time the LED is on vs. off. The eye and brain smooth out the pulses of light and roughly averages the on/off time.

    Great,·I learn something new everyday smile.gif

    So basically it comes down to this, using RCTIME, how do I recieve a value from a potentiometer whose ratings are unknown? (the pot could possibly 2K or 5K)· Does it matter what kind of capacitor im using·or that the·amount of voltage/current coming into the potentiometer is below the expected ratings?

    Thank·you

    Technic-R-C

    Post Edited (Technic-R-C) : 6/25/2009 7:23:11 PM GMT
  • LilDiLilDi Posts: 229
    edited 2009-06-25 20:08
    Technic-R-C, launch the Basic Stamp Editor program. Click on Help, click on Index... and click on the commands RCTIME and POT for an explaination and circuit for reading a poteniometer value.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-25 20:30
    The ratings of the potentiometer (other than the total resistance) don't matter very much. The RCTIME circuit draws very little current except when the potentiometer is set to 0 Ohms (that's why you need the low resistance fixed resistor in series). The capacitor value depends on the resistance and the manual's chapter discusses how to choose a capacitor value.
Sign In or Register to comment.