Line length / driver questions

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UPDATE: Video link of the projet on the second page!!!

Hi guys, I don't post much here, but read as much as I can!

This is my first electronics project (other than experiments in my workshop) and I have a total n00b set of questions to ask. Hopefully, this is the correct forum for them...

The project:

An expandable/programmable LED lighting system using modular lighting boards. Each lighting board contains a 595 shift register and 8 LEDs. This component is affectionately called a ‘jixel’. There are 36 ribs each containing 12 jixels(hopefully 14 when the project is complete). So, that means 3456 (4032) bits of lighting information per frame.

The upper-dome in this picture is where the system will live.

I’m using a Mega128 to translate data coming in on USART0 onto a 40bit bus (ports A,B,C,D,F). 1 pin for each rib (36 ribs), and 3 control lines(OE, SRCLK, and RCLK). Each rib of 595s has a maximum line length of about 18 feet - from the STK500/501 where the mega lives, to the last jixel on the rib. From the STK500 to the first 595 is ~ 11 feet. After which, spacing is ~ 5”. All components are connected using 10pin ribbon cable (3V+, 3GND, 1 data, 3 control)

The OE, SRCLK, and RCLK lines are shared across all ribs. The total line length for these control lines is ~650’ I assumed line length would be a problem due to the topology of the design... I did a line length test to see how far my testing jig (a Mega32) could reliably send signals. Turned out to be ~50 feet at a 2mhz clock.

So, onto the questions...

Question 1: Obviously I need to put something on each rib to keep the signals at a good level. Since I’m a total n00b, I’m not really sure what I can use here... Would a 74HC125 do the trick?

Question 1b: If a 74HC125 is the right solution to keep the line integrity, can I just tie the OE lines active and let the buffer sit inline transparently?

Question 2: Since the serial data goes from chip to chip, the serial line shouldn’t be an issue as long as it gets to the first 595 reliably. Is this a safe assumption? I’m going to drive the serial line as well, so this isn’t really an issue (i hope), just curious.

Question 3: Obviously running all of these LEDs will require a good deal of current. Does anyone have tips on hooking up the STK500/501 board/target chip to an external power supply? The docs say just to run power to the V+ GND pins. Anything more to it than that?

Last Question: Is this project freaky enough to qualify me as a true AVR Freak?

You can find out more about the project here: http://www.jellyfish12000.com

-Jeremy

I have too many hobbies.
s-conductor.com

Last Edited: Fri. Dec 14, 2007 - 05:09 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, this is way freaky enough!

Your tradeoff will be data rate vs distance. You don't say what clock rates you are trying to use. That would help.

Yes, if the data goes from chip to chip, using the output of the first to drive the data input of the next, the DATA should be good. Clock will be a bit more of an issue. You might use 74HC125 on the clock line.

No suggestions on the supply question.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well if you get Jim's approval you are definitely a Freak!
Sorry, I can only help with the Freak part of the questions.
John

Resistance is futile…… You will be compiled!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll pick up the power supply question then...

If I understand correctly, you're going to use about 4000 LED's? That's quite a few... :)
A common number when calculating with LED's is 20 mA current per LED, and a forward voltage drop of about 1,5 - 2 V for red ones. Total current consumption (for a parallel arrangement) would then be about 80 Amps! That's a whole lot of current! Total dissipated power is about 160 W, just for the LED's. You have to add the power dissipated in the current limiting resistors as well - if you're going to use those. Constant current generators might be worth looking into.

What's usually done when you have many LED's is to connect them in a parallel-series arrangement, which would lower the current consumption at the expense of higher voltage needed - which is usually no problem. But since you want to control each LED individually, this can't be done (I don't see any way at least).

I would section the LED's off, so that you don't have one massive power supply, but quite a few smaller. The problem then is that you shouldn't connect these in parallel. This in turn means that you'd have to interface the transmission lines somehow - usually using opto-couplers. If you don't, you're going to get some serious current flow in the transmission lines if the voltages don't match exactly - and they won't.
Opto-couplers might also limit the transmission speed - I don't know how fast they are.

Quite a freaky project, I'd say...

Just a stray idea: Perhaps you could put an ATtiny on each jixel (instead of the shift register), and use a High impedance input to read the transmission lines... that would get rid of the whole opto-coupler problem, at least... It would make the project way freakier too...
Trying to keep the voltage down (thus lowering power dissipation in the current limiting resistors), a Tiny 25/45/85 (and most others as well, I guess) can run at 10 MHz on 2,7 V, which would probably be fast enough, and the voltage drop on the current limiting resistors will be really small, just a volt or so - also good.

Updates on how it turns out would be really interesting!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using a string of shift registers in this application tends to be a little shakey. At a minimum, I would suggest you add buffers like the one you suggested or maybe a HC244 with a bit of series resistance on the output, say around 33R to slow the edges down a bit. Also, passing current down flat cable has to be done carefully as does high speed signals. The current carrying capacity isn't that great on the cable/connector system, so parallel up your power. With the signals, intersperse a gnd signal between each data/clock signal so you don't get coupling between adjacent signals.

Personally, I'd suggest using local AVRs to talk directly to the 595's and connect all these via RS485 and maybe implement a standard protocol like DMX512. Look at distributing your power at a higher voltage and have local regulation - at least for the digital stuff.
This way you've cut down the number of interconnects, enabled greater distances if required and by using a standard protocol, you can use third party software/hardware to talk to your stuff. The local cpus don't need too much grunt - something like mega16s at around $5 each will most likely do the trick.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course, Kartman! How could I miss DMX512? That'd be way cool too, since it would support controlled dimming of the diodes - but you would need an AVR on each jixel. :D

If you use DMX, you can distribute that from the "central" AVR down each rib, thus eliminating the whole parallell arrangement. Note that DMX has a limit of 512 units (in this case, a unit would be a single LED) per "universe", so you'd probably need a separate universe for each rib.
Hmm... you could probably squeeze it all into one universe too, since you can specify levels for each unit. With 255 avalible values, you can control 8 LEDs individually - though they might flicker a little, due to corruption of the signal.

If you're going to use higher voltage to pass down power to the jixels, you must use switched regulators, not the usual 78xx parts, since these just turn excess voltage to heat. You won't gain any current by using those (like you "normally" do when raising voltage), just generate a whole lot of heat.

I'm thinking while I'm writing - sorry if it gets confusing... :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Of course, Kartman! How could I miss DMX512? That'd be way cool too, since it would support controlled dimming of the diodes - but you would need an AVR on each jixel.

Not necessarily! But it is not unreasonable to have an AVR per jixel.

Quote:

If you're going to use higher voltage to pass down power to the jixels, you must use switched regulators, not the usual 78xx parts, since these just turn excess voltage to heat. You won't gain any current by using those (like you "normally" do when raising voltage), just generate a whole lot of heat.

Again, whether to use switchers depends on the voltage , current etc. If you were running a 24VDC rail, then maybe switchers would be a reasonable solution. Recom have some nice little 78xx replacement devices that are a switcher at around $8USD each.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One brief additional comment.

The input impedance of a CMOS gate is hardly any different from an AVR input (with pullup off). There is little to be gained there by choosing one over the other.

Here is an idea. Use something like a Mega48 (or maybe a Tiny) instead of the shift registers. You can control more LEDs from one node of the system AND you can PWM for brightness. This would let you put some "smarts" in like node addressing that might really simplify things.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about using I2C line drivers for both clock and data (I use them for non I2C applications also)? It will be a little more expensive I guess.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you guys so much for the input.

ka7ehk wrote:
Yes, if the data goes from chip to chip, using the output of the first to drive the data input of the next, the DATA should be good. Clock will be a bit more of an issue. You might use 74HC125 on the clock line.

Thanks, your response fits with the testing I've done. The data, clocks, and output enable will be driven using the quad buffer(which based on my design, can be placed in series where needed). I'm currently switching at 2MHz (pin toggle for a clock pulse). I have also had success at 3.686MHz.

Kartman wrote:
... with a bit of series resistance on the output, say around 33R to slow the edges down a
bit.

Can you explain the reason for this in detail? I don't understand why you'd want to add series resistance here.

Kartman wrote:
Also, passing current down flat cable has to be done carefully as does high speed signals. The current carrying capacity isn't that great on the cable/connector system, so parallel up your power. With the signals, intersperse a gnd signal between each data/clock signal so you don't get coupling between adjacent signals.

I've limited the current going through each LED to ~4ma, so a rib of 14 jixels should be under 600ma. I should have asked these questions a while ago (the boards are already produced). I didn't think about placing GND lines between data. Damn it.

3 of the 10 conductors are carrying V+ and 3 are for GND. The connectors I'm using are rated at 1A per contact. Does this mean I can theoretically run 3A down a rib?

Here is a picture of the Jixel PCB:

It's been a pain to assemble, but one of the project requirements starts with, 'on the' and ends in 'cheap'. We also had a bunch of parts already in hand when the design began. It's basically a big image mapped onto a semi-sphere.

Oh, please give feedback on the PCB!! I'm a total self-taught noob with zero hardware training. Boy, that sounds dangerous... :wink:

Lastly, I have two switching power supplies (5V 20A). I am considering buying larger one, unless it's possible to tie the outputs together to get more current capability... Is this kosher?

Kartman wrote:
Not necessarily! But it is not unreasonable to have an AVR per jixel.

We're hoping for an art grant for next year. At that point we'll add an ATTiny to each LED (RGB at that point) and probably use ethernet, or some other high-speed bus.

I've attached an image of the dome with the Jixels test-mounted.

-Jeremy

Attachment(s): 

I have too many hobbies.
s-conductor.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mhatter wrote:
I don't understand why you'd want to add series resistance here.
While the series resistance does slow the rise time down due to the RC filter created between the wires capacitance and the resistor, the main benefit of series (or parallel) termination is to prevent voltage overshoots and undershoots from reflections on your transmission line.

You asked for a reason for this in detail. Every signal integrity book I've read covers this in detail. You can also do a web search for "series termination transmission line impedance", but for thorough treatment a monograph is likely best. Howard Johnson's and Lee Ritchey's books are good.

Basically, you have a transmission line from output to input. The transmission line is "long" with respect to the rise time. Thus, you have to have proper termination to avoid voltage undershoots and overshoots which stress the protection diodes of your ICs, and more importantly, avoid incorrect logic signals being generated -- such as a change to logic level 1 on the output side becoming a double change on the input side (like change to 1, then 0, then 1).

For your application, I agree that series termination is best. Another reason to intersperse ground lines between signal lines is so that you have a cable with a fairly well defined impedance. Selection of the appropriate amount of series resistance depends upon the output impedance of your driver and the impedance of your transmission line. As a simple approximation, you can do something like 0.9 x (tranmission_line_impedance - output_driver_impedance).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MadHatter, I'd suggest you mock up a string of your drivers to see if it will work. Sorry to sound negative, but I think you're going to have problems. you've broken just about every rule in the book. There's a better than fair chance your signals will 'ring' and cross-couple with an adjacent signal. The net result is that you'll get weird flickering as the actual data being clocked into the HC595 will differ.

As for your power supplies, read the datasheet on them - some like being paralled, some don't. I would suggest you have two power runs rather than join the power supplies.

I don't know why you would consider using ethernet, apart from the main feed of data from the computer. We're talking about leds here and humans are looking at them - the human eye is quite slow.

That was a good treatise Kevin!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman: thanks. Treatises have been written about it, for sure. My goal was a much simplified explanation hopefully imparting, "it's important, learn it". I fully agree with you, ethernet does not practical place in this project.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

For power supplies:

I wouldn't parallel them. Just have X number of jixels powered off each PSU. Be sure to connect the grounds together though!

Also: think about what will happen when one power supply is on and one is off. You don't want to get into a situation where for instance the jixels have data being sent to them, but there is no power to the jixel boards. This can cause CMOS latch-up, which could damage the devices.

So in this case you'd want to turn on the power supply for the jixels first. Then turn on the power supply for the controlling device.

A computer PSU is probably the cheapest way to get +5V. See http://www.wikihow.com/Convert-a... for example - 30A@5V for $15, or even free if you grab them out of old used PC's that no one wants.

It sounds like you are going for a fast clock, I assume you want to get data through all the jixels in reasonable time? I'd consider having multiple masters, each controller less Jixels. It should let you drop the clock speed a bit, and your hardware should work well enough with that.

HTH,

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kmr wrote:
You asked for a reason for this in detail. Every signal integrity book I've read covers this in detail. You can also do a web search for "series termination transmission line impedance", but for thorough treatment a monograph is likely best. Howard Johnson's and Lee Ritchey's books are good.

Awesome thanks! I'll do more research on this.

kartman wrote:
MadHatter, I'd suggest you mock up a string of your drivers to see if it will work. Sorry to sound negative, but I think you're going to have problems. you've broken just about every rule in the book. There's a better than fair chance your signals will 'ring' and cross-couple with an adjacent signal. The net result is that you'll get weird flickering as the actual data being clocked into the HC595 will differ.

I'm pretty lucky then! I have the entire system working, I just can't attach many jixels in series (unless I'm only running one rib of the bus). PLEASE TEAR MY DESIGN APART! I want to learn as much as possible from this project.

I'm just learning this stuff, so don't worry about sounding negative. I want to learn what to do, and what not to do ASAP. The 'rules' you speak of, can these be found in one of the previously mentioned texts on signal integrity?

kartman wrote:
I don't know why you would consider using ethernet, apart from the main feed of data from the computer. We're talking about leds here and humans are looking at them - the human eye is quite slow.

You are correct, I meant the main feed from the computer. I'll want to run simulations on the PC to generate the image data being clocked into the 595s.

Colin wrote:
A computer PSU is probably the cheapest way to get +5V. See http://www.wikihow.com/Convert-a... ... wer-Supply for example - 30A@5V for $15, or even free if you grab them out of old used PC's that no one wants.

I have a few spares sitting here in front of me I'll tear apart to use. Thanks for the idea.

Thanks again for the input freaks!

I have too many hobbies.
s-conductor.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A word on using computer power supplies as "bench" supplies: Often/sometimes they need a substantial load on one or more outputs in order to regulate. A small AVR project hooked only to the +5 (say) can lead to rude voltage surprises.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I second what Lee says regarding using PC supplies. I normally connect an old hard drive to provide the minimum load.

Madhatter, You're lucky it works. I did a similar thing many years ago and learnt the hard way. In my case, if I added an extra board in my chain, it would become unreliable. The things you need to consider are the signal integrity issues we've previously spoken about and also power distribution. Whilst each led draws a small amount of current, combined, all your leds draw a substantial amount of current. So, voltage drops across your 0V wiring can become a problem and may cause false clocking if large enough. Wiring your power in a 'star' configuration as opposed to a 'daisy chain' can alleviate this problem.

Things to consider for your next design:
Local regulation - using a switchmode supply means you can run a higher 'rail' voltage and convert it down to your local voltage. This lessens the amount of current needed on your power rail. Something like a NatSemi 'simple switcher' ic or there are various modules available like from http://www.recom-international.com/

Use RS422/485 tranceiver ics to send/receive your data. Using twisted pair wire, you signal integrity problems should disappear. Most of these devices can do 10Mbps over some distance. Something like a MAX485 or similar device

Look to reduce the number of signals between your jixels - using serial comms with local AVRs is one solution. Use a dipswitch to identify what device that board is on the chain.

If the display is to be used outdoors, lightning protection may be required. Again, the less interconnects you have, the less amount of protection devices you need to add. Depending where you are in the world, you may have to comply with EMC regulations.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Update!

Kartman, amazingly enough you were right! :wink: Once I started adding more and more jixels to the system it turned to a flaming pile of noise and random blinking (if power would even get to the jixels). What a poor design!

Redesigning at the jixel level wasn't an option. Luckily, a single rib of jixels(more than 15 in series) is very reliable. So all I needed to do was redesign how power, data, and clock get to each rib.

So...
After the data leaves the Mega128 on PORTS A,B,C,D, and F it travels to 5 identical (other than some jumper settings) distribution boards. Since the clock signals (RCLK, SRCLK) are in the high bits of PORTA they come into one board and are then buffered before traveling to the next dist board. This continues all the way down the chain (AVR->1->2->3->4->5). All of these boards are in a stack seperated by standoffs, so they're pretty close together.

Once the data and clock signals are on a distribution board they travel to one of eight quad differential line drivers after which there is an RJ45 Female connector. Three of the four pairs are driven, RCLK, SRCLK, and SER for that rib. The fourth pair in the Cat5 is used for a common ground.

Since the signals are in a completely different form, I also designed a receiver board to translate the differential signals into what the jixels were designed to use. This is also where the power for the rib comes in. This was as close as I could get to local power regulation without redesigning / remanufacturing several hundred boards.

Anyway, the attached image shows a distribution board. We're hoping to have a video of the complete system on the artcar late Wednesday evening.

Here is a test videos I shared with some of my buddies on the project.

http://www.jellyfish12000.com/video/MOV00005.mov

Attachment(s): 

I have too many hobbies.
s-conductor.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Awesome, you are an order of magnitude better off then you were when you started. I'd love to see how the finished product turns out.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Amazing? I'm always right - except one time I was mistaken! I'm glad the differential distribution worked for you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't believe it... Success.

Sorry this isn't the best quality video (and the person filming had been drinking heavily). In person, the JellyFish's lighting system is absolutely beautiful -to me anyway. There are a lot of subtleties not coming through here.

The framerate has been doubled since this video was taken, we have quite a few animations programmed now, I'm working on a USB interface to eliminate the serial port bottleneck, and we're adding 60% more leds over the next few months.

**Disclaimer** Vulgar language ahead. Please turn down the sound if you're easily offended. **Disclaimer**

http://www.jellyfish12000.com/video/jellydome_domination.mov

Thanks again to everyone for your help. I'll post another video of the project's progress after xmas.

I have too many hobbies.
s-conductor.com

Last Edited: Fri. Dec 14, 2007 - 05:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
A word on using computer power supplies as "bench" supplies: Often/sometimes they need a substantial load on one or more outputs in order to regulate. A small AVR project hooked only to the +5 (say) can lead to rude voltage surprises.

Lee

This is quite true!

On most PC power supplies, the +5 Volt section usually needs a load of about 1 Ampere before the +/-12 Volt sections will regulate.

Also, if using a PC power supply, be sure that you place a suitable fuse at the +5 Volt output, to protect the +5 Volt field power wiring. It wouldn't hurt, as well, to place a separate fuse at each thingie out in the field, as uncontrolled shorts of the +5 Volts at the thingies will do a good bit of damage out on any field components.

Remember, you want lighting control, not a fireworks display!!!

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

On most PC power supplies, the +5 Volt section usually needs a load of about 1 Ampere before the +/-12 Volt sections will regulate.

My son has done a number of projects using Apple II power supplies, and scoffs at my recommendations about load and protection. They are well encapsulated when removed from the computer, and indeed do not seem to need a load to regulate well. If you can still find them they should cost nothing. ;) YMMV.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

On most PC power supplies, the +5 Volt section usually needs a load of about 1 Ampere before the +/-12 Volt sections will regulate.

On some newer supplies it's the 3.3V rail that requires the load to bring all the other rails into regulation.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.