Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: ruddock1234 on March 21, 2015, 01:26:44 PM

Title: switch
Post by: ruddock1234 on March 21, 2015, 01:26:44 PM
How do I add a switch to this circuit to turn battery on and off
Title: Re: switch
Post by: Ibaeni on March 21, 2015, 02:17:27 PM
You could simply put one in series with the positive lead of the battery. A simple SPST switch would do the trick.
Title: Re: switch
Post by: ruddock1234 on March 21, 2015, 03:48:32 PM
So it doesn't have to be connected to ground
Title: Re: switch
Post by: Ibaeni on March 22, 2015, 10:51:52 AM
No it does not. Essentially what a really basic switch does is disconnect and reconnect the wire. I'll put a link to an example switch below. Basically what is happening is that when you switch it on, the wire is reconnected and when it is flipped off the wire is disconnected.

This link has a good picture of how to turn a light on and off with a switch. It is the same idea with your circuit, except instead of a light, it is a more complicated circuit.
http://www.homelightingtips.org/light-control-systems/light-switch-diagram/ (http://www.homelightingtips.org/light-control-systems/light-switch-diagram/)

Below is a link to an example switch from sparkfun.
https://www.sparkfun.com/products/9276 (https://www.sparkfun.com/products/9276)