10. Electronics in robotics: Ohm’s Law

Leave a comment

In an earlier blog we saw how the relationship between current (I), voltage(V) and resistance(R) combined into one of the most important identities in electronics called Ohm’s law.  To review, the current is the speed with which the electrons are allowed to flow, the voltage is the energy exerted on the electrons to flow and resistance is any reduction in the ability of the electrons to flow.


Changing any one of the three will change the other two in a way that makes it easy to apply algebra to.  If the resistance increases, the amps can’t move as fast (current decreases) and the ratio of the volts to current increases.

Similarly, in order for the current to increase, either the voltage has to be stronger than the resistance or the resistance has to decrease.

We write this relationship as



V=I x R

The first component that we looked at in an earlier blog was the resistor which obviously has to do with Ohm’s law because it’s sole job is to increase resistance.  

If we put a 100 Ohm resistor across a battery’s terminals the voltage from the battery will be 1.5 volts but the current will be equal to the voltage divided by the resistance or 15 milliamps (15×10-3Amps)


It’s worth noting that the current would be the same on either side of the resistor.

But what if we want to vary the voltage? One of the most frequently used circuits in electronics is the voltage divider which makes use of Ohms law and the fact that if you put two resistors in a series, the total resistance will be the sum of the two resistor’s ohm values or simply R1 + R2.


According to Ohm’s Law, the current I will be the Voltage divided by the resistance.  Since there are two resistors this will be the sum of the two resistors you see in the denominator and the voltage in the numerator.  Again, according to Ohm’s Law in order to get the voltage we multiply the current by the resistance in the second resistor  which you see in the numerator of the formula in the drawing.

Suppose we had a 12 volt battery (common in robots) and two 100 ohm resistors in parallel like in the drawing above.  How much voltage would we have at the output of the voltage divider?

Want to know more


8. Mathematics in robotics: Units of Measure

Leave a comment

Most of us are used to single measurements of everyday items.  A ruler can give us linear measures in units of inches or centimeters; a measuring cup can give us volume measures in units of cups or fluid ounces.  But when you’re measuring electrons in a circuit your measuring something really small!

For example, your standard car speakers will require the radio to pump 104,000,000,000,000,000,000 electrons per second…well that’s just silly! Even if it were helpful to know how many electrons it took to power my sub-woofer it would be easier to write as “104-followed-by-18-zeros” or in scientific notation as 104 x 1018. But there are many cases where we need a unit of measure that counts a lot of electrons at once. Using some very clever experiments, people decided that the count of 6.241×1018  electrons could be called “one coulomb” and that moving that many electrons past a point in one second would be called “one ampere”.

1 Ampere = 1 coulomb / 1 second

Whenever we come across a measurement that includes the word “per” or “rate” we should use a division sign to symbolize it.  Thus “miles per gallon” becomes miles/gallon and “miles per hour” becomes mi./hr. Since ampere’s or amps are measured in units per second, it is a measure of the speed at which the electrons are flowing, not the number of electrons that are present.  Actually the number of electrons present won’t matter in electronics.  Every helium atom has two electrons but I guarantee you won’t charge your smartphone by plugging it into a helium balloon. The only way to get those electrons to flow is if there are more electrons on one side of the circuit than the other.  The difference between the two is measured in volts.  This is a very different measure than the one for current (amperes) which measured the velocity of electrons in a wire.  Volts are a measure of force (you can think of it as pressure) on the electrons to move.  This force or energy that results from having more electrons on one pole than the other is measured in a unit called Joules.  The number of joules per coulomb (energy per number of electrons) is what we refer to as volts.

1 volt = 1 joule/1 coulomb

We now have two measurements of electricty; the ampere as the unit of measure of current (symbolized as I) and volts as the measure of voltage (symbolized as V).  But the only time anything interesting happens is when we pass the current and the voltage through something (e.g. a light bulb, a radio or a computer)  What we’re changing is the amount of each that travels through a conductor.  Whenever we change the ability of a conductor we call it the conductor’s “resistance”.  We measure resistance in units called “ohms” (symbolized as  Ω) and an ohm is measured in terms of volts per amp or

1 Ohm = 1 Volt / 1 Ampere

Resistance is the third leg of the fundamental law for all electronics.  Just like the example we gave earlier about π , the combination of resistance, current and voltage can describe everything interesting that’s happening in a circuit.

Besides what’s happening in a circuit, FIRST robotics will be concerned with how much the robot weighs, how long the battery can last and how much things cost.  We’ll have to constantly be measuring, inventorying, estimating and reporting on measured quantities.

When we’re figuring out what to buy for our robot we’ll have to stick to the budget that FIRST has given us (I think we can add up to $400 to the $5,000 in parts that FIRST will give us).  Budgeting requires that we estimate how much each part will cost and make sure we don’t use all of the money before we’ve purchased everything we need.  How might the notion of budgeting apply to a circuit?  Can you use up electricity?

Want to know more




9. Electronics in robotics: Discrete components

Leave a comment

At first glance you might think building a robot will require a deep understanding of electronics but it actually relies on a lot of the electronics we need being self contained in little chips on a circuit board.  All we really need to do in robotics is to connect the chip’s pins to the right inputs and outputs in order to make the robot do what we want it to.  Sometimes, however, we can’t simply connect things together or we’ll destroy a chip and often it helps to know the function of each chip in order to better diagnose what might go wrong with the robot during a competition.

Let’s begin with the basic notion of a circuit.  A circuit describes the condition where electric current (remember that current is the flow of electrons) flows from a source, through the devices in the circuit and returns to the source’s other pole.  This seems pretty intuitive but it’s important to understand that you can’t do much with current that goes to something but you can do a lot when it flows through it and into a ground.

Discrete components


  • Unit of measure: Ohms
  • Types: Surface Mount, carbon, foil.
  • What they do: change the ratio of voltage to current in a circuit
  • Symbol resistor
  • what they look like


From top to bottom

Surface mount, DIP chip, carbon, foil, precision foil






  • Unit of measure: Farads (although its usually microfarads or picofarads)
  • Types: surface mount, ceramic, tantalum, poly, electrolytic
  • What they do: They’re little reservoirs that can hold a finite amount of electricity.
  • Symbol:cap
  • What they look like


In order from left to right

Ceramic, tantalum, poly, Electrolytic (I’m out of surface mount caps but they look just like the surface mount resistors).






  • Unit of measure: Two numbers.  The high voltage is the reverse voltage limit that will fry your diode and the small voltage is the voltage drop from the anode to the cathode.
  • Types: Zener, Schottky,  Light emitting, rectifier, thyristor
  • What they do:  Basically they’re a one-way valve for electricity.  They’re most often used to flatten a sign wave or oscillating current.
  • Symbol: diode
  • What they look like


From top to bottom:

Surface mount, Zener, rectifying







  • Unit of measure: Max voltage between the emitter and the collector, current gain to the emitter (called the beta),
  • Types: surface mount, NPN, PNP, Darllington, Field Effect, etc.
  • What they do: most people use them as a switch but they actually act as a current amplifier.
  • Symbol: transistor
  • What they look like


From left to right:  These are all NPN transistors of increasing power.

Surface mount, TO-92 package, TO-220 package, TO-3 package






  • Units of measure: Cycles per second or Hertz (1 Hz=1 cycle per second)
  • Types: crystal, crystal with cap included
  • What they do:  These are the “Pulse” of the microcontroller we spoke about in the 4th blog but they’re also used in R/C in order to establish the radio frequency you’ll be using to control your robot.
  • Symbol: crystal
  • What they look like:








Want to know more

This about the coolest way I know to learn basic electronics: http://www.falstad.com/circuit/e-index.html

7. Mathematics in robotics: Number Systems

Leave a comment

The Piraha people of the Amazon only have 3 numbers: 1, 2 and all-numbers-more-than-2.  That’s really all the data they ever need to represent but most other cultures have found it necessary to communicate more information (data) than that and have developed number systems that allow them to do that.  These usually start with something like notches on a stick or stone counters.  The problem is that these get longer with each one you add so most people’s numbering systems began to count using a system that got longer by multiples of 10.  In this decimal system (deci- is Greek for tenth) the first place is reserved for counting the number of 1’s, the position next to that is reserved for counting the number of 10’s, next is reserved for the number of 100’s (10×10), next 1,000’s (10x10x10) etc.  Because digital information comes to us as pulses of “on” and “off” we’ve kinda had to go backwards from the innovations of the decimal system.  The easiest way to represent digital information (data) is by reserving each place in the number represent a multiple of 2.  So the first place represents the number of 1’s just like the decimal system but instead of the next place holding 10’s it holds the 2’s and the third place is for holding 4’s (2×2) the fourth for holding 8’s (2x2x2) etc.  We call this system of number binary.

The decimal number 7 would be written as 111 in binary and the number 5 as 101.  How would you write the decimal number 9 in binary?

Handling a string of 1’s and 0’s is fine for a computer, but when we’re typing computer code and we want to input a big binary number we’d end up typing a long string of 1’s and 0’s.  Once again people had to come up with a way to write shorter representations of the data.  In the decimal system there’s one other convention that I forgot to mention…we use commas after every 3 place holders in the number (1,000’s, 1,000,000’s etc.).  This makes it easier for us to count really big numbers.  The first innovation that took place in our use of binary numbers in computers was to create a system like the use of comma’s in the decimal system so we decided that after 3 places in the binary system (which counts 8 numbers or “bits” as their called in the binary system) we’d call it a “byte”.  A number system that added a place after every multiple of 8 would reserve the first place for 1’s, the second place for 8’s, the third for 64’s etc.  We call this the octal system of numbers.  In this system of numbers 111 would be equal to the decimal number 73 (64+8+1).  We decided to write this system by adding the alphabet to our decimal system as  0,1,2,3,4,5,6,7.  The decimal number 74 would be 112.  How would you write 80 in octal notation?

Finally, the system used in most programs combines a lower byte (1111) and an upper byte (1111) into number system called the hexidecimal system of numbers.  It borrows letters from the alphabet to enable counting from 0 to 16 in the first position:  0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f.  So the number ff written in Hexidecimal would equal 255 (240+15).  In Binary this would be equal to 1111 1111.

Numbering systems are useful ways for representing data but there are other ways we use communicate information that are not digital.  Can you think of any other systems of communication that use something other than the decimal system which is based on the number 10?

Want to know more



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,


and then write it in the alphabetic symbols of that language


Want to know more:



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.


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



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.


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




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




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.


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




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




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.


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







Newer Entries