You should also put them in a matrix to reduce the number of pins (and wires) required.
You should also put them in a matrix to reduce the number of pins (and wires) required.
I thought of a matrix, but my code might become very complex so I'm trying to keep the basic structure as simple as possible.
That and I have the pins available.![]()
Figured out how to have same current at the LEDs no matter how many are used; set pin even if bit received from Master is a 0. So now it always take the same amount of time to go through the loop. Post is updated:
http://www.picbasic.co.uk/forum/show...843#post124843
Used NPN 2N2222 transistors to drive the LEDs. So now I've moved the problem of the PIC having a pin frozen ON, to a transistor frozen ON. Not enough experience to know if it is worth the extra parts.
Transistors do bring another problem, it now takes a 100mA to drive all LEDs ON; a lot more than using the pin to LED to 0VDC technique. I don't know enough about transistors; I'm guessing it has something to do with switching times, I must have more than one still leaking current even if the PIC decided the pin is at 0VDC. LED loop is now running at 668 Hz according to Saleae probe.
I have no experience using LED driver ICs (none on hand). I have to research those; they must bring in safeguards and fewer parts count into the picture. Is one more interesting in particular?
The system will never have 32 LEDs ON, that was a stress test. Only one side can be lit at any one time, and that's if I disabled the zone or the zone is open; highly unlikely all 15 rows will be ON. SO current will not really be an issue, I was just hoping to get it as efficient as possible.
Also, the panel won't be active all the time. You'll have to press the * on the keyboard, that will help conserve current when using battery mode even more.
Robert
Sidenote: I had one LED that was always dimmer than the others. I changed pin, LED, even the transistor, no difference. Turns out the 4K7 resistor was way off (gold tolerance), replaced and LED now same as others. First time I get one of those that is so far off that it affects LED brightness this much.
Last edited by Demon; - 6th January 2014 at 07:19. Reason: Hertz
Great bi-directional multiplex design here:
http://www.picbasic.co.uk/forum/showthread.php?t=14439
Only 5 pins to drive 16 LEDs.
Woot!
Robert The Happy Camper
![]()
Last edited by Demon; - 12th January 2014 at 00:21.
CURRENT SAVING UPDATE
Transistors are out, back with current limitting resistors and ultra bright LEDs.
Tested using AR813 Lux Meter.Old "frosted?" green 5mm LED with 330R: 40 LUX using 9mA
New clear ultrabright green 5mm 10000 MCD LED with 1K at 90Hz: 40 LUX using 0.053mA
Robert
Last edited by Demon; - 23rd January 2014 at 04:32.
Bookmarks