Arduino Forum

Using Arduino => General Electronics => Topic started by: GustavoMcSavy on Jun 20, 2016, 09:40 pm

Title: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 20, 2016, 09:40 pm
This is fairly confusing to me. I have a bunch of transistors connected to LEDs, but they don't work unless i touch the leads, specifically the base.

The transistors function normally, in that they respond to the signal, when they are touched. The current is  less than it should be under normal operation, but on is on and off is off.

I know contact will definitely cause a change in capacitance. Am I missing some capacitors in my circuit? I've never heard of capacitors being required to make a transistor work, so that seems unlikely.

I am using a TLC5940 to PWM each transistor base, and the chip is working fine. I decided that I could eliminate the base resistors by using the constant current function of the chip. I do have resistors on the LEDs themselves.
 (https://s32.postimg.org/x7axund0l/TLC54940_with_transistor_schematic.png)
Title: Re: Transistors don't work until i touch them?
Post by: Zapro on Jun 20, 2016, 09:49 pm
Have you looked at the datasheet for the TLC5940? It can only sink current, not source it.

Your circuit will not work.

// Per.
Title: Re: Transistors don't work until i touch them?
Post by: ilguargua on Jun 20, 2016, 09:52 pm
Looking at the datasheet, seems that the chip in sinking current, not sourcing, so I would try with PNP transistor (in different configuration, on the high side).


Ciao, Ale.


Edit : too late, already answered... second time today..
Title: Re: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 20, 2016, 10:33 pm
Oh no! I can't use pnp transistors because my LEDs are common anode. I can't add more transistors, I've already used up 90% of the space on my board. And I can't drive the LEDs directly from the chip because they require too much current.

Any ideas for a simple solution? Since it works when I touch it, maybe adding resistors or capacitors somewhere would get it operational, at least temporarily. Are there any ICs almost identical to the tlc5940 that source rather than sink?
Title: Re: Transistors don't work until i touch them?
Post by: DrAzzy on Jun 20, 2016, 10:40 pm
Looks like it's time for a redesign.

Would a PCA9685 be appropriate?  It's an 16-channel PWM driver with totem pole outputs (ie, can drive high or low) and I2C interface.... I know they're popular and there are Arduino libraries for them.
Title: Re: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 20, 2016, 10:50 pm
Looks like it's time for a redesign.

Would a PCA9685 be appropriate?  It's an 16-channel PWM driver with totem pole outputs (ie, can drive high or low) and I2C interface.... I know they're popular and there are Arduino libraries for them.
It looks like it would do the job if i can find space for it. It would require me to completely rebuild my board. I was determined to do this using only on hand parts and as quick as possible so i skipped the part where I use my brain.

I would prefer an ic in the same package, 28 pin dip, but a total rebuild might be my only option here.

What would be the circuit equivalent of touching the base of the transistor? If I can get it working temporarily, I'll have more time to rebuild the board.
Title: Re: Transistors don't work until i touch them?
Post by: Grumpy_Mike on Jun 20, 2016, 11:09 pm
You must use a pull up resistor from the output of the TLC5940 to the 5V supply. Then it will work.

However because you are inverting the switching you will never be able to turn the LEDs fully off, they will always be slightly on.
Title: Re: Transistors don't work until i touch them?
Post by: MarkT on Jun 21, 2016, 12:09 am
Oh no! I can't use pnp transistors because my LEDs are common anode.
That's a shame, you might be able to get away with them as emitter followers low-side, but
that depends on the current involved and the voltage overhead you have to spare.
Title: Re: Transistors don't work until i touch them?
Post by: charliesixpack on Jun 21, 2016, 12:45 am
The TLC5940 has open drain detection that shuts down the output when it falls below .3V.  By touching the outputs you are probably discharging yourself into the output and allowing normal operation.

You are not using the chip in the intended way.  The chip is intended to sink LED current, not drive the base of a transistor.
Title: Re: Transistors don't work until i touch them?
Post by: aarg on Jun 21, 2016, 01:18 am
You are not using the chip in the intended way.  The chip is intended to sink LED current, not drive the base of a transistor.
+1. It can supply 60mA. You don't need a transistor.
Title: Re: Transistors don't work until i touch them?
Post by: larryd on Jun 21, 2016, 01:25 am
@aarg
I believe you meant 'sink' not 'supply' 60ma.

.
Title: Re: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 21, 2016, 01:25 am
You must use a pull up resistor from the output of the TLC5940 to the 5V supply. Then it will work.

However because you are inverting the switching you will never be able to turn the LEDs fully off, they will always be slightly on.
It works! Although, I think I need to adjust my limit resistors because the colors aren't balanced and it can get incredibly bright. It drained two 300mah cells in 30 seconds and gets quite hot.

I'd call that a victory in some way.

(https://s31.postimg.org/41hjj9sc7/IMAG0510.jpg) (https://postimg.org/image/41hjj9sc7/)(https://s31.postimg.org/79m0wbelz/IMAG0509.jpg) (https://postimg.org/image/79m0wbelz/)(https://s32.postimg.org/98k9bnub5/IMAG0506.jpg) (https://postimg.org/image/98k9bnub5/)
Title: Re: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 21, 2016, 01:31 am
+1. It can supply 60mA. You don't need a transistor.
That 220 ohm resistor in the schematic is actually supposed to be 22 ohms. It can require up to 200ma per pin and every parallel set has a different number of LEDs so the same current for all would result in some letters being bright and others dim.

In hindsight, I should have done that. Limiting each letter to 60ma would give me enough brightness and I can compensate for any uneven levels by adjusting the duty cycle.
Title: Re: Transistors don't work until i touch them?
Post by: aarg on Jun 21, 2016, 01:47 am
That 220 ohm resistor in the schematic is actually supposed to be 22 ohms.
You didn't think it was important to tell us?
Title: Re: Transistors don't work until i touch them?
Post by: GustavoMcSavy on Jun 21, 2016, 01:50 am
You didn't think it was important to tell us?
I didn't notice my typo until you mentioned it.
Title: Re: Transistors don't work until i touch them?
Post by: charliesixpack on Jun 21, 2016, 02:06 am
@aarg
I believe you meant 'sink' not 'supply' 60ma.
.
It is definitely not wrong to use "supply".  Whether sinking or sourcing you are still supplying current.
Title: Re: Transistors don't work until i touch them?
Post by: Grumpy_Mike on Jun 21, 2016, 02:42 am
Quote
It is definitely not wrong to use "supply".  Whether sinking or sourcing you are still supplying current.
Yes it is.
Title: Re: Transistors don't work until i touch them?
Post by: charliesixpack on Jun 21, 2016, 03:05 am
Yes it is.
Reference?
Title: Re: Transistors don't work until i touch them?
Post by: aarg on Jun 21, 2016, 03:08 am
Okay, then... "provide" 60mA.
Title: Re: Transistors don't work until i touch them?
Post by: charliesixpack on Jun 21, 2016, 03:24 am
Okay, then... "provide" 60mA.
But that is a synonym for "supply".  Contradiction predicted in 5, 4, 3,... here it comes...
Title: Re: Transistors don't work until i touch them?
Post by: Grumpy_Mike on Jun 21, 2016, 03:26 am
Reference?
Piss off.
Title: Re: Transistors don't work until i touch them?
Post by: Paul__B on Jun 21, 2016, 04:29 pm
I was about to report that to moderator for "excessive" humour.
Title: Re: Transistors don't work until i touch them?
Post by: Grumpy_Mike on Jun 21, 2016, 04:55 pm
He started it first with this very funny reply.

The TLC5940 has open drain detection that shuts down the output when it falls below .3V.  By touching the outputs you are probably discharging yourself into the output and allowing normal operation.
The output is open drain so HTF can the output fall below 0.3V. Pure comic genius. Well it must be because it is not electronics is it?