Pages: [1]   Go Down
Author Topic: Servo issue on Bare Bones Board  (Read 672 times)
0 Members and 1 Guest are viewing this topic.
Melbourne, Victoria, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I have a problem when running servos from my Bare Bones Board.
When I attach a servo to BBB 'A0' (pin 14), and change the pin number in the servo 'sweep' test program, nothing happens. However, when I hook it up to +5v, GND, and pin 9, it all works fine.

From what I gather, the A0-A5 stack of pins on the side is specifically for sensors and servos. I'm not doing anything fancy, just plugging hte servo directly to the pin(s) and running the test program.  :'(

Any help is greatly appreciated  smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as far as i know you can only use the servo on the pwm pins. pin 14 is not one of them
Logged

The hills of Tennessee
Offline Offline
Newbie
*
Karma: 0
Posts: 49
What, me worry?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you declare the pin as OUTPUT? I always thought that if you used the pin address(14) that it automatically changed it to OUTPUT, but maybe it needs to be declared?

It may be a timer issue? pin 9 is a hardware PWM pin using Timer1 I believe. The labeling shows pin9,10,and11 as PWM.

Jim
« Last Edit: January 02, 2009, 01:10:58 pm by aercam » Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RTFM?

“this library allows an Arduino board to control one or two RC (hobby) servo motors on pins 9 and 10”

See: http://www.arduino.cc/en/Reference/Servo
Logged

Melbourne, Victoria, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I realise that the library says pins 9 and 10 are the only pins compatible with it, yet the Bare Bones Board specifically says that the stack of pins there can be used to control servos as well as sensors. And yes, I've already consulted that page for help, and I realise what it says there, but that still doesn't change the fact that I was lead to believe that these pins could be used to control servos as well.

Quote
Also see the headers page for 3 pin male and female headers for connecting to servos or analog sensors.

If I'm not understanding something correctly here, then let me know, but don't think I haven't looked for an answer already. I'm just not sure which place to believe. I'm thinking that if I want to use these pins to control a servo, I'll have to do it without the servo library.
« Last Edit: January 02, 2009, 07:37:53 pm by Archive555 » Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think he was stating that you can use 3 pin servo cables to attach sensors to the analog section.  I don't see anything that states that actual servos can be hooked up to the analog pins.  Of course you can also use 3 pin servo cables to hook up servos, but I saw nothing that stated analog section could be used.  You'd never be able to power that many servos off of the on-board regulator anyway.
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm thinking that if I want to use these pins to control a servo, I'll have to do it without the servo library.

Yes, that is correct. It is possible to connect servos to any of the Arduino pins (including analog) but not with the servo library you have tried.

I published a library in this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230479947 that drives up to eight servos on any pin.
You can use the analog pins by calling the attach method with pin numbers from 14 to 19.

I haven't found the time yet to write up a tutorial on using this library but it is similar to the one you are using, except that it uses microseconds instead of degrees for servo position.

If you need more information on servos there are many sources on the internet
for example: http://www.princeton.edu/~mae412/TEXT/NTRAK2002/292-302.pdf
« Last Edit: January 03, 2009, 03:11:49 am by mem » Logged

Melbourne, Victoria, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I'll have a look at your library, it should help.

I also tried the 'Software Servo' library, but couldn't quite get it working  :-?

Thanks for the help.


Quote
You'd never be able to power that many servos off of the on-board regulator anyway.

I'm using a TO-220 instead of the supplied TO-92, so it can handle a fair bit more, but still not heaps.
« Last Edit: January 04, 2009, 07:02:12 pm by Archive555 » Logged

Pages: [1]   Go Up
Jump to: