Pages: [1]   Go Down
Author Topic: Wierd TLC5940 action - running w/ NO ground? How?  (Read 1133 times)
0 Members and 1 Guest are viewing this topic.
Artisan's Asylum, Somerville, MA, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm building some blinking lights for my wheelchair, using an Arduino and a few TLC5940's...  To get the circuit working, I'm using some solderless breadboards for development... (with all the open circuit issues that can cause)

Mostly I've been trying to get it working with relatively little luck, until I had a wierd accident that I'm trying to figure out what is happening...

I'm using dumb 12V RGB LED strips - common +, with a ground wire to turn on each color.

Circuit power is a 12VDC laptop wallwart  that stands in for my chair's lighting circuit.  It goes to feed the common hots for the LED's

In addition, it feeds into a 7805 (1.5A package) on one breadboard, and from there goes to the Arduino (via the Vin and Gnd connections) and a second breadboard with the TLC's and the LED's on it, where it supplies the 5V VCC power for the TLC chips.

The rest of the circuit follows the recommended wiring for 2 TLC's as mentioned in most of the documentation...  I have traced the circuit repeatedly, and can't find any errors... 

It would not run the "Basic Use" sketch in the library sample code, until while trying to trace wiring and wiggle connections, I DISCONNECTED the only wire I had leading to ground from the breadboard...  With no ground the basic use sketch ran great, but as soon as I touched the ground wire to the ground connection, it would put out all the LED's...  Take the ground wire off and they'd come back on...

Any idea what might be going on?  Only thing I can think of is that the chip is somehow grounding through the signal wires coming out of the Arduino...

The other thing I was wondering, is if I am supplying the Arduino with a regulated 5V, should I be connecting it through the Vin socket, or the +5V socket?

(could this be part of my problem?)

Thanks
ex-Gooserider
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know about the ground issue,
but a 5V source should connect to the 5V header, not Vin and not the barrel jack.
Use a diode from 5V (anode) to Vin (cathode), 1N4001, to prevent the onboard 5V regulator from being reverse biased.
http://www.ti.com/lit/ds/symlink/lm1117-n.pdf
See page 10/11
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It goes to feed the common hots for the LED's
DC electronics do not use the term "hot".  It's called positive.

The rest of the circuit follows the recommended wiring for 2 TLC's as mentioned in most of the documentation...
What documentation?

When you follow a guide and things don't work as expect, I suggest drawing a schematic of how your circuit is assembled.  This means, ignoring the schematic you followed.  Look at ONLY your circuit and draw what you see.

It would not run the "Basic Use" sketch in the library sample code
What is "it"?


but as soon as I touched the ground wire to the ground connection, it would put out all the LED's...
Then you've wired something wrong.

All grounds must be connected together.  You have a short somewhere.

The other thing I was wondering, is if I am supplying the Arduino with a regulated 5V, should I be connecting it through the Vin socket, or the +5V socket?
The barrel jack or Vin need at least +7Vdc to operate correctly (because they are driving an onboard regulator).  So you would connect your regulated 5volts to the 5V pin.  Of course, if all you are powering is the Arduino board and a couple of TLC chips, then why not just put your 12V supply on Vin, and use the on-board regulator instead?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Artisan's Asylum, Somerville, MA, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It goes to feed the common hots for the LED's
DC electronics do not use the term "hot".  It's called positive.
OK, call it 12V positive...  Though it seems sort of like calling a duck an eagle - it still quacks... smiley-roll

Quote
The rest of the circuit follows the recommended wiring for 2 TLC's as mentioned in most of the documentation...
What documentation?

When you follow a guide and things don't work as expect, I suggest drawing a schematic of how your circuit is assembled.  This means, ignoring the schematic you followed.  Look at ONLY your circuit and draw what you see.
The documentation that comes with the TLC library, and that seems to be the same as used in every project I've seen that uses an Arduino with that chip.

A couple of minor exceptions that I have had working a couple of times, intermittently - I've tried omitting the optional pullup resistor on the blanking line - which only causes the LED's to flash when powering up, or rebooting the Arduino.  I also have tried running two pairs of TLC chips in parallel by running the serial data line to the Sin line of the first chip on each pair.  (I have two blocks of LED's that I want to be doing the same thing..)

I have had the circuit working as for a few minutes a couple of times - but if I look at it funny or touch anything near it (WITHOUT rearranging the wiring) it starts acting strangely again - with no visible shorts or opens...

Quote
It would not run the "Basic Use" sketch in the library sample code
What is "it"?
The circuit....


Quote
but as soon as I touched the ground wire to the ground connection, it would put out all the LED's...
Then you've wired something wrong.

All grounds must be connected together.  You have a short somewhere.
That is what I thought, but I can't see how a short would produce the observed behavior - the only lines connecting the Arduino to the TLC circuit on the breadboard were the +12 and +5V lines and the data lines...

Quote
The other thing I was wondering, is if I am supplying the Arduino with a regulated 5V, should I be connecting it through the Vin socket, or the +5V socket?
The barrel jack or Vin need at least +7Vdc to operate correctly (because they are driving an onboard regulator).  So you would connect your regulated 5volts to the 5V pin.  Of course, if all you are powering is the Arduino board and a couple of TLC chips, then why not just put your 12V supply on Vin, and use the on-board regulator instead?
OK, thanks to you and Crossroads for that clarification - I've changed my wiring accordingly (and it stopped working - AGAIN)

I'm using the 7805 regulator for several reasons....

1. Because my reading of the Arduino docs is that the onboard regulator doesn't reliably supply enough power to reliably drive 4 TLC chips with the margin that IMHO should be part of the design  (The 1.5A rated 7805 regulator I'm using gets quite hot BTW)

2. My reading of the Arduino docs also suggests that the board really doesn't want more than 9V on the Vin input.

3. In order to save space and costs, I'm thinking in terms of spinning a couple boards with just a minimal (Mintduino type?) Atmel chip setup once I have everything working.  That means I'll need a regulator for that setup - so might as well include that in the prototype build...

I'm actually having enough grief with the solderless breadboards I've been using that I'm strongly considering going to a soldered protoboard setup for development instead - it can't be any less reliable!

ex-Gooserider
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

but if I look at it funny or touch anything near it (WITHOUT rearranging the wiring) it starts acting strangely again - with no visible shorts or opens...
This usually indicates a wiring problem, lack of decoupling capacitors, or just plain bad connections.  It is why I suggested already that you re-draw the schematic of what you have built. 

For what it is worth, I've taken brand new TLCs out of my static tube, put them in a circuit, and found them to be bad.  So another approach you might consider is building up a simpler circuit and test each one.  See if this behavior follows.


(The 1.5A rated 7805 regulator I'm using gets quite hot BTW)
Without a heat sink, I would expect so.  Electronics, especially regulators, can handle far more heat than you can.



I'm actually having enough grief with the solderless breadboards I've been using that I'm strongly considering going to a soldered protoboard setup for development instead - it can't be any less reliable!
Draw a schematic of what you've built.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Artisan's Asylum, Somerville, MA, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delay, but I've been busy building a soldered protoboard replacement for the breadboard disaster... 

Once I got it finished, it has taken me a while to get it running, and it still isn't completely stable, but it's doing better...

I couldn't get it going initially, although everything metered out OK.  So I got out a scope and started looking at the signals between the Arduino and the proto-board.  They all seemed to be there, but looked noisy, so I added more bypassing caps...

I'm probably doing overkill now, but... 

I initially had started out with a 0.33uF between 5V and ground, and a 0.22uF between 12V and ground, both at the regulator chip.

I added a big blob of 4 caps,  1000uF, 100uF, 0.22uF and a 470pF  across the output of the power supply I'm using (an old 11V 2.3A DEC laptop switching supply brick, puts out about 11.25V) .  In addition I added a 470pF across each of the two TLC chips VCC and ground lines close to the chips.

It is now running the "Basic Use" sketch that came with the TLC library I'm using...

The only problem I'm having now is that sometimes after I've been working on the circuit, I will get some channels that don't light up when they should, while the rest were fine.  The first couple times I was pulling my hair out trying to find a bad connection without any luck - but then I found that if I simply power cycled the setup (I do this with a switch in the + DC out line of the supply brick) it would work right... smiley-confuse

Looking at the power supply lines with the scope, I still see about 150mv of noise, and a slower ripple of about 200mv on the 12V line, and about 100mv of noise on the 5V line at one of the TLC chips VCC pin, does this seem acceptable, or do I need to add more caps?  (If so what size?)

Thanks,
ex-Gooserider
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
does this seem acceptable,
No.

Quote
In addition I added a 470pF across each of the two TLC chips VCC and ground lines close to the chips.
That won't do much they need to be 0.1uF and ceramic.

Quote
do I need to add more caps?  (If so what size?)
Well you have a 1000uF across the supply already so I would put an inductor in series with the power and another 100uF at the other end of the inductor. Make the inductor as big as you can get.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it's any help I'm doing something pretty similar and have some diagrams here - http://forum.arduino.cc/index.php?topic=168742.msg1265019#msg1265019

Logged

Artisan's Asylum, Somerville, MA, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestions - will be adding them soon as I can get the parts.

ex-Gooserider
Logged

Pages: [1]   Go Up
Jump to: