Author: Michal Ogrodniczak
Over past week I've learned couple new things:
- Hobby servos don't give any feedback - which will cause trouble down the line when syncing with audio.
- We can’t directly measure load on GPIO pins on Rpi
- Hardware calls from Python will be ran higher in call stack and might cause jitter in movement.
- We can’t directly control speed of the servo movement.
- 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 https://www.sparkfun.com/products/8883 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 - https://www.adafruit.com/products/2327
Below is a short video of servo in operation along with current draw.