Servo issue on Bare Bones Board

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. :cry:

Any help is greatly appreciated :slight_smile:

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

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

RTFM?

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

See: Servo - Arduino Reference

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.

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.

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.

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

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.

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.