Relays: High and Low Signals (Part 2)
Mini Project Powering a motor (Part 2)
Find the following components in your kit:
- Arduino Uno
- Arduino Software
- USB A-to-B cable
- Computer with USB port
- Motor with two leads
- 22 AWG wire
- Header Pins
- Header Pin Housings
- Header Pin Wire Crimper
- 1 Alligator Clip
- Uninsulated Crimper
- 9 Volt Battery
- 9 Volt Battery Connector
- Small phillips screwdriver screwdriver
- 16 AWG Wire
- Relay Board
Take the 22 AWG 5 pin wire and separate the wires so that you only have red, black, and green wires.
Attach Male Header Pins to one side of each of the three wires.
Use the following steps to refresh yourself on attaching male header pins to wires.
To begin attaching and crimping spade connectors, you will need the following:
- 22 AWG Wire
- Wire Cutter/Stripper
- Header Pin Crimper
- Male or Female Header Crimps
- Header pin housings or shells
- Needle nose pliers or Wire Cutter / Stripper
You may want to have extra crimps and wires. These crimps are small, require a special crimping tool, precise techniques and practice to create a proper crimp.
Header pin crimps are made up of three distinct portions: The mating pin zone is the portion of the crimp that interfaces with the component that you are connecting to. The other two portions interface with the wire. There is the conductor crimp zone which is the portion of the cimp that forms around the conductor and makes the electrical connection. The final part is the insulation crimp zone, where this part of the crimp forms around the wire’s insulation. This further securies the wire and creates a strain release. Both male and female header pins are crimped using the same process.
Cut a piece of the wire to the needed length and separate the number of wire you need from the .
Strip the ends of the wire so that 0.10 in or 2.5 mm of wire is exposed. It may be easier to strip the wires longer and trim the exposed wires to 0.10 in or 2.5 mm.
Cut off the male or female pin off of their connector strips. Keep the metal tab connected to the crimp, it will be used to align the crimp into the header pin crimper.
Place the wire into the crimp. Make sure the exposed wire is not in the mating pin zone.
To give your crimp a better chance to be successful use your wire cutters or needle nose pliers to start to fold over the tabs on the insulation crimp zone.
The recommended crimper has 2 different crimping areas the larger anvil crimps the insulation zone while the smaller anvil crimps the conductor zone. Make sure to line up the zones correctly or the crimp will not crimp properly.
Use the crimping tool to crimp the conductor crimp zone and the insulation crimp zone. Make sure the Mating pin zone is extended completely out of the crimping tool. If you crimp this part it will deform and will not function
After crimping, if you inspect the connection and see that the crimped parts are not fully compressed onto the wire you may want to crimp the connection a second time.
Once the crimp is successfully attached to the wire you can remove the metal carrier strip by bending or cutting it off. After removing that, the crimp is ready to be placed into the plastic housing.
The plastic housing, or shields as they are sometimes called, add structure and support to make the crimp more durable. The plastic housings come in various sizes that can hold multiple connections in one block. Some projects will have all the connections next to each other which make the multi-connection block very convenient to use. Using single pin housing is easier to learn on and creates wires that have more flexibility in how they can be connected.
Both the male and female header pins have a small square or rectangle of metal in the pin mating zone. This metal “tab” will lock itself into the square opening or “slot” in the housing. Make sure the tab and the slot are facing the same direction and push the crimp into the larger opening in the housing. If done successfully the crimp will lock itself in the housing.
Perform a pull test to confirm that the crimp will not slip out of the housing. If the housing does not easly slip off you have successfully made a crimp!
Using a Wire Stripper, expose the other end of the three wires.
Connect the black wire’s header pin to the GND port, the red wire’s header pin to the 3.3V port, and the green wire’s header pin to Port 13.
Using the screw terminals connect the other end of the black wire to the DC- port, the other end of the red wire to the DC+ port, and the other end of the green wire to the IN port.
Attach the alligator clip to both sides of a peice of 16 AWG wire. This wire will connect the battery to the motor.
Follow along with this module to prepare wires with alligator clips.
To begin crimping clips, you will need the following:
- Alligator Clip
- Wire
- Alligator Clip Crimper
- Wire Stripper
Take the end of the wire, and make sure there is enough conductor exposed to attach the connector -- about 1 cm, or half an inch is good for this type of clip.
Insert the exposed conductor through the small loop on the back of the alligator clip.
Note: If the connection is too loose, strip off some more of the insulator and fold the conductor together to create an extra "thick" wire for the alligator clip slot.
Tip: Twist the ends of the conductor strands so they stay together more easily.
Insert the loop + conductor into the slot on your crimper that matches the size of the loop.
Firmly squeeze the handle of the crimper to press the loop closed around the conductor. Many crimper designs will not open back up until you have squeezed far enough -- if the crimper won't open, keep squeezing until it does.
Tip: You can squeeze harder if you grip toward the ends of the handles.
Tip: If you really need the crimper to open early, there is usually a small release latch inside the handle.
To ensure the fit is good on all sides, rotate the connector 90 degrees, and squeeze the handle closed again.
The alligator head connector should now be securely attached to your wire!
Attach the Red wire from the 9V battery connector to the Common (COM) terminal of the relay. Also clip one of the alligator clips to the black 9V wire.
Screw down the red motor wire into the Normally Open (NO) terminal. Clip the other alligator crimp to the black motor wire. This should connect your motor to your battery.
Your circuit should look like this!
Connect the Arduino to your computer using the USB A-to-B cable.
Open up the Arduino software, and go to the Tools menu and select Board < "Arduino/Genuino Uno". This lets the Arduino software know which Arduino board you are using (there are several types!).
On the menu bar, select “Open”, and in “01. Basic”, select “Blink”.
Click on the Upload button to upload and run the “Blink” program to the Arduino Uno.
What happens?
The motor should turn on and off every second!
Explanation
The motor can now run every second because it is being powered by an external battery instead of the 5 volts from Port 13! It does this by using the Relay to act like a switch.
A Relay is an electromagnetic switch that uses a small electric current to turn on or off a larger electric current.
The main component of a relay is an electromagnet.
An electromagnet is a coil of wire that becomes a magnet temporarily when electricity flows through it.
When electricity flows through the relay, the “arm” inside makes a connection and closes a circuit. When electricity is not flowing through, the circuit is open.