Servos go spastic if not in PWM mode when motors run?

Moderator: Steve

Servos go spastic if not in PWM mode when motors run?

Postby alanmcdonley » Sun Jun 12, 2016 6:59 pm

When I first apply power to my Raspberry Pi ( and Pi Droid Alpha ) the tilt and pan servos move about 15 degrees. After this initial movement, the servos are not active/powered.

I was starting my bot with:
center_servos()
servos_off() # no need to use a power holding the tilt/pan in the centered position

The servos_off() sets the servo pins from pwm mode to input mode,
BUT when I run the wheel motors, both servos go crazy to the end of travel and draw lots of juice.

If I leave the (SG90) servos in PWM mode after centering, they remain unphased by the motor commands,
and appear to be drawing less current than the variability in my ADC readings of the current.
Is this for real? I saw one post stating the resting draw was "< 10ma" so maybe.

Alan
alanmcdonley
 
Posts: 90
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: Servos go spastic if not in PWM mode when motors run?

Postby mikronauts » Tue Jun 14, 2016 10:44 am

This is almost certainly due to running the servos off the same batteries as the motors, and the driver boards in the servo not dealing well with supply variations.

You can observe this behaviour with 99% of servos making at least a small initial motion when powered up.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Servos go spastic if not in PWM mode when motors run?

Postby alanmcdonley » Tue Jun 14, 2016 12:54 pm

Thanks,

I can tolerate the initial power-on twitch, and do a center_servos() (without the servo_off) early in the init_bot routine.

The resting current draw appears to be less than I can measure with my onboard current sensor (0.xx Amp accuracy),
or my USB multi-meter (0.xx A precision and accuracy), or my digital multi-meter (0.xx precision for 0-10A range)
alanmcdonley
 
Posts: 90
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: Servos go spastic if not in PWM mode when motors run?

Postby mikronauts » Tue Jun 14, 2016 1:46 pm

You are welcome.

That sounds ok.

The centred servos will draw current if you apply force to them to force turning, they will fight it and use more juice.

If the camera head is light enough, then the servo can hold it passively without having to use power to maintain position.

You could see this in action by adding enough weight to the camera to force the servo to to work to keep it at the rest position.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm


Return to Pi Droid Alpha

Who is online

Users browsing this forum: No registered users and 1 guest

cron