Go Down

Topic: Using a toggle switch to turn on/off a Arduino MEGA 2560 (Read 5461 times) previous topic - next topic


Hi everyone.

I am new to this forum, so if this topic does not belong to the right place of the Arduino forum, please admin move it to the right place.

Right now, I am currently working on a project on my university, where we are going to build a LED cube with 5x5x5 = 125 LEDS.
The processor we are going to use is an Arduino MEGA 2560. We are going to use 8000 mcd blue LEDS that will light up and make some cool effects.

In order to make this project more practical, we have decided to use a toggle switch to turn the Arduino processor on/off, so that the LED cube can be switched on/off.
We have been looking to this type of toggle switch:


But this toggle switch is handling 12 V/25 A as it says. Since the Arduino processor can only handle 5 V, how would it be possible to connect the toggle switch to the Arduino processor?

Here is how the schematic of the Arduino MEGA 250 should be looking like.


If the load of a switch is less than the switch can handle, you are fine.

The more important question is, how do you plan to wire it?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


we plan to put a switch between the arduino and the cube, but there are about 30 wires coming from arduino mega to the cube which
need to be controlled individually. The leds can only handle about 3V.

Do you have any idea of where we could put the switch, or if any other switch is easier to use?


LEDs do not handle voltage.   They drop it.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


This is actually how we could connect the switch. But the pins that comes out from the toggle switch are only two, so the wire would be connected to the other pin instead. Is it possible to connect the switch on this way?



Assuming you are powering Mega and all of the lights via the wall socket, the simplest approach is just use a power strip with an on/off switch.  Then plug in your power cords to the power strip.  If you are using batteries, then obviously you want a toggle switch between the batteries and the electronics.  I assume that with 8,000 LEDs, you aren't powering all of those LEDs directly from the Mega.  If you have multiple power supplies, you can get double pull, single throw switch (DPST) that one switch controls two wires.  If you need it there are higher versions like triple pull, single throw.


Are you wanting to turn off power to the cube? or are you wanting to give a signal to the Arduino to turn off the cube?


Apr 10, 2013, 07:30 pm Last Edit: Apr 10, 2013, 07:41 pm by Anon_person Reason: 1
I actually want the LED Cube to turn on/off so that it does not light up all the time we connect the Arduino MEGA 2560 to the computer via USB cable.


To explain the project a bit more:

We are going to have 6 effects showing up on the LED Cube.
What we basicually want is to be able to turn the LED cube on/off.

So if the Arduino MEGA 2560 is using a switch, when the switch button is on, the Arduino MEGA 2560 should be turned on and the first effect will be shown, the second, the third and so on....and when we turn the Arduino MEGA 2560 off, the Arduino MEGA 2560 will be turned off.

Turning the Arduino MEGA 2560 on again will simply turn on the Arduino MEGA 2560 and show the first effect, the second and the third and so on....

The program should start over from the beginning everytime we turn on the Arduino MEGA 2560. That is how we are planning to do it.

Go Up