go_away

Author Topic: TLC5940NT Mal-operation???  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

Offline ecaitsTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
TLC5940NT Mal-operation???
« on: August 19, 2015, 01:42:47 AM »
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

Offline cyberjeff

  • Full Member
  • ***
  • Posts: 114
  • Helpful? 7
Re: TLC5940NT Mal-operation???
« Reply #1 on: August 19, 2015, 08:04:18 AM »
I haven't used this yet, although I have one similar on order.

I can think of a couple possible problems.

1) The PWM outputs are sinks, you will need a pull up resistor (~4.7K to TLC5940NT +), if your servo does not have one.

2)One wire devices can have reflections on the line and fail to communicate, particularly if you have other i2c devices on the line.

Don't forget to tie all grounds together.

 


Get Your Ad Here