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.

individually addressable lights

Status
Not open for further replies.

computer

New Member
hi,

I need to have some LEDs that are individually addressable on no more than 4 wires between LED. They will be seperated and I need a bus type configuration rather than a star configuration...

I need help with a simple circuit to attach to each LED which will get +5v and GND through two wires and the other two for data probably.

I've been told a something stable would work. I want to keep each individual LED's circuit as cheap and simple as possible. I will be using a PICAXE to control the LEDs through the two datalines if I can depending on the system I work on.

Help/ideas/diagrams are all appreciated...
 
i don't understand the problem
- how many leds?
- how many picaxes? (only one)
- what do you meen 4 wires "between LEDs"? you want 4wire connection from one location to another (with another groups of 4wires going to other places) or 4wire bus?

if you want to have few LEDs away from picaxe and if you want no more than 4wires between them you can try couple of methods but i would suggest to:
- use group of LEDs and 4 resistors (wire LEDs in a matrix)
- use another chip(s) like picaxe for example. make them LED driver and use the 4 wires for RS422 or 485 to address different nodes.
 

Attachments

  • led_matrix.jpg
    led_matrix.jpg
    15.9 KB · Views: 1,114
How about doing it with only 3 leads?
Try using a 74HC595 serial to parallel shift register. All you need is 1 data line, clock, and latch from the PIC. Shift out the 8 bit data word to the register, latch it then use its outputs for the individual LED's. If you need more than 8 bits, simply daisy chain the carry out from each 595 to the data in of the next 595, then shift a longer data word tru the registers.
Nice, clean and simple
Dialtone
 
I only want one picaxe controlling the circuit and 4 wires from the picaxe to the first led, to the second, etc..

the shift register sounds like a good idea but I'd assume it would use 8 outputs which means I'd need to group LEDs into 8 (well 7 really for daisy chaining).

how much would the shiftregister method cost and would it require lots of external components?
 
Shift register chips will drive 8 individual LED's and should only need a current limiting resistor for each LED, so cost should be cheap. I saw where the register chips can be purchased for aroung USD $1.39 each. Search around and probably available for even less.
Grouping the led/ shift registers makes since to keep the LED lead lengths down, but the shift registers themselves can be spaced out from each other somewhat to form a longer serial type bus, but it will have some length limits depending on the speed of data transfer due to the capacitance in the longer bus wires and voltage drops involved.
Your original post did not state how many LED's were needed, or the spacing involved, so that is about all the help I can provide for now.
Dialtone
 
I'm looking at 30 total LEDs spaced out about 20m total length. Well, I'm kind of lying really, we have some leds fitted in those halogen downlighters and I'm rigging this effect up for stage effects use so there are more than 30 LEDs, but I mean 30 Channels so to speak. I'll be running 12v power and ground to each fixture in a seperate wire and using transistors to power the LEDs. I suppose working in 8's might work - just means more cabling :p

How complex is the code to control these registers though? I want to be able to do chases up and down the LED fixtures and other random effects and stuff.

edit:

I have found some code here for a picaxe.
 
Code should no be too difficult. Remember, you only have 3 ports on the pic to administer. The data stream is a bit by bit digital representation of the on/off state of each control points., and its length is dependant on the number of control points built. The clock lead is just that, and is activated for each bit being send. Finally, the latch is activated once all data bits are sent out to latch the data into the output registers. So your program will look something like this sequence:
1. Place data bit 0 on data bus lead
2. Toggle clock lead
3 repeat steps 1 $ 2 for all remaining data bits
4. Toggle Latch lead
Keep in mind that the output points do not change state till the latch is toggled, so the change looks immediate.
You can pre-build a data matrix with the desired effects then simply shift the info out to the latches when called for.
Using the shift register approach means that to change 1 bit's output state, all data bits must be re-sent. Even doing this, it will be so fast you cannot tell that it is happening in a serial fashion, and is capable of handling rapidly changing effects.
Dialtone
 
ok sounds good.

would something like this (p# 3166028) be the correct thing?

Also, if I use a standard transistor (NPN?) and supply a PWMed signal as the input (Base?) with the shiftregister output as the signal one (collector?) and then the group of leds connected to the output would that work, or should I use an AND gate?

this'd allow me simple master dimming of all the fixtures.

computer
 
That part is the one. In fact any of the chips 74LS595, 74HC595, 74HCT595 should do what you want.
At best, each 595 output is only capable of driving a single LED. Since you want to drive more than 1 with each control point, Look into using a ULN2803 series (8 bit relay driver chip). It can handle higher current loads, will work on the 12VDC you will use at the LED arrays, and directly interface the 595 chip outputs. If you use 12vdc at the LED's you can series 3-4 LED's together thru 1 current limiting resistor to the ULN2803 driver. If you need more than that, tie several inputs to the ULN2803 together and drive from a single 595 output pin source. Much more simple (and probably cheaper) than 8 power driver transistors. There are several posts in the forums here on driving LED's and current limiting resistor calculations, along with some good advice on the DO's and Dont's involved.
Dialtone
 
Makes me wonder - I'm visiting Hong Kong at the moment, and one of the buildings in Central has a matrix of small lights up the entire height of the building, each of which can be turned on/off and change colour individually. I wonder what sort of system they use to control it?
 
you mean this (3187032)?

I'd prefer though to use big transistors probably because I may in the future control larger loads and a transistor will allow me that methinks. I also may run on 24v I haven't decided yet.

Ideally, I'd like to use standard dichoric 12v halogen downlighters but I don't think they'll last long in fast flashes, etc.

Ben
 
Hi again,

I've been working out a PCB design - Its a pity I can't get it to single layer but this is the easiest way. I'ma going to get it made at a local shop with a milling machine who'll do it for me (they've done before and I'm pleased with the results).

I've decided to use the transistor arrays - can you please check for me if possible the pins are correct. The two connectors at the top are in/out connections. I'm now using 8 core multicore wire wired to DIN connectors. I am doubling up the transistors too so I hopefully can have 1 amp per channel maximum. The two big transistors are amplifying a PWMed signal from pin 4 so that I can (somewhat crudely) dim all the channels as a master dimmer. Pinout as follows:
1) +5v
2) GND
3) +12v
4) PWM (@ 5v)
5) Clock Signal
6) Latch Signal
7) Serin (With pin 7 on other connector as Serout)
8) GND

I will work a design for the control PCB later on tonight.

I hope that looks ok,
computer

note: the sqare pads on the ICs represent pin 1.
 

Attachments

  • final_design_210.jpg
    final_design_210.jpg
    57.2 KB · Views: 862
Hi! I see I'm a little late in posting a reply here! I do need to ask though if anyone has gotten this to work or if there's any other ways of doing this rather inexpensively? Also, if you (computer) have your final pcb layouts without silkscreen layers, that would be great!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top