Now that our robot has the motors and controllers in place we can start adding sensors! The first sensors will be infrared proximity switches and an infrared remote control. Infrared (IR) sensors are low cost and very useful for short range detection and communication.
You’ll need the following components for this phase of the build:
- top cover
- 4 – M3x10 screws
- DFRobot IR Kit for Arduino
Follow these steps to add the IR sensors:
1. Prepare top cover
Remove the paper backing off the both sides of the top cover.
2. Connect IR receiver to controller
Remove the IR receiver and transmitter from the package.
Feed the cable on the receiver through the hole top panel as shown in these photos:
Insert the receiver connector on the D11 header on the controller. Notice that the green wire is positioned towards the white connectors.
3. Install top cover
Make sure the power and motor wiring is neatly tucked in on the sides of the controller. Position the top cover and secure with two M3 x 10 screws. No need to put in 4 screws at this point as we’ll be taking the cover off frequently.
As shown in the last photo, make sure the programming cable exits the side and the IR receiver exits from the top.
4. Mount IR receiver on chassis
Place a small piece of velco on the back/top of the chassis:
Place the matching velco on the back of the IR receiver.
Neatly bundle the IR receiver wire so it does not get tangled int the wheel:
Your now ready to upload software and test the IR remote control!