BANNED Board and Adafruit PWM driver using Arduino 1.5.3

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Smoke
 
Posts: 5
Joined: Wed Apr 30, 2014 2:51 pm

BANNED Board and Adafruit PWM driver using Arduino 1.5.3

Post by Smoke »

I am having difficulties with using the Adafruit library with the BANNED board. The example code that Adafruit have provided should work, but there are errors for days, mainly with a wire1 variable from Wire.h (which is not the library from Adafruit, but is still used in the example code). I am using the Adafruit 16 channel 12 bit PWM driver, because I will ultimately need to use more than 10 servo motors.

Also, with just using a pin on the BANNED Board, the code (without using the PWM driver) should make the servo turn from 0 - 180 degrees, but it only turns slightly over 90 degrees. The code that I used is:

#include <Wire.h>
#include <Servo.h>

int servoPin = 9;
Servo myServo;

void setup()
{
myServo.attach(servoPin);


}

void loop()
{
myServo.write(0);
delay(1000);
myServo.write(180);
delay(1000);
}

Are there some compatibility issues between the Adafruit library and the BANNED Board or perhaps something else?

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

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by adafruit_support_bill »

1.5.3 is still beta code. As far as I know, the wire library is still not ready for prime-time.
Also, with just using a pin on the BANNED Board, the code (without using the PWM driver) should make the servo turn from 0 - 180 degrees, but it only turns slightly over 90 degrees.
What model servo are you using?

Smoke
 
Posts: 5
Joined: Wed Apr 30, 2014 2:51 pm

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by Smoke »

Just to do some prototyping, I used a FS90 (torque is 1.3kg/cm), but ultimately I will have to use something a bit bigger, like the DS3118 (torque 18kg/cm).

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

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by adafruit_support_bill »

I used a FS90
Who makes that? We had a batch of the Tower Pro MG90S that behaved similarly & had to send them back.

Smoke
 
Posts: 5
Joined: Wed Apr 30, 2014 2:51 pm

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by Smoke »

FS90 is made by FiTec

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

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by adafruit_support_bill »

Not familiar with that brand. The standard library assumes "standard" servo pulse timing. But not all servos respond the same. You can try using the WriteMicroseconds function to see if you can extend the range that way.

http://arduino.cc/en/Reference/ServoWriteMicroseconds

Smoke
 
Posts: 5
Joined: Wed Apr 30, 2014 2:51 pm

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by Smoke »

Thanks. Will try it out

Smoke
 
Posts: 5
Joined: Wed Apr 30, 2014 2:51 pm

Re: BANNED Board and Adafruit PWM driver using Arduino 1.5.

Post by Smoke »

Yip, the software is choppy. Thanks for the help

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

Return to “Microcontrollers”