ShiftPWM support topic. Latest update: Schematics, high power LED's, LED strips

elcojacobs:
Yes, that is correct, that is how the code is written at the moment.

I changed the layout, because this made a lot more sense with the my hardware. I will have to update the code to support my new setup.
I don't think it would have been possible to route the board without the colors separated.

I routed mine that way.....

And btw, how the hell do you route a PCB without the air wires guiding and not make mistakes?

Very carefully! :wink:

I just arrange the parts in a logical way (schematic-like), click to connect the nets, then I arrange them in a way that makes sense for the layout. The "rubber band" nets are defined, so it's pretty easy to avoid routing errors. The software I have is an ancient program I got a long time ago, so it has some limitations since I don't have a full package.

elcojacobs:
What do you think of the new safety circuit?

I am a little concerned about the capacitive load it places on the row latch signal. Isn't that the equivalent of 1 uF in series with a diode to ground, or basically 1 uF capacitive loading for the rising edge?

Do you have means to test it?

I might have some SCRs laying around somewhere? They're probably not the same part number.

Would the original circuit work if the capacitor were smaller? You're going to be latching a new row pretty quickly, like at least 200 Hz, right? Maybe a 22 nF or 47 nF capacitor and 1M resistor could work?

I think you might be right about the capacitor needing to be smaller. The 1u was from when I was still using a transistor. It should only be enough to trigger the thyristor, so I guess 47n would be fine. I think you only need to change C1. The 100k is needed to pull up the OE pin.

If you could test it that would be very helpful. I have just routed the board for the new layout. It is getting really crowded, was a big puzzle to get everything to fit on the 60x60mm board without completely re-aranging things.

I'll wait on your test before sending the board to lean. Best would be a logic level thyristor, because the gate trigger voltage should not exceed 1V.

New layout:

I found my supply of SCRs... an unopened bag of 200 pieces of part number 519-S401E from Mouser Electronics, and a dozen or so loose parts, all with EC1030 printed on them. Or maybe the last "0" is a "D", which would make then EC103D, which is actually a SCR part number I can find! I could not find any info on the 519-S401E. Looks like Mouser doesn't carry them anymore.

My google-fu brought me to this:
http://www.datasheetarchive.com/dl/Datasheets-35/DSA-699163.pdf

Seems like an SCR aimed at a bit higher voltage, but it might stay under the switching treshold of the 595.

I am looking into the teensy++ as a candidate to drive the matrices. The atmega328 has only 2k of SRAM which is not enough if you want to control 10 8x8RGB matrices. The Arduino Mega is overpriced an unnecessarily big.

I hooked up the SCR circuit, with the EC103D, 2 capacitors and 1 resistor. The SCR never seems to trigger.

I tried posting a moment ago with a photo, and the "upload folder is full", and my entire message was lost. Grrrr! Will try again in a moment to get the photo up.

It's times like these I really want to buy one of those extremely expensive wide bandwidth current probes....

I guess I might be able to connect a low-value resistor in series with the 1 uF capacitor on the gate and use differential mode to try looking at the current?

Hmm, maybe the current pulse is too short to trigger the SCR?

I'll buy some logic level SCR's and have a go at it myself as well.

I tried a test pulse, 2 ms low, 20 ms high. The SCR still would not trigger. It might be a bad SCR or other mistake on my part, but the only thing I can confirm for certain is the setup on my desk (same as the photos above, but running the code below) is not triggering.

void setup() {
pinMode(8, OUTPUT);
}

void loop() {
digitalWrite(8, LOW);
delay(2);
digitalWrite(8, HIGH);
delay(20);
}

This works, even with a 1 microsecond pulse :slight_smile: Boards will be sent to Laen tonight.

Edit: Okay, it almost works. It can get in a stuck in a state where the SCR is half open and the capacitor stays at 1.25V. The drain of the BS250 stays at 0.68V in that case. Suggestions to fix this are welcome.

Edit2: Fixed with a resistor from the SCR gate to ground :slight_smile: Boards will go to Laen today!

Just for fun, I got your library working with Vixen (www.vixenlights.com). It is working fine on my chain of 56 RGB LEDs except something is wrong with channel 99 but I'll fix it later. Using your library to control a Christmas Light show may be on my list next year.

Ok, so I don't know if this pertains to the ShiftMatrixPWM, but I need some electrical engineering help. This is my first engineering project period.

To clarify the project a bit, it is a Word Clock with 13 columns * 8 rows = 104 led

All led are RGB.

So far I'm in the led soldering stages. I've attached a rough sketch on how I think I should solder them together(attachment 1). On arduino's site they use a STP16C596 for shifting, with 2 registers they run 16 LED's, but can I would have to divide that by 3 if I'm thinking correctly. Right now I'm asking how to wire them, I could go every separate every led with rgb out, hence if wired like above i could control 5.33 per 2 shift registers. The alternative is wiring series/parallel (attachment 2), but I'm assuming there would be some voltage drop. Please let me know what you guys think.

Screen shot 2012-01-23 at 1.22.22 AM.png

That LED connection will work great if all 6 LEDs are red and the power supply is a well regulated 5 volts, and you wire the LEDs always-on connected directly to the power.

Blue LEDs typically have a forward voltage between 3.2 to 3.6 volts. Some green LEDs are about 2.2 volts, but others (the really bright ones) are closer to 3 volts. Check the specs, or just run 20 mA through your LED and measure the voltage. Always remember each color is different.

USB power is typically about 4.9 volts from a PC, or 4.7 if using an unpowered hub. Some USB cables use #24 wire, but others use #28 (the smallest officially allowed by the USB spec) or even smaller. If you draw substantial current, plan on some voltage loss in the cable.

If you want those 6 LEDs to actually turn on and off somehow, they'll need to connect to a transistor, or a chip which uses a transistor to conduct the full current. Mosfet transistors have an on-resistance which will effectively be in series with your LED resistor(s). Bipolar transistors have a minimum saturation voltage while conducting substantial collector current. Either way, the net result is your LED array doesn't get the full 5 volts (or 4.9 or 4.6 or whatever your power actually is). Some is lost across the transistor.

If you plan for things to work properly range of power supply voltage, perhaps 5.2 to 4.6, and you calculate things with the actual LED forward voltage and approximate transistor properties, it may not look as pretty on paper, but you'll probably be much happier when you actually build it.

They are not all red. I drew the Series/Parallel (figure 2) based just upon the red.

RED: Typical: 2 V Max: 2.4V
GREEN: Typical: 3.4 V Max: 3.8V
BLUE: Typical: 3.4 V Max: 3.8V

Elco, any chance I could talk you into including pinout defs for Teensy boards in your next version? Here's the file.

http://www.pjrc.com/teensy/beta/pins_arduino_compile_time.h

Hi Paul,

I sent you an e-mail about the Teensy 12 days ago, you must have missed it.
I have ordered a Teensy++ to develop the matrix code, so Teensy support will be taken care of.

Elco

Opps, yeah, I see it now. Looks like I'm pretty behind on email... but I've gotten a lot of coding done lately! :slight_smile:

i am planning to build a 7x20 rgb matrix. would your library be able to handle such a "big" matrix?
if yes, how would u setup it, so it would give the best results? i thought of multiplexing it so i could have 7 rows a 20 Leds a 3 Colors, but then i would need 4.2 A since i want to power each ledcolor with a pulse current of 80mA.. (is this value realistic? i just want my leds to be bright :slight_smile: ) how many "steps" could i get with pwm to conroll the color?

thanks for your help :wink: