Building a Windows Phone Controlled Arduino Robot – Part 1
I am partnering with one of the universities near me to perform a few workshops to build a Windows Phone App to control an arduino robot via Bluetooth. I recently built an universal app that communicated to an arduino board to perform a little trivia game. It was fun and straightforward. I am bringing most of that underlying code over to controlling a robot. Here is what I got so far:
Here are all the parts I got for the robot:
- DFRobot 2WD Mobile Platform for Arduino Product Code: RB-Dfr-16 (RobotShop.com)
- DFRobot Wheel Encoders for DFRobot 3PA and 4WD Rovers (2pk) Product Code: RB-Dfr-46 (RobotShop.com)
- SunFouder 2 pcs Ultrasonic Module HC-SR04 Distance Sensor for Arduino UNO (Amazon.com)
- Seeed Studio Motor Shield (local Radio Shack or online)
The first step was to assemble the bot.
After I built the bottom portion I realized I should solder the motor since it will be easier before it is assembled. So I took everything apart and stared that process.
Once soldering was done, I assembled the bottom portion again.
A few other things to note. The bottom plate seems like the roller ball should “drop” in. It is supposed to go under, since the battery pack sits on top. Unassembled again for me. There is a jack for either an external power supply or charger if the batteries were rechargeable. There was some articles online discussing adding a capacitor if a charger was going to be used. I did not want to add that since I did not have the right capacitors.
This is what the underside of the switch looks like after it is added.
Here is a diagram if you were to use the trickle charger option.
This was the wiring setup I used.
I originally used a seed studio shield that had grove connectors, which worked fine. However I did not want to deal with finding the connectors or making new connectors for the Bluetooth module
See video of the test. Everything worked!
I used the code from Seeed Studio to make sure the robot moves. You can download it from here or my site here. Use arduino studio to load it on the board and see if your robot moves in all 4 directions.