Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and speed control for L298 — Parallax Forums

BS2 and speed control for L298

Kurt SchmidtKurt Schmidt Posts: 1
edited 2006-12-01 16:02 in Robotics
I am trying to control 2 dc· motors via remote control,· using· the· BS2 to read· the signal· from· the receiver and pass on· to the L298 motor· controller.· Does the BS2··have· the ability· to do· PWM· for 2 separate· motors?· Also, am I just beating· myself up?· If so, what· is a good motor controller· with speed· control· for a reasonable· price that would· suit this application?· I have seen pololu serial controller and· the· HB25... any others?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-12-01 05:56
    Kurt,

    You might take a look at the Parallax MoBoStamp-pe here. It includes two AVR coprocessors, each of which can output two channels of PWM continuously. The Stamp sends a command to the AVR for each channel telling it what duty cycle, and the AVR will sustain those duty cycles indefinitely until the Stamp commands a different setting.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-01 15:44
    Kurt,
    ·
    ·· Also, since you already have a BS2 and presumably a board you could use the PWMPAL which will plug right into the socket your BS2 plugs into and give you 4 serial controlled PWM outputs which are suitable for driving motors.· I hope this helps.

    http://www.parallax.com/detail.asp?product_id=28020

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • dandreaedandreae Posts: 1,375
    edited 2006-12-01 15:54
    Here is a sample code (attached) that we used with two HB-25 motor controllers and an RC radio.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-12-01 16:02
    I agree with the PWMPal suggestion. The BS2 is a single-tasking processor, so when it's outputting a single PWM signal that's all it's doing. The PWMPal provides a co-processor for the BS2 so it can maintain the PWM while the BS2 does something else -- like deciding what speed you want, or recieving serial communications.
Sign In or Register to comment.