Introduction: "Project Launch Platform Robot" Part 1 - the Head

Introduction;
I am in the process of building a robot that I can attach some of my many projects to and have function off of the robot itself. Instead of making a flat bed on tracks, I thought it could use some personality. This bot will be several serial devices, mostly controlled by several Arduino's as serial controllers with very limited logic. All of the controllers are currently tied together with Processing and called upon by several programs from the built-in vostro laptop.

In English:
Big serial robot with attachments and a vast open-ended possibility for programming.

This series will be broken into several parts starting with the head.

Please be careful, working electricity can be dangerous and even result in fires. I take no responsibility in any damages that are caused as a result of somebody following this Instructable. Remember, test everything before assembly to ensure it will work with your parts in a safe and functional manner.

With this in mind, let's begin;

Step 1: Part 1 - the Head: Parts List

Parts List:

Electronics:
Arduino Uno R3 - Serial controller with limited programmed logic.
Motor shield - Various companies make them, Sainsmart has more robust screw blocks.
USB Webcam - I choose a Logitech® B910 HD USB 2.0 Webcam
LED Flashlight - Easier to use a pre-made flashlight that already has a lense.
Laser diode - Bonus if it is included in the flashlight. (Found mine at KMart)
Xbee - *Optional, if you want to talk to devices from the robot (The head is the highest point.)
Wire terminal blocks - *Optional either use these or solder the wires to each other.
Ultrasonic Distance Sensor - Used for ultrasonic mapping and object avoidance.
Quick release power connectors - Attaches head to the bodies power supply
Metal Pushbutton switches with LED - Used for Glowing "eyes" and Arduino reset button.
2x Tip 120's, diodes, and resistors
Step up/down voltage regulator - The Arduino was not able to sufficiently power the LED flashlight  / laser.
Mini stereo jack (Male) -  use to control automatic focus and shutter of my DSLR.
Dual Relays - Solving my voltage leak problem for the light  and laser modules.
SLA 12v Batteries - 12v power source hooked to the motorshield

Headform / Neck:
Bezcor Mp 101 PT camera mount
Large project box - Holds Arduino, motor controller and most electronics.
Small project box -  Holds relays
Steel strapping - found at Lowes hobby section, looks like "Erector set pieces"
Cardboard - to build the mockup parts before fiberglass
Fiberglass Resin
Fiberglass cloth, fine weave
Nomex cloth - Robots camo skin.

Other:
Fabric Glue
Screws
Nuts, bolts, washers
Hot Glue

Step 2: Part 1 - the Head: Bescor MP 101

The main part of this robots head is a very sturdy Bescor MP 101 PT camera mount. I wanted to be able to mount heavy items to this including my Canon DSLR camera and the Bescor MP 101 is about the best thing I have found out there for the cost. The draw back is that stock, it has a more limited range of panning than I felt was necessary.

360 degree mod for the Bescor MP 101:
Modifying the Mp 101 for 360 degrees of motion was actually very simple with the following guide I found online:
http://www.blindskunk.com/Bescor_MP101_360_Hack.html

Additional Bescor Wiring Mod:
I did not need to use the on-board motor controller or remote for my project. I simply removed them and kept only the four (4) wires necessary for the Pan and Tilt motors operation. (White, Black / Green, Red)

As I will show later on, I additionally cut off the front and back boxes and attached one of my own.

Step 3: Part 1 - the Head: Designing / Building a Head Shape

I didn't take step by step photos of this part (I hadn't thought about documenting and sharing the process at this point) but here is what I do to make a fiberglass form.

First:
Brainstorm and get a rough idea of how you want the form to look. I am a huge fan of the Metal gear series so I went with a shape of the top of Rex's head. Don't worry, the resemblance will grow on you. =P

Second:
I figured out how big I want this to be and built a frame out of the steel strapping. Be sure to take into consideration any load-bearing structures that may need to be reinforced. I knew I would be attaching parts to the sides of the head and thus used angled steel as their supports. Additionally the steel strapping holes will be used to attached the projects head to the neck piece using screws. Be sure to allow ample strapping coverage to secure your project to its neck.

Third:
Take pieces of cardboard and build a body around the steel strapping. Masking tape works well to attach the cardboard together and is dissolvable in later steps. For raised odd shapes, I use water soluble clay, normal bake to harden clay works fine, nothing air hardening. Make sure the face of the largest portions of steel strapping are not covered by cardboard. The fiberglass will need to stick to it as much as your design will allow.

** OPTIONAL** The camera screw threads on the Bescor should protrude through the square hole in the head form. This will allow you to mount a camera on top of the head if your head is flat on top. (Picture 3)

Fourth:
Cutout pieces of fiberglass cloth that are larger than the parts you are trying to cover. Try to get the form covered by the least number of sheets as possible. This will make your form smoother vs. having a form covered in a bunch of mismatched scraps. Now attach your fiberglass by using masking tape and taping it to the inside of the form. (**There shouldn't be any masking tape visible on the outside surface.) Tape it to the cardboard or steel frame, not the inside of the fiberglass. Make sure the Fiberglass cloth is pulled taught, it will be more form fitting when you apply the resin.

Fifth:
You will want to wear gloves, nitril, latex or pvc, this stuff is very sticky and hard to wash off of your skin. Be sure you are in a well ventilated area and wear an approved mask if you have one.

Apply the Resin!
**if you lay down wax paper, the hardened fiberglass will pull right off of it, just make sure the finished (Nice) side is not the side sitting against the wax paper.

Mix the resin and hardener in a cup (I usually use a cut down soda can) as per the instructions on the resin's container. Spread thinly on the outside of the cloth with a Popsicle stick, pencil, etc, making sure to thoroughly saturate the cloth until its see through. You will want this to be as smooth as possible to minimize sanding and shaping later.

Sixth:
Let this dry thoroughly.

Step 4: Part 1 - the Head: Designing / Building a Head Shape II

First (a):
Once the fiberglass has dried, trim the excess that extends beyond the edges of your desired shape.

-------------------------------------------
First (B): ** Bonus -  I did not do this for the head shown, but will for other parts of this build. If you do not want to have the cardboard frame in your form do the following. >> Follow these instructions if you used water soluble clay to build up your form. <<

a) Carefully soak the form in warm water, if you add liquid laundry detergent it will help break the cardboard down. **CAUTION, hot water may deform the Fiberglass.
b) Carefully peel the cardboard away from the fiberglass.
c) Use a small stainless steel or hard plastic brush to work some of the stubborn cardboard off. You will not need to remove every cardboard fiber.
-------------------------------------------

Second:
Go ahead and cut the rectangular and round  holes for each eye. Check other embedded parts for fitment, trim as necessary (Camera, screw mounting holes, etc)

Third:
After everything has been trimmed go back and apply a layer of resin to the trimmed edges while blending it into the finished body.

Fourth:
Add some small pieces of fiberglass cloth to cover the inside of the steel supports and add a layer of resin to the underside.

Fifth:
Allow to dry.

Step 5: Part 1 - the Head: Sanding / Shaping the Head

First:
Sand and shape all of the rough edges and the entire outside of the form. Form should be fairly smooth and don't worry if in sanding some of the fiberglass cloth begins to show, just make sure that you don't completely penetrate the cloth.

----------------------------------
Necessary tools:
Xacto knife
Dremel tool
Sheet metal shears 
sandpaper
----------------------------------

Second:
Go ahead and test the "eye" holes to make sure the switches fit, cut / sand as necessary.

Third:
After the sanding and testing add another coat of resin! This ensures that the form is strong and smooth.
** Repeat the sanding and applying resin steps until your form it to your liking.

Fourth:
Let dry.

Fifth:
Okay Gents and Gals, one last light sanding job with a low grit paper, just to remove any resin bumps and blemishes.  Remember that the smooth surface will determine the end result after cloth skin or paint is applied.

Step 6: Part 1 - the Head: Applying the Skin

First:
Wipe the outside surface dust off with a clean, damp cloth.

Second:
Allow to dry.

Third:
Paint the "eye sockets". I used a flat black acrylic brushed on by hand.
** If you are going to use paint, skip the next few steps on how to apply the Nomex fire retardant skin.**

Fourth:Applying the Nomex fire retardant (because, hey, why not?) skin.
Cutout a piece of cloth in the shape of the form to be covered, with a little border to spare. Try to get all sides to be covered with a single piece of cloth. This will eliminate seam lines. ** If you are having trouble determining how much, what shape, and how to fold around corners, try thinking about wrapping a present.

Fifth:
Starting at the largest side apply a thin coat of glue with a Popsicle stick. Start applying the cloth to the glue making sure to leave a border edge all the way around that you can tape to the inside of the form. Carefully work from the largest side to adjacent side and then out from the middle to the remaining sides. Be sure to remove all of the wrinkles and smooth the fabric out. Use the loose border edge to secure the fabric to the underside of the form with masking tape.

Sixth:
Allow glue to dry.

Seventh:
Once the glue is dry, remove all tape from the border strip. Apply glue to the inside of the form and fold the border strip into it, securing the cloth tightly with masking tape.

Eighth:
Allow glue to dry.

Ninth:
Trim any noticeable frays and cloth edges, apply a thin amount of fabric glue to the edges of this cloth. Nomex is not stayfast cloth and will unravel easily at its edges.

Step 7: Part 1 - the Head: Accessories (light, Laser, Ultrasonic)

I have decided to add a few accessories to the side of my robots head;
* LED Flashlight - Bright white light, visible to humans.
* Laser Module - Pointer and target painter.
* Ultrasonic Sensor
- Area mapping and backup object avoidance.

These parts will be explained and assembled in the following section.

Step 8: Part 1 - the Head: Accessories - Ultrasonic Array

The Ultrasonic sensor array is used to map out areas using Processing, ping objects in order to measure distance, and  a system to avoid bumping into objects.

------------------------------------------
Parts:
Ping sensor
Wire
cardboard
Nomex cloth *Optional, paint.
Fiberglass cloth
Fiberglass resin - There are several fiberglass parts that can built at once to cut down on drying time.
PVC pipe adapter
Tea bottle lid
Radiator hose support from a Miata MX-5 *Funny parts I have laying around*
------------------------------------------

First:
Find a PVC adapter that will allow your ping sensor to fit into one end, while allowing the Radiator hose support to close on the other.

Second:
Remove any greasy residue from the radiator support.

Third:
Apply a permanent glue to the inside of the radiator support  and screw the clip and receiver together.

Fourth:
Measure and mark the large end of the PVC adapter so that the two sensors on the ultrasonic sensor board will either be flush or protrude slightly from the PVC adapter. We do not want to create "shadows" for the sensors.

Fifth:
Cut off and discard the excess from  the large end of the PVC adapter.

Sixth:
Sand the face of the PVC flat using a sanding block.

Seventh:
Using scrap pieces of fiberglass fill in the gaps in the radiator support and apply resin. (Picture 3)

Eighth:
Allow to dry and harden.

Ninth (a):
Sand off all of the lettering and rough points, sand and shape the fiberglass.
** Apply more resin to hollow spots in the fiberglass as necessary, allow to dry and sand.

Tenth:
With the Ultrasonic sensor placed into the PVC Adapter, measure and cut a cover for it out of cardboard. (Picture 4)

Eleventh:
Once the cardboard cover is snug fitting remove it and apply a layer of fiberglass cloth and resin to each side. (Picture 5)

Twelfth:
Allow to dry.

Thirteenth:
Cut off excess fiberglass from the cardboard and using an Xacto knife, cut out the holes for the two sensors.

Fourteenth:
Once you have proper fitment of the sensors face into the PVC adapter, glue the fabric to the outward facing side of this cover.  Trim the excess and cut holes for the sensors to poke through. (Or use paint)

Fifteenth:
Hot glue the Ultrasonic sensor to the inside of the face with the two sensors protruding out of the holes in it.

Sixteenth:
Solder your connections being careful to document which wire is connected to what. Use heat shrink tubing to cover your connections and avoid shorts. (Picture 6)

Seventeenth:
Drill four (4) holes through the radiator hose bracket. One (1) for the wires from the flashlight / laser module and one (1) for the Ultrasonic sensor. The last two (2) holes will be used to attach the mount to the side of the head, these should line up with the steel support contained within the head form. Refer to (Picture 2) for the location of these holes and (Picture 8) for the steel supports example.

Eighteenth:
Take your tea bottle lid and glue it to the back (Smaller side) of the PVC adapter, covering the hole.

Nineteenth:
After the glue has dried it's time to finish up all surfaces of the PVC adapter and radiator hose bracket. I covered the back part with the Nomex cloth, from the tea lid to the back of the radiator support. The radiator hose support and PVC adapter were then painted with a flat black, acrylic paint. (Picture 7)

Twentieth:
After the paint is dry, tie a knot in the ultrasonic sensor wiring about 3 inches back from the sensor, this will keep the wire from pulling the connection to the sensor loose. Thread the wiring through the PVC adapter and out the radiator hose support. Next, take the face of the ultrasonic sensor and glue it into the front of the PVC adapter.

Your "Ultrasonic Array" is now complete!

Step 9: Part 1 - the Head: Accessories - Flashlight / Laser Module

I did not take any pictures of the before and after flashlight pictures, but I will briefly describe the process.

Going out to KMart I found a nifty little LED flashlight with a built-in laser module. The flashlight combo took three (3) AAA sized batteries and was longer than I needed for my robots head. I ended up cutting the flashlight down to about five (5) inches in total length and wiring the Flashlight and Laser Modules leads to another cut down usb cables' wire. This enabled me to be able to independently power the two (2) devices off of the Arduino's 3.3V power rail. The flashlights cut down body was then glued back together and the hole for the wire was sealed shut with silicone.

Sounds great, but there was a problem....

It seems the Arduino's 3.3v power rail does not supply enough current to sustain the flashlight for extended periods of time, that and I felt I could get more strength out of the laser modules brightness. I know, three (3) AAA batteries worth of power are a little better rated anyways.

The solution:

After trials and deliberation I ended up going with a Pololu Adjustable Step-Up/Step-Down Voltage Regulator S8V3A (http://www.pololu.com/product/2120) wired directly to the 12v SLA's  main power connector. This device can be tuned with a small Philips head screwdriver to increase or decrease the voltage and is very stable. After more testing I found that this particular flashlight / laser module combo worked the best at about 3.5v and the regulator can sustain an indefinite amount of this combo's current.

Since this voltage regulator is built into the actual head and not the body, it is not necessary to prepare it in this step. The final wiring of the Pololu Adjustable Step-Up/Step-Down Voltage Regulator S8V3A (http://www.pololu.com/product/2120) will be visited again in a later step.

Step 10: Part 1 - the Head: Attaching the Accessories Bracket

The next thing that should be done before the parts go into the head form, is to attach the accessories bracket with the Ultrasonic Sensor, Flashlight, and Laser Module.

First:
Pull the accessories' wires through the center hole in the steel support bracket from the outside, in. (Picture 1)

Second:
Using two (2) bolts with washers as spacers (to keep from crimping the bracket accessories wires), bolt the radiator hose bracket to the side of the head with the two (2) outside holes in the steel supports. (Picture 1)

Third:
Leave the wires loose inside of the head form.

Step 11: Part 1 - the Head: Attaching the "Eyes" and Camera

I choose a Logitech® B910 HD USB 2.0 Webcam to enable my robots head to "see" or well rather, allow the user to see through its prospective. In these next steps we will attach this webcam and add the switch "eyes" to the robots head form.

A little camera prep work:
The webcam will need a little modifying to remove the heavy mount attached to it from the factory. This is actually easy to remove and requires only a precision Philips head screw driver. The screws for this mount are located on the bottom under little rubber sticky covers. Once these screws are taken out, just pull the camera carefully apart, remove the mount and then reassemble the camera. Once the mount has been removed from the camera, discard it, it is unnecessary for this build.

First:
This next part will probably pain a few people; take the top of the webcam and rough the plastic part up, being careful not to scratch or damage the glass covering the face. Roughing this will allow glue to adhere to the camera more easily.

Second:
Glue the camera to the front underside of the head form. Clamp and allow to dry.

Third:
Wire the one of the switch "eyes" so that you use 2 wires for the LED and 2 wires for the Momentary Enabled switch. (It has to be the enabled hookups, so when you push the switch the contacts are on, otherwise it will not reset the Arduino.)
** One "eye" should have about a 2.5' lead to connect to the robots body, the other leads should be only about a 1' that go to the controller box in the back of the "neck".

Fourth:
Do the same for the other eye, it's okay to feed the LED's power from the first eye, but the circuits for the momentary switches need to be kept separated. (One lead will reset the Arduino in the head, the other the Arduino that controls the body and movement.

Fifth:
After threading the wires through, place the "eye" switches in their socket holes and secure firmly with the provided nuts.

Sixth:
I used hot glue to hold the wires to the inside of the head form, just be careful to allow clearance for the Bescor MP 101. All of the wires should run to the back of the head form, to a central point near the middle. Since space is limited you may want to have the wires glued next to each other in the back instead of bundled together. The wires will need to flex and be able to fit under the back of the head when it is tilted all the way back (head panning up). (Picture 1)

This concludes the Head form portion of this build, time to mount it on something.

Step 12: Part 1 - the Head: Trimming / Wiring the Bescor MP 101

Way back in step two (2) I talked about how to make a Bescor MP 101 rotate 360 degrees, and that I had cut the poor thing apart. We will cover the body modifications in these next few steps.

The Bescor MP 101 has a motor controller mounted into the front of it, we won't need that for our build, but we do need the wires for both motors. Unscrew and cut everything electronic out of the front of this thing except for the White, Black, Green and Red motor wires.

First:
Carefully cut the front "box" off as flush as you can to the cylindrical neck. (picture 1)

Second:
Unscrew and cut everything electronic out of the back box.

Third:
Carefully cut the back "box" off as flush as you can to the cylindrical neck.

Fourth:
Drill a hole in the front and in the back so that they both enter the base with the removable cover.

Fifth:
Attach about a 1' of wire to the existing motor wires and thread back through the newly drilled holes, until the wire is protruding through the back of the neck. Use hot glue to route the wire through base around the gearbox.

Step 13: Part 1 - the Head: Building the Controller Box

This is built from a large "project" box sold by RadioShack that was cut down to fit my needs;

First:
Cut down a project box and the plastic lid to a length equal to the height of the Bescor Mp 101 from its base to where the top starts to bevel in. Set the included metal cover aside for now. (Picture 1)

Second:
Measuring the Arduino Uno R3, figure out where the square hole for the USB should be. The Arduino sets in the controller box sideways to avoid clearance issues from the large end of the USB B connector cable. Cut out the hole for the USB and the power if you are not going to power through the USB. *You can cut notches into the plastic to hold the Arduino's breadboard firmly in place.

Third:
Right now your controller box, isn't much of a box and only has three (3) sides. Take the metal cover that was included with your project box and cut it down to fit as the fourth side of this box. There are little grooves in this box that the metal side can fit into.

Fourth:
The Bescor, since it is cylindrical in shape, has curves that the box needs to fit flush to. This curve was really easy to mark if you were careful when you cut the old boxes off. Take one of the old boxes and trace the cut off curve onto your metal piece and the top of the box.

Fifth:
Cut out these curves, test for fitment against the Bescor Mp 101, and sand as necessary to make it fit fairly snug.

Sixth:
Replace the metal cover to make the fourth wall of your control box. Glue in place with permanent glue.

Seventh:
Take the plastic lid and check it for fitment against the now four-sided box. Sand as necessary and set aside once you are happy with its fit.



Step 14: Part 1 - the Head: Attaching the Controller Box

First:
Take your control box and rough up the sides without the curved cutouts, wipe clean. We will want the fiber glass to adhere to these sides. Do the same to the back of the Bescor Mp-101, from the tilt arms back. (Picture 1)

Second:
With the metal side up, line up the controller box with the bottom of the box sitting flush to the base of Bescor Mp - 101. Using masking tape, tape the box in place only on the top and bottom sides. (Picture 1)

Third:
Neatly roll up the motor wires that should be on the bottom inside of your controller box, tape them to the inside of the bottom of the box, covering them completely with tape. This will keep fiber glass resin off of them in the next few steps. (Picture 1)

Fourth:
Cut two sheets of fiberglass each large enough to cover from the Bescor's tilt arms back to the controller boxes door. (Picture 2)

Fifth:
Apply Resin to the fiberglass sheets and allow to dry.

Sixth:
Trim fiberglass so edges match that of the Bescor and controller box. Go ahead and cutout the hole for USB-B connector and *optional* power hole. It should be really easy to discern where to cut due to the fiberglass being semi see through.

Seventh:
Sand down any rough edges, clean, then fill in any gaps with resin. Repeat as necessary.

Step 15: Part 1 - the Head: Building a Curved Neck Front

Next I wanted to give the front of the "neck" a nice curve. This curve is both aesthetically pleasing and keeps the neck from getting caught on objects as easily, as they just slide off of it.

In this first picture I am showing a toilet paper tube as the guide for my curve. I only used this to get a rough idea of what this was going to make my project look like. I actually ended up using a wine bottle's cardboard tube because it's stronger and holds its shape better. (Picture 1)

First:
Take your Bescor Mp-101 and rough up the sides past the the tilt arms all the way back to the controller box (do not rough up the controller box, just the Bescor and avoid roughing up the actual tilt arms) , wipe clean. We will want the fiber glass to adhere to the surface.

Second:
Cut the desired amount of cardboard tube so that it covers the front wiring (where we previously moved the motor power wires) without protruding too much. A nice gentle curve will do.

Third:
I would highly suggest when masking the cardboard tube onto the front  of the Bescor that you do so from the inside by doubling the tape up onto itself. The more surface area for the fiberglass the better.

Fourth:
Cut a sheet of fiberglass cloth big enough to wrap around the Bescor / cardboard structure from the controller box all the way around to the other side of the controller box. Cut out the cloth for the tilt arms, we do not want them covered. (Picture 2)

Fifth:
Apply the resin. It may be easier to set the Bescor on it's side  allowing the resin to dry and then flipping the structure over and fiber glassing that side. Just be sure that the cloth stays taught or the curve may become unsmooth.

Sixth:
Sand down any rough edges, clean, then fill in any gaps with resin. Repeat as necessary. (Picture 2)

Seventh:
To close the hole in the neck where the motor wire is, and that the cardboard tube / fiberglass created; start by adding scrap pieces of fiberglass rubbed into a ball by rubbing them between your thumb and pointer finger (with gloves on of course). These fiberglass balls will provide enough support for the resin while giving them a structure to adhere to. Do not worry if the balls fluff stick up above the structure a little bit.

Eight:
Apply a light amount of resin, just enough to start making your top surface, do not worry about getting the pits out just yet. This is really only making a container for the rest of the resin later.

Ninth:
Allow the resin to dry completely.

Tenth:
Go ahead and trim down any loose fibers from the fiberglass balls and try to get the surfaces of these balls just below the lip of the cardboard / fiberglass form, by either trimming them or sanding them.

Eleventh:
Fill in the surface with resin, allow to dry and then sand. Repeat as necessary until smooth.

Twelfth:
Flip the Bescor over and repeat steps seven (7) through eleven (11) to close the bottom hole in the neck where the motor wire is, and that the cardboard tube / fiberglass created.

Step 16: Part 1 - the Head: Adding Nomex Skin & Paint to the Neck

Motorshield notes:
I had to upgrade the motor shield with dual SN754410 H-bridges, these are plug-compatible with the L293D, but allow rated to 1A continuous/2A peak. If you leave the stock H-bridges in you will probably cause a fire when the Bescor motors stall or buck.

Motorshield Pin Usage:
( http://learn.adafruit.com/adafruit-motor-shield/faq )
All 6 analog input pins are available. They can also be used as digital pins (pins #14 thru 19)

Digital pin 2, and 13 are not used.

The following pins are in use only if the DC/Stepper noted is in use:
Digital pin 11: DC Motor #1 / Stepper #1 (activation/speed control) – Connect the Bescor tilt motor.
Digital pin 3: DC Motor #2 / Stepper #1 (activation/speed control) – Connect the Bescor pan motor.
Digital pin 5: DC Motor #3 / Stepper #2 (activation/speed control)
Digital pin 6: DC Motor #4 / Stepper #2 (activation/speed control)

The following pins are in use if any DC/steppers are used
Digital pin 4, 7, 8 and 12 are used to drive the DC/Stepper motors via the 74HC595 serial-to-parallel latch

The following pins are used only if that particular servo is in use:
Digitals pin 9: Servo #1 control
Digital pin 10: Servo #2 control

Basically I had a few connections that I could still use for the auxiliary functions in my robots head.
Digital Pin: 2, 13, 9, 10
Other outputs:
DC Motor #3
DC Motor #4

Routing and connecting the wires:
The following wires should be routed from their respective installed locations, hot glued under the head-form, wires protruding out from the back of the head-form, through the open side of the relay box and finally through the hole between the relay box and the controller box.

- "Switch eyes" - Lights: Solder the Positive to the 5v rail on the motor shield and the Negative to the ground (lights up when head is plugged into USB). Reset Switch: Solder these two (2) wires to the existing reset switch on the motor shield.

- Ultrasonic sensor – Depending on which version you get, connect to the two (2) pins [9,10] for digital, or analogue pins if necessary. Mine is simply soldered to pin 9, pin 10 with the ground and vcc soldered to the ground and 5v rail on the motorshield.

- DSLR camera control cable - I used the cable from a cheap wired remote with that had a 3 wire hookup. A bit of playing around with the cut down cable I could determine which two (2) wires would work the shutter and auto zoom when connected to 5v.  I used the motorshield's "Motor3" screw connectors to drive Tip-120 transistors as follow (if you do not know how to use a Tip-120 NPN transistor to drive powered devices there is an awesome Instructable here); Zoom: Solder the determined wire to the collector side of the first (1) transistor, screw the base into one side of "Motor 3". Screw the camera cables' positive connection into the 5v rail of the motorshield. Solder the Tip-120 ground into the ground rail on the motorshield. Shutter control: Solder the other determined wire to the collector side of the second (2) transistor, screw the base into the other side of "Motor 3". Solder the Tip-120 ground into the ground rail on the motorshield.

- Flashlight / Laser combo - These cannot be powered by the motorshield alone, you will need to use a voltage regulator such as the Pololu Adjustable Step-Up/Step-Down Voltage Regulator S8V3A. Wiring the Pololu Regulator S8V3A: Hook the voltage in side directly to the positive side of the Motorshield's external power screw block. Hook the ground directly to the negative side of the Motorshield's external power screw block. The voltage out should be used to run the flashlight and laser module, but only after it has been tuned to around 3.5 - 4v to avoid damaging the lights and laser. Flashlight: Solder the positive wire to the voltage out of the S8V3A. Solder the negative to the collector side of a Tip-120 and the emitter to the motorshield's ground rail. The Tip-120's base should be soldered to pin no. 13. Laser module: Solder the positive wire to the voltage out of the S8V3A. Solder the negative to the collector side of a Tip-120 and the emitter to the motorshield's ground rail. The Tip-120's base should be soldered to pin no. 2.

** In theory the Tip-120 transistors should be all that is necessary to switch the flashlight / laser module on and off, but due to a voltage leak (the flashlight / laser would remain faint while turned off) I had to wire up relays between the Tip-120's and the flashlight and laser module.

Other wires:

- Main Power - Tie a knot in the quick disconnect wire and protrude it through the hole in the bottom of the controller box, the connector should be on the outside of the controller box. Connect the internal end to the motorshield's external power screw block.

- Logitech® B910 HD USB 2.0 Webcam USB Cable- Take the Cameras USB cable and glue to the side of the Bescor, right behind one of the tilt arms (either side). Router this cable under the controller box and back to the main power cable. Use a strip of Nomex with fabric glue to cover and glue this cable in place.

Step 17: Part 1 - the Head: Joining the Head and the Neck

Finally, this is the step where the fruits of your labor really start to blossom.

Back in Step 3 there were holes in the steel strapping that were left in order to attach the head to the neck. (Picture 2)

Screw the head directly into the neck through the cloth and fiberglass, careful to make sure that everything lines up. A good way to mark this is using a nail or a thumbtack and making a puncture hole from the inside of the head form, then screwing back through these markings into the Tilt platform.

** All of the wires from the head form should be pulled straight back out from the top of the controller box, easy to access.

** OPTIONAL** The camera screw threads should protrude through the square hole in the head form. This will allow you to mount a camera on top of the head if your head is flat on top.

Step 18: Part 1 - the Head: Adding a Relay Box

Looking at the picture this will look out of order, I assure you that adding the relay box before wiring up relays is much easier.

Why a relay box? I found that I was having a voltage leak with the TIP-120 relays that I was using to power the laser and flashlight modules. For both of these, the On was indeed on, but the Off was a very dull laser or light module. I am sure there are better ways, but this was my absolute fix, while using parts that I already had acquired.

First:
Take a small plastic hobby box and discard the metal insert.

Second:
Cut off one of the long sides that will be facing the back of the head. The box should be cut off enough to allow you to mount it flush with the lid of the control box and allow the head to fully tilt back (facing up) without touching this relay box. Make sure you cut the top to match.

Third:
Glue the relay box to the top of the controller box using permanent glue, clamp as necessary.

Fourth:
Drill a hole through the bottom of the relay box, through the top of the controller box. This will allow the wires from the Arduino to pass into the relay box and the "switch eyes", ultrasonic sensor, and camera control cables to pass through too.

Step 19: Part 1 - the Head: Wiring Everything Together

Motorshield notes:
I had to upgrade the motor shield with dual SN754410 H-bridges, these are plug-compatible with the L293D, but allow rated to 1A continuous/2A peak. If you leave the stock H-bridges in you will probably cause a fire when the Bescor motors stall or buck.

Motorshield Pin Usage:
From:http://learn.adafruit.com/adafruit-motor-shield/faq
All 6 analog input pins are available. They can also be used as digital pins (pins #14 thru 19)

Digital pin 2, and 13 are not used.

The following pins are in use only if the DC/Stepper noted is in use:
Digital pin 11: DC Motor #1 / Stepper #1 (activation/speed control)
Digital pin 3: DC Motor #2 / Stepper #1 (activation/speed control)
Digital pin 5: DC Motor #3 / Stepper #2 (activation/speed control)
Digital pin 6: DC Motor #4 / Stepper #2 (activation/speed control)

The following pins are in use if any DC/steppers are used
Digital pin 4, 7, 8 and 12 are used to drive the DC/Stepper motors via the 74HC595 serial-to-parallel latch

The following pins are used only if that particular servo is in use:
Digitals pin 9: Servo #1 control
Digital pin 10: Servo #2 control

Basically I had a few connections that I could still use for my auxiliary functions in my robots head.
Digital Pin: 2, 13, 9, 10
Other outputs:
DC Motor #3
DC Motor #4

Routing and connecting the wires:
The following wires should be routed from their respective installed locations, hot glued under the head-form, wires protruding out from the back of the head-form, through the open side of the relay box and finally through the hole between the relay box and the controller box.

** Cover all Tip-120 Transistors, the Voltage Regulator S8V3A, and Soldered Connections in heat-shrink tubing to keep from having electrical shorts.**

- "Switch eyes" - Lights: Solder the Positive to the 5v rail on the motor shield and the Negative to the ground (Lights up when head is plugged into USB). Reset Switch's: Solder these two (2) wires to the existing reset switch on the motor shield.

- Ultrasonic sensor -

- DSLR camera control cable - I used the cable from a cheap wired remote with that had a 3 wire hookup. A bit of playing around with the cut down cable I could determine which two (2) wires would work the shutter and auto zoom when connected to 5v.  I used the motorshield's "Motor3" screw connectors to drive Tip-120 transistors as follow (if you do not know how to use a Tip-120 NPN transistor to drive powered devices there is an awesome Instructablehere) ; Zoom: Solder the determined wire to the collector side of the first (1) transistor, screw the base into one side of "Motor 3". Screw the camera cables' ground into the ground between "Motor3" and "Motor4". Solder the Tip-120 ground into the ground rail on the motorshield. Shutter control: Solder the other determined wire to the collector side of the second (2) transistor, screw the base into the other side of "Motor 3". Solder the Tip-120 ground into the ground rail on the motorshield.

- Flashlight / Laser combo - These cannot be powered by the motorshield alone, you will need to use a voltage regulator such as the Pololu Adjustable Step-Up/Step-Down Voltage Regulator S8V3A. Wiring the Pololu Regulator S8V3A: Hook the voltage in side directly to the positive side of the Motorshield's external power screw block. Hook the ground directly to the negative side of the Motorshield's external power screw block. The voltage out should be used to run the flashlight and laser module, but only after it has been tuned to around 3.5 - 4v to avoid damaging the lights and laser. Flashlight: Solder the positive wire to the voltage out of the S8V3A. Solder the negative to the collector side of a Tip-120 and the emitter to the motorshield's ground rail. The Tip-120's base should be soldered to pin no. 13. Laser module: Solder the positive wire to the voltage out of the S8V3A. Solder the negative to the collector side of a Tip-120 and the emitter to the motorshield's ground rail. The Tip-120's base should be soldered to pin no. 2.

** In theory the Tip-120 transistors should be all that is necessary to switch the flashlight / laser module on and off, but due to a voltage leak (the flashlight / laser would remain faint while turned off) I had to wire up relays between the Tip-120's and the flashlight and laser module.

Logitech® B910 HD USB 2.0 Webcam.
Camera USB cable glued to front of relay box, run down one side and hide under a strip of Nomex.

Step 20: Part 1 - the Head: Final Assembly and Finishing Touches

After you have all of the parts wired together, plug the motor shield into an Arduino Uno. I know it doesn't look like much space but I can assure you that all of the assembled parts will fit into the controller box. (Picture 1)

First:
Carefully insert the Arduino Uno / Motorshield combo into the controller box starting with the USB connector side. Push the USB connector through the hole in the controller box, then work the back down into the box, be careful to push the wires off to both the top and bottom of the controller box to keep from damaging them.

Second:
Slowly work the transistors and the Voltage Regulator S8V3A into the spaces around and on top of the Arduino / motorshield combo. Work the wires into this space too.

Third:
Screw the back onto the controller box on.

Fourth:
Screw the top onto the relay box on.

Fifth:
Cover the relay box in Nomex including the cutout side. (This hides the wires from the relay box to the back of the head, while still allowing them to move easily.)

Sixth:
After the Nomex cloth is dry, cut out around the seam between the top and the relay box. Open the relay box and apply a thin layer of glue to the edges of the cloth. Once dried, reapply the top of the box and screw shut.

This concludes the building of this robots head. =)

Step 21: Part 1 - the Head: Usage and Code Samples

To use this head unit is really as simple or complex as you want to make it. Like stated at the beginning of this Instructable I kept the project pretty open ended.

Connecting the head:
The head was designed to be powered off of the robots 4x 12v SLA batteries wired in parallel so you will need at least one 12v power source hooked to the motorshield's quick disconnect external power cable.

The USB can either be hooked up to a Pc on a continuous basis (like in my case) or used to program the head based on your specifications.

Coding ideas:
Lets take a look at my example;
The robots body, which I will talk about in a continuation, has a built -in Vostro laptop. The head's Arduino does not have very much logic, but instead relies on listening for commands from the computer before running certain tasks. It is also responsible for giving feedback from the the ultrasonic sensor and letting programs know when it has received commands.

A simple way of going about this is through presses of keys on a keyboard  and printing our values to various programs.

A few examples:
Motors in the head are controlled by keyboard presses, which in turn are mapped to a program that can either control them directly or turn the control over to the driver through the use of a connected controller. I apologize for being intentionally vague but I am currently building the software which I can use to control this robot through several wireless means or over the internet. - Very open ended. The code for this in the Arduino would look something like the following:

Motors:

#include <AFMotor.h>

AF_DCMotor motor1(1, MOTOR12_64KHZ); // create motor #1, 64KHz pwm
AF_DCMotor motor2(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
AF_DCMotor motor3(3, MOTOR12_1KHZ);  // create motor #3, 1KHz pwm
AF_DCMotor motor4(4, MOTOR12_1KHZ);  // create motor #4, 1KHz pwm

void setup() {
  Serial.begin(115200); // set up Serial library at 115200 bps
  Serial.println("Adafruit L293D Motor Shield");
  Serial.println("Connecting at: 115200 baud");
  Serial.println("   ");
  Serial.println("Status: ACTIVE");
}

void loop() {
  // read the sensor:
  if (Serial.available() > 0) {
    int inByte = Serial.read();

    int speed; // Local variable

    switch (inByte) {


//Tilt (Up & Down) [Motor 1]
     
    case 'u':   // Look Up
      motor1.setSpeed(225);
      motor1.run(FORWARD);
      Serial.println("Look Up");
      Serial.println("   ");     
break;

    case 'i':   // Motor Stop
      motor1.run(RELEASE);
      Serial.println("Stop Tilt");
      Serial.println("   ");
      break;

    case 'o':   // Look Down
      motor1.setSpeed(225);
      motor1.run(BACKWARD);
      Serial.println("Look Down");
      Serial.println("   ");
      break;

//Pan (Left & Right) [Motor 2]

    case 'j':  // Look Left
      motor2.setSpeed(225);
      motor2.run(FORWARD);
      Serial.println("Look Left");
      Serial.println("   ");     
break;

    case 'k':   // Motor Stop
      motor2.run(RELEASE);
      Serial.println("Stop PAN");
      Serial.println("   ");
      break;

    case 'l':   // Look Right
      motor2.setSpeed(225);
      motor2.run(BACKWARD);
      Serial.println("Look Right");
      Serial.println("   ");
      break;

** The "Serial.println" was used in this example for testing through putty to ensure that the commands being given were indeed giving the correct results. It was also changed in later code to set off triggers in a program to let it know a command had been sent.

Flashlight code:

//Spotlight
  
    case '7':
      digitalWrite(13, HIGH); // Turns on Spotlight
   Serial.println("Spotlight ON");
      Serial.println("   ");
      break;

    case '8':   
      digitalWrite(13, LOW); // Turns off Spotlight
   Serial.println("Spotlight OFF");
      Serial.println("   ");
      break;

It really is that simple in this stage.

You can write more logic in this step if you feel, for instance if you want a more automatic, less open ended robot, you could simply code the head to "look around" and fire it's ultrasonic sensor to merely avoid obstacles, like a lot of other projects that I have seen on the internet. The choice is yours =)

Thank you for reading my first Instructable, I hope to have other projects up soon along with the continuation of other parts to this robot.

- Reichenstein7

Comments

author
Reichenstein7 (author)2014-12-30

This project has come a long way...

IMG_9492.JPG
author
jgambell-texmo (author)2014-10-22

great project, has there been any progress since this instructable was done?

author

Tons of progress. Well on the robot itself, not the head. The robot now has a full flatbed that covers the laptop and the body is almost done. I have given it a ton of sensors and have been slowly working on programming all of it.

He appears in a few of my other instructables, either on its sensors/systems or in the background.

author
Vulcan01 (author)2015-11-02

What is the base you are using in this?

author
Reichenstein7 (author)Vulcan012015-11-03

It is an old set of RC tank treads from an old RC tank. I am currently, actively looking for a set of Snawblower tracks and chassis.

author
haung9 (author)2015-03-15

Can I get sketch of this robot

author
haung9 (author)2015-03-15

Can I get full specification of this project...coz i wanna do this project next mth can u help me plz??? Want Youtube link also???

author
transistor2 (author)2014-01-28

if i where intrested in building a robot using 10+ motors and servos along with rangefinder and a camera along with other sensors all run via wifi what would you recomend i use for a central component to connect everything to, like adrino or raspberry pie or something along those lines?

author

You could either use an Arduino or a Raspberry Pi with a breakout shield depending on how big you wanted your bot and how you wanted to program / control it. Arduino has limited logic or can be used as just a serial controller. Raspberry Pi will give you a little more to "login to" if you are space constrained and want an O/S, plus it can use a WiFi Dongle without taking up pins. I personally like Arduinos, but once you get right down to the wiring, both would be built about the same. If you need a more specific answer, please let me know.

author

Actually while we are on the topic of wireless there are a few additional considerations. The reason my bot has wireless lan is to directly communicate with its on board pc from another laptop. The issue with this is that you operate in a limited range and usually only within a fixed radius of a structure. To combat this, and as I will write about more in the future, is that I rewired and added a wireless router to the robot itself, this way I can take it out and about anywhere I want.

This robot also has, and is solely used in some of my others, a 900Mhz Xbee that is used to wirelessly talk to other devices and a smaller bot that it can control. These Xbees work great with far less overhead than conventional WiFi at low cost and with quite a diverse setup.

author
transistor2 (author)2014-01-26

how much did all of this cost you?

author

To me the educational value has greatly outweighed any financial constraints. As wreckless as this sounds, there has never been a budget allotted to this project and a simple number would never do it justice. The cost; a small exchange for taking the time and effort to learn a new skill set.