I'm using the TLC5940 to build a PWM expander to control 8 servo motors. I've been using the library:
http://www.arduino.cc/playground/Learning/TLC5940
I uploaded the following example provided with the library:
/*
This sketch sweeps a servo on channel 0.
To connect a servo:
- Put a 2k-5k pull-up resistor (R0 below; I've tried with 3.3k) between the
servo control output pin and +5v. - Connect that same pin to the servo's control line like so
servo data pin
| _____
OUTn ----+----[_____]---+5v
R0
Steve Pomeroy <steve ~AT~ staticfree.info>, 2009-01-20 */
#include "Tlc5940.h"
#include "tlc_servos.h"
#define SERVO_CHANNEL 0
#define DELAY_TIME 15
void setup()
{
tlc_initServos(); // Note: this will drop the PWM freqency down to 50Hz.
}
void loop()
{
for (int angle = 0; angle < 180; angle++) {
tlc_setServo(SERVO_CHANNEL, angle);
Tlc.update();
delay(DELAY_TIME);
}
for (int angle = 180; angle >= 0; angle--) {
tlc_setServo(SERVO_CHANNEL, angle);
Tlc.update();
delay(DELAY_TIME);
}
}
For some reason, my servo motor isn't doing anything. I have the schematic wired just as shown on the library's site in the Arduino playground. The servo I'm using is the large servo from Sparkfun (which they do not provide a datasheet for >:( ):
Help please!! This has been driving me crazy for the last week! Thanks in advance!