Ran out of PWM pins for my robot...

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Ran out of PWM pins for my robot...

Post by js3 »

The 8 PWM pins on the BBB are being used for servos. I need to add control for a couple RGB leds, communicating over serial. This means I can't use neopixels or the I2c PWM BoB right? Do I need to add a micro like the Atmega 328 to get these extra PWM pins? Is there an easier way? I'm using BT, which is why I need serial communication.

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_mike »

Are you talking about a Bluetooth connection between the BBB and the LEDs?

That's the only reason you'd be handcuffed to a serial connection. If your using a Bluetooth serial connection to talk to the BBB, that only constrains that line of communication. The BBB should be able to talk to other devices using any protocol it pleases.

User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Re: Ran out of PWM pins for my robot...

Post by js3 »

The serial BT connection is between an Android phone and BBB. Servos and leds work, looking to add more servos. Guess I am handcuffed to a serial connection for these motors. How would I add more?

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_bill »


User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Re: Ran out of PWM pins for my robot...

Post by js3 »

These boards communicate via SPI or I2C. I need to keep it a serial communication b/c everything is controlled over bluetooth.

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_bill »

Add one of these between the BT and the PWM breakout(s): https://www.adafruit.com/product/1501

User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Re: Ran out of PWM pins for my robot...

Post by js3 »

I'll give it a try. Are there any tutorial(s) on how to connect a second microcontroller?

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_bill »

The serial BT connection is between an Android phone and BBB.
If I understand your configuration properly, the BBB should be able to drive the PWM controllers directly via i2c. I don't think you need a second processor for a serial interface.

If you post a diagram of the system you are trying to build, it might make things clearer.

User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Re: Ran out of PWM pins for my robot...

Post by js3 »

So the robot will be controlled with an Android phone. Right now its on an Arduino Uno and I'm trying to transfer it to a BBB, but I need these extra PWM signals. 1 RGB Led and 3 servo's using PWM on the UNO. Right now the app sends a number over BT, Arduino code receives it, makes that assigned servo move. If I understand you right, the BBB(or UNO) can receive that Serial data and move those motors over the PWM driver, still keeping the wireless control?

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_bill »

the BBB(or UNO) can receive that Serial data and move those motors over the PWM driver, still keeping the wireless control?
Yes.

User avatar
js3
 
Posts: 24
Joined: Mon Sep 10, 2012 12:45 am

Re: Ran out of PWM pins for my robot...

Post by js3 »

Would there be any timing issues? Using a pan tilt setup, would it affect responsiveness ?

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

Re: Ran out of PWM pins for my robot...

Post by adafruit_support_bill »

The servos themselves will be the limiting factor in responsiveness. The servo update rate is 60 Hz (16.7mS) Servo commands to the board are well under 1mS.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”