TLC5940NT Mal-operation???

Status
Not open for further replies.

ecaits

New Member
As I have to control servos by TLC5940NT in Arduino Uno.
During testing, the servos are not rotated as per command and sometimes it stopped and not working.
The wiring diagram is attached in file.
Simple program I have used for servos testing, given below,

#include "Tlc5940.h"
#include "tlc_servos.h"

#define SERVO_CHANNEL 0
#define DELAY_TIME 20

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);
}
}

Thank you,

Regards,
Nirav
 

Attachments

  • TLC5940_Arduino_circuit.jpg
    97.6 KB · Views: 323
Why you open a new thread

Have you tried it like it tells you...?
Code:
/*
    This sketch sweeps a servo on channel 0.

    To connect a servo:
     1. Put a 2k-5k pull-up resistor (R0 below; I've tried with 3.3k) between the
          servo control output pin and +5v.
     2. 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      20

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);
  }
}
 
Dear Burt,

I have tried exactly same way as told in your reply.
But still servo is not rotating in commanded fashion.

Regards,
Nirav
 
Im sure if not hooked up right it will not work that chips made for driving leds there using pullups to keep it from thinking you have a broken led.
**broken link removed**
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…