Home

6. Mathematics in robotics

Leave a comment

Mathematics is one of many tools we’ll use in robotics.  Now when most of us are using a hammer we aren’t thinking to ourselves “I am using a hammer.  I am striking this nail with a hammer.  The hammer is hitting the nail…”  but when we’re taught mathematics we spend a lot of time focused on the tools of mathematics and that can be boring and frustrating.  With enough practice, however, we get comfortable using the hammer and are thinking about the outcome of our hammering, we’re using it in the context of some larger construction that we have in mind.  The same thing goes for math.  Math is only useful when we’re using it to build and discover.

I think everyone must have felt a chill when they first learned that the circumference of any circle, no matter how big, divided by its diameter always equaled 3.14159… Wow! How did that happen?  Is there any case that isn’t true?  Are there any other things in the universe that I can understand that rely on a constant like this?  Discoveries like this are still happening even today and we use those discoveries in our technologies and engineering.  In fact most modern technologies are completely dependent on those discoveries.

We won’t be using much math in this competition, but knowing how some basic tools can be used to make a better robot are as important as knowing how to use a screwdriver or a remote control console.  The basic tools are the ability to count, the ability to use arithmetic and the ability to find unknowns in an equation (algebra).  In order to master this tool I suggest we approach it like we would a new language.  First say it in english

“you can wrap 3.14 can lids around a can (assuming all three came from the same can)”,

then draw it as a picture,

pi

and then write it in the alphabetic symbols of that language

piequ

Want to know more:

http://www.geom.uiuc.edu/~banchoff/Flatland/

http://www.education.rec.ri.cmu.edu/downloads/education_standards/standards_menus/STEM%20lessons%20for%20Immersion%20Units.pdf

Advertisements

5. Logic

Leave a comment

Logic is used in the courtroom to structure sound arguments and can be used to deduce or induce a truth we’re grappling but in electronics and programming it’s the basis of how we put things together.

gates

In class I showed two circuits that would turn on a light using a battery and two switches.  The AND set of switches (AND Gate) requires that both of the switches be on in order for the light to turn on.  Then we built one using a breadboard and an LED with two switches

The OR gate only required that one of the switches was on but if both of them were on that would be O.K. too.

The other types of logic gates common in computing are NOR, XOR, NAND and NOT

These are NOT OR, EXCLUSIVE OR, NOT AND and the NEGATION.

OR

Evan and I went through the construction of truth tables for each of these gates and showed how they could be used in programming.  In programming another very important logic step was introduced called IF…THEN…ELSE.  Almost all computer programs and anytime our robot will be making a decision based on some input we’ll be using this logical argument.

The idea of using symbols was introduced as arbitrary but an important skill to master.  All subjects use some sort of shorthand or symbolism to represent the elements and systems of their discipline.  In the US, Logic gates are represented in a circuit diagram using the symbols shown below.

symbols

In your notebooks we constructed truth tables that showed TRUE if a switch was on and FALSE otherwise.  We showed the status of the switches and the status of the light (TRUE if “on”, FALSE otherwise) in a table.  If you placed an AND and an OR gate in series (the output of the AND gate formed the Ts and Fs of the OR gate’s input) what would the truth table look like?  Does it make any sense?  Why or why not?

Want to know more

http://www.youtube.com/watch?v=eJHmVlzH_9Q

http://www.youtube.com/watch?v=IwLExQbPlBU

http://www.doc.ic.ac.uk/~dfg/hardware/HardwareLecture01.pdf

4. Digital vs Analog

Leave a comment

Electronics can generally be divided into two types: Digital and Analog.

Whenever we’re measuring a voltage from a sensor or whenever a record player needle feels the scratches in a groove on a plastic record we’re dealing in the realm of analog.

Analog is useful because its what nature uses.  The sights, sounds and motion of the world around us are all working in analog.  In most modern technologies, however, we really are a digital age.  What distinguishes digital from analog for me is the fact that digital signals are represented as pulses or square waves that signal “on” and “off” as a “1” and  “0”.  This looks like a pulse to me and so I’ve told you that digital electronics begins with the pulse or heartbeat.

