4096 LED sensor/display

wilf_nv

Senior Member
Scaling the Hex Led Sensor circuit, discussed earlier, to control a large array of LEDs for active mirrors, etc is not practical.

With 10ms sensing times for each LED sensor input, multiplexing is not an option for reason of excessive flicker. And using a 18X for each 6 LED sensors would quickly run into $$$ for large display.

The physical bidirectional I/O function of the PICAXE to interface the LED sensor / display can be easily duplicated in discrete CMOS logic as shown here:

<A href='http://www.user.dccnet.com/wrigter/picaxe/ledsensordisplayv2.gif' Target=_Blank>External Web Link</a>

I have tested this design with two 74HC374 octal registers. Each register controls 8 LEDs and a single 08 picaxe can provide all the timing signals for as many registers as needed.

This design is scalable to virtually any size with no timing penalties and can be expanded to control a very large array of LEDs. In this design, the LED sensor to LED display conversion is processed by the registers themselves. The picaxe can only adjust the sensitivity of the threshold.

For a large instalation, the physical design of the circuit can be modular.

PCBs that are 4&quot; x4&quot; with eight 74HC374 chips controlling 64 LEDs in a 8x8 array spaced on 0.5&quot; centers would be practical.

Each module would cost approximately $15

A mirror of 64 x 64 LEDs (4096) would be a respectable 32&quot; x 32&quot; and would require 64 modules all connected to a 3 wire bus which can be controlled by a single PICAXE 08M for this simple mirror application.

Alternatively each module can be separately controlled by a 08 or 08M which allows modules to be used in complex feedback installations in which multiple small mirrors reflect each other to generate recursive dynamical LED Display patterns.

With a modest 5 mA per LED and the typical 50% sample/display dutycycle, each module requires 5V @ 170mA.

For the large mirror a 10 amp power supply is required for all LEDs on.

wilf

Edited by - wilf_nv on 14/01/2007 09:37:17
 

jodicalhon

New Member
Hi Wilf, this is very interesting.

Should there be a 'low ANODE' command prior to the 'pause THRESHOLD' command in your program's mainloop?

 

wilf_nv

Senior Member
good eye acrylic! The code got somewhat lost in translation trying to squeeze it into the graphic. I have corrected the code in the schematic.

I have also reproduced it here with one additional initialization line :

<code><pre><font size=2 face='Courier'>high ANODE ;ANODE set high for 1st loop </font></pre></code>

This is not actually needed for an endless loop but it make the code easier to read.

Without it, the code converts correctly from the second loop on as ANODE is high (carried forward from the end of the first loop) during the first pulsout clock,1.


<code><pre><font size=2 face='Courier'>
;08 CONTROL PROGRAM FOR LED SENSOR/DISPLAY
;74HC374 for LIGHT = LED ON (POSITIVE IMAGE)
;wilf rigter - 13/01/07

symbol CLOCK=2 ;register CLOCK
symbol OE=4 ;register output enable
symbol ANODE=1 ;common anodes of LEDs
symbol THRESHOLD=10;LED discharge time constant

;initialize

low CLOCK ;clock low
high OE ;register outputs disabled
high ANODE ;ANODE set high for 1st loop


mainloop:
pulsout CLOCK,1;register bits = high
low ANODE ;anodes low to reverse bias LEDs
pulsout OE,1 ;register outputs pulse high
pause 10 ;compare LED TCs with THRESHOLD
pulsout CLOCK,1;register bits = register input
high ANODE ;forward bias LEDs
pulsout OE,1000;turn on LEDs with bit = low for 10ms
goto mainloop ;repeat

</font></pre></code>

Thanks again for the feedback

wilf


Edited by - wilf_nv on 14/01/2007 18:11:01
 

jodicalhon

New Member
You're welcome, Wilf.

A quick hardware question, if I may.

What is the purpose of the 100k resistor across the base-emitter junction of the MPSA13? What alterations to the transistor's biasing resistors should I make if using a BC548 or equivalent - (obviously driving less LED's)?

edit: (...quick hardware questionS...)

Edited by - acrylic on 15/01/2007 12:25:44
 

wilf_nv

Senior Member
For a small scale demo of one 74HC374 and eight LEDs, I would use a more conventional anode driver design:

Just limit each LED current with a 470 ohm resistor in series with the anode and drive the common other side of the resistors directly from the Picaxe output since the maximum anode current is limited to about 25ma.

You can use a resistor network (resnet) in a SIP instead of individual resistors to reduce the footprint.

Re your question about the base emitter resistor. This was required for the anode driver circuit I used for the 4096 LED aplication that was optimized to minimize parts count and cost.

During the conversion, the LED anodes must first forced to Vcc (to set the register=$FF) and then to GND to reverse bias the LED junctions. These two steps only drive the stray capacitance on the common anodes and the register inputs.

The picaxe output pin through the base and base-emitter resistors provides the path from the common anodes to Vcc and Gnd

During display, the picaxe drives the base of the Darlington transistor(s) high which supplies current from Vcc-Vce to the common anodes of each module. The Darlington Vce drop is approximately 2V and I use this to advantage to limit the LED currents without using a resistor in series with each LED.

The combined voltage drop of the red LEDs, the transistor Vce drop and the 74HC374 output impedance is just right to limit the LED current to about 5ma. A small adjustment of the +5V supply can be made to adjust all LED current.

I considered various other strategies for controling the ANODE current, this one saves 4096 current limiting resistors for this application.

The down side of this circuit is that Vce varies with Ic and there is some variation in LED brightness depending on the number of LEDs that are on.

For circuits that rely on the HCMOS output resistance for LED current limiting without LED resistors, the ideal ANODE switch is one that supplies regulated 3V to the ANODEs during display and GND or Vcc during sensing.

I would be interested in suggestions for other cost effective ways to limit the LED current.

wilf



Edited by - wilf_nv on 15/01/2007 20:04:23
 

premelec

Senior Member
Wilf... I wonder if you have looked at the great variety of LED driver ICs coming into play for cell phones etc. An example is the National Semiconductor LP3943 which I think has a simulator program available too... also LP3954. Even if you didn't want to use this sort of chip they might give you some ideas about how to do what you want...
 

jodicalhon

New Member
Thanks for the explanation, Wilf.

<i>...this one saves 4096 current limiting resistors for this application. </i>

That's quite a saving!

I'll be trying your design out later tonight.
 
Top