Introduction: Bump Sensor for Sumo Robot
For sumobots course...
Now that we can transmit and receive an IR pulse. We will make the robot "freeze" until a person on our team gives us a "bump". So we need a way to detect this "bump". I have used paperclips, but you could also use a momentary depress switch.
To do this task we will need to find the 5V rail and the D13 female header.
Get a long and a short wire connected to a paperclip. The short wire will be connected to the D13 female header and the longer one will be connected to the 5V rail.
First lets find the D13 female header. On your version I have soldered on a jumper wire to digital input pin D13.
Locate this female header and insert the shorter paper clip wire into the female header.
Step 2: Connect the D13 Paperclip Directly to the Sumo Body
Clip the paper clip directly to the body of the sumo bot. Take care to avoid the wheel. The paper clip should stay firmly. This is the stationary part of the switch, and will not move.
Step 3: Loop the Longer Paperclip Wire Through Some Holes in the Body.
Remove the battery and locate some holes in the back of the sumo bot. Thread the longer paperclip wire through these holes, to give the paperclip support. We want it to float freely above the other stationary paperclip.
After you are satisfied that it will float, replace and reconnect the battery.
Step 4: Connect the Other End of the Shorter Pin to the 5V Rail.
The other end of the floating paperclip will be connected to the 5V rail. This will cause D13 to go high when the 2 paperclips touch each other. This is what the program will detect and cause the sumo bot to unfreeze.
You can use electrical wire or hot glue to tidy up the wires so they aren't loose. You can also cut out extra wire that you don't need.
Power up your sumo bot. When you touch the 2 paperclips together you should see a small light go on under the printed circuit board. This is a built in led that the nano already has connected to D13.
We have a be nice policy.
Please be positive and constructive.