SX28 and Hex D Flip Flops
Hello,
I am new to forum so be easy!
I am wanting to use the SX28 to control a matrix of leds. I have seen a few differnt schematics that use Hex D flip Flops to control the ground lines of the matrix and wondered why they use those and also how they work.
I am wanting to put together a 5x7 matrix but not just a single led but 6 or 8 in series parallel configuration. I plan on using a ULN2803 to drive the leds from the processor. My other question is what is the best Hex D Flip Flop to use since my current is going to be 40ma on each series parallel led setup?
Any suggestions appreciated!
Thanks!
I am new to forum so be easy!
I am wanting to use the SX28 to control a matrix of leds. I have seen a few differnt schematics that use Hex D flip Flops to control the ground lines of the matrix and wondered why they use those and also how they work.
I am wanting to put together a 5x7 matrix but not just a single led but 6 or 8 in series parallel configuration. I plan on using a ULN2803 to drive the leds from the processor. My other question is what is the best Hex D Flip Flop to use since my current is going to be 40ma on each series parallel led setup?
Any suggestions appreciated!
Thanks!
Comments
Look at the following posts of mine:
http://forums.parallax.com/showthread.php?p=649643
http://forums.parallax.com/showthread.php?p=651690
http://forums.parallax.com/showthread.php?p=636061
http://forums.parallax.com/showthread.php?p=561515
http://forums.parallax.com/showthread.php?p=676976
http://forums.parallax.com/showthread.php?p=670557
Let me know if I can help.
The ULN2803 may not be as good a separate transistors when you start mutiplexing strings of LEDs.
It is a neat little device, but by putting 8 lines in one package they share the heat build up. And Darlingtons run a lot hotter because are really two transistors together.· You need to dump the heat along the way in individual packages.
I suppose the Hex D flip-flops serve a couple of purposes. They provide a switch outside of the microprocessor that can handle a bit more power and heat. And depending on how they are used, they can cascade and reduce several microcontrol lines down to one clock line.
As mentioned above, there are lots of matrix projects. Mostly because there are different ways to do LED matrix and each has its own pro and con.
I suspect it is best to start with one matrix and generate indivdual characters that spell out a message. The n figure out how to scroll Down. Then figure out how to scroll Right. After all that, you can move on to bigger grids or banners.
But as your project grows, the P in Watt's equation grows exponentially. You will have to figure out a lot of tricks fo the trade to drive all that current drain to the right places.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
PS: Let me know if you don't have Microsoft Word and I will convert it to something else.
What I am wanting to do is a table with a 5x7 display built in. I can change the ULN2803 to the PN200 or etc. that can handle the current but still need something to replace the 74lS138. This comes from a schematic I saw minus the 2803. I knew I would have to use something else since I was going to use more leds.
Does anyone have a suggestion to replace the 74ls138 so it will handle the 40ma sink per led segment that I need?
Thanks,
K
Post Edited (BigK) : 9/27/2007 10:22:49 PM GMT
I have found that on the LED cathodes one can use any of the following (depending on how the hardware and software is dealt with): (highs in, lows out for the cathodes) UDN2803, A6821 (serial version of UDN2803 - much like a high powered 74HC595 with inverted outputs), etc.
If you use UDN2803's then you will need to drive them with something like 74HC595s, 4017 & 4081 combos, or direct with lots of I/O like a Parallax·SX-48 microcontroller. If you use UDN2803's you will ultimately have lots of chips because you still have to reduce the I/O to something that the microcontroller has. However if you are only talking about 1-3 5x7 matrixs then you can use the I/O from an SX directly through the UDN2803's.
My preference is to use the serial version being the Allegro Microsystems A6821 which only needs 3 inputs can provide the same 500 mA per output that the UDN2803. Less chips to deal with and they cascade easily. You can use SHIFTOUT statements for this type of SPI design.
Now for the LED matrix Anodes, you can use ULN2881/2/3 (that's right ULN not UDN) they give the parrallel outputs just like the UDN2803's but they take lows in to give highs out to the anodes. Just the opposite of the UDN2803s. You can also use Pn200's on the Anodes. However, you will soon find out that your LEDs just wont be all that bright UNLESS you allow more current to flow. This is when P channel FETS come into play. Use them on the Anodes.
You will also need a higher current power supply 5vdc. If you use a higher voltage· and higher current (3-5 amps) like 12 vdc , then you will also need to add N channel FETS to the P channel FETS - gets a bit complicated doing it this way. I try to stay with 5vdc for everything.
Another approach entirely is to use the popular MAX7219 which used SPI (SHIFTOUT command) for lighting up all 64 LEDs per led matrix. You can cascade them using a Basic Stamp 2 if you like.
You may also want to look into a complete solution by Sparkfun.com. I had a link to them previously. They sell bi colored LED matrixs AND controllers as well as RGB LED matrixs and controllers. They are a bit pricey but all the hardware design is done for you and it is somewhat simple to write the microcontroller software (SX chip or Basic Stamp 2). I can help with that.
Many other possibilities exist but lets see your schematic design and criteria for using this or can anything be changed on it.
·
What controls the column switching, I didn't see that in the schematic info?
You guys have posted some great info, thanks!
Is there a NPN equivelent to the PN200?
What I can do is use PN200 on switching the ground side of the leds and the NPN's from the SX28 outputs.
I have posted the schematic but it is using a pic and I want to use the SX28.
Can all of this be controlled from the SX28 since it has enough I/O's without having to use a decoder chip?
The schematic is attached but the 74ls174 should be a 74ls138!
Thanks,
K
You have got me hooked. I am going to have to build one of those 5X7 displays as the 'swimmer' graphic animation is brilliantly simple. It is really hypnotic and special.
I'm sure an SX28 can do it with room to spare for additional items' such as·a trigger input, speed change·input, and/or·reverse the direction reverse.· I still have some of the SX18 chips with 12 I/O pins and I can even use the SXes'·internal oscillator to knock the pin count way down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
Post Edited (Kramer) : 9/30/2007 6:26:45 PM GMT
What is the reason for the LM339?
K
There are two ways to control brightness - in software by controlling the duty cycle AND in hardware by a scheme such as this. Avoiding having to fine tune brightness in software gives you more programing space to do other things. It also allows you to start out with a dim display and protect it from potential damage due to a miscalculation in software.
It is a very intelligent design.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
Variable brightness could be easily incorporated by using a variable voltage regulator (LM317) in place of the fixed 9V (7809) that I used.
But since the negative input of the comparitor is controlled by 50K pot, wouldn't it have some affect on the overall output timing? Or is the rise time of the square wave so fast that it doesn't really have an impact?
The heart of the issue is that matrices of LEDs do require some in depth thought about power consumption and duty cycle. The LEDs are driven at a high voltage but for a fraction of the time. And the rate is so fast that it looks at if it is constantly on.
Not all matrices are the same. I just picked up a jumbo 5X7 to copy the circuity. But if someone was to use a smaller sized 5X7, the voltages and overall power would require redesign as the smaller LEDs use less.
And the matrices also come in Common Anode or Common Cathode. I am just hoping I've got the same one as the schematic. If not, I have to adapt the design for the opposite polarity.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
· When selecting a matrix, one needs to determine whether they're cathode row w/ anode columns·or cathode columns w/ anode rows (the common anode vs·common cathode distinction is for alphanumerics, segmented displays.)·
· Does everyone reckon columns and rows the same as I do?· To me, a row consists of 5·horizontal elements and a column consists of 7 vertical elements (therefore 7 rows and 5 columns.)· But others might see it the other way.· So, as I see it, my matrix is cathode columns w/ anode rows.
· Sometimes...·you gotta work with what you got.
· With 8x8s, this is not a consideration.· :)
http://www.futurlec.com/LEDMatrix.shtml
http://cgi.ebay.com/10pcs-8x8-Dot-Matrix-3mm-dia-Bicolor-LED-Display_W0QQitemZ230175550122QQihZ013QQcategoryZ26207QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
Also there is SparkFun but more costly:
http://www.sparkfun.com/commerce/categories.php?cPath=51_89
One may have similar experience when buying at a very good price on E-Bay. If you can adapt to it, it is worth the savings.
I really like futurelec's product inventory and prices. Yet, a lot of people don't like the delays they encounter with orders as they ship from Australia, China, and Thailand. It takes weeks for them to round up and ship out an order. And yet, looking at their 5X7 jumbo matrices, I see square LEDs for the first time. They have genuine depth in inventory for the DIYer. And they have PDF info on most chips right within the web site.
Sparkfun is great when it has the product, but it doesn't seem to carry all and everything - just is the most popular and exotic devices that really are fun and fly off their shelves. They are a very well priced jobber for printed circuit boards in short runs on Eagle. Someone in China does their boards and ships directly to you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········