Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Led Cube 4x4x4 using PC's parallel output port only

Status
Not open for further replies.

Alek

New Member
Hi guys.

Lately I want to make a led cube, something small 4x4x4 - 64 LEDs total.

I want to control it using only the outputs (8) of the PC parallel port so I can program the code on the PC directly, so no microcontrollers involved.

This is my plan so far :

I will make the matrix with 3mm diodes (or 5mm if I can't find 3mm ones) and to it I'll bring (to a LED in it I mean) +Vcc from the 16 lines that will be at the bottom and I'll drain the voltage (GND) from the 4 lines connected to each floor of the matrix.

For controling the voltage to the 16 inputs of Vcc and the 4 outputs of Vcc (connected to gnd) I plan on using 16 / 4 2N2222A transistors ( I hope they can keep up for the current that the LEDs will consume).

I plan to use a 4 to 16 decoder which will have pins A,B,C,D connected to the output of the PC's parallel port and its 16 outputs to the corresponding transistors (through a resistor) of the 16 Vcc inputs.

for the control of the floors I plan on using a 3 to 8 decoder connected to the corresponding transistor (R again) to the 4 transistors that will control the connection of the LEDs to GND.

Both the 3-to-8 and the 4-to-16 decoders will be non-inverting. I was thinking of using 74HCT4514 for the 4 to 16 decoder and CD74AC238 for the 3 to 8 decoder.

I also plan on putting resistor on the Vcc 16 matrix, between the emiter of the 2N2222A transistor and the connection for the 4 LEDs connected on that connection.

For programing I'll use the technique of fast-blinking so I can create images while not messing up with the rows/columns and ending up getting the matrix to light like a Christmas three.


Is my plan good, if its not, what does it need ? Any ideas of improving it ? Just keep it in mind that there will be no PIC involved. Hence, if I'm able to make it with the PC's parallel port shirley I can adopt the cube for a PIC afterwards.

Thanks in advance,
Aleks.
 
Look into the MAX7219/7221 another poster is using in his illuminated guitar fretboard project. It can control/drive 64 led's per chip. Just send it data from your parallel port.

Jeff
 
The thing is that I don't want to have 65 lines going from an IC :) Less lines, more elegant. If it was for individual control I would've hooked up a 8-to-256 decoder and made a light show :) Thanks for the idea though
 
Last edited:
That's the nice thing about the MAX7219. It's a matrix ... only 16 lines are required - 8 rows x 8 columns.

Jeff
 
Well Jeff, this is going to be a cube, width, length and height (3D) not a matrix (2D). I hope we understood each other :)

Poi.
 
Well Jeff, this is going to be a cube, width, length and height (3D) not a matrix (2D). I hope we understood each other :)

It makes no difference, it's probably easier to connect the LED's as an 8x8 matrix (same 64 LED's), physically wire the LED's as 4x4x4 and deal with the 3d aspects in the software.
 
Hm... you might be right Nigel, I'll give it a thought.

I'm more interested in the question "will this work" considering the transistors and controling them with the controler.
 
I understood what you were saying. A cube like you've described is simply a three-dimensional matrix, essentially 4 "decks" of 16 leds each. The point I've tried to get across is that a one-chip solution with one resistor and 16 control lines will be considerably less wiring than 2 decoders, 20 transistors and 40 resistors. If you prefer to do it the more difficult way, best of luck. I'm sure you'll make it work.:)

Jeff
 
Hm... you might be right Nigel, I'll give it a thought.

I am, you need to think of it differently, there's no reason for it to be electrically a cube, and lot's of reasons for it not to be.

I'm more interested in the question "will this work" considering the transistors and controling them with the controler.

It's far more complicated (and expensive) than it needs to be, 8x8 is much simpler and cheaper.

How bright do you want the LED's?, my PIC tutorial drives 64 LED's without any drivers, and is perfectly bright enough.

Using a slightly larger PIC (because the 16F628 I used has no spare pins left) is probably your simplest and cheapest solution, with a single serial feed from the PC telling it what to display. The PIC will take care of all the multiplexing, you just need to send data changes from the PC.

