RPi + 16 Channel Servo Driver ID # 815 & robots

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
RussellJames
 
Posts: 98
Joined: Thu Jul 24, 2014 10:49 am

RPi + 16 Channel Servo Driver ID # 815 & robots

Post by RussellJames »

Will a marriage between the RPi and the 16 channel servo driver ID #815 improve the RPi's ability to control servo driven movements and actions of a small robot? I ask this question, because it is my understanding the RPi runs a time-sliced OS, which I believe is not great for precision timing of actions.

My thinking is the RPi's limited ability to control precise movement does not really in this application as the robot is being build for learning and fun. Therefore, this question falls into the learning aspect of the project.

Any thoughts or advice on this topic would be greatly appreciated.

Cheers

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_bill »

The servo driver would definitely improve your control - particularly when you have multiple servos.

The time between the servo control pulses is not so critical. Most servos will handle a range of 15-30 milliseconds or more. The width of the pulse is the critical part. For most servos, the difference between 0 and 180 degrees is 1 millisecond. So a 0.1 millisecond error equates to about an 18 degree glitch in your movement.

User avatar
RussellJames
 
Posts: 98
Joined: Thu Jul 24, 2014 10:49 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by RussellJames »

Very helpful,
Thank you.

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

Hello everybody.
Help me please.
I can't understand what I did wrong.
As instruction says I have installed python-smbus and i2c-tools as well.
Then I have commented "blacklist i2c-bcm2708" in "/etc/modprobe.d/raspi-blacklist.conf" file.
When I trying to search "/dev/i2c-1" by "sudo i2cdetect -y 1" command the error occurs:
"Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directiry".
I have second rev Raspberry Pi.
Could anybody give some advise plaese?

User avatar
RussellJames
 
Posts: 98
Joined: Thu Jul 24, 2014 10:49 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by RussellJames »

Sorry I cannot give you any technical advice at this time because I am still in the planning stages of my bot.

The best I can do is recommend that you go back, start over and review all the steps to the point of error; be slow and deliberate when you do so.

Good luck.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_mike »

@Bazilij: What output do you get from the command:

Code: Select all

ls /dev/i2c*

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

The result of "ls /dev/i2c*" command.
Attachments
ls2.png
ls2.png (10.74 KiB) Viewed 438 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_mike »

Okay, that shows the OS hasn't created any I2C devices.

Did you reboot after installing the two I2C packages?

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

Yes, of course.
Some screenshots:
Attachments
blacklist-comment.png
blacklist-comment.png (3.53 KiB) Viewed 412 times
i2c-tools.png
i2c-tools.png (4.56 KiB) Viewed 412 times
python-smbus.png
python-smbus.png (4.39 KiB) Viewed 412 times

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

And the error:
Attachments
i2cdetect.png
i2cdetect.png (2.79 KiB) Viewed 411 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_mike »

What does your /etc/modules file look like?

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

Modules file:
Attachments
modules.png
modules.png (4.73 KiB) Viewed 399 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_mike »

Bingo..

It looks like you missed the step at the beginning of the tutorial where you add these two lines to /etc/modules:

Code: Select all

i2c-bcm2708 
i2c-dev

User avatar
Bazilij
 
Posts: 7
Joined: Mon Oct 06, 2014 8:48 am

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by Bazilij »

Thank you very much and sorry for my inattentiveness!
It is working now Image

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: RPi + 16 Channel Servo Driver ID # 815 & robots

Post by adafruit_support_mike »

Glad to hear it's working for you. Happy hacking!

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”