Pages: 1 ... 14 15 [16] 17 18   Go Down
Author Topic: 8x8x8 multiplexed LED cube with an Arduino Mega 2560  (Read 29517 times)
0 Members and 1 Guest are viewing this topic.
Cluj-Napoca, Romania
Offline Offline
Full Member
***
Karma: 3
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you copy-paste from scratch to notepad and from notepad here? If not, which step fails?
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23607
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

When I paste from sketch to Notepad, I only get a few lines.
Even when I do CTRL-A to select all, then CTRL-C to copy, and CTRL-V to paste - I only get a small section, like this:
Code:
/*
LED display test
 Use  shiftregister 7 to control anodes, 1 = output low = segment off
 Use individual bits of shift registers 0,1,2,3,4,5,6 to control common cathode of individual digits. 1 = output low, common cathode on
 
 cathode bits are flipped in pairs:
 control board: a-b, c-d, e-f, g-dp
 breakout board: b-a, d-c, f-e, dp-g
 
 anodes are 1-1 between boards: a,b,c,d,e,f,g
 
 */
I can copy the whole sketch within the IDE itself - just not anyplace else.

Off to bed, probably gonna have snow to clear in a few hours, work on this some more tomorrow night.
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

I guess the problem is with the sketch editor then... You should open the file with another text editor (notepad, Total Commander viewer, NotePad++, etc.) and you would probably be able to paste.
OK, good night smiley
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23607
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

Ok, will check that out tonight.
I also tried going back to 1.0 (vs 1.0.3) and paste from there did not work either.
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

I've tried out a couple of other things tonight, hoping to get rid of the ghosting:
1. I've added some big (10uF) capacitors in parallel with the existing smaller ceramic ones to each shift registers. Didn't help.
2. I've disconnected the clear (SRCLR) pin of the shift registers from the 5V (which prevented them from clearing) and connected them to two Arduino pins. When I'm clearing the the data in the shift registers, instead of shifting all 0s into them, now I set the SRCLR to LOW for a moment and that clears them. This way te ghosting doesn't go away even if I add that software delay. This is either because the clear doesn't work (does not clear the shift registers) or because for some perverted reason they need those 0s to be shifted in...

God only knows what the hack is going on here smiley
« Last Edit: March 07, 2013, 04:43:24 pm by Un4Seen » Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23607
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

SRCLR only clears the first, need  an output clock to make the 0's show up at the output.
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.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23607
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

Check the end of this post
http://arduino.cc/forum/index.php?topic=144057.new;topicseen#new
Not seeing any ghosting - why not ask to see that code?
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

Oh, yes, you're right. It's not enough to clear, you need to latch too. I'll try that tonight. Thanks! smiley
Logged


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

I kind of grew tired of hunting down the ghosting smiley I'll leave it as it is for now, with the software fix. I read somewhere that somebody had the same problem and he changed some wires and bad connections and the problem went away. Maybe I'll have the same luck. Today the printed circuit will be ready so I will soon switch form the solderless breadboard solution to the printed circuit (let's hope I've designed it well smiley ).

Anyway, I wanted to write about the LED currents again. For 20 mA per LED we agreed to have 82 Ohm resistors. I've used 1KOhm ones instead, limiting the current to about 1.6 mA per LED. This seems to be the optimal value for super-bright, diffused, 3mm blue LEDs. This value seems to give optimal brightness (not too bright to cut through your retina, but bright enough if there's no strong light in the room - a lamp is fine, in bright daylight they look a bit pale). If the LEDs are brighter, they bother me at night. For white LEDs probably the same resistor values are optimal. For orange, green and red ones you need weaker resistors because their voltage drop is less.

As an experiment, I've tried adding higher value resistors. At 5.6 KOhm (0.3 mA) the LEDs still look quite bright (but not enough for a cube in my opinion). The point where they start loosing their light is 47 KOhm (0.03 mA).
« Last Edit: March 11, 2013, 06:34:55 am by Un4Seen » Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23607
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

Wow, that's pretty efficient!
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! smiley

Just for fun, here's another video of the 4x4x4 LED cube smiley
http://youtu.be/H_wenZQ0fmI

The main thing to notice here compared to the previous video is how much smoother the animations are, even on camera. This is because now I'm switching layers every 1 ms. Previously it was 3 or 4 ms.
Logged


Greenville, IL
Offline Offline
Edison Member
*
Karma: 11
Posts: 1309
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 It's getting better all of the time! Way to go!
Logged


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

Thanks smiley
I stopped developing animations for now in favor of starting the 8x8x8 cube, but new ones will follow when the big cube will be done smiley
Logged


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

As I have promised, I'll try to give back what I have learnt here to the community, by writing a series of articles about how to build an LED cube. For now, I've written a very long introduction smiley

http://iqjar.com/jar/building-an-8x8x8-led-cube-introduction/

I plan to write 3 more articles, one about building the cube itself, one about putting together the driving circuit and one about writing software for it. These will take time, because I'm doing it in parallel with actually building the big, 8x8x8 cube, so that the experience is fresh while I'm writing about it.
I'm trying to explain things on a very simple level, suitable for beginners like I was a few months ago.
Logged


Canberra Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 500
Hardcore Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great article there  Un4Seen smiley-cool Its good to see people, such as your good self, take the time to write up these tutorials. Looking forward to the software article, Pedro. 
Logged


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