Shop OBEX P1 Docs P2 Docs Learn Events
Want to display voltage — Parallax Forums

Want to display voltage

agent319agent319 Posts: 7
edited 2013-10-04 13:10 in BASIC Stamp
Can I program my Basic Stamp to display the voltage? For instance let say I want to know the voltage coming off a potentiometer?

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2013-10-04 12:25
    Welcome to the Forums!

    The Stamp does not have an a/d converter built in to it, although it is very easy to use an external a/d to measure analog voltages, currents. The LTC1298 is good one to use.

    What is available, however, is the RCTIME instruction which would let you measure the resistance of that pot.

    As an example, you could calibrate the pot's position with respect to its voltage output using a bench supply and meter. Then, program the Stamp to tell you the pot's position via the RCTIME instruction. You know the voltage from your bench calibration. You can extend this exercise to also use the LOOKUP/LOOKDOWN instructions and tell your program what the voltage is for a range of pot settings.

    Cheers,
  • ercoerco Posts: 20,257
    edited 2013-10-04 12:41
    Per Tom, yes you can.

    But since you can buy a digital voltmeter for $1.55 shipped (nearly the same price as an LED display), that might not be the best use of a BS2 + ADC.

    http://www.ebay.com/itm/Mini-LED-DC2-5-30V-Red-Volt-Voltage-Meter-Display-Digital-Voltmeter-Self-Powered-/360732171649?pt=LH_DefaultDomain_0&hash=item53fd501d81#ht_4819wt_848
  • agent319agent319 Posts: 7
    edited 2013-10-04 13:09
    stamptrol wrote: »
    Welcome to the Forums!

    The Stamp does not have an a/d converter built in to it, although it is very easy to use an external a/d to measure analog voltages, currents. The LTC1298 is good one to use.

    What is available, however, is the RCTIME instruction which would let you measure the resistance of that pot.

    As an example, you could calibrate the pot's position with respect to its voltage output using a bench supply and meter. Then, program the Stamp to tell you the pot's position via the RCTIME instruction. You know the voltage from your bench calibration. You can extend this exercise to also use the LOOKUP/LOOKDOWN instructions and tell your program what the voltage is for a range of pot settings.

    Cheers,

    I like that.
  • agent319agent319 Posts: 7
    edited 2013-10-04 13:10
    erco wrote: »
    Per Tom, yes you can.

    But since you can buy a digital voltmeter for $1.55 shipped (nearly the same price as an LED display), that might not be the best use of a BS2 + ADC.

    http://www.ebay.com/itm/Mini-LED-DC2-5-30V-Red-Volt-Voltage-Meter-Display-Digital-Voltmeter-Self-Powered-/360732171649?pt=LH_DefaultDomain_0&hash=item53fd501d81#ht_4819wt_848

    Having one of those sent my way. Thanks for the info.
Sign In or Register to comment.