Shop OBEX P1 Docs P2 Docs Learn Events
How to convert applied voltage to pwm — Parallax Forums

How to convert applied voltage to pwm

BoyzBoyz Posts: 8
edited 2009-11-27 16:35 in Robotics
i need to convrt the applied voltage to PWM signal in spin code, does someone know how to do this? The PWM signal as the input to HB-25 (#29144), and i use CJ_HB25.spin at obex.parallax. At thad code i need to identified pulse1 as input PWM pulse to Motor1 and pulse2 as input PWM pulse to Motor2. I need some direction... thanks b4

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-11-26 04:38
    Say what? Do you mean you need to estimate the equivalent voltage of a PWM signal applied to a motor?
  • BoyzBoyz Posts: 8
    edited 2009-11-26 15:15
    yup, i use this motor http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/wheel/List/0/SortField/4/ProductID/507/Default.aspx and HB-25 to control it. Can you point me what should i do? so in my control design the input is the Voltage Applied to the Motor.
    Best Regards,
  • kwinnkwinn Posts: 8,697
    edited 2009-11-26 15:46
    Not a simple task. The relationship between applied voltage, current, and power is not linear. In most cases the output from the motor is measured and used to control the pulse width to maintain a desired speed. What are you trying to accomplish?
  • BoyzBoyz Posts: 8
    edited 2009-11-27 14:19
    How can i measure the output of the motor? i still have no idea about the relationship between Voltage applied to motor and pwm signal...
  • kwinnkwinn Posts: 8,697
    edited 2009-11-27 16:35
    The measured output of the motor is usually measured in RPM with an optical or hall effect sensor. In most applications it is the speed of the motor that is controlled, so the actual RPM is compared to the desired RPM and the difference is used to control the pulse width.
Sign In or Register to comment.