New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
New Human Computer Interfaces - HUJI - Spring On the Menu Homework review Electronics and Circuits Introduction to the OpenBoard microcontroller System –Hello World –Digital Output Program and circuit –Digital Input Program and circuit
New Human Computer Interfaces - HUJI - Spring Homework Review Project Folio –Description and architecture –Parts Needed: Research the parts you will need to make it happen –Psuedocode Create a Project WIKI page with the Project Folio
A bit about Electronics
New Human Computer Interfaces - HUJI - Spring Electronics Today: –Basic Concepts Voltage Current Resistance –From idea to circuit: Circuit SymbolsSymbols the Prototyping Board Meters and Continuity –Some Basic Circuits Switches (for Control) Digital Output (for Effect)
New Human Computer Interfaces - HUJI - Spring Voltage and Current Voltage and Current are vital to understanding electronics, but they are quite hard to grasp because we can't see them directly.
New Human Computer Interfaces - HUJI - Spring Voltage and Current Voltage is the Cause, Current is the Effect –Voltage attempts to make a current flow, and current will flow if the circuit is complete. –Voltage is sometimes described as the 'push' or 'force' of the electricity, it isn't really a force but this may help you to imagine what is happening. It is possible to have voltage without current, but current cannot flow without voltage.
New Human Computer Interfaces - HUJI - Spring Voltage and Current Voltage and Current The switch is closed making a complete circuit so current can flow.
New Human Computer Interfaces - HUJI - Spring Voltage and Current Voltage but No Current The switch is open so the circuit is broken and current cannot flow.
New Human Computer Interfaces - HUJI - Spring Voltage and Current No Voltage and No Current Without the cell there is no source of voltage so current cannot flow.
New Human Computer Interfaces - HUJI - Spring Voltage, V Voltage is a measure of the energy carried by the charge. Voltage is supplied by the battery (or power supply). Voltage is used up in components, but not in wires. Voltage is measured in volts, V. You may find it helpful to think of voltage like height in geography. –The zero volts in an electronic circuit is like the sea level in geography.
New Human Computer Interfaces - HUJI - Spring Current, I Current is the rate of flow of charge. Current is not used up, what flows into a component must flow out. Current is measured in amps (amperes), A. The symbol I is used for current in equations. (Intensity of current )
New Human Computer Interfaces - HUJI - Spring Resistance Resistance is the property of a component which restricts the flow of electric current. Energy is used up as the voltage across the component drives the current through it and this energy appears as heat in the component. Resistance is measured in ohms, the symbol for ohm is an omega. Resistors used in electronics can have resistances as low as 0.1 Ohms or as high as 10 M Ohms.
The Prototyping “Bread” Board
New Human Computer Interfaces - HUJI - Spring The Prototyping Board Allows you to build circuits without needing to solder anything together. Makes it easy to test and change a circuit quickly.
New Human Computer Interfaces - HUJI - Spring How to use the Prototyping Board Two TOP and BOTTOM rows are connected Horizontally Two inner rows: Connected Vertically
New Human Computer Interfaces - HUJI - Spring Setting up Power
New Human Computer Interfaces - HUJI - Spring Setting up Power Is this circuit complete?
New Human Computer Interfaces - HUJI - Spring Setting up Power Now it is. But is it usable?
New Human Computer Interfaces - HUJI - Spring Setting up Power Now it is- we can add elements into the central areas to create a working circuit
New Human Computer Interfaces - HUJI - Spring Building Circuits We will build a simple LED circuit
New Human Computer Interfaces - HUJI - Spring Building Circuits 1.connect the power to the central circuit area
New Human Computer Interfaces - HUJI - Spring Building Circuits 2.Add the first element (a protective resistor)
New Human Computer Interfaces - HUJI - Spring Building Circuits 3.Add the LED
New Human Computer Interfaces - HUJI - Spring Building Circuits 4.Finish the circuit- connect to the – (GND)
New Human Computer Interfaces - HUJI - Spring Building Circuits If all is Well- enjoy the light!
New Human Computer Interfaces - HUJI - Spring Building Circuits Hmm… But what if it doesn’t work? Ideas?
New Human Computer Interfaces - HUJI - Spring Building Circuits Hmm… But what if it doesn’t work? Ideas? –Maybe the wires are not in the correct place (the circuit is not wired properly) –Maybe there is a bad wire in there somewhere –Maybe the LED is burned –Maybe the battery is dead
New Human Computer Interfaces - HUJI - Spring Building Circuits How do we check these things? –Circuit –Wires –Components –Power
New Human Computer Interfaces - HUJI - Spring Building Circuits To check wires and the circuit: we want to check for CONTINUITY –This means checking that electricity flows all the way through the circuit. –If it is disrupted somehow- there will be no continuity. OK- but how do we check this?
New Human Computer Interfaces - HUJI - Spring Multi-Meter Meet the Multi-Meter: Analog Digital
New Human Computer Interfaces - HUJI - Spring Checking for Continuity To check for Continuity, set the meter to test Resistance (the Omega symbol) Now touch both ends (Red and Black) to each other. What do you get?
New Human Computer Interfaces - HUJI - Spring Checking for Continuity Some Multi-Meters have a Continuity Check mode. –In this case, touching the leads will give you an audible beep. –This is good because you don’t need to look at the meter, just listen: continuity: Beep No continuity: No Beep
New Human Computer Interfaces - HUJI - Spring Checking for Continuity If any of the elements in the circuit are broken, there will be no continuity!
New Human Computer Interfaces - HUJI - Spring Procedure for Checking for Continuity 1. Check both ends of the circuit 2. No continuity? a. Check one half of the circuit. 1.Good Continuity? »The problem is in the other half of the circuit 2. Bad continuity? »continue checking this half of the circuit until you zero in on the culprit (simply do the same procedure from this point downwards, each time checking the remaining 2 halves of the circuit until you reach a point where you find the problem)
New Human Computer Interfaces - HUJI - Spring Some Circuits Now that we know how to build simple circuits with the Prototyping Board, we will look at a few simple circuits –A Buzzer –A Beeper
New Human Computer Interfaces - HUJI - Spring A Buzzer Remind you of something? Bzzzzzzzzz
New Human Computer Interfaces - HUJI - Spring A Beeper Remind you of something? Beeeeeeep
Introduction to the Arduino microcontroller System
New Human Computer Interfaces - HUJI - Spring The Arduino System Hardware: –MCU –USB Cable Software –Arduino IDE
New Human Computer Interfaces - HUJI - Spring The Arduino System
New Human Computer Interfaces - HUJI - Spring The Arduino System Basic Setup: PC Serial Connection (Also supplies Power) MCU Arduino IDE
New Human Computer Interfaces - HUJI - Spring The Arduino System Basic Setup: PC Serial Connection MCU 9V Power + - Arduino IDE
New Human Computer Interfaces - HUJI - Spring The Arduino System Basic Setup: PC Serial Connection MCU 9V Power + - Arduino IDE WARNING: NEVER connect or Disconnect The Programmer To the MCU When the MCU is ON ALWAYS TURN THE MCU OFF BEFORE HAND
New Human Computer Interfaces - HUJI - Spring The Arduino System Software IDE Win, Mac, Linux
New Human Computer Interfaces - HUJI - Spring The Arduino System Software Setup –Have JAVA installed on the machine –Download and install the IDE Win MacOSX-PPC, MacOSX-IntelMacOSX-PPCMacOSX-Intel Linux –Check what Port is assigned to the USB Serial Port on your PC (COM4, 5, 7…) –The EnvironmentEnvironment –How To (Windows, Mac OS X, Linux): step-by-step instructions on getting your first Arduino program working.WindowsMac OS XLinux
New Human Computer Interfaces - HUJI - Spring The Arduino System Class Workshop: –Get an Arduino board and cable –Download the Arduino environment –Install the USB drivers –Connect the board –Connect an LED –Run the Arduino environment –Upload a program –Look for the blinking LED See Instructions:
New Human Computer Interfaces - HUJI - Spring The Arduino System Digital OUTPUT
New Human Computer Interfaces - HUJI - Spring The Arduino System Digital INPUT –Lets create a circuit with a Switch
New Human Computer Interfaces - HUJI - Spring Homework Create a reactive system: –Input creates output – be creative Move forward with your projects: Design Hardware Programming