AZIBOt for Educators
- November 6, 2015
- Posted by: Alex
- Category: Beginner lessons
This is your Freaduino Uno. There are a few parts on it that you will be using. Starting in the upper left corner, there is the USB port. This port is what you will use to program the Freaduino. Below that is a small switch, it is marked with 3V3 and 5V. These stand for 3.3 volts and 5 volts respectively. For what we are doing, we want to keep this switch set to 5V unless otherwise noted. Below this is a small black box. This is the power port that the battery pack will plug into. Moving right from the power port is a button. This button is the reset button and it will reset the chip when pressed. If a program is running, it will stop the program and start over once the button is released. All the variables will have been forgotten though. More on that in other tutorials. Now we have the black holes that run along the top and bottom of the board. These are the inputs and the outputs. The bottom ones have an “A” by their number. This means they are analog pins. Analog pins can sense different voltage levels from zero volts to five volts. The top row are called digital pins. Digital pins can only sense either zero volts, or 5 volts. Voltages in between may cause erratic behavior since the Freaduino doesn’t know if it should round down to zero or up to five. There are also three rows of other pins on the top and bottom of the board. The black row is connected to what is called ground, or zero volts. The red row is all connected to the positive volts, either 3.3 volts or 5 volts, whatever the switch is set to. Finally, the yellow row pins are also inputs and outputs. They are actually connected to the black row with holes. This system of having a ground, then a voltage, then an input or output (a signal) is shortened to GVS for ground, voltage, signal. These letters can be seen next to the rows on the board.
Hooking up the AZIBOt utilises these GVS hook-ups to connect most of the sensors and the servos. If you look at the sensor and servo wires, you will see that they have a similar color configuration. The ground wire will usually be black, but it will sometimes be brown. The signal wire will usually be yellow, but it can also be orange. The middle wire (voltage) should be red. When attaching the sensors and signals, always make sure that the ground wire is going to the black row of pins and the signal wire is going to the yellow row of pins.
Now we will start to connect the servos. Connect them as follows:
- The arm base servo to digital pin 3.
- The arm joint servo to digital pin 6.
- The gripper servo to digital pin 5.
- The right drive servo to digital pin 10.
- The left drive servo to digital pin 11.
These pins are used because they support a type of communication called PWM, a special type of communication required to control servos. Not all pins on the Freaduino support PWM, only these five plus digital pin 9.
Now, for the sensors. Connect the button and IR sensors as follows:
- The right IR sensor to digital pin 2
- The left IR sensor to digital pin 4
- The button to digital pin 7
Finally, we will connect the ultrasonic distance sensor. You may notice that this has four pins. The wires that come with it may also not follow the color convention so be extra careful when hooking the sensor up. Connect the four wires as follows:
- VCC to the positive rail (red row)
- Trig (short for trigger) to digital pin 8 (yellow row)
- Echo to digital pin 9 (yellow row)
- Gnd (short for ground) to ground (black row)
Good job! You have now finished hooking up the servos and sensors. Don’t forget to put in the batteries!