Basic Electronics and Arduino at CCA, Summer, 2011

Basic Electronics/Arduino Workshop

Instructor: Michael Shiloh

SF / SCNCE–200–01 / 000 /15 sessions
May 26–June 30 (no class 5/30), MWTH, 6:15–9:15 p.m.

Prerequisite: high school algebra

Class Blog:

Textbook and other Materials:
A free online textbook is used. Printouts will not be provided in class.
This class includes a materials fee for basic materials, which will be provided. Depending on choices you make regarding your projects, you may require materials and parts beyond these provided materials. While I will do my best to guide you towards inexpensive solutions, some parts and tools in this field can be quite expensive. Furthermore, it is common for plans to change, leaving you with parts that are not used. Please budget accordingly.

Class Orientation
This class is based on hands-on exercises and projects.

Lab Exercises
The purpose of each lab is not to complete certain steps, but rather to discover electrical principles and get a feel for the behaviour of certain components, values, and quantities. Each lab exercise ends with short, individual written reports, to include observations, conclusions (or guesses), and ideas for further learning

At least one project is required. In addition to the core concepts of this class, you are encouraged to further research and develop  areas in the field that are of particular  interest to you.

Homework and tools
Homework includes exercises and projects. An adequate project will require substantial work outside of class. If you lack the tools at home, you may be able to do all the work requiring tools during class, and save all other work for outside of class. You may also elect to purchase some of these tools. I am happy to offer guidance.

Complexity and time estimates
Unless you have a fair bit of experience working with these materials and mechanisms, you may find that physical implementations often don’t behave the way you imagined they would. Furthermore, you may find that tasks take a lot longer than you expected. Even professionals in this field often underestimate these points. I strongly encourage you to prototype early and often.

There will be some homework, but most of the grade comes from your work in class and in your projects and exercises. I am always looking for evidence of your understanding and comprehension. You are encouraged to answer each others’ questions in class and in general to help each other.


Week 1
Experiment and Learn

Week 2

Week 3

Week 4
Putting it together

Week 5


1: Thursday, May 26, 2011
Experiment with resistors, power supplies, and LEDs
Lab report.

  1. Resistors
  2. Power supplies
  3. Measure voltage, resistance
  4. LED and current limiting resistor

Things to think about:

  1. What do you think resistors do to voltage?
  2. What happens when you connect resistors in different ways?

Homework due Tuesday, May 30

  1. Start your own reference sheet. The first topic will be the resistor color code. Research and explain it in your reference sheet, in your own words. Give examples.
  2. Bring in an unused power supply, if you have one.

2: Wednesday, June 1, 2011

  1.  voltage dividers
    1. now that you have the resistor color code, collect 3 resistors from each decade:
      1. Thousands of Ohms
      2. Tens of Thousands of Ohms
      3. Hundreds of Thousands of Ohms
    2. make 3 voltage dividers
      1. measure voltages
      2. observe they always add up to total voltage
      3. make table of voltage, resistance, and V/R
      4. observe V/R is the same in each divider
    3. Current
      1. Rate of flow of electrons (electrons per second)
      2. Same in all resistors of a divider (but might be different from a different divider)
      3. Ohm’s law: I=V/R
      4. Voltage, resistance properties of power supply and load. Current depends on what power supplies and loads are connected, and how.
    4. Summary
      1. Voltage in a divider must add up to total voltage
      2. Current at branch or convergence must somehow add up

3: Thursday, June 2, 2011

  1. Review
    1. Voltages in a simple circuit or in a pair of voltage dividers
    2. Current at a node
    3. What is the current in a short circuit?
  2. Switches
    1. Mechanical
    2. Relay
    3. Transistor

Lab circuit:

Lab work:

  1. Calculate the current in the LED (how?)
  2. Calculate the current into the gate (how?)
  3. How does this make the transistor useful?


  1. Add to your reference sheet, in your own words
    1. Ohm’s law
    2. KVL
    3. KCL
  2. Read and study, in our online textbook, the section on Scientific Notation and Metric Prefixes

Ideas for next time:

  1. sound generation
  2. record player
  3. arduino 3d printer

4: Monday June 6

Introduction to the Integrated Circuit

Today we will build the Atari Punk Console

On Wednesday we will start working on Arduino. We probably won’t need laptops until next week.


  1. Read about Arduino at
  2. Explain, in your own words, what Arduino is
  3. Explain, in your own words, what role the Arduino IDE plays

5: Wednesday June 8

Today we start building Arduino. We will use a new construction technique: wiring directly on a perforated (“perf”) board. New concepts to learn include:

  1. Microcontroller
  2. IDE (Integrated Development Environment)


  1. Please bring your laptops tomorrow (Thursday)

6: Thursday June 9


  1. Finish building Arduino
  2. Install IDE
  3. Program your Arduino

7: Monday June 13

Midterm review: What are the important points I want you to get out of this class?

  1. Electrically common points (nodes)
  2. Familiarity with common components (transistors, resistors, capacitors, LEDs, ICs, power supplies)
  3. Parallel and Series circuits
  4. Voltages and currents in parallel and series circuits
  5. KVL and KCL
  6. Ohm’s law
  7. Wattage
  8. How to read schematics
  9. How to build things
  10. An introduction to the art of connecting (part of) one schematic to (part of) another
  11. How transistors increase current capabilities
  12. Relays
  13. Voltage dividers
  14. How to calculate equivalent resistances


  1. Conductors and Insulators
    1. Ideal Conductor: any material that posses no resistance
        1. Practical Conductor: any material that posses very low resistance
        2. a piece of wire
        3. most other metals
    2. Ideal Insulator: any material that posses infinite resistance
        1. Practical insulator: any material that posses extremely high resistance
        2. wood, plastic, rubber, air, electrical tape, etc.
    3. Anything else: resistors!
  2. Electrically common point
    1. Any points connected to each other by one or more conductor
    2. There is no voltage differential between any two physical locations on an electrically common point
    3. Any voltage or signal applied to any location on an electrically common point (relative to some reference point) is instantly present at every part of the entire electrical common point
      1. Corollary I: Any component which must be connected to an electrically common point can be connected to any physical location on that electrical common point
      1. Corollary II: a voltage difference can not exist anywhere on a single electrically common point.
        1. Corollary IIa: A voltage difference can only exist between two different electrically common points
        2. Corollary IIb: Any two components or other sub-circuits connected between the same two electrically common points experiences the same voltage difference
  1. Introduction to series and parallel components, which are just trivial reductions of KVL and KCL

Homework due Thursday, June 16

  1. Read, in our online textbook, Volume I, Chapters 1-7
  2. Sometimes we are missing the right value of a resistor. It is possible to combine available resistors to come up with a different “effective” resistance.
    1. Research, in our online textbook or elsewhere on the web, and explain in your own words why the equivalent resistance of two resistors in SERIES is the sum of the two resistance values
    2. Research, in our online textbook or elsewhere on the web, and derive the equation for the equivalent resistance of two resistors in PARALLEL. You can derive this using only Ohm’s law, KVL, KCL, and very basic algebra.
    3. Explain, in your own words, why it makes sense that the equivalent of series resistors is bigger than any, while the equivalent of parallel resistors is smaller than any.
  3. Selected online sources

Arduino files:

  1. For the 3 by 3 LED matrix
    1. Simple alternating LED
    2. Sample of how to multiplex
    3. Sample of animation

9: Wednesday June 15

    1. Projects
      1. You are not required to use Arduino. Complicated does not necessarily mean better. I encourage you to start with what you are interested in.
      2. Be realistic!
        1. You might have to learn some subjects on your own
        2. You will have to purchase some of your own components but I can help direct you to low cost or salvageable options
      3. Inspirational Links
        14. Carl Pisaturo’s work
        15. Applied Kinetic Art
        16. Survival Research Labs
    2. Sensors and Actuators
        1. Sensors
          1. What’s available?
            1. Wikipedia
            2. An incredibly long list of sensors, illustrating the huge range of things that might be sensed
            3. Wiki dedicated to sensors
          2. Sensors can report their findings in different ways. How do we get this information into Arduino? Arduino can read voltages between 0 and 5V (why do you think the zero important?)
            1. Resistive
              1. Voltage divider and Analog Input
                1. Excellent tutorial at Adafruit on how to do this in great detail
            2. Switch closure (or opening)
              1. Can be considered  an edge case of resistive.
            3. Voltage
              1. Easy: Same as resistive, but the voltage divider is unnecessary because the result already is a voltage
            4. Pulse width
              1. Not too difficult, using the Arduino  “pulseIn” command
            5. Some sort of serial protocol (“Morse code”)
              1. More complicated, but Arduino does provide help in the form of “libraries” (Wire, SPI)
    3. Actuators
      1. Light
        1. LED
        2. incandescent
      2. Motion
        1. Electromagnetic
          1. Motors
            1. permanent magnet DC (PMDC)
            2. stepper
            3. servo
          2. Solenoids
          3. Speakers
        2. Piezoelectric actuators
      3. Heat

10: Thursday June 16

  1. Homework
  2. Time and resources!!!!
  3. Begin Projects

11: Monday June 20

  1. Interrupts
  2. Problems
    1. Voltage drop on series resistors
    2. Total current into parallel resistors
    3. Exercises at board
  3. Project progress
  4. Relay lab

Links to mechanical stuff

  2. cabaret mechanical theatre (or something like that)

Links to color organs


12: Wednesday June 22

  1. Understanding the current limitations of Arduino
  2. Using N-channel and P-channel transistors to control motors and other high current loads
  3. Using a double pole double throw (DPDT) switch or relay to create an H-bridge to control the direction of a permanent magnet DC (PMDC) motor.
  4. Using two N-channel and two P-channel transistors (for a total of 4 transistors) to create an H-bridge to control the direction of a permanent magnet DC (PMDC) motor.
  5. Using Pulse Width Modulation (PWM) to control the brightness of a light (LED or incandescent) or the speed of a motor
  6. Using an oscilloscope to see the PWM signal
  7. Connectors
  8. Resources:
    3. San Francisco Microcontroller Club

13: Thursday June 23

  1. Lab
    1. We only have 3 meetings left. How will you finish your project in time?
    2. Homework: I do not assign much (hardly any) homework in this class. You are expected to use this time (and more) to work on your project. Any work that can be done on your own (research, design, mechanical construction) should be done outside of class time.
    3.  In class, please work on aspects of your project that require either my assistance or materials or tools to which you do not otherwise have access.

14: Monday June 27

  1. Lecture
    1. How can Arduino drive both low and high: totem-pole outputs
    2. FET vs. BJT
    3. Phototransistors, opto-isolators, photodetectors
Print Friendly
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *