Saturday, 30 January 2016

Hobby servo control

Team:    QRM
Author: Michal Ogrodniczak
Date:     30/01/2016

Over past week I've learned couple new things:
  1. Hobby servos don't give any feedback - which will cause trouble down the line when syncing with audio.
  2. We can’t directly measure load on GPIO pins on Rpi
  3. Hardware calls from Python will be ran higher in call stack and might cause jitter in movement.
  4. We can’t directly control speed of the servo movement.
  5. Plastic gears are weaker than the motor itself, trying to move it while set to hold position will strip the gears.
Along with QRM teammates we were able to devise a plan how to investigate possible solutions to the issues:
We knew that the current draw is directly proportional to actual movement/power but we still needed a confirmation of how it looks in practice - we've built simple circuit and used external power supply that allowed us to observe the current draw - in ‘holding’ state the servo drew around 16mA and spiked at around 140mA when changing position after which it settled back to initial 16mA.
We have tried to use 5A Range Current Sensor based on ACS712 chip but our small current didn't even register on it - an alternative to sense low current is this product which we hope to order soon.
Pairing current sensor with ADC will allow to feed digital signal back to Rpi and eventually get feedback when servo reaches its desired position - we are speculating that it would greatly simplify syncing of audio over movement as well as allow to calibrate the servos positions to their respective duty cycles.

Another issue is Rpi’s control over servo motors, we came to similar conclusion as Pi Over Four team - outsourcing PWM handling to external module - Adafruit produces a servo hat for rpi and it seems to be good match for our requirements - small footprint, has a cut out for camera ribbon, takes in its own power supply and comes with Python library to use -

Below is a short video of servo in operation along with current draw.

No comments:

Post a Comment