Main > Main Forum

Poor mans LED controller?

Pages: << < (2/3) > >>

SavannahLion:


--- Quote from: ids on November 14, 2011, 07:10:28 pm ---Is there a replacement for the 574 (inverted or otherwise) that could easily handle 8 LED's (e.g. 20mA * 8 )?  I have been hitting up Digikey and Mouser a great deal but...may not have quite the expertise in this area.

--- End quote ---

This is just a thought, is it a good idea to even bother with the LPT port anymore? Even though the parallel ports appear on about 90% of the PC's I own, I haven't actually purchased any PC in the last five years or more that sport a native parallel port.

Just a thought. :dunno

ids:


--- Quote from: SavannahLion on November 14, 2011, 09:20:31 pm ---I haven't actually purchased any PC in the last five years or more that sport a native parallel port.

--- End quote ---

I've heard this a lot but not experienced it myself so far (macbook excluded).  I'm sure you could get a card you could drop into your computer, but that sort of defeats the purpose of the poor mans LED controller.  Going with USB, to my limited knowledge, will drive up the costs and complexity.  I guess, in my mind, this is as much an exercise in thrift as it is an exercise in ability.  I guess one could simplify and go with the serial port.  It would be slower, but perhaps work out ok anyway.  Although, the same machines without parallel ports might also skimp on old fashioned serial ports as well.  As for me, I dug up an old, unused printer cable, ....

MonMotha:

You'd use a ULN2803 along with the 74xx574 (I'd still suggest a 74xx573, instead).  The 57x would generate the signal which would gate the ULN2803.  The ULN2803 can handle pretty beefy loads, though I've had some trouble when switching all 8 outputs at once on 194/168 type incandescent lamps - it seems to blow up the common as the whole chip goes out - but this shouldn't be an issue with LEDs.

If you want an integrated solution, TI has a nifty line of "power + logic" devices.  Check out the TPIC6273.  This is an edge triggered device like your 574, but it does have a different pinout.  It's supposedly available in an experimenter-friendly DIP package.  You might also check out the TPIC6259.  This is an addressable latch, and you could use 8 of them to replicate the functionality you've described without needing the 238, though the banking/topology would be different (each device would be modified one bit at a time but all 8 devices would have one output changed when that happens).  From the looks of it, you may be able to get by with nothing but 8 of those and some connectors.  They'll probably sample you a few of these, at least, maybe even all 8 that you need.  There's also the 6B259 and 6C259 that are similar but have different output current ratings.

Regarding USB, yes, it's quite a bit more complicated than the parallel port.  Many people not familiar with it (especially management types) often want to use it as though it's a simple serial port without realizing how complicated even a minimal USB device software stack is.  You can relatively easily run it (completely bit banged in firmware) on a low end 8-bit MCU, though.  It'll just require a fair bit of firmware work that you probably don't want to do.  There are unfortunately not many MCUs with USB in hardware that are available in through-hole packages.

ids:

Sorry, I had a lot more typed up in response but lost it....

Many thanks again for your responses which are priceless to a newb like me...so to be brief (I'll get more detailed again later)....

Keeping with the theme of low cost (MonMotha I mean no disrespect whatsoever as, per usual, your solutions are superior) I found the SN74ACT564 which, if I understand the spec sheet right (http://www.ti.com/lit/ds/symlink/sn74act564.pdf) can handle both 3.3V and 5V LPT port types, while also supplying sufficient current for 8 LEDs (~20mA each).  If that is the case, we could use this as a replacement for the *574 from the diagram, which keeps the component count down (and thus complexity of build) - but it raises costs a bit: $1.09ea for small quantities (<25).  But, 8 of those, the *238, and the odds 'n' ends to finish the job, produces a very cheap 64 port LED controller...for 5V LEDs... in the 20mA range....with no features like dimming (software could do this however).

FWIW, I'm not stuck on the edge-triggered chips, I really have no idea what I'm doing, the transparent latch seems much better.  In my ignorance laced search I found the SN74ACT564, which appears to be a potential candidate, but I'm open to cheapo components of any type.

So, based on a haphazard selection from mouser, I've got:

part #descunit costqtytotal771-HC238BQ115Demultiplexer$0.3931$0.39595-SN74ACT564NFlip-Flop$1.098$8.72649-DILB20P-223TLFIC Socket, 20 Pin$0.2188$1.96649-DILB20P-223TLFIC Socket, 16 Pin$0.1421$0.14TOTAL$11.21

Shipping is extra, as is a protoboard, DB25 cable, solder, wire, etc

As mentioned earlier in this thread, I'd be willing to prototype such a thing.  I would also be willing to kick off coding of such a driver.  I'm not sure how much interest there is in such a thing, but I think I'll try it just for kicks anyway.  I have no need for such a thing, it just seems like a cool challenge  ;D  because of course we've all got too much time on our hands  :banghead:

ids:

Thanks again for all the info.  Looking at costs, effort, etc:

* The ULN2803, at $1.02 (Mouser) would add $8.16 to total cost, not a big deal, just a bit more work to connect it all up.  OTOH, adds a great deal of flexibility on the outputs.

* The TPIC6273 looks great, however at $4.38 ea (Mouser) - multiply by 8....getting too close to the cost of an LEDWiz to make this worthwhile, unless you're doing this just for the fun of it.  The TPIC6259 is $4.43, so same thing there.

* The TPIC6B259N is more reasonable at $2.74.  Using addressable latches I can see two approaches.  One is a simple design in which you use the demultiplexer to select an enable line for one chip, 3 address lines common to all chips, and a common data line.  This setup can address only one LED at a time - might be a bit slow to do full updates.  Otherwise, you can use 8 lines, one for each chips enable pin, so that the data line (connected to all) can be fed to one or more chips at a time (where the value being assigned is common for those LEDs).  This is a bit more complicated to code a driver for, but not a big deal.  Worst case behaviour is 1 LED update at a time, best case is 8.

I've also sketched out circuits using the SN74ACT564N (attached).  I've added the pull-downs on the *238 outputs (thanks), the extra control line into the *238 (thanks again), etc.  First pic is basic overview, 2nd is getting ideas how to lay it out on a board and wire it up.  8 lines to 8 chips is a lot, but some sort of "bus" idea here....for each data line, connect from LPT to chip 1, jump to chip 2, 3, 4, etc.  And if you run chips in two rows back to back it might be easier.  Fortunately, the pinout on the *564 makes this really easy.  Working in the *238 - still thinking about that one.  Maybe also add some screw terminals for LED outputs to make it easy to use this thing.  Oh, and a DB25 connector for the LPT cable.  I think this could all be done easily and very cheap.  With software support, we could have a really viable solution for basic CP lighting (or other uses).

Pages: << < (2/3) > >>

Go to full version