This is a MyRobotLab service to support the Adafruit 16-Channel 12-bit PWM/Servo Driver attached to an Arduino or a Raspberry PI. It can be used with any board that use the PCA9685 circuit. It is dedicated to do PWM ( Pulse Width Modulation ) and it uses the i2c protocol. Since it can do PWM it can also be used to control a Motor driver. The pins can also be used as digital output pins or analog output pins. When used as analog output pins they are not true analog, but pwm.
Go to Adafruit product page for more descriptions on details of the driver.
Some examples of other boards that also can be used:
Adafruit 16-Channel PWM / Servo HAT for Raspberry Pi
Adafruit 16-Channel 12-bit PWM/Servo Shield for Arduino
8-Channel PWM or Servo FeatherWing Add-on For All Feather Boards
Steps to control Servo Driver using the Arduino.
- Attach the Arduino to the computer running MRL (USB, Bluetooth, or other serial method)
- Attach the servo driver to the Arduino
- Attach the servo to the servo driver and connect power
- Follow the steps on this page to install MRLComm. http://myrobotlab.org/service/Arduino If it already has been done, you don't need to do it again.
- Once uploaded, I would highly recommend restarting MRL after the upload
- Download the example script and execute it from the Python tab. You need to change some parameters in the script to fit your configuration. They are all docmented in the script:
Steps to use the Servo Driver using the Raspberry PI.
- Attach the servo driver to the Raspberry PI
- Attach the servo to the servo driver and connect power
- Download the example script and execute it from the Python tab. You need to change some parameters in the script to fit your configuration. They are all docmented in the script:
References
[[Adafruit16CMotorDriver.py]]
[[Adafruit16CServoDriverPi.py]]
tested
AND APROVED !
I will test it more
thank you
Adafruit16CServoDriver
I finished updating and testing the Adafruit16CServoDriver today. So if you want, you can download an test in in the 'latest build'.
attach() and detach() should be working now.
I also updated it so that setVelocity and setAcceleration can be used.
Please test and report if you find anything strange,
Great news Mats ! thank about
Great news Mats ! thank about the work you ve done. I'm happy to test it soon on the little robot
Hi ! I have done some test ( raspy mrl 1893 )
Hi ! I have done some test , it is better ! This is the results
If I use somewhere servo.detach() , I can't attach anymore. But now if I restart MRL it worky again.
If I didn't use servo.detach() but I declare servo.autoAttach(1) an some sleep between servo declaration it seem works better
SCRIPT :
https://github.com/MyRobotLab/pyrobotlab/blob/master/home/moz4r/Marty/m…
Attach() / Detach()
Hi Moz4r
I made a change in the 'lastest build' so that it should work now. But please test again.
If you still find a problem, please provide a small script showing the problem so that I can recreate it.
/Mats
just perfect. thank you so
just perfect. thank you so much
Hi Mats ! I think setVelocity
Hi Mats ! I think setVelocity is broken on last mrl . Speed always at full speed , can you confirm ?
setVelocity
I can confirm that it is/was broken. I found the reason and it's correced in 1932.
I tested a servo connected to the Arduino. I also found that something is broken with the combination of Servo >= Adafruit16CServoDriver => Arduino
I need to dig into that. I hope that it's just related to the Arduino so that it still works on the RasPi.
worky ! Thank again
worky ! Thank again