newbie: Trying to get PWM to work to move a servo - not working

Hi,
I’m a newbie to the Beaglebone Black. I’m trying to get a servo moving with the BBB. I have a separate 5V power supply going to my servo and the signal wire (orange) going to P8_13 on my BBB and going to the servo orange wire (signal).
I have confirmed that my wiring is definitely correct.
How can I go about getting PWM to function? or even test to see if it’s working? I have tried the Adafruit_BBIO library which is supposed to work - but it’s not working.
I have also tried to use GPIO to display a message within my SSH window when a push button switch is pressed - nothing there either. It seems none of the IO ports on the BBB are working. I have actually purchased another BBB thinking that my first one was broken. I have the same result on both of my BBBs.

Does anyone have any step by step directions that can help me? I really want to start creating things and playing but nothings working… :frowning:
I’ve searched google endlessly and have gone to basically every article to try and get more information but still at a loss. Any help would be appreciated.

HI Ian,

Sorry to say it did not work for me either. I think Adafruit are aware of it – I posted a bug notice a couple of weeks ago and they deleted it because there was one already.
PWM on the BBB does not seem to be working real well at the moment. I got it to work fine on the RPI with the equivalent library.
It was OK for me in the end --Im using a stepper, and I’ve just been switching the GPIO on and off in python – which seems as fast as I need.

Better than trying to use PWM in my case, anyway.

Kind regards

Matt

Just to tell you.

I use PWM on BBB and encoders and they are working quite well.

You have to use kernel 3.8.13
You have to patch pwm test using
https://github.com/SaadAhmad/beaglebone-black-cpp-PWM

and if you have encoders try
https://github.com/Teknoman117/beaglebot

all that you need is:
http://www.phys-x.org/rbots/index.php?option=com_content&view=article&id=106:lesson-3-beaglebone-black-pwm&catid=46:beaglebone-black&Itemid=81

Hi,
What ‘patch’ are you referring to? I never heard of having to apply any patches to get PWM to work.

Can you post the code you used to set up the io pin and to check it?

Hi,

I just re-tested with another Beaglebone Black that I bought, and GPIO seems to be working ok. I couldn’t get PWM to work on it yet though.
Do you have any experience in getting PWM to work? I’m trying to control a servo.
I have an A5A Beaglebone Black running Ubuntu 13.04 and an A6 Beaglebone Black running one of the latest Angstrom builds.
I’ve tried the Adafruit Tutorial for servos but cant seem to get it to work. It’s great that my GPIO test worked - at least i know something is working correctly on these units :slight_smile:

Chris