Go Down

Topic: Possible wiring problem? (Read 15325 times) previous topic - next topic

Vinter

Aug 17, 2013, 02:48 pm Last Edit: Aug 18, 2013, 11:12 am by Vinter Reason: 1
Hello everyone. During the past weeks I've been trying to finish my led cube project but I can't solve a problem that keeps occuring. In order to speed up the troubleshooting , I want to make sure that the wiring is correct. How this works is by settting the column pin to high and the row pin to low in order to lit the corresponding led.Setting all the rows of a column to low would lit all of its leds. Only the leds of one column should be lit at a time and hopefully only the ones I want to. I am not too sure about the transistor connections thought and I would appreciate  a heads up from the more experienced and knowledgable users of this forum.

The schematic is attached.

Thanks in advance!

MAS3

What transistors did you use ?
The ones in your drawing are connected in an a-typical way.
There are no resistors in the base connections of your transistors, is that the way you are using them ?
If you are not sure about the connections you used, show a photo that clearly shows how they are connected, or make a drawing of the housing and what you connected.
That only is useful if you mention the transistor type you used.

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

MarkT

Yes, that looks like a standard Charlieplex array with transistor boost on the columns (you would
drive one output high to turn on that column, then the other pins are either INPUT or LOW to
control the 9 LEDs in that column.

The emitter-follower configuration is used for the transistors to boost current without inverting -
there is some voltage drop as a result, but it should only be about 0.7V or so
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

MarkT


What transistors did you use ?
The ones in your drawing are connected in an a-typical way.
There are no resistors in the base connections of your transistors, is that the way you are using them ?
If you are not sure about the connections you used, show a photo that clearly shows how they are connected, or make a drawing of the housing and what you connected.
That only is useful if you mention the transistor type you used.


Don't worry, this is a standard trick in Charlieplexing, any NPN transistor with enough current rating for a whole
column of LEDs will basically work.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Vinter

I'm using the 2N3904 NPN transistor and I don't use a resistor to the base. Can that create any problems ?

dc42

What is the problem that keeps occurring?

You don't need a base resistor in that arrangement. However, 2N3904 is not a good choice of transistor for that circuit, because you are running it close to its maximum current (200mA) and its hfe will be rather low at that current. So you are likely to find that the more rows you light at a time in a given column, the less bright the LEDs will be.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Vinter

#6
Aug 17, 2013, 05:04 pm Last Edit: Aug 17, 2013, 05:22 pm by Vinter Reason: 1
My problem is that stray leds light up. Could not putting a resistor to the base affect the current or switching frequency? I don't know much about such details.

dc42

#7
Aug 17, 2013, 06:28 pm Last Edit: Aug 17, 2013, 06:31 pm by dc42 Reason: 1

My problem is that stray leds light up. Could not putting a resistor to the base affect the current or switching frequency? I don't know much about such details.


You are using the transistors in the common collector (also called emitter follower) configuration, and the emitter current is limited by the LED series resistors, so you do not needs base resistors in this case. Adding them would just reduce the LED current and make the brightness depend even more on the number of LEDs lit.

I suggest you post your code, configured so that you light up only a few LEDs but the problem occurs, and tell us which additional LED(s) light up. For example, what happens if you try to light up all the LEDs in column 1?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Vinter

#8
Aug 17, 2013, 07:29 pm Last Edit: Aug 18, 2013, 11:12 am by Vinter Reason: 1
The cube is basically the matrix bent into an S shape and lacks the last column of the schematic. 3 leds of every column represent an RGB led. What happens is that while the second column first led's red and third column's second led's green should only be lit, the corresponding led of the other column also light up.  Here is the picture. The red led of the third column cant be seen that well but the green one of the second column can  clearly be seen. Both are very dim and I suspect it may has to do with the port register manipulation. The code is attached.



sorry for the small size, I had to take this from my phone. Also, the commentary for the interrupt frequency is wrong because I've been messing around a bit with the timer and forgot to change it back.

TomGeorge

#9
Aug 18, 2013, 10:08 am Last Edit: Aug 18, 2013, 10:09 am by TomGeorge Reason: 1
Quote
The cube is basically the matrix bent into an S shape and lacks the last column of the schematic.

Does this mean that you have built the circuit as per the schematic but have not built the last column into your setup?
From what I see of charlieplexing you need ALL of the circuit for it to work. It relies not just on transistor but the diode action of the LEDs to work.

Tom.
PS Double check your LED polarities as well, one LED in the wrong way round with charlieplexing does not just mean that it will not glow, but it will upset how the rest of the array works.
Everything runs on smoke, let the smoke out, it stops running....

Vinter


Quote
The cube is basically the matrix bent into an S shape and lacks the last column of the schematic.

Does this mean that you have built the circuit as per the schematic but have not built the last column into your setup?
From what I see of charlieplexing you need ALL of the circuit for it to work. It relies not just on transistor but the diode action of the LEDs to work.

Tom.
PS Double check your LED polarities as well, one LED in the wrong way round with charlieplexing does not just mean that it will not glow, but it will upset how the rest of the array works.


All the leds I want to light , do so with no problems. It's just that others which share the same cathodes do so too but very very dimly.Btw the last column isn't needed, only it's cathode row is so we end up with 9 pins that act as anodes/cathodes and one that acts as cathode only. Also I sat down yesterday and checked every led individually . Also checked combinations of leds in each column and it seems that it works as expected. This looks like a programming problem but I can't spot the error.

MAS3

Then why don't you show the code to have it verified ?
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Grumpy_Mike

I would try a 22K pull down resistor on the base of those transistors.

Vinter

#13
Aug 18, 2013, 11:11 am Last Edit: Aug 18, 2013, 11:15 am by Vinter Reason: 1

Then why don't you show the code to have it verified ?

I did . It's attached to the post with the picture. I also added it to the first post for convenience.
If you mean to the programming section, I did that too but didn't get an answer and the topic got buried so I thought II should verify the wiring first.

@Mike why the resistors ?

Grumpy_Mike

Because when the transistor base is connected to an input it is floating and can pick up interference which can cause a small current to flow which would light up LED slightly. A pull down resistor would stop this from happening.

Go Up