Simple Bot Switches, Sensors, and Modules
by randofo in Circuits > Robots
25584 Views, 151 Favorites, 0 Comments
Simple Bot Switches, Sensors, and Modules
![SBchapter3.jpg](/proxy/?url=https://content.instructables.com/FF4/PLM1/H58PK68F/FF4PLM1H58PK68F.jpg&filename=SBchapter3.jpg)
Sometimes we want to add some complexity to our Simple Bots so that the motors do more than spin in one direction. This is where switches, sensors and modules come in. These tools allow us to not only change the direction of the motor, but also vary the speed and toggle the motors on and off. These tools are indispensable in giving our bots personality and purpose. It is these added complexities that make the bots seem less like out of control machines and more like living creatures. Don't be afraid to experiment and try adding any of these modules to any of the Simple Bots.
Get the Simple Bots eBook for more projects!
|
DPDT Switches
![ch3B.jpg](/proxy/?url=https://content.instructables.com/FUJ/UEGQ/GV0KKPQU/FUJUEGQGV0KKPQU.jpg&filename=ch3B.jpg)
DPDT switches are mighty tools in bot building because they can allow you to reverse motor direction with the flick of a switch.
The way we typically use these switches, in Simple bots, is to have a lever attached to the motor shaft, which rotates around and toggles the switch, hence reversing its direction. In other words, the motor hits the switch and changes its direction and rotates the other way, and then again hits the switch and changes its direction and rotates back the way it came and hits the switch and changes its direction, etc.
You can get quite complex behaviors by using this technique. For instance, you can have something attached to a motor hit the switch back and forth very rapidly to quickly change motor direction. If you put this motor in parallel with other motors, the bot can have two motors quickly moving back and forth in unison, which is ideal for a walking bot.
Alternately, the motor can have a wheel do a full rotation, hit a switch, and reverse itself. You can then use this technique to have two motors which are both doing this at the same time, but slightly out of synch. This will create a bot which is constantly alternating between turning, and driving forwards and backwards.
So, as you can see, using this simple switch, you can get a bot to do a lot of complex and interesting activities.
Reed Switch
![ch3A.jpg](/proxy/?url=https://content.instructables.com/FCU/JKBC/GV4W35ON/FCUJKBCGV4W35ON.jpg&filename=ch3A.jpg)
A reed switch is essentially a magnetically actuated switch. To put it simply, when you move a magnet past it, it closes the switch and turns on the motor.
You can incorporate this into your bot to add a little more control. For instance, you can put a magnet on a rotating wheel and have it pass by a reed switch to turn on a different motor.
In this way, you can use one motor to pulse another motor at different rates and speed up or slow down its speed. In robotics, this is called pulse width modulation (or PWM for short).
Tilt Switch
![tilt.jpg](/proxy/?url=https://content.instructables.com/F92/5BXA/H01NGHEG/F925BXAH01NGHEG.jpg&filename=tilt.jpg)
Tilt switches typically are metal tubes with a rolling metal ball inside. When the tube tilts, it makes an electrical connection between the body of its casing and the wire lead sticking out of it. Some other variations of tilt switches have two wires sticking out for each end of the switch.
Tilt switches are fun because they can be used to activate a motor when your bot tilts forwards or backwards. This is cool because it allows your bot to respond when it tilts in a certain way. This means, you can make a bot that is constantly correcting its own posture or, better yet, comically throwing itself off balance repeatedly.
Tilt switches are fun because they can be used to activate a motor when your bot tilts forwards or backwards. This is cool because it allows your bot to respond when it tilts in a certain way. This means, you can make a bot that is constantly correcting its own posture or, better yet, comically throwing itself off balance repeatedly.
Simple Light Switch
![4A.jpg](/proxy/?url=https://content.instructables.com/FKK/I2RH/GOIDHBJS/FKKI2RHGOIDHBJS.jpg&filename=4A.jpg)
![4B.jpg](/proxy/?url=https://content.instructables.com/FAW/OLMJ/GOHMGLTN/FAWOLMJGOHMGLTN.jpg&filename=4B.jpg)
![4C.jpg](/proxy/?url=https://content.instructables.com/F8C/JCVB/GOHM3NEA/F8CJCVBGOHM3NEA.jpg&filename=4C.jpg)
![4D.jpg](/proxy/?url=https://content.instructables.com/FG4/U7YD/GOHMGLTP/FG4U7YDGOHMGLTP.jpg&filename=4D.jpg)
![4E.jpg](/proxy/?url=https://content.instructables.com/FF5/MKES/GOHMAOTX/FF5MKESGOHMAOTX.jpg&filename=4E.jpg)
![4F.jpg](/proxy/?url=https://content.instructables.com/FUU/IPGM/GOHMGLTR/FUUIPGMGOHMGLTR.jpg&filename=4F.jpg)
![4G.jpg](/proxy/?url=https://content.instructables.com/FP8/X9VM/GOIDHBJX/FP8X9VMGOIDHBJX.jpg&filename=4G.jpg)
In building Simple Bots, we are going to use a series of photo-coupled devices called modules. But, before we can do this, we need a good photo-couple to use as a light-activated switch. To make one of these switches, we will be using a special OSRAM-brand photo transistor and any standard NPN transistor (like a 2N2222, 2N3904, BC546, etc.). These switches will allow the motor to spin in direct correlatoin to how much light it senses. In other words, the more light, the faster the motor goes and the less light, the slower.
To learn how to build your own visit the Simple Light Switch instructable.
To learn how to build your own visit the Simple Light Switch instructable.
Modules
![7A.jpg](/proxy/?url=https://content.instructables.com/FBS/9BWN/GOHMGLVS/FBS9BWNGOHMGLVS.jpg&filename=7A.jpg)
![6A.jpg](/proxy/?url=https://content.instructables.com/F9X/ECRF/GOIDHBV9/F9XECRFGOIDHBV9.jpg&filename=6A.jpg)
![main1.jpg](/proxy/?url=https://content.instructables.com/F96/Q940/GVBJQUVY/F96Q940GVBJQUVY.jpg&filename=main1.jpg)
In the Simple Bots eBook, modules are going to refer to photo-coupled consumer devices that allow you to "steal" logic and sensor output from standard consumer devices.
In other words, we are putting a light switch in front of an LED and when that LED gets turned on by computer logic or a sensor, the motor gets activated.
A few of the basic ideas for this are going to be demonstrated, but this technique can be used with anything that has an LED. As such, anything that your bot can carry and that has an LED, can be used as a controller.
Some example modules include the light module, the blink module, and the motion module