When we looked at some of the instruments we’ll be using to diagnose our circuits and programs in the robot we connected a signal generator to the oscilloscope and generated a series  of square, sine and V shaped waves at various frequencies.  We also saw how the signal generating probe would generate either a 400 pulse per second or a .5 pulse per second signal that we could trace in a circuit using the logic probe.  Later, we connected the oscilloscope to the output of the BOE-BOT board that gave instructions to the servo motor to move.  We saw that as we changed the pulse length in the program that the pulse-up and the pulse-down got further and further apart.

The true pulse, however is the one that is called the clock and is essential to any microprocessor, computer or digital process.  This is different than the “1”s and “0”s we spoke of.  This is the set of pulses that determine how fast the central processing unit (CPU) of a computer steps through its instructions and how often a microprocessor sends or receives signals.

boebot processorWhen I introduced you to the BOE-BOT I showed pointed out the chip that housed the microprocessor of the robot and called it the brains of the robot.

Unfortunately, its very small and hard to see.  What the company that makes the BOE-BOT has done is to take a very small microprocessor called a PIC (the largest chip on the board) and placed it on a little circuit board of its own called a BASIC STAMP.  On this board we can see a silver component with 20.o M written on it.  This is a crystal that oscillates at 20 megahertz (20 million cycles per second) but ours works at 50 megahertz.  This little computer can execute 75 million instructions per second at that rate!  You can’t tell from the picture but the crystal has two wires that are connected via the circuit board’s traces to the second- and third-pin-from-the-top on the right side of the PIC chip.  If your robot suddenly stopped working or was working sporadically, you might want to check the pulses at either of these two pins using the oscilloscope.

Want to know more

https://learn.sparkfun.com/tutorials/analog-vs-digital

http://www.parallax.com/sites/default/files/downloads/BS2-IC-Schematic-Rev-J_0.pdf

http://www.parallax.com/sites/default/files/downloads/27218-Web-BASICStampManual-v2.2.pdf

3. Motors

Leave a comment

DSCN0208At the beginning of class we covered the idea that whenever a magnet rushes past a conductor it creates electricity.  This is one of the ways that we can generate electricity.  We also learned that whenever electricity runs through a conductor it creates a magnetic field.

We demonstrate this by dropping a magnet down a copper pipe and noticing that it took a long time for the magnet to run through the pipe.  This was a demonstration of Lenz’ law.

When we combine the idea that whenever electricity runs through a copper wire it creates a magnetic field and that magnetic opposites attract we have the basics of how a motor works.

By making sure that the copper wire in the motor (the windings) are only creating a magnetic field when we want them to be attracted to the magnet, we create a motor.

We actually did this when we made our own motors with nothing more than a battery, some copper wire and a magnet.

DSCN0204

We then saw how the motor on the BOE-BOT worked.  The BOE-BOT uses a continuous servo motor.  This type of motor uses the length of a pulse to determine how long to go one direction or another.  Most servos aren’t continuous but use the signal to determine what angle to point to.  This type of servo is used to steer R/C cars and airplanes.

MotorsThere are many types of motors in the market today but the three types most commonly seen on robots are the DC motor, the servo motor and the stepper motor.

When we made the battery motor we saw how to make it go backwards.  Do you remember how?  How would we do that using a DC motor?

When we changed the code for operating the servo motor whenever we put in a value of 750 micoseconds the motor stayed in one place.  What values made it go forward?  Which made it go backwards?

 What would make our motor stronger?  More wire, a bigger battery or a bigger magnet?

Want to know more

http://www.launc.tased.edu.au/online/sciences/physics/Lenz’s.html

http://www.robotmarketplace.com/products/motors_main.html

http://www.phys.unsw.edu.au/hsc/hsc/electric_motors.html

2. Energy, Power and Work

Leave a comment

There are several kinds of energy that we know of in the universe.

  • Kinetic energy is the energy of masses with momentum gathered from potential energy.
  • Thermal energy is the energy that is found when atoms of a substance are moving rapidly.
  • Solar energy.
  • Chemical energy is the energy released from chemical bonds when those bonds are broken or created.
  • and several others…

But the most common sort of energy we’ll be talking about in robotics is electrical energy.

In class we discussed many sources of electrical energy.  Name three different sources of electricity other than batteries that we see in everyday use?

Potato Battery

We demonstrated the chemical energy that’s associated with batteries as a source of energy by making a potato battery.

When we connected a copper wire and a zinc coated nail into the potato and measured the voltage we found that we created a little less than a volt of electricity but it only flowed at a rate of less than 1 milliamp.

To figure out how a potato and a couple of metal nails can make electricity it was necessary for us to explore some atomic physics.

According to current theory, all atoms are comprised of three fundamental parts

  1. Neutrons
  2. Protons (positively charged particles)
  3. Electrons (negatively charged particles)

The Neutrons and Protons combine into what we call the nucleus of the atom and the electrons are thought to orbit this nucleus in layers called shells.  In neutrally charged atoms the number of electrons should equal the number of protons.  In class I showed you a periodic table which organized all the atoms we know of in order of how many protons they had.

Periodic tableThe outermost shell of any atom is sometimes called the valence shell.  Electrons from this layer can be shared with another atom.  When this happens we create a chemical compound and the shared electron is called a covalent bond.  In some elements this outer layer is short one electron or only has one electron, making the atom very reactive!

The copper and zinc (I’ve highlighted them in blue) are numbers 29 and 30 on the periodic table.  The Potato has a small quantity of phosphoric acid in it that reacts with the copper and the zinc to release some electrons by oxidizing (rusting) the zinc and reducing (the opposite of oxidizing) the copper.  This places more electrons on the zinc and fewer electrons on the copper.  When we connect them to a drain (a light for example) the electrons flow from the electron-rich zinc to the electron poor copper.

The main point of most technologies is to do work.  Work is using a force to move something or to keep it from moving.  Remember from your sailboats that force is a vector quantity;  It operates in a specific direction.  In most cases, the work done will also be in specific direction.   In class we showed the work done by rolling a steel ball down a ramp and across the floor.  We also talked about the torque of the motors on our BOE-BOT’s axle.  Finally we discussed how, because force is a vector quanity, we can divide the momentum in a rolling steel ball between other items and change its direction and speed. Research and write a page or more in your journals about vectors and how they can be added.

Power is not the same thing as energy.  When energy gets used to do something (work) we call that power.  It is usually measured in terms of the rate at which the energy is used to accomplish one unit of work.  Energy only exists when its flowing.

For our potato battery we would multiply the amperage (current) and the voltage together to get the power of our potato battery.  Although it had enough voltage to power a motor it would take several dozen potatoes before you had enough current to power a small motor.

In class we discussed how to string together potatoes to increase voltage or to increase current.  Can you remember how we did that?

Want to know more

http://sxxz.blogspot.com/2005/03/how-do-batteries-work.html

http://www.webelements.com/

http://www.chemguide.co.uk/atoms/bonding/covalent.html

1. Outline of L&E Robotics

Leave a comment

L&E Robotics is a small but important part of the L&E curriculum.  It’s function is to

  1. Inspire STEM learning by demonstrating practical applications of Science, Technology, Engineering and Math.
  2. Practical understanding of modern workplace standards of teamwork, creativity, documentation and quality assurance.
  3. Leverage diverse talents for a common, competitive goal and how to build trust in a team.
  4. To have fun and build friendships.


The L&E team is a part of the DigiPen/NASA/FIRSTDrAFT team (Team number 4559) and is comprised of 16 High School students from DigiPen and 4 students from the L&E Academy.  Between January and March 2014 we will be designing, building and operating a robot for entry into the 2014 FIRST robotics competition.  We’ll be meeting on weekends and using DigiPen’s extensive robotics laboratory to build and test the robot.  FIRSTWA Full Logo

In class we’ll be studying robotics in a series of modules.  These modules are intended to build confidence in the student’s ability to work with the science, technology, engineering and mathematics of robotics.  Additional learning may be accomplished by the student through independent study at home based on these modules.

A NOTE ON SAFETY

Students will not be around high voltage or unusually dangerous conditions but batteries use corrosive materials and there are constantly sharp objects in the robotics lab and in the competition.  Whenever we’re building or experimenting with an hardware we’ll be using safety glasses.  In cases where we’ll be using any sort of power tools or soldering irons, the safe use of that tool will be reviewed before we begin.

To sign up as a student team member go to https://my.usfirst.org/stims/site.lasso and sign up for team 4559 as a new student.

Want to know more

http://leacademy.org/

https://projectfun.digipen.edu/summer-workshops/workshops-grades-8-12/robotics/

http://www.usfirst.org/roboticsprograms/frc

http://www.firstwa.org/

 

 

Newer Entries