If you just want the example code for the Motor Shield, you can find it here.
- Soldering Iron. Remember, you get what you pay for. As a result, if you are going to get serious with electronics, pick-up a good soldering iron such as the Hakko FX888D Soldering Station.
- Good solder do good thing, bad solder create nightmare. This lead-free solder is something that will work.
- Solder Sucker. Very useful in cleaning up soldering mistake.
- Diagonal Cutters. The most essential cutting tools in electronics.
- If you need it, schematic of the motor shield can be found here.
(*Note the big “X”. Those are extra inverter pins that got flipped during layout. Most likely you won’t be using them.)
- (1x) PCB
- (1x) Motor Driver H-Bridge
- (1x) Hex Inverter
- (1x) Voltage Regulator
- (8x) General Purpose Diode
- (2x) 1k Resistor
- (2x) 3mm Green LED
- (2x) 3mm Yellow LED
- (1x) 47μ Capacitor
- (1x) 0.1μ Capacitor
- (3x) 3.5mm Terminal Block
- Breakaway header (60 pins in total)
Turn on you soldering iron and set the temperature to 400 °C (750 °F) if possible.
The first parts to go in are the two 1 kΩ resistors. There should only be two resistors in the packages. The colour band should be (Brown Black Red). Bend the resistor so they look like staples, as seen in this photo.
Slip the resistors into the PCB at the position labelled “1k” as shown so they sit flat against the circuit board.
Resistors are not polarized. That means you can put them in “either way” and they’ll work just fine.
Bend the wire legs out a bit so that when the board is flipped over, the resistor won’t fall out. You can bend it inward or outward.
Using your soldering iron tip, heat the resistor wire lead and the metal ring (pad) at the same time, after a few seconds, poke a little solder in so that it melts into a nice cone. Remove the solder and then remove the soldering iron. Do this for all 4 wires.
Check your work, you should have clean solder joints.
Once they are all good, clip the long leads, just above the solder joint using the diagonal cutter.
Next, please the eight black diode. Diodes are polarized. They only allow current to flow in one direction.
Note: if you are not too confidence at working with eight (8) components together, do them one or two at a time.
Align the white band of the diode with the white band on the PCB diode location as shown in the photo.
Once all eight diodes are in place, your board should look like this.
Just like the resistors, you can bend the legs to prevent them from falling out when you flip the PCB over to apply solder.
Apply heat to the diode wire lead and the metal ring (pad) at the same time suing your soldering iron. After a few seconds, poke a little solder in so that it melts into a nice cone. Remove the solder and then remove the soldering iron. Do this for all the wires.
Note: Make sure you don’t miss any.
Next up, the LEDs. LEDs are also polarized. Large 5mm usually have a flat side to indicate the cathode (-) terminal. However, the 3mm LEDs are too small to have a flat side. As a result, we’ll have to rely on the length of the lead to determine the cathode (-) and the anode (+).
- Shorter lead = Cathode (-)
- Longer lead = Anode (+)
Line up the shorter lead with the flat side of the LED diagram on the PCB.
Note: The shorter lead (Cathode) should be facing the middle of the four LEDs.
Once again, bend the leads a bit and solder the LED one by one.
Next is the 0.1uF ceramic capacitor. Ceramic capacitor are not polarize so you can put in on the PCB either way.
Put the ceramic capacitor onto the PCB as shown and apply solder to secure it in place.
Next are the servos/sensors headers. If you don’t want to use male headers here. Skip this step or you can replace them with female header. Only male headers are included in the package.
Cut the 60 pins of header into the following configuration:
20-pin header strip:
- Two (2x) 7-pin strip
- One (1x) 6-pin strip
40-pin header strip:
- Two (2x) 8-pin strip
- Four (4x) 6-pin strip
Insert the 7-pin header strip into its header connection beside pin 0 to 7.
Flip the PCB over while holding the header in place and put it against the table.
Apply solder to only one of the pin. By only soldering one pin will make re-adjusting easier because the chance of getting the header straight and prefect is very hard.
While holding the PCB and the header, re-heat the solder at the first pin and re-adjust the positioning of the header.
Repeat the previous two steps for the remaining header strips.
Now, place the three 2-pin screw terminals for the motor and external power and solder them onto the PCB.
Working on them one-by-one is easier.
Apply solder onto the pin to secure the screw terminal in place.
Next is the 16-pin IC. When ICs come from the factory, the legs are angled out somewhat which makes it difficult to insert them into the PCB. Prepare them for soldering by gently bending the legs against a flat tabletop so that they are perfectly straight.
ICs must be placed in the correct orientation to work properly. To help with placement, each chip has a U notch at the top of the chip. On the circuit board there is a printed out image of the chip outline and one end has a U notch. Make sure the chip notch is on the same end as the image notch. In this PCB, all are facing the same way.
Gently insert the three chips. Check to make sure none of the legs got bent or broken.
Solder each pin of the chips.
Next is the 47uF electrolytic capacitor.
Electrolytic capacitors are polarized and must be placed in the correct orientation or they could pop! The long leg of the capacitor is the positive (+) leg and goes into the hole marked with a (+). The short leg or the side marked with a large band is the negative (-) leg and goes into the hole marked with a (-).
Therefore, the orientation of the capacitor should be inserted as shown.
After double-checking their polarity, solder and clip the three capacitors.
Next is the 5V voltage regulator.
Insert it into the PCB as shown.
You can bend the leg a bit to hold the voltage regulator in place while soldering.
Last but not least, the motor driver chip. The chip should only goes in one way.
Insert it into the PCB and solder all of the pins.
After you solder all the pins of the motor driver. This is what you should have.
Lastly, if you want to use this as a shield for Arduino, place 10-pin, 8-pin, and 6-pin (not included) headers onto the Arduino.
Insert the headers onto the Arduino first.
Put the shield in place and solder all the headers.