At this point in the semester, our time was split between a few projects. This page is devoted to our electronics, programming, and robotics portion of our work.
Electronics Expiriments
To construct our robots, we needed to learn about how circuits work, why they work, and how to build them. We were given a packet with instructions for mini projects to give a hands-on learning experience. After completing the packet, we gained a thorough understanding of basic electronic circuitry.
Physics Concepts - Electric Circuits
Ohm's Law: Voltage = Current x Resistance
Circuit: a complete loop of conductive material with a power source
Resistors: poor conductors that reduce voltage
Voltage: power that electricity gives off, push/pull of electricity, pressure or potential energy difference
Series circuits:
Circuit: a complete loop of conductive material with a power source
Resistors: poor conductors that reduce voltage
Voltage: power that electricity gives off, push/pull of electricity, pressure or potential energy difference
Series circuits:
Parallel circuits:
Adding Resistance:
Series - add all individual resistance
Parallel - add up reciprocals and then take the reciprocal of that number.
Series - add all individual resistance
Parallel - add up reciprocals and then take the reciprocal of that number.
Resistor's Code:
First band: 1st digit
Second band: 2nd digit
Third band: number of zero's in the amount of resistance
Fourth band: tolerance
0 Black
1 Brown
2 Red
3 Orange
4 Yellow
5 Green
6 Blue
7 Violet
8 Gray
9 White
0.1 (+/- 5%) Gold
0.01 (+/- 10%) Silver
For example, using the Resistor's Code above:
a resistor's band with color order [ green + blue + brown + silver ] = [ 56 0 Ohms ] plus or minus 10% of resistance
First band: 1st digit
Second band: 2nd digit
Third band: number of zero's in the amount of resistance
Fourth band: tolerance
0 Black
1 Brown
2 Red
3 Orange
4 Yellow
5 Green
6 Blue
7 Violet
8 Gray
9 White
0.1 (+/- 5%) Gold
0.01 (+/- 10%) Silver
For example, using the Resistor's Code above:
a resistor's band with color order [ green + blue + brown + silver ] = [ 56 0 Ohms ] plus or minus 10% of resistance
MAterials
LED - (Light Emitting Diode) emits light when energy is applied
Resistor - Lowers the voltage of circuit
Capacitor - Stores and then releases energy
Bread Board - solderless way of making circuits
Resistor - Lowers the voltage of circuit
Capacitor - Stores and then releases energy
Bread Board - solderless way of making circuits
Learning to Program
In addition to circuitry, we needed to learn how to code in order to program our robots. Raspberry Pis run on Python, so using an online course at CodeCademy.com, we learned the basics of Python. Instead of telling you about concepts, I will explain a piece of code I have written.
Programming Concepts
Code:
print "Welcome to the Adventures of Slaveboy"
name = raw_input("What do you want to name your slaveboy?")
def name_check(name):
if len(name) >0 and name.isalpha():
return name
else:
name = raw_input("Please enter a name. (1 Word Please)")
name_check(name)
name = raw_input("What do you want to name your slaveboy?")
def name_check(name):
if len(name) >0 and name.isalpha():
return name
else:
name = raw_input("Please enter a name. (1 Word Please)")
name_check(name)
Explanation:
The 1st statement prints "Welcome to the Adventures of Slaveboy"
The 2nd statement prints "What do you want to name your slaveboy?" and saves whatever you enter in the variable, name.
The function, name_check, is def(ined) and takes the variable name (what was typed in) and checks to see if the length of the name is greater than 0 and that it only uses alphabetic characters. If it passes both, name is returned with its value.
If it doesn't pass the if statement it executes the else statement. The else statement prints "Please enter a name. [1 Word Please]" and waits for a response. It will keep checking for a response until you enter a valid name.
The 2nd statement prints "What do you want to name your slaveboy?" and saves whatever you enter in the variable, name.
The function, name_check, is def(ined) and takes the variable name (what was typed in) and checks to see if the length of the name is greater than 0 and that it only uses alphabetic characters. If it passes both, name is returned with its value.
If it doesn't pass the if statement it executes the else statement. The else statement prints "Please enter a name. [1 Word Please]" and waits for a response. It will keep checking for a response until you enter a valid name.
Robotics
Using the knowledge stated above, we programmed the robot using a tutorial by Simon Monk. We managed to get our robot to move while being controlled by a keyboard. To take it to the next level, we got a wireless keyboard to make an ROV. Below is a video of it in action:
Reflection
Overall, I thoroughly enjoyed these three projects. I loved reinforcing my circuitry skills, learning to program, and making a real robot.
Some great aspects of these projects were time management, efficiency, and usefulness. Our group used all our time wisely. We were never rushed at all. We were also extremely efficient. We had more than enough time to spare and were able to help others finish. The best part for me was knowing that this project could actually help me later in life. I now think I could go into a computer science/programming career.
Some poor aspects were staying on task and not wasting time. Since we finished early, we had lots of time to mess around instead of do more work. As a result we didn't stay on task and get extra work done. I also think we wasted a lot of time. We could have been much more efficient than we were.
In conclusion, I loved this project and am more than happy with the result.
Some great aspects of these projects were time management, efficiency, and usefulness. Our group used all our time wisely. We were never rushed at all. We were also extremely efficient. We had more than enough time to spare and were able to help others finish. The best part for me was knowing that this project could actually help me later in life. I now think I could go into a computer science/programming career.
Some poor aspects were staying on task and not wasting time. Since we finished early, we had lots of time to mess around instead of do more work. As a result we didn't stay on task and get extra work done. I also think we wasted a lot of time. We could have been much more efficient than we were.
In conclusion, I loved this project and am more than happy with the result.