Let's Make Robots!

Where to put an On/Off Switch on Picaxe 28x1


While I'm trying to solve my distance sensor problems , I've found that it would be convenient to have  an on/off toggle switch to be able to turn off the robot any time instead of having to wait until the program ends or replug the robot back into my computer to download a blank program to get it to stop moving. My question is: where on the board would I put this switch?

I am using the the starter pack with Picaxe 28x1 microcontroller and board.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I guess I was asking for something very basic. I have a switch with two ends. I was wondering where on the board I attach them to i.e. which pins I attach the ends to, given that my board looks exactly like the board in the "First Robot" tutorial.


You dont attached it to pins on the board. Take the red wire from the battery clip and cut it. Attach both ends to the switch and it will turn the board on and off when you switch it.
Ahhh. I get it now. Thanks for the help!
I always switch the positive voltage, rather than ground. It is best practice to switch positive because if you put the switch on ground and something happends to ground your circuit while you are working on it, you'll have a live circuit. 

DO NOT ATTACHED BOTH GROUND AND POSITIVE VOLTAGE TO THE SWITCH! This is a common occance when people first wire up a switch. It ONLY needs to have ground OR voltage. When the switch is "off" it breaks the circuit. When it is on it allows current to pass through. If you wire both ground and voltage it will get hot and catch fire.

Sorry if this seems obvious but I did it my first go around ;)

No, it was not obvious! Thanks for the tip! This is my first robot and I'm posting in the beginner section because I have so much to learn.
Cut the positive wire from the battery and put the switch in there is the simplest way.