16x40 LED Sign question

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Garth
I practically live here!
I practically live here!
Posts: 232
Joined: Wed Jan 16, 2013 1:17 pm
Contact:

Re: 16x40 LED Sign question

Post by Garth » Fri May 09, 2014 8:49 am

Garth wrote:You might want to implement some kind of hardware protection against overcurrent. What I'm thinking of is the possibility of a crash or other timing malfunction (especially before the debugging is finished) leaving a lot more current running through LEDs than they can safely take for more than a few ms. If the driver ICs have enable inputs, they could be driven together by a single circuit using an RC and a gate with a Schmitt trigger input so the enables will go false if clocking stops for more than a couple of ms for whatever reason.
Here's one idea of how to do it:
ScanMonitor.jpg
ScanMonitor.jpg (28.28 KiB) Viewed 19954 times
The two gates on the left are just used as inverters, but I drew them as NANDs so the whole thing could be done with a single IC, a 74HC132 quad 2-input Schmitt-trigger NAND gate. The time constant of the .1uF and 22K is 2.2ms, and depending on the actual thresholds of the final Schmitt NAND, it will take the input clock signal getting stuck in one state or the other for approximately that long to make the output go false. As long as the input toggles faster than that, the output stays true. The first input gate is just to keep the clock signal from being loaded down by a capacitor through a diode. Depending on your clock speed, you might want to modify the values. The time will be proportional to the capacitance times resistance. Actually, if you want to strobe the shift registers' output latches that often, the clocking will be nearly ten times as fast (or faster, depending on the length of the shift register chain), so you might want to make it a .01uF or even less instead of .1uF.
http://WilsonMinesCo.com/ lots of 6502 resources

User avatar
waywardson07
decided to stick around...
decided to stick around...
Posts: 25
Joined: Wed Nov 24, 2010 5:01 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by waywardson07 » Fri May 09, 2014 11:01 am

Great information from everyone! This project is getting more sophisticated each and every day :D
Im going to go ahead and apply the method of scanning 2 lines at the same time.
Since I'm scanning the rows... I will do it exactly as you explained brad.. row 1 and 9 together.. 2 and 10.. till 8 and 16..

Ive begun to design the circuit boards meanwhile I wait for the parts. But I will post a video and photos as soon as I have something to show. :mrgreen:

Garth: thats also a great idea!! Since I'm not very knowledgeable when it comes to electronics(Im much better at software :roll: ).. I'm sure its going to take me a little while to wrap my head around. But having that diagram and explanation really help! Thanks. Im going to look at it for a bit and I will let you know if I follow.

EDIT: ok.. I looked at the data sheet for the 74HC132 and everything has cleared up for me. I would connect the output form your diagram to the "OE" output enable pin on my 74HC595 shift register.. When this pin is kept Low the outputs are enabled on the shift register. Since your diagram keeps the output of the NAND chip high during shifting and low when taking too long I would have to invert this output to get it to work for me.

So if we are taking too long shifting through the rows the 74HC595 shift register outputs will be disabled, thus causing the darlington array driver it is activating to be disables as well protecting us from over current. Very cool!!!! I would have never known I could do this.Thank you Garth.

