3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED Cube 8x8x8

Step 40Build the controller: Buttons and status LEDs

Build the controller: Buttons and status LEDs
«
  • IMG_5982.JPG
  • IMG_5973.JPG
  • IMG_5974.JPG
You can make a LED cube without any buttons at all, but it's nice to have at least one button and some status LEDs for debugging.

We added one awesome looking button with two built in LEDs, and one regular button with an LED.

The first button is mounted on the latch array PCB, since this will sit on top of the AVR board, and we want the button easily accessible. The wires are routed through the ribbon cable. The second button and LED sits on the AVR board and was mostly used for debugging during construction.

The buttons are connected between GND and the IO pin on the ATmega. An internal pull-up resistor inside the ATmega is used to pull the pin high when the button is not pressed. When the button is pressed, the IO pin is pulled low. A logic 0 indicates that a button has been pressed.

The LEDs are also connected between GND and the IO pin via a resistor of appropriate size. Don't connect an LED to a micro controller IO pin without having a resistor connected in series. The resistor is there to limit the current, and skipping it can blow the IO port on your micro controller.

To find the appropriate resistor, just plug the led into a breadboard and test different resistors with a 5v power supply. Choose the resistors that make the LED light up with the brightness you want. If you use LEDs with different colors, you should test them side by side. Different color LEDs usually require different resistors to reach the same level of brightness.

We will leave it up to you to decide the placement of your status LEDs, but you can see in the pictures below how we did it:
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Jan 13, 2011. 3:48 PMwhybjorn says:
Are these momentary buttons that only stay on while your are pressing them? Thanks.
Aug 14, 2011. 9:13 AMTechNotes says:
Yes. These are momentary push-buttons.
Jul 27, 2011. 3:56 AMpaler31 says:
I was just wondering as I can not see from the diagrams which button is connected to which port on the processor.
Aug 9, 2011. 1:59 PMTechNotes says:
The reset button goes to RESET, and the rs232-mode button goes to (OC1A)PD5.
Jan 9, 2011. 4:47 PMsirbobls says:
this button with the 2 built in LED's, can you post a link on where i can get one! or email it to me, i have been looking for this type of button for a while!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
651
Followers
7
Author:chr
I like microcontrollers and LEDs :D