Help with maestro servo control and pololu script!

hello all,

So I’m new to this forum and have a whole bunch of questions to ask about this silly controller and problems I’m having with it… So, for a school project, I was given 1 6CH maestro controller, 1 position servo motor (6001B), and 1 velocity servo motor (SM-S4303) all from pololu. I am trying to script some code together for a forklift like device where the forks are lifted using the position servo motor and the rear wheels are controlled using the velocity motor but i keep running into problems with it…

here’s my problem: Whenever i run the script i can never turn off the continuous velocity motor… My solution to that was to set the slide bar for its forward and reverse speed to the middle so that it would essentially be motionless, but whenever the position servo runs, the continuous motor (still set at a standstill position on the slide bar) starts to freak out and go either backwards or forwards, as if the middle point on the slide bar has now moved… i cant have this happen for what I’m doing…

So my questions are this: Is it possible to set the mode of my velocity motor from servo to input? Is there a code i can use to shut off the velocity motor? Has anyone ever encountered anything like this before??

here is my code for the pololu script (also note that i am not willing to learn a new language, as i do not have enough time to do so.):

10 0 speed
 
begin
  6169 3 servo
  4000 0 servo # set servo 0 to 1.00 ms
  moving_wait
  8000 0 servo # set servo 0 to 1.00 ms
  moving_wait
  4000 3 servo
  3000 delay
  6169 3 servo
  4000 0 servo # set servo 0 to 1.00 ms
  moving_wait
  4000 3 servo
  3000 delay
	  quit
repeat
 
sub moving_wait
  begin
    get_moving_state
  while
    # wait until it is no longer moving
  repeat
  return

Thank you in advance! :smiley:

Hello.

The motion you described sounds like it might be jitter caused by an inadequate power supply. What power supply are you using for your servos?

Also, if you want the Maestro to stop sending pulses on a particular servo channel, you can set the target position to “0”. For example, the command “0 3 servo” will stop sending pulses to the servo on channel 3.

-Brandon

hey BrandonM,

the battery supply i’m using is 4 AA batteries hooked up to the maestro which is sufficient for what i am doing. Unfortunately, due to the way the continuous velocity motor works, when i change my code for it to 0 3 servo instead of shutting off the motor it sets it into full reverse mode, so that didn’t fix anything :confused: Thank you for your response though!! anything else you think can fix this issue?

A servo’s reaction when the signal is turned off will depend on the particular servo. Some will simply stop, while others can behave similar to what you are describing. Are you powering both the Maestro and your servos with your AA batteries or just the servos? Are your AA batteries NiMH or alkaline? You might try double checking that they are fully charged or fresh. Also, could you post some pictures of your setup, including all connections? Alternatively, a video showing the behavior would be helpful.

-Brandon