So after some testing with the Adafruit driver for PWM, I could write a little example to move a servo with the Hatalogico.
As you can see in the video, in this test the software just commands to move the servos between 0º, 90º and 180º with 0.3 seconds between each position.
Here is the code in GitHub: https://github.com/fdominguezr/Adafruit.PWM.library.git
Update 11/May/2015: Now the new program will ask you the position you want. It is here in GitHub.
You can see all the info about the Hatalogico board for your experiments here.
FAQ regarding PWM servo control with Raspberry Pi:
My servo is working erratically, what could be the problem?
Most of the time is wrong frequency for PWM configuration. I'm using 50 Hz of frequency which works for most hobby servos. You have full explanation here with an improved version of the test software ;-)
Adafruit_PWM_Servo_Driver/Servo_Test_Asking_Position.py
Regarding the issue of "erratic servo movement sometimes) it can be:
- wrong numbers for positions from Hatalógico. I experimented that until I found a very useful article in Adafruit regarding how to calculate the correct values (120 for 0º postion and 480 for 180º, but it can vary from servo to servo and depending on temperature). Tip: John, Hatalógico's father uses Adafruit's library. This is the issue in most cases. Check my example here: Adafruit_PWM_Servo_Driver/Servo_Test_Asking_Position.py
- bad connection of cabling either in any part of the circuit between power suply, servo.
- bad soldering in the board with the header.
- too electrical noise in the circuit.
To solve that issue you should:
- use the right frequency and PWM command for servos. (check Adafruit library or even better, my examples published here, already tested and working great: Adafruit_PWM_Servo_Driver/Servo_Test_Asking_Position.py)
- double check all circuit cabling.
- check soldering of header with a magnifing glass and a continuity tester.
- more difficult: see electrical levels with oscilloscope.