Go Down

Topic: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 (Read 44357 times) previous topic - next topic

Can you copy-paste from scratch to notepad and from notepad here? If not, which step fails?
Andras
http://iqjar.com

CrossRoads

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: [Select]

/*
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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 :)
Andras
http://iqjar.com

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#229
Mar 07, 2013, 10:41 pm Last Edit: Mar 07, 2013, 10:43 pm by Un4Seen Reason: 1
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 :)
Andras
http://iqjar.com

CrossRoads

SRCLR only clears the first, need  an output clock to make the 0's show up at the output.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Oh, yes, you're right. It's not enough to clear, you need to latch too. I'll try that tonight. Thanks! :)
Andras
http://iqjar.com

#233
Mar 11, 2013, 12:25 pm Last Edit: Mar 11, 2013, 12:34 pm by Un4Seen Reason: 1
I kind of grew tired of hunting down the ghosting :) 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 :) ).

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).
Andras
http://iqjar.com

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Yepp! :)

Just for fun, here's another video of the 4x4x4 LED cube :)
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.
Andras
http://iqjar.com

cyclegadget


It's getting better all of the time! Way to go!
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

Thanks :)
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 :)
Andras
http://iqjar.com

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 :)

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.
Andras
http://iqjar.com

Pedro147

Great article there  Un4Seen 8) 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. 
http://www.pedroduino.com

Go Up