Depends really if this is something you want to build, or if it's a school poject that you have to build using hardware.
 
You got me thinking :) I'm looking over the MAX7219/7221 data sheets right now and I'll try to think of a way to use the MAX chip. You are right, it will be hell easier =)
 
Nigel,

I'm not familiar with PICs that's why I don't one included in the project. I want to make it controlable only with the PC's parallel port.

Jeff,

As far as I can see the MAX chip is serial controlled chip, not quite sure how will I be able to control it with a serial line.

Do you have any sample circuit using the MAX chip ? I will try to design the matrix like being a 8x8 2D matrix.


Well... I spent some time thinking and I just can't find a way to use the MAX chip. From the data sheet I just can figure out how can I control the SEG and the DIG lines individually. I see that I can control them in order for it to control a 8-digit LED display but I'll be needing to control each output separately AFAIK. Little help about the MAX chip ?

10x in advance.
 
Last edited:
The 7219 gets it's data via 3-wire synchronous serial connection. The PC or microcontroller is used to format the data stream into something the 7219 can understand. If you can write software which can control the parallel port of your PC (I assume you can), that will be what is used to communicate with the 7219. That is, unless you decide to go the microcontroller route which Nigel suggested. The serial (RS232) port of your PC is not used in this method.

The 7219 uses three signals: data, clock and load. I would use one of the parallel port's bits as "data", another as "clock" and a third as "load". The data is shifted to the 7219 in 16-bit packets.

Basically, assert the data line with the bit (high or low) that you want to send, toggle the clock bit and after the 16th data bit has been sent, toggle the load bit to load the data into the 7219's internal registers.

You will have to preset the state of the 7219 using some control commands (brightness, decode mode, number of displayed digits, etc) before you can send it data, but once your software is written to shift the data out from the PC in the appropriate fashion, that won't be difficult.
 
Last edited:
I built the cube as I mentioned above with 20 transistors, now my problem is to getting it to work. The 16 transistors that are controlled by the decoder (CD4514) work perfectly and I have around 4.20V up on the LEDs anode. The problem is when I get +5v to the base of the 4 transistors that are meant to control the GND to the four levels, I don't have a flow of current and he LED doesn't light up.

When I measure the potential from the cathode of a led to GND I get around 3.3/4 Volts. Is it that I'm giving 5V to the level control transistors that they don't let current flow from collector to emiter ? I have the level control transistors hooked like this:

I connect the collector of a transistor to the corresponding level on the cube and I have the transistor's emiter connected to GND. For activating I bring +5V stable on the base.
 
I built the cube as I mentioned above with 20 transistors, now my problem is to getting it to work. The 16 transistors that are controlled by the decoder (CD4514) work perfectly and I have around 4.20V up on the LEDs anode. The problem is when I get +5v to the base of the 4 transistors that are meant to control the GND to the four levels, I don't have a flow of current and he LED doesn't light up.

When I measure the potential from the cathode of a led to GND I get around 3.3/4 Volts. Is it that I'm giving 5V to the level control transistors that they don't let current flow from collector to emiter ? I have the level control transistors hooked like this:

I connect the collector of a transistor to the corresponding level on the cube and I have the transistor's emiter connected to GND. For activating I bring +5V stable on the base.

hi Alek,
I still cannot find your circuit, it would help 'a lot' if you posted a diagram showing how it is connected, then we can sort it out.:)
 
Last edited:
**broken link removed**

All the collectors of the 16 transistors are connected through a 1k resistor (individually) to +5V.

The bottom 4 transistors are the level control ones, their collectors are connected to the corresponding level of the cube and the emiter is connected to GND

sry for tha bad schematic, I done it in a hurry. Hope it helps.
 
All the collectors of the 16 transistors are connected through a 1k resistor (individually) to +5V.

The bottom 4 transistors are the level control ones, their collectors are connected to the corresponding level of the cube and the emiter is connected to GND

sry for tha bad schematic, I done it in a hurry. Hope it helps.

hi alek,
Looking at the drawing its still not clear how everything is interconnected.

Put on the missing wires and I will look again.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top