tony1812
Posts: 350
Joined: Sat Jul 15, 2017 12:40 pm
Location: Boston MA.

16-channel PWM & Servo driver and pi3

Mon Jul 16, 2018 3:27 am

Hello, I am doing a robotic project. I have an old robot wth 12 servos. it was using and Arduino nano with a 16-channel PWM & Servo driver. Now I would like to substitude the Arduino with a Pi3 or Pi zero, as the Pi has a limited hardware PWM, Would it be better to use this 16-channel PWM & Servo driver?
Also later on, I would like to add some sensors such as proximity sensor to the bot, would it be better to leave the nano to handle the servos tasks and dedicate the pi to do the sensors tasks?

Thanks

User avatar
joan
Posts: 13558
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 16-channel PWM & Servo driver and pi3

Mon Jul 16, 2018 7:03 am

You don't need the PWM driver on the Pi. pigpio and others can provide suitable servo pulses on all spare GPIO.

http://abyz.me.uk/rpi/pigpio/index.html

However the module does simplify the wiring and if you want to use it there are several software modules available, e.g. http://abyz.me.uk/rpi/pigpio/examples.h ... PCA9685_py

pcmanbob
Posts: 4380
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 16-channel PWM & Servo driver and pi3

Mon Jul 16, 2018 9:57 am

The one advantage of using a 16 channel servo driver board with the pi is your can drive it using just a serial command , so just 2 or 3 gpio pins ( TX,RX, Ground).

This leaves all the other gpio free for your sensors which might be important to your robot project if you are using lots of sensors that each require there own pins.

both ways will work it just comes down to how many gpio pins you need for your robot.
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

pootle
Posts: 270
Joined: Wed Sep 04, 2013 10:20 am
Location: Staffordshire
Contact: Website

Re: 16-channel PWM & Servo driver and pi3

Mon Jul 16, 2018 11:03 am

If you are driving the sensors at a fairly low level (like timing the range pulse from an ultrasonic sensor) then using pigpio to trigger on the edges will give you very accurate timings direct from the pi. So it probably makes sense to drive the servos from a controller board if you need more io pins than the pi can drive direct, but pwm direct from the pi using pigpio is very accurate anyway, so if there are enough pins, you don't need extra boards - unless you need level changers / drivers. Remember to put decoupling capacitors close to the motors if they don't have them built-in.

The cpu load from driving pwm servos via pigpio is minimal (its mostly done in the hardware).

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: No registered users and 11 guests