Pages: 1 ... 13 14 [15] 16 17 18   Go Down
Author Topic: 8x8x8 multiplexed LED cube with an Arduino Mega 2560  (Read 29943 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes G pin Output enable.
High is disabled, Low is enabled.
Might have to do some experimenting to find the best time to turn the outputs on & off.

Ports, PORTD was just an example, yes portability is reduced somewhat in exchange for speed.

Setting the SS pin Low/High back to back- all that is needed is  rising edge to clock the bits into the output register, does not matter where it goes low.
Maybe add a pull down resistor on the anode layers to ensure they go low when their transistor is turned off.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

CrossRoads, by adding pulldown resistors to the anode layers you meant adding some resistors between the MOSFET gates and the GND, right? I'm a bit confused by this (just like I was last time when you suggested it) because currently we have some pullups there (between the MOSFET gates and the 5V). I thought the role of the pullups was to ensure that the anode layers go low when the MOSFET is off... but now you suggested that we need pulldowns for the same purpose... I guess I'm missing something here.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What I am saying is leave the MOSFET gate alone and put a resistor from the LED Anode to Gnd - that will ensure the LEDs are being turned off when the MOSFET is off.


* 4x4LEDmatrix_TCIP6B595 ransistors.jpg (76.25 KB, 960x720 - viewed 7 times.)
« Last Edit: February 24, 2013, 08:18:38 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Right! I knew I was misunderstanding something smiley This sounds good. I'll try it tonight when I get home.
Thank you!
Logged


Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately I still haven't had the time to try the pulldowns on the anodes (I suspect they wil actually be needed on the cathodes), I'll get back with my findings as soon as I'll be able to try it out.

In the meantime I wanted to share with you guys something that might be quite important. As I wrote earlier, modern LEDs might be rated at 20 mA, but they give relatively strong light at much lower currents. I have experimented with my cube and I have found that multiplexing (fast switching) does not influence this at all. In other words, designing the cube to work at 20 mA per LED might not be needed at all. I'm giving my LEDs 1.6 mA (1K + 82R resistors for each LED) and they are quite bright. Not as bright as at 20 mA, but still bright enough (I'm guessing about 70% as bright as at 20 mA). Full brightness may actually be an undesired thing, as the LEDs in the lower planes might shine through the ones that are above them. What I'm trying to say is that you can put 1K (or heavier) resistors to the LED cathodes instead of the originally intended 82 Ohm ones. This will reduce the current consumption of the cube considerably, you'll get away with a much weaker power source and maybe even the MOSFETS and shift registers could be replaced with ones that work at lower currents smiley
Logged


Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the first video of the cube, running a test pattern smiley
http://youtu.be/daVEyItv5lA
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you end up changing the hardware between replies 214 & 215?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, not yet. I expect to do it sometime in the next 2-3 days. Don't worry, I'll let you know what I find.
The reason why you don't see the ghosting in this video is that I've fixed it in the software by adding a 100 microseconds delay between turning the previous layer off and turning the current layer on. The hardware solution appeals to me more, so I'll definitely try it.
Logged


Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Time for some fun!  smiley-cool
http://youtu.be/5NqlwmS5dDs

Although the multiplexing is quite obvious on camera, it is almost completely unnoticeable for the human eye.
Logged


Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've finally managed to take some time to try adding some pull down resistors directly between the anodes and GND to see if the ghosting disappears. No such luck. I've also tried to add them between the cathodes and the 5V. Still no joy.

Something is not shutting down quickly enough. I wonder what. Remember that when a new anode plane is turned on, the LED that is at the intersection of the new anode plane and old cathode column, briefly turns on, just enough to be visible to the human eye as a dim light. This suggests that the cathodes are not turned off fast enough (not the anodes) and they interact with the newly turned on anode plane although they should not. The minimum delay added in the software which fixes this is 75 microseconds (0.075 milliseconds). From what I understood from the TPIC6B595 shift regiters' datasheet, that's a lot more than the typical 200 nanoseconds specified as "Fall time, drain output". But there's also some propagation time there (see the "Switching characteristics" section in this datasheet: http://www.ti.com/lit/ds/symlink/tpic6b595.pdf). Could it be that some propagation times add up to produce this 75 microseconds delay? That's still hard to believe because the propagation times (high-to-low + low-to-high) are specified around 150+90 = 240 nanoseconds. 75 microseconds divided to 240 nanoseconds is still about 300 and I doubt that I have 300 propagations (whatever that means) on 2 shift registers. Still, the cathodes are driven directly by the shift registers, so I can't imagine any other culprit... or could it be something to do with the capacitors that we use at the shift registers?
« Last Edit: March 06, 2013, 06:02:04 pm by Un4Seen » Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You got me.  I just finished  multiplexing 56 7-segment displays with 8 TPIC6B595s, pullup resistors as current source, one TPIC6B595 to pull the anodes low for off segments and one output low at a time from the remaining 7 for each digit's common cathode, switching to next digit every 300uS.  All 8 shift registers were loaded and updated at the same time.  I didn't see any ghosting at all.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yepp, it's very strange... I might try experimenting with turning the shift registers off with their clear pin (instead of shifting 0s into them), who knows, maybe they turn off faster like that...
I wonder if the quality of the shift registers could have anything to do with this. After all, I've bought them form China at a quite low price...
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Turn off time, quality of signals - hard to say without putting a 'scope on the lines and see what you are getting.
I am doing 8 SPI.transfers to send the anode data and select 1 cathode (now that I fixed all my typos  smiley-mr-green ) with a common latch to change the outputs from all 8 at the same time.  OE is just on all the time.

I don't know what is going on with my PC,  I can't seem to copy & paste code from a sketch in here. It highlights correctly, all the copy & paste commands are selected correctly, yet nothing is pasted in.  Aggravating.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it's Windows, it's a subtle way of letting you know that it's longing for a reboot smiley-razz
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"If it's Windows, it's a subtle way of letting you know that it's longing for a reboot"

Okay, full power off re-boot, including pulling battery.
Can copy-paste here.
Can copy-paste in a sketch.

Can't copy paste from sketch to here.  What gives?

WinVista, never had this issue until a couple of days ago.  Gotta be some setting screwed up somewhere.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: 1 ... 13 14 [15] 16 17 18   Go Up
Jump to: