You won't need the PCA9685, the pi can run servos from every GPIO pin using Joans excellent PIGPIO to modulate a PWM signal, just alter the PWM setting to change the servo output.demonclaw wrote:I'm trying to make a tail for a costume to do this I want to use a pi zero v1.2 with a Pca9685 https://www.tindie.com/products/land_bo ... d-rpi-mdi/ and mpu6050 on the I2C bus to make the tail move more realistic and can mov with my body but I don't know the first thing about coding on the raspberry pi. I have found a video of how the servos will move using the Mpu6050 and a pca9685 https://m.youtube.com/watch?v=fqdC4Y1CrxY but the guy in the video didn't post the code anywhere as to help me for a jump off point. So if anyone can help me with the code that will be nice or atleast teach me how to make a rough code to make this work.
the problem is if you drive servos right from the pi it makes them Jitter and make a lot of noise because of the pwm is made in the software so when ever you have another program needing more processor it will interrupt the pwm which will cause the servo to make ear splitting sounds.BMS Doug wrote:You won't need the PCA9685, the pi can run servos from every GPIO pin using Joans excellent PIGPIO to modulate a PWM signal, just alter the PWM setting to change the servo output.demonclaw wrote:I'm trying to make a tail for a costume to do this I want to use a pi zero v1.2 with a Pca9685 https://www.tindie.com/products/land_bo ... d-rpi-mdi/ and mpu6050 on the I2C bus to make the tail move more realistic and can mov with my body but I don't know the first thing about coding on the raspberry pi. I have found a video of how the servos will move using the Mpu6050 and a pca9685 https://m.youtube.com/watch?v=fqdC4Y1CrxY but the guy in the video didn't post the code anywhere as to help me for a jump off point. So if anyone can help me with the code that will be nice or atleast teach me how to make a rough code to make this work.
You should provide two separate power outputs, one for the servos and another for the Pi or you might lose the pi to brownouts when you move the servos.
Don't forget to link the grounds of the two power supplies.
That is not the case when hardware timed PWM is used. pigpio, servoblaster, and others use hardware timed PWM.demonclaw wrote: ...
the problem is if you drive servos right from the pi it makes them Jitter and make a lot of noise because of the pwm is made in the software so when ever you have another program needing more processor it will interrupt the pwm which will cause the servo to make ear splitting sounds.
karrika wrote:The controller card you were planning to use uses the Adafruit_PWM_Servo_Driver.py
The link to the Github code seems to be dead. There is a wiki page describing the controller card.
You could take a look at the https://learn.adafruit.com/adafruit-16- ... spberry-pi page to get an idea of how to use python with servos.
Well that is all great and all but I would not like to have wires going all over to to make a it move. I have seen people do it but I would like a self contained thing that does it for me with out buying fishing line or wire to do this project. Plus I have this little Pi sitting around so I want to use for a project and this seems to be a simple one but I'm new to programing on a PI.karrika wrote: The important thing is how to create the costume. Where do the wires go to create realistic movement. Even without electronics you can do some amazing effects by connecting the wires to non-obvious body parts.
As an example you can control levitation of objects by connecting wires behind your ears . If you nod your head a bit down and rise up the object hanging from an invisible wire will levitate. The rest is up to using your magic hands that are free to do anything.
Okay is there a way of mixing that with mpu6050 to get the movement I need? Is there an example I can look at?joan wrote:That is not the case when hardware timed PWM is used. pigpio, servoblaster, and others use hardware timed PWM.demonclaw wrote: ...
the problem is if you drive servos right from the pi it makes them Jitter and make a lot of noise because of the pwm is made in the software so when ever you have another program needing more processor it will interrupt the pwm which will cause the servo to make ear splitting sounds.
does servoblaster support the zero? The pigpio looks like it might work but I have never programmed in python before.joan wrote:I don't have a MPU6050 example. The code you use at the moment should still work.
For a pigpio servo example see http://abyz.co.uk/rpi/pigpio/examples.h ... vo_demo_py
pigpio also offers a pipe interface (as does servoblaster). If that means nothing to you it simply means that you can control a servo by opening a file and writing values to it.
What ever I can to get it to work.joan wrote:What programming language are you planning to use?