Robot Assembly

Today is the day when we assemble the robot. This is supposed to be a live class that involves soldering and hand tools.

Since we only have a limited time here at the library to use the tools, we shouldn't waste too much time reading. So please read this page before coming to class if you can.

If we do not finish the entire robot today, that's OK. Just come back another day, the tools will always be here at the library.

If you want to do some of this at home, that's great! It will save some time while you are at the library. This requires you to read this entire page first, understand what to do, and understand why you are doing it.

Part List

You should have been provided a pre-packaged kit of parts. If anything is missing, the classroom should have extras. Sometimes, your kit may contain a part that is different from the list, that's OK. Please do not worry about any missing or different parts until you need it (do not ask at the beginning of the class, only ask in the middle of the class).

Big Long List Of Parts
Quantity
Name
Picture
1
PCB (Printed Circuit Board)
1
AA battery holder
4
AA battery
1
robot body (3D printed)
2
sensor shroud (3D printed)
4
infrared sensor (TCRT5000L)
1
Arduino Nano
1
10x2 male pin header (or two 5x2)
2
15x1 male pin header
included in Arduino Nano package
1
6x1 male pin header (or two 3x1)
2
20x2 female pin socket header
6
220Ω resistor
4
10kΩ resistor
2
LED
1
button switch
1
potentiometer
2
continuous rotation servo motor
2
wheel
2
tire
included in wheel package
2
screw for wheel
included in servo package
substitute: #1 thread-forming screw, 1/4 inch long
4
screw for servo
included in servo package
substitute: #1 thread-forming screw, 1/2 inch long
2
screw for battery holder
#4 countersunk/tapered wood screw, 1/2 inch long
1
solderless breadboard

The parts may come in different colours and different styles!

Trade parts with your friends or ask for another one if you want a different colour.

Tool List

Please do not take any tools home from the library, unless instructed to do so.

Introduction to Soldering

Soldering is easy, and it's easier to learn through pictures and videos than for me to write long boring sentences.


Here is a video:

MightyOhm made this awesome comic about soldering. There is a small version...

... and his long version can be found on his website: https://mightyohm.com/blog/2011/04/soldering-is-easy-comic-book/

(Some instructions might want you to count time during soldering. Don't worry too much about that time too much. The time it takes to heat something up varies with the size of the part, the thickness of the copper, the power of the iron, and a bunch of other things. Usually you will know you've counted too short if the solder doesn't melt, and you can see melted solder eventually make the a shape and stop moving, which means "long enough".)

The long metal legs on a component is also often called leads. You should cut them off after you solder something, but only when you are absolutely sure you haven't made a mistake.

More Websites with Soldering Instructions

Adafruit Industries: Adafruit Guide To Excellent Soldering

Adafruit Industries: Common Soldering Problems

SparkFun Electronics: Soldering Your First Component. SparkFun tends to use a lot more videos in their guides.

Buying a Soldering Iron

If you don't have a soldering iron, the library can always let you use theirs. But that might become really inconvenient later on.

If you are looking to buy a cheap soldering iron, you should be buying this one. This one may look similar to other ones but there is one key difference you cannot see. The cable on this one is safer, it can withstand higher temperatures. I have personally tried to melt it and I couldn't (and I did try other ones, other ones all failed). This is the one to buy if you don't want kids to burn your house down, a melted power cable can cause fires or electrocution.

Do not buy soldering irons from Fry's Electronics, or any other physical retail stores. The soldering irons they have are all overpriced for their value.

Do not buy the TS100 soldering iron. Sure, it looks cool and futuristic... But it lacks a flared handle, which means it's easy to burn your hand with it!

If you love soldering and want to setup a really good soldering station, then you should get a Hakko FX-888D. It usually costs about $100.

Additional Soldering Tips and Tricks

It's OK to make mistakes! We can fix mistakes, but we can only fix one mistake at a time. Please solder one joint at a time, and then double check that everything is nice and straight. Only do a second joint if the previous joint is perfect.

Fixing a Crooked Joint

If something is crooked, just melt the solder again, and move it straight while the solder is melted.

Obviously, nothing can move if the solder is solid. This is why fixing two mistakes is very hard, because you need to melt two solder joints at once if you make two mistakes at once.

Removing Solder

Also called desoldering. Using desoldering braid (aka desoldering wick) is the best way.

There's more than one way to desolder. I will show you two ways:

  1. remove the solder first, and then pull the part out
  2. pull the part out first, and then remove the solder

Sometimes you need to destroy the component in order to desolder it, because you care more about keeping the circuit board. This is a decision that you have to make. Remember that most components are dirt cheap.

Safety Note:

You might find information about another way to desolder, by melting the solder and smacking the circuit board. DO NOT EVER DO THIS. This is not safe because the molten solder will splatter, it may get on your skin or in your eyes while it is very hot. This technique is only used by really really old people because "back in the day", electrical components were gigantic. Today, components are tiny and this trick doesn't work well and break easily.

What's the brown stuff around my solder joints?

Soldering flux is a liquid that helps you make better solder joints. It is usually put in the middle of solder. When flux gets hot from the soldering iron, it cleans metal and it helps liquid metal flow.

Sometimes when something is hard to solder, we buy more flux in a bottle (or syringe, or "pen") and put it on the joint before we solder the joint. This makes it much easier to solder something that is hard to solder because a cleaner surface makes it easier for solder to stick, and flux helps the solder form that nice volcano shape.

It does leave behind a brown stain sometimes, that's flux residue. We can clean this off but only if we use flux cleaner (which is mostly isopropyl alcohol, aka rubbing alcohol). Obviously this makes the circuit wet, it takes time to dry, and breathing alcohol fumes is bad for you.

Flux is not harmful to people, the brown kind is made of pine tree sap. It does slowly damage circuit boards, but it takes so long to do real damage that hobbyists don't need to clean it.

(if the flux residue is white, then it's probably no-clean flux, a different version that does not cause damage, it does have some drawbacks, big factories obviously like it since it saves time)

If you do decide to clean your circuit board, then remember to remove the batteries! You should never power a wet circuit! And use an anti-static brush to avoid damage from static electricity.

Soldering Safety

The soldering iron is very hot, any part of a soldering iron that is made of metal will be very hot. You should do your best to avoid touching any part of the soldering iron that is made of metal, even if it is turned off.

If you drop a soldering iron, or if it falls, DO NOT TRY TO CATCH IT! (obviously because it is very hot and you might grab the hot part if you try to catch it) "A falling knife has no handle"

Do not be afraid of the soldering iron. The best way to stay safe is to keep the soldering iron under your control when you are holding it, and putting it back into its stand when you are not holding it. When I say "under your control", I mean you need to keep a firm grip on it, not a loose grip as if you are afraid of it.

Do not make melted solder splatter anywhere. Do not fling melted solder around. You could blind somebody! Think of it like metal lava!

Only solder circuits that are turned off. Remove all batteries. Unplug all power cables. Turn off all switches. Otherwise, you might get electrocuted or damage the circuit.

This robot project is extremely safe though, because it uses low power AA batteries, and most parts can be replaced if you break them. But let's not waste the batteries (they will still get damaged if you do something bad), remember to remove the batteries if you need to solder.

When you are cutting anything, bits might fly off and hit your eyes. It's a good idea to hold the part that might fly off with your hands when you are cutting it.

Enough Talk, Let's Start!

Please pay attention to which side all the components go on.

Soldering: Pin Headers

I want you to start soldering the pin headers first. They are easy to solder and hard to break, so they will give you some good practice before soldering other components.

Doing this first will also make it much easier to solder the Arduino Nano later.

If you have a 10x2 male pin header, cut it into two 5x2 male pin headers first. (if you got two 5x2 male pin headers already, then you don't need to do this)




Solder in all the bigger headers first, with the hints from the previous pictures. These have to be perfectly straight or else you won't be able to plug in your Arduino Nano.




Then move on to soldering the two smaller 3x1 male pin headers. If you have a 6x1 male pin header, cut it in two halves. (otherwise if you have two 3x1 male pin headers, do not cut it)



Soldering: Arduino Nano

With the big female pin socket headers in place, it is really easy to solder male pin headers (two sets of 15x1) into the Arduino Nano. The trick is to use the female pin socket headers to keep the male pin headers straight while you solder.

Soldering: Infrared Sensors (Side)

The drawing on the circuit board shows you how to put in the infrared sensors. Please follow it and do not install the sensors backwards.

Another IR Sensor Precaution

Do not rotate the bulbs (the emitter or the phototransistor) inside the sensor. If you do, then the emitter or phototransistor will be backwards, so they will not work. Do not take any of the two bulbs out of the sensor, because you might put them back in wrong.

If you accidentally rotated or removed the emitter or phototransistor. Then give the sensor back to the library and ask for a spare. We can fix it later and give it to somebody else after we test it.

Do this for both the left side sensor and the right side sensor.

Soldering Infrared Sensors (Floor)

These two sensors need to have their little extra plastic bits removed, cut them off with your cutters. Do not cut the metal leads.

These two sensors require even more bending. If this is too hard to do with your fingers, then use some needle-nose pliers to help you.



Do this for both the left floor sensor and the right floor sensor.

Soldering: Resistors

Please check the colour codes on the resistor to find out their value. Please place them in the correct locations according to their value.



There are a lot of resistors, four 10kΩ resistors and six 220Ω resistors. Solder all of them in.

Soldering: LEDs

LEDs must be installed in the correct direction. The circuit board shows the LED as a round shape but with a flat side. The LED itself does have a flat side, you have to look really closely or use your fingers to feel the flat side.

Solder in both the left LED and the right LED.

Remember that LEDs are diodes, they only allow electricity to flow in one direction. If you install it in the wrong direction, they will not work.

Soldering: Button and Potentiometer

The button switch and the potentiometer are really easy components to solder. It will be really hard for you to make a mistake here, because the symbols and the positioning of the holes shows you how to insert them. Just make sure you put them in the right place on the right side of the board.

Soldering: Battery Holder

The battery holders should have a red and black wire already, and they should be stripped for you already. If they are not, then use a wire stripper to strip the wires.

You should twist the two wires together. This keeps them neat (there are other advantages too).

There are holes on the circuit board with the label "battery", "red", and "black". The wires snake through the holes without the metal pad, and the exposed end of the wires are soldered to the metal pad.



The "snake" prevents the wire from breaking.

Remember to cut all extra leads from finished solder joints!



Congrats! You have finished the electronics!


Attach the Robot Body

The robot's 3D printed body has tiny grooves on it for the 5x2 male pin headers to slide into. So push the body into the header pins.

Plug in Servos

It's time to plug in the servos into the circuit board. Pay attention to the colours of the wires when you plug in the servo cables into the circuit board. The circuit board is labelled with which colour goes where. (ORG means orange, WHT means white, BLK means black, BRN means brown, RED means red)

Screw in Servos

Place the servos into the robot's body, with the output shaft near the back of the robot. Use the screws (see part list) and a screwdriver to attach the servos to the robot.



Tuck all the cables away neatly, there's some space between the servos where you can stuff the extra cables.

Screw on Battery Holder

The battery holder is screwed into the bottom of the robot's body using the appropriate screws (see part list). Position it in a way so that the wires are closest to the circuit board (we will tuck the wires away later).

Screw in the side with the round hole first. Screw in the side with the slot second. Otherwise, you might not be able to line up the hole on the holder with the hole on the body.

Tuck away the battery holder wires after the holder is screwed in place.

My battery holder has different holes, what should I do?

Screw on Wheels

Put the tires on the wheels if they are not already put together.

Use the tiny screw to attach each wheel to each servo.


Attaching the Sensor Shrouds

The 3D printed sensor shrouds should snap into the bottom of the circuit board, around the downward-facing infrared sensors.

Congrats! You are Done!

Your robot is finished! But it won't do anything until the Arduino Nano is programmed. Plug the Arduino Nano into your circuit board now. Make sure it is in the correct spot and in the correct orientation. Make sure all the pins are in the right place!

You should also stick the solderless breadboard onto your robot. The back of the breadboard should have a protective sheet over the sticky padding that you need to peel away first.

There's no power switch on this robot, so to stop your batteries from dying, only install the battery when you want to play with the robot, and remove the batteries when you want to turn the robot off.

Testing the robot will be done in the next class, where we learn to use the Arduino Nano.




Click Here, to return to the list of classes