Shop OBEX P1 Docs P2 Docs Learn Events
Reading motor voltage — Parallax Forums

Reading motor voltage

mmor101mmor101 Posts: 8
edited 2006-05-01 19:26 in BASIC Stamp
I have two motors hooked togehther, one that powers the other motor and one that generates. I'm trying to read the voltage coming of the generated motor and display it in a debug window. Would I have to use an ADC chip?

Comments

  • mmor101mmor101 Posts: 8
    edited 2006-04-25 16:17
    bump
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-25 19:02
    1. Make sure the 'output' motor has a load attached -- like a resistor -- across it's 'output' terminals.

    2. You probably SHOULD use an ADC chip, as you want the ADC chip's high impedance so it will affect the motor's output as little as possible.
  • mmor101mmor101 Posts: 8
    edited 2006-04-26 17:29
    Do you have any idea of how I should write the program?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-27 13:20
    ADCData VAR Word


    Main:
    GOSUB ReadADC
    GOSUB WriteOutput
    PAUSE 100
    GOTO MAIN

    ReadADC:
    ' Whatever code it takes to read your ADC chip
    ADCData = 1
    RETURN

    WriteOutput:
    DEBUG DEC ADCData, 13
    RETURN
  • mmor101mmor101 Posts: 8
    edited 2006-05-01 17:13
    One more thing, the motor is going to be putting out more than 5 volts. Around 14-15 Volts, should I just use a resistor to get it down to lower voltage then have a multiplier in the program to compensate for the difference?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-05-01 19:26
    If you really want to measure the voltage, then you'll need a two-resistor voltage divider network to drop the voltage seen by the A-to-D converter to below 5 volts at all times. And yes, multiply in the program to get the 'real' number.
Sign In or Register to comment.