Go Down

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

alnath

OK, the code is readable now, but I've never used charlyplexing myself, so I'd have to get the logic before I could look for a mistake, I think there are people here who have already that in mind and will answer ;)

for the schematic.... nearly . But as you don't have base resistors on your wiring, and the emitters are not connected to GND,  they don't match !
Based on your wiring, the pulldown resistors should be between "Q1 base" (that is the connexion point between Q1 and R1) and GND , another one between Q2 base and GND etc...

polymorph

Remember, you've got a lot of wires in close proximity. There is going to be capacitive and inductive coupling between them. Didn't you say there was some correlation between taking out the switching delay and the problem getting worse? Transistors can have a lot of gain at low current, and it doesn't take much current to light up an LED enough to see it.

There is also the matter of Collector to Base capacitance. So switching the voltage on a transistor Collector with the Base unconnected can cause a short burst of current to flow.

You should be able to simply connect a resistor from the Arduino pins to ground. Fairly simple to add.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Vinter

#32
Aug 18, 2013, 05:42 pm Last Edit: Aug 18, 2013, 08:08 pm by Vinter Reason: 1

Remember, you've got a lot of wires in close proximity. There is going to be capacitive and inductive coupling between them. Didn't you say there was some correlation between taking out the switching delay and the problem getting worse? Transistors can have a lot of gain at low current, and it doesn't take much current to light up an LED enough to see it.

There is also the matter of Collector to Base capacitance. So switching the voltage on a transistor Collector with the Base unconnected can cause a short burst of current to flow.

You should be able to simply connect a resistor from the Arduino pins to ground. Fairly simple to add.


Connecting the resistors between the pin-connection point and ground would save me from desoldering the whole thing but is it the same as connecting them between the base-connection point and ground ?
Also is 10k a good value for them ?

MAS3

I'd solder them as close to the transistor as possible, but most important is to have them in there.
I'm assuming you have built a test setup, which often means sloppy wiring.
That again doesn't help preventing interference.

If you have 10K resistors available, you could consider putting 2 of those in series to get 20K and be closer to Mike's value (remember that is based on his extensive experience).

If you are asking for help, try to do what what the helping answer is telling you instead of doing something similar but not the same.
After your problem has been solved, you could try your alternative to see if that would work as well.

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

Vinter


I'd solder them as close to the transistor as possible, but most important is to have them in there.
I'm assuming you have built a test setup, which often means sloppy wiring.
That again doesn't help preventing interference.

If you have 10K resistors available, you could consider putting 2 of those in series to get 20K and be closer to Mike's value (remember that is based on his extensive experience).

If you are asking for help, try to do what what the helping answer is telling you instead of doing something similar but not the same.
After your problem has been solved, you could try your alternative to see if that would work as well.




Don't bite me , I don't have enough resistors which is why I asked. Btw why is 20k needed ? Saves some power but wouldn't 10k work just as well ? Advice is great, I just like to know how things work and why I should do something instead of another.

MAS3

I don't know why 22K would be better than 10K.
But in this case i would take any advice as is from a lifetime experience like Grumpy_Mike has to offer.

If you want to learn, put in an order for a bunch of 22K resistors, and 10K as well.
These are inexpensive and you don't need to feed them before you're going to use them in a next project.
Then solder your 10K's that are available at the Arduino side and see if this will solve your problem (either completely or not), or if this creates another one.
After that you could try soldering them at the transistors and see if something changes.
After the new resistors arrive, exchange them and see what that does.
That will be some work, but you'll learn something.

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

polymorph

I suspect that 10k or 22k would work fine for this. And soldering them from the Arduino pins to ground should be fine. As MAS3 says, if it is easier, try it that way first and see if it solves it.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Vinter

#37
Aug 20, 2013, 01:06 am Last Edit: Aug 20, 2013, 09:44 am by Vinter Reason: 1
I tried with a 10k pull down resistor but it didn't work. Now whenever I write a high while all others are in input mode,the WHOLE column lights up. What's the minimum current that a low power led can be lit with ? If the current between the emitter and pull down resistor's ground is high enough, then whenever I activate a transistor, the whole column will be lit. How do I go from here on ?

(I did try with 20k resistance too)

dc42

Looking at that circuit, I think it is inevitable that you will get spurious low-intensity illumination when using RGB LEDs. In order to not get any spurious illumination, it is necessary that for any 2 LEDs in the matrix, where the cathode line of one is driven by the same pin as the anode line of the other, the forward voltage at low current plus approximately 1.2V must be less than the supply voltage. If you have two red LEDs connected in this configuration, then it is unlikely that you will have met that condition. Even one red and one green might not meet that condition. This type of problem is mentioned at http://en.wikipedia.org/wiki/Charlieplexing.

If this is the cause of the spurious illumination, then I think you should find that when you only light up green and blue LEDs, the only spurious illumination comes from red LEDs; and that lighting up red LEDs causes more spurious illumination.

A possible fix (you're not going to like this) would be to add a 1N4148 or similar silicon diode in series with every red LED in the matrix, to increase the effective forward voltage of the red LEDs.
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


Looking at that circuit, I think it is inevitable that you will get spurious low-intensity illumination when using RGB LEDs. In order to not get any spurious illumination, it is necessary that for any 2 LEDs in the matrix, where the cathode line of one is driven by the same pin as the anode line of the other, the forward voltage at low current plus approximately 1.2V must be less than the supply voltage. If you have two red LEDs connected in this configuration, then it is unlikely that you will have met that condition. Even one red and one green might not meet that condition. This type of problem is mentioned at http://en.wikipedia.org/wiki/Charlieplexing.

If this is the cause of the spurious illumination, then I think you should find that when you only light up green and blue LEDs, the only spurious illumination comes from red LEDs; and that lighting up red LEDs causes more spurious illumination.

A possible fix (you're not going to like this) would be to add a 1N4148 or similar silicon diode in series with every red LED in the matrix, to increase the effective forward voltage of the red LEDs.


The thing that confuses me is that per column , the common anode and each cathode are completely seperated. The wiki example follows a different logic by taking advantage of the voltage drops. I don't get how a led can illuminate without supplying it's anode with a voltage AND diving it's cathode to ground.

dc42


The thing that confuses me is that per column , the common anode and each cathode are completely seperated. The wiki example follows a different logic by taking advantage of the voltage drops. I don't get how a led can illuminate without supplying it's anode with a voltage AND diving it's cathode to ground.


The current path is this:

Active high pin -> transistor base -> transistor emitter -> LED and resistor -> floating pin -> transistor base -> transistor emitter -> LED and resistor > active low pin.

Total voltage drop = 2 LED drops + 2 emitter-follower transistor drops + resistor drops.

It's also possible that capacitive pickup on the wires attached to the output pins is causing the problem, as has already been suggested. The problem with a pulldown resistor to ground is that it will pass current to the cathode lines, causing the LEDs to light up a little. To avoid that, you could try using higher value pulldown resistors (e.g. 100K), or using both pullup and pulldown resistors, e.g. 22K to ground and 27K or 33K to +5V.
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



The thing that confuses me is that per column , the common anode and each cathode are completely seperated. The wiki example follows a different logic by taking advantage of the voltage drops. I don't get how a led can illuminate without supplying it's anode with a voltage AND diving it's cathode to ground.


The current path is this:

Active high pin -> transistor base -> transistor emitter -> LED and resistor -> floating pin -> transistor base -> transistor emitter -> LED and resistor > active low pin.

Total voltage drop = 2 LED drops + 2 emitter-follower transistor drops + resistor drops.

It's also possible that capacitive pickup on the wires attached to the output pins is causing the problem, as has already been suggested. The problem with a pulldown resistor to ground is that it will pass current to the cathode lines, causing the LEDs to light up a little. To avoid that, you could try using higher value pulldown resistors (e.g. 100K), or using both pullup and pulldown resistors, e.g. 22K to ground and 27K or 33K to +5V.


Isn't the path output high pin -> transistor base and then collector -> led and resistor -> output LOW pin.

Why would the current go to the high impedance input pins ?

dc42


Isn't the path output high pin -> transistor base and then collector -> led and resistor -> output LOW pin.


Yes, when I said base->emitter I was meaning that the base current causes an emitter current, most of which which actually comes from the collector. Sorry if I wasn't clear.


Why would the current go to the high impedance input pins ?


It doesn't go into the input pins. It goes from the cathode resistor to the base of the transistor that is connected to the same pin. The point I was trying to make was that the pin connected to that junction is not configured as an output.

So what we have is a small amount of current going from the emitter of a transistor that has been turned on, through a first LED/resistor that is supposed to be off, feeding into the base of another transistor (that is supposed to be off), which in turn causes a larger current to flow from its emitter through a second LED/resistor that is supposed to be off. Even if the current flowing through the first LED is too small to make it light up, the amplification by the transistor will provide a much larger current for the second LED.

Pulldown resistors on the pins will help by diverting some of the current away from the base; but as you have already observed, too low a value for the pulldown resistor will provide enough current for unwanted LEDs (the "first LED" in my example above) to light up to some degree.
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

#43
Aug 20, 2013, 01:42 pm Last Edit: Aug 20, 2013, 02:03 pm by Vinter Reason: 1


Isn't the path output high pin -> transistor base and then collector -> led and resistor -> output LOW pin.


Yes, when I said base->emitter I was meaning that the base current causes an emitter current, most of which which actually comes from the collector. Sorry if I wasn't clear.


Why would the current go to the high impedance input pins ?


It doesn't go into the input pins. It goes from the cathode resistor to the base of the transistor that is connected to the same pin.

Doesn't there have to be a ground for the current to flow ?


dc42


Doesn't there have to be a ground for the current to flow ?


The current goes to ground via the output pin that is driven LOW.
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.

Go Up