Shop OBEX P1 Docs P2 Docs Learn Events
Sample Test Program for Prop, Motor (27971) & Controller (29319) needed. — Parallax Forums

Sample Test Program for Prop, Motor (27971) & Controller (29319) needed.

LarryCardoLarryCardo Posts: 28
edited 2011-02-21 08:49 in Propeller 1
I purchased the motor and controller for simplicity. But I am now getting lost in the details.

Is a 1K resistor required in series with the output pin of the Prop that goes to the Position controller data pin?

The sample code that came with the instructions is applicable to Basic Stamp processors. Does anyone have "simple" sample code for the Prop?

Thanks,

Larry Cardo
Mentor, OH

LCardo@aol.com

Comments

  • BotdocterBotdocter Posts: 271
    edited 2011-02-02 07:45
    I think we need a bit more info about the speed/motor controller.

    Usually electronic speed controllers (ESC) are driven with servo commands. Allthough i had quite some problem with it myself, a good starting point for me was the servo32v2 demo. It should be in your local library.

    Remember that you probably need to initialize before you can use them.
    Please read the manual from the esc to learn how to do this.
  • LarryCardoLarryCardo Posts: 28
    edited 2011-02-02 08:45
    Thanks for your reply Botdoctor.

    In my effort to simplify (counting of encoder pulses and motor control functions), I purchased what I thought would be a simple system solution. Using the Propeller Chip and Parallax’s Motor (#27971), H-bridge (#29144) and Position controller (#29319). I plan to initially use these parts to design a sort of balancing bot (The bot will balance a pole that extends from the chassis).

    The literature indicates motor control is obtained by simplify specifying:
    -Max speed value
    -Speed ramp rate
    -Travel distance

    I am just looking for a simple code sample that would output this info to the controller. It’s like a picture is worth a 1000 words. I have searched the forms and have not come up with anything. The literature supplied with the hardware, only gives examples of using the Basic Stamp, not the Propeller using the total system (Controller, H-bridge and Motor).

    I understand the system hardware wiring, except the need for the 1K resistor on the propeller output to the controller.
  • BotdocterBotdocter Posts: 271
    edited 2011-02-02 09:03
    The 1K resistor is for protection of the propeller pins. Some controllers allready have them, some don't. Atleast it won't harm if you do use it.

    As for the code examples; the best you can do is to search the forum for "balancebot" or something similair. Drivers for your sensors and controllers can be found in the OBEX.
    [url]Http://obex.parallax.com[/url]
  • LarryCardoLarryCardo Posts: 28
    edited 2011-02-21 08:49
    I found 3 programs which assisted me in programming the motors.

    MPC_Roll_Demo.spin

    Wheel_Controller.spin

    WC_TestHarness.spin

    These examples helped me solve the confusing of wiring the motors, selecting a motor ID and the proper reverse command for one motor.

    The 1K resistor worked fine.

    Thanks
Sign In or Register to comment.