Shop OBEX P1 Docs P2 Docs Learn Events
Integrate BASIC Stamp with PWM — Parallax Forums

Integrate BASIC Stamp with PWM

RadioactiveRadioactive Posts: 5
edited 2008-02-21 16:08 in BASIC Stamp
Hi there!

Currently I'm working on a wall following robot. I need to control the speed of the robot. As the robot is getting nearer to the wall, it will become slower. However, I'm having problem on how to integrate the Pulse Width Modulator into the BASIC Stamp. I already attached the circuit of the PWM. Could someone help me please? Thanks.

Comments

  • RichardFRichardF Posts: 168
    edited 2008-02-14 11:03
    Your PWM uses a variable resistance to set PW. This is not compatible with the Basic Stamp output. Change your PWM to use an incoming pulse, such as 1.0 ms to 2.0 ms to control the output PW to your motors. The Parallax Servo-Pal or M-25 Motor Control are perfect for that application.
  • RadioactiveRadioactive Posts: 5
    edited 2008-02-15 00:18
    Thanks but I can use a combination of variable resistor and capacitor to create pulses right? Because t = 1 / RC?
  • terry_bearterry_bear Posts: 84
    edited 2008-02-15 16:45
    Radioactive,

    An excellent explanation of the PWM circuit can be found here: http://www.dprg.org/tutorials/2005-11a/index.html
    As you can see; it already incorporates an RC time constant.

    If you are trying to use the Stamp as an additional control, you might look into applying a signal to pin 5 of the timer IC...
  • RadioactiveRadioactive Posts: 5
    edited 2008-02-21 14:55
    Thnx! =D
  • LilDiLilDi Posts: 229
    edited 2008-02-21 16:08
    You could replace the VR1 variable resistor (poteniometer) with a digital variable resistor. Then control the digital resistor via the Stamp.
Sign In or Register to comment.