Building Andy Continued
The SainSmart Uno S is very similar to the Arduino R3 and actually includes both female and male breakout connectors. This is handy when you only have female-male jumper wires. Moving back to the left-hand side, you can see that I routed the second set of motor wires through the adjacent hole I routed the first wires through.
I found that the pins connected to the motor wires prohibit a 90-degree connection from the motor shield because they no longer reach inside the screw terminals when they are bent. If you are not worried much about aesthetics, you can skip this step and just screw them into the terminal blocks as normal. I clipped off these ends and stripped back bare wire.
To ensure a good connection, I quickly tinned the bare wire with my soldering iron and screwed them down tight into the terminal. This ensured that my connection held fast to the screw terminal and would not break away during transport or handling. I did this with both sets of motor wires.
Now it's time to include a power source to drive the motors. The simplest and cheapest way to do this is through a common 9V battery. Take your 9V battery clip and strip and tin the ends if they are not already tinned for you. Then, using a screw driver, insert the wires into the terminal blocks in the Vin (Red) and GND (Black) slots. You will notice later that I routed the 9V wires through a hole in the chassis.
Here is a nice shot of everything connected. You also get to see the Arduino Motor Shield R3 here for the first time. Note how I have everything connected as you may need to reverse one set of the motor wires later on.
Now that we have the Arduino, Motor Shield, and Motors partially wired up, it's time to move onto the ultra-sonic sensor and get it installed onto the servo. As you can see, I used my 3D printer to print a custom mounting bracket for the HC-SR04 sensor. I have uploaded the .STL file for this bracket to my Thingiverse account so you can download it for free. Here is where the male-female jumper wires come in handy. I did not have any, so I had to improvise and use male header pins to make male-female jumpers. Mounting the sensor to the bracket is as easy as sliding the round transceivers through the holes. You may need to file these holes some depending on how well calibrated your 3D printer is.
I used a little dab of hot glue on each corner to secure the sensor to the mount. Once this is completed, you can place the mount on top of the servo. Once you are sure that the mount is centered with the servo's sweep, you can screw it down. I used a dab of hot glue on the screw and mount as my servo's splines were a bit worn down. Be careful not to tighten the screw too much as it will bind the servo.
Here you can see that I again used hot glue to secure the makeshift connector to the sensor's pins. Since this is a moving piece, I highly recommend doing this. I have also hot glued the cable where it passes through the chassis leaving about two inches of slack to compensate for the movement of the ultra-sonic sensor. This helps prevent abrasion of the cable and keeps everything nice and secure.
In these two shots, you can see how much slack I left between the sensor and where I glued it down to the chassis. Moving to the back of the chassis, you see how I routed the sensor wires close to the servo wires and used the header pin method to connect the cable to the breadboard.
Now it's time to give Andy some headlights. While this is not a necessary step, I included this as a way to add in another coding lesson to the robot. Using female-male jumpers, affix 2 LEDs to the wires and route them back through the chassis.
Before gluing on the LEDs, let's affix some goofy "googly eyes" for comical effect. Just a thin dab of hot glue is needed as anymore will melt the eyes.
Once you have the eyes glued on, glue the LEDs in place as seen in the image above. I glued all the way past the connector making sure the glue encapsulated the LED leads as well as the connector. This prevents the LEDs from falling out of the connector. Remember to color code the jumper wires with the leads; make the anode the lighter color wire and the cathode the black wire.
What would a robot named Andy be without a big, toothy smile? Here I printed a mouth with teeth out on my 3D Printer. I used mounting tape that I trimmed to fit and then pressed the mouth into place.
Here is Andy with his big smile! Notice that the mouth has been placed behind the front chassis mounting screw.
Now it's time to tackle the most tedious part of the entire process. Wiring up the Arduino to the servo, ultra-sonic sensor, and LED headlights is a simple task and quite quick if you use generic jumper wires. For the purpose of this article, I chose to use hookup wire that was cut and bent to size to make everything easier to follow and as neat as possible. The first thing we need to do is drop a ground to the breadboard; as you can tell, I did just that. I extended the ground to each LED. In the image above, I did mess up and have the right resistor out of place a little. Move the ground wire over by one hole to the left and all will be fine.
In these two images, you can see that I cleverly ran the wires for the LEDs under the motor shield in an effort to keep the project neat and clean. Don't worry too much about following the wiring in the images as I will have a wiring schematic you can follow instead at the bottom of this article.
Here you can see that I have extended the ground to another row of connectors and dropped 5V down to the board.
In these two images, I have connected the servo and ultra-sonic sensor pins to the Arduino using more tight-fit custom-bent jumpers to keep things clean.
Finally, you can see where I brought the servo and sensor data lines to the other side of the Arduino using the same method I used when running the LED power lines. Below, I have included a wiring diagram to help you wire your robot exactly as I did mine. In the next installment, we will cover programming Andy using the Arduino IDE. Thanks for reading and remember to Hack The World and Make Awesome!
PRICING: You can find products similar to this one for sale below.
United States: Find other tech and computer products like this over at Amazon's website.
United Kingdom: Find other tech and computer products like this over at Amazon UK's website.
Canada: Find other tech and computer products like this over at Amazon Canada's website.
Recommended for You
- We at TweakTown openly invite the companies who provide us with review samples / who are mentioned or discussed to express their opinion of our content. If any company representative wishes to respond, we will publish the response here.
Latest News Posts
- Lucasfilm denies CG Princess Leia plan for 'Star Wars 9'
- Take home 'Pete's Dragon' in our latest Blu-ray giveaway
- Putting Nintendo Switch launch games into perspective
- 'Stranger Things' director talks bigger, darker season 2
- Samsung's new Galaxy S8 looks amazing in leaked videos
- Intel 82579v - Code 10 - media disconnected
- 80mm or 92mm Fan for D8000-3
- p67a-ud3-b3 with u1d UEFI bios: pcie 4x works as 1x
- Can't Find PC-O10 Riser Kit
- Help overclocking x5460 / GA-EP43-UD3L past 3.99ghz
- Immersion and Nintendo enter into agreement to bring Immersion's TouchSense Technology to the Nintendo Switch System
- LucidSound invites Nintendo Switch gamers to a new standard of powered audio with the LS20 Amplified Universal Gaming Headset
- Opera Neon envisions the future of web browsers
- Nintendo Switch launches March 3 at $299.99
- ESL One returns to Southeast Asia to kick-off world class Dota 2 action in 2017