Shop OBEX P1 Docs P2 Docs Learn Events
Pololu — Parallax Forums

Pololu

scam_5000scam_5000 Posts: 17
edited 2007-09-20 10:50 in Robotics
Hello,

I was wondering if someone might be able to help me, I have bought a Pololu Dual Serial Motor Controller and am having a tough time getting my motors to even spin.

I connect it exactly as is shown in the instructions, use the example code and nothing happens. I am hoping that maybe someone here has had this problem before and might be able to shed some light onto it.

Any advise would be very helpful...

Thanks,

Chris

I am using the Tamiya Worm Gearbox and the motor that comes with it.

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-09-16 20:25
    Hi Chris, was the controller pre-assembled or did you buy the kit. Can you post the code you are using to test with.

    Jeff T.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-09-16 23:48
    I've purchased quite a few of these and have had no problems.

    1.· If it is a kit...

    ·· a.· are there any short circuits

    ·· b.· are the two chips inserted correctly

    ·· c.· is the capacitor installed correctly

    2.· Is your power supply good?· Do you have your grounds tied together?

    3.· what is the code you are using?

    4.· Have you contacted Pololu?· They are very good at customer service and should be able to support you.
  • SnoDogSnoDog Posts: 4
    edited 2007-09-19 16:33
    I am having the same problem as described above. I too am using the sample code provided with the motor controller, part number 30052. I have a small fan and a scope on the motor out lines from the motor controller. I've used Hyper Terminal to be sure the correct data was presented to the motor controller. Power supply is good, I have checked the wiring many times . . . and the code. Do I need to have a motor connected to the output lines or will the scope do? Other than that, I am at a loss.

    B
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-09-19 18:41
    Hi SnoDog,
    I didn't see a controller with that part # but the Pololu controllers I looked at had two possible serial inputs RS232 and TTL. You said you veiwed the signals with Hyper Terminal does this mean your signals are RS232 or are you using a level shifter. The code I saw was for a non inverted (TTL) signal. Can you post code and a description of your connections. Connecting RS232 to the TTL input·may damage the controller.

    Jeff T.
  • SnoDogSnoDog Posts: 4
    edited 2007-09-19 19:17
    I'm using 16F628, programming with PIC Basic Pro. The part number is Parallax' number for the motor controller.
    The data on the scope toggles 5 volts. I have quite a few serial out projects over the years with htis setup and have no data issues; lost data, incorrect data . . .

    So far as the code goes, I am not with the project at the moment. I used the sample code that came with the Parallax supplied motor controller, p/n 30052. I checked the baud rate in the serout command, confirmed with HyperTerm. The PC was never in contact with the motor controller. The PC does not send data to the controller, only the PIC. The handshake lines are not connected to the PIC or the motor controller.

    So far as the connections go, serial data out on the PIC is B7, reset is B6. In the code, I pause 1 second to let the rails settle at power up, then pull the reset line low for 500ms, pause for 500ms then send out the serial commands to move motors, as described in the sample code.

    I was wondering if I need to have a stepper or servo motor on the motor controller outputs or is a fan or the scope enough to see changes on the motor cotroller output.

    Thanks for the quick response.

    B
  • SnoDogSnoDog Posts: 4
    edited 2007-09-20 02:42
    More information now. Code I am using is listed below. This is from the sheets that came with the controller, parallax part number 30052.
    As you can see the config code is outside the for loop, but for some reason that line keeps getting sent out, pulsing pin 9 of the motor contoller. It's these pulses that make the motor go, not the change in the variable, speed.

    I have a 9-volt battery (new, measuring 9.5v) operating the motor and a 5v supply taking care of the logic side.
    I'm using PICBasic Pro. Not much different than BS1. I double checked the baud rate, parity, and converstion.

    Many thanks for anything that might help get this turning.

    B

    Include "modedefs.bas"

    speed var byte

    high portb.7 'serout line
    low portb.6 'reset line
    pause 100
    high portb.6

    pause 100 'motor control start up
    serout portb.7, T2400,[noparse][[/noparse]$80, 2, 2]
    pause 100

    here:
    for speed = 0 to 127
    serout portb.7, T2400,[noparse][[/noparse]$80, 0, 5, speed]
    pause 20
    next

    for speed = 127 to 0
    serout portb.7, T2400,[noparse][[/noparse]$80, 0, 5, speed]
    pause 20
    next
    pause 1000
    goto here
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-09-20 05:12
    Hi SnoDog, the docs say to reset after configuration. You could try inserting a low portb.6 --pause 200----·high portb.6 just after the configuration.

    Jeff T.
  • SnoDogSnoDog Posts: 4
    edited 2007-09-20 10:50
    Jeff-

    That was it. Thanks. I have been looking at this for days . . . . rewiring, rereading . . . . ughhh.

    Many thanks.

    B
Sign In or Register to comment.