Got this board cheap from Banggood, but there are minimal details on how to use it. There is a manual here https://www.gitbook.com/book/smartarduino/user-manual-for-2-way-motor-16-way-servos-shield/details , but it is a long way from detailed, and what I need are some details on how to drive the I2C PWM servos.
doit 2-way motor & 16-way servo shield board
1.9k views Asked by Robbie Matthews At
2
There are 2 answers
0
On
External power source is required only at VM & GND terminals if jumpers are shorted both at VM+VIN and VS+5V, VM will have the same voltage as input power and VS (servo voltage) will be 5V derived from VM input, not from UNO board. That is what the user manual means by single power source, which input is at VM terminal. OPEN all the jumpers will need individual power source for VM and VS separately.
After some poking around, I have a partial answer.
The Adafruit libraries seem to work fine for the servos. https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library
Motors on this version of the board have the following controls: D6 PWMB - speed channel B D7 DIRB - Direction Channel B D8 PWMA - Speed Channel A D9 DIRA - Direction Channel A
... which may explain why the speed control is working on channel B but not A, since pin 8 is not PWM on a UNO. (May also explain why it is cheap)
Also note that you need to supply a separate 5V to 18V power to the VS connector to drive the servos. I used a 6v battery pack.
Also note that the on-board power switch did not appear to affect power to servo, so a power switch for the servo power is probably also useful.