Just 1 question. In your diagram, the ends of the caps and resistors are going to ground or +5v(I'm guessing to ground) ? Also, That is 2 caps and 2 resistors in the diagram correct?

Edit 2: forgot one last thing. In your diagram.. are those capacitors polarized or non-polarized capacitors? Im assuming non-polarized from what it looks like.

Garth
I practically live here!
I practically live here!
Posts: 232
Joined: Wed Jan 16, 2013 1:17 pm
Contact:

Re: 16x40 LED Sign question

Post by Garth » Fri May 09, 2014 12:33 pm

waywardson07 wrote:EDIT: ok.. I looked at the data sheet for the 74HC132 and everything has cleared up for me. I would connect the output form your diagram to the "OE" output enable pin on my 74HC595 shift register.. When this pin is kept Low the outputs are enabled on the shift register. Since your diagram keeps the output of the NAND chip high during shifting and low when taking too long I would have to invert this output to get it to work for me.
No, it's NAND, not AND; so if both inputs are high, the output would be high except the little circle inverts the output so it's low when both intputs are high, meaning it will enable the drivers as long as the clock signal keeps going. So no, you don't need to re-invert the output.
Just 1 question. In your diagram, the ends of the caps and resistors are going to ground or +5v(I'm guessing to ground) ? Also, That is 2 caps and 2 resistors in the diagram correct?
Yes, two resistors, two capacitors, and two diodes. The diodes would preferably be Shottky ones for the lower forward voltage drop. Regular silicon ones will work, but they might require the resistors or capacitors to have a little higher value to give adequate delay to avoid unwanted shutdowns. You might want to experiment with the times anyway to make sure you're in the sweet spot, with enough time margin to make sure the drivers won't get shut down, but still short enough that there's no chance of damaging the LEDs from being on at high current too long if your program crashes during development.

I worked in applications engineering in the mid-1980's at company that made VHF & UHF power transistors. A lot of them went into radars, and because of the super low duty cycle and narrow pulse widths, we could run single transistors the size of a shirt button at a couple thousand watts, which is way more than it would take to blow it up if it were left on for a significant fraction of a second.
http://WilsonMinesCo.com/ lots of 6502 resources

User avatar
waywardson07
decided to stick around...
decided to stick around...
Posts: 25
Joined: Wed Nov 24, 2010 5:01 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by waywardson07 » Fri May 09, 2014 12:34 pm

I also have a question about swordfish delayms() and delayus().
How do I make sure that they are accurately delaying say 1 millisecond or 1 microsecond?
I noticed at different internal clock speeds the delay time changes drastically.
Is there a certain clock speed that will make them accurate or do I need some kind of external clock?
No, it's NAND, not AND; so if both inputs are high, the output would be high except the little circle inverts the output so it's low when both intputs are high, meaning it will enable the drivers as long as the clock signal keeps going. So no, you don't need to re-invert the output.
ahh! yes you're correct. While walking myself through the circuit I took into account that the first two were NAND gates but I guess I got too excited by the time I got to the last gate and treated it as a AND gate. :roll: Thanks for the correction!

Garth
I practically live here!
I practically live here!
Posts: 232
Joined: Wed Jan 16, 2013 1:17 pm
Contact:

Re: 16x40 LED Sign question

Post by Garth » Fri May 09, 2014 12:49 pm

I forgot to answer these:
waywardson07 wrote:Just 1 question. In your diagram, the ends of the caps and resistors are going to ground or +5v(I'm guessing to ground) ? Also, That is 2 caps and 2 resistors in the diagram correct?

Edit 2: forgot one last thing. In your diagram.. are those capacitors polarized or non-polarized capacitors? Im assuming non-polarized from what it looks like.
The triangle pointing down is ground. The circle with the + in it goes to the 5V. Other than perhaps some tiny tantalum capacitors, I have not seen any polarized capacitors below 1uF. These are non-polarized. Monolithic ceramic would be my natural choice if thru-hole, or MLCCs if they're SMT. MLCCs' capacitance reduces quite a bit though when the voltage across them is more than about 20% of their WVDC, so make sure the WVDC is at least 25V, not 16. 50V would be good. If they were polarized though, the negative side would go to ground. Polarized are drawn with the negative plate curved, so you really don't even need the + and - markings in a diagram. If both plates are drawn straight, it's non-polarized. I should add: I would not use Z5U dielectric or anything with a 5 in it, as the temperature coefficient is really bad. You don't want the thing to quit working in really cold or hot weather. X7R will be fine.
http://WilsonMinesCo.com/ lots of 6502 resources

User avatar
waywardson07
decided to stick around...
decided to stick around...
Posts: 25
Joined: Wed Nov 24, 2010 5:01 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by waywardson07 » Fri May 09, 2014 12:59 pm

Thanks a ton Garth!!! All the information you have provided has been a load of help.
It all makes perfect sense and is explained very well. I don't think I could have gotten this project off the ground without the help of everyone who has posted in this thread. :!:

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by brad » Sat May 10, 2014 8:20 am

I also have a question about swordfish delayms() and delayus().
How do I make sure that they are accurately delaying say 1 millisecond or 1 microsecond?
I noticed at different internal clock speeds the delay time changes drastically.
Is there a certain clock speed that will make them accurate or do I need some kind of external clock?
You just need to make sure of two things:

1. You tell Swordfish compiler what speed your are going to be running your microcontroller at
2. You run the microcontroller at the speed that you told the compiler.

Have a look at this page I made a while back, it should give you the info you need :)

http://www.bradsprojects.com/microcontr ... periments/

I just realised that on that page, while i did get the microcontroller to run at different speeds, I forgot to tell swordfish about the new speeds.

I.E. I needed to update this:

Code: Select all

clock = 20
to whatever the speed is in mhz. for example if I set the clock speed on the microcontroller to 48mhz, I would also need to tell swordfish this by writing in:

Code: Select all

clock = 48

User avatar
waywardson07
decided to stick around...
decided to stick around...
Posts: 25
Joined: Wed Nov 24, 2010 5:01 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by waywardson07 » Sat May 10, 2014 2:46 pm

Thanks brad, I actually just found the answer to that question before you posted it, but your post does has some info I didn't find.
One thing I noticed that really caught my eye in your post is the screenshot of the swordfish IDE you have. Is that a MAC version of the swordfish IDE? If so, where did you get it? I looked around and found no info on a MAC version.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 16x40 LED Sign question

Post by brad » Sat May 10, 2014 8:14 pm

Is that a MAC version of the swordfish IDE?
No unfortunately :) I use a Mac but I also have parallels desktop installed which allows me to run Mac OS and Windows together at the same time. I run it in coherence mode and there is an option to make windows programs look like they were a mac program :)

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 7 guests