Shop OBEX P1 Docs P2 Docs Learn Events
Control speed DC Motor with BoeBot — Parallax Forums

Control speed DC Motor with BoeBot

lauvuellauvuel Posts: 4
edited 2010-10-06 08:17 in BASIC Stamp
Hi,

i got the boe bot kit some time ago and now i would like to control a rc car:idea: i just bought. however i am not sure how i can control the speed of the motor as it doesn't seem that there is anything in the remote controller that can increase or decrease the speed.

do you guys have any idea in which direction i could go to get this sorted out?

thank you!

Comments

  • CampeckCampeck Posts: 111
    edited 2010-10-06 05:43
    1.) Make sure to change the 220ohm resistor to a 2.2k or the digipot might fry. also change the .01uF cap for a .001uF one. I had this on my boebot with DC motors.

    2.) alternatively on the second one make R5 a digipot, R2 1k, and feed the PWM out into the EnA and EnB of the L298HN motor driver from the first circuit. You will need to make a code to control the digipot and the direction of the motor controller. you can find out how in the datasheets of the chips. By adjusting R4 and R6 you can achieve full 0-100% PWM
    973 x 708 - 36K
  • lauvuellauvuel Posts: 4
    edited 2010-10-06 06:12
    Thanks for the answer, but could you elaborate a little more? i'm kind of new to this, so it would be great if i could know what to get and how to plug it in.

    thanks!
  • CampeckCampeck Posts: 111
    edited 2010-10-06 06:18
    Well I would use the second circuit first of all. so all you need to do is replace R5 with an AD5220 which you can get on digikey. And change R2 to 1k. You can get a "sample" L298HN from stmicroelectronics. and you can get CMOS 555's and CMOS 339's from radioshack (I think). Then omit the LED and run a wire from just under the 1k resistor on the transistor to the EnA and EnB of the L298HN. I forget exactly how that chip works but when I am home later tonight I can give you some pseudo code on how to change speeds and direction etc.

    what do you need most help on?
    coding?
    or how the electronics are working?
    do you know about the 555 at all?

    http://home.cogeco.ca/~rpaisley4/LM555.html
    http://www.st.com/stonline/books/pdf/docs/1773.pdf (figure 6 shows how to operate it)
  • lauvuellauvuel Posts: 4
    edited 2010-10-06 06:22
    Cool keep me posted.

    Thanks
  • lauvuellauvuel Posts: 4
    edited 2010-10-06 06:43
    well, the thing is that i know this:
    1. there is a possibility to control the speed of an RC motor using the pulsout command

    what i don't know is:
    1. what do i need?
    2. how do i hook it up?

    i've been searching around and it looks like it would be easier to just use something like this:
    HERE

    what do you think of that option?
  • CampeckCampeck Posts: 111
    edited 2010-10-06 08:17
    Well I can't read any of that.

    The options I showed are so that the 555 and 339 picks up the task of handling the PWM. because as you know the BS2 cannot do two things at once. with the circuits I showed you you can set the direction and speed. and then the motors will stay going that speed while you tell the BS2 to check sensors or whatever. then when you need to change direction or speed you go back to the digipot and 555 and perform the necessary changes. while the L298HN handles the motor load.
Sign In or Register to comment.