New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class ? May
New Human Computer Interfaces - HUJI - Spring On the Menu Project Idea Presentations and Discussion Serial Communications: Some more sensors Changing the world: Actuators Milestones for the rest of the semester
New Human Computer Interfaces - HUJI - Spring Serial Communications The Ardiono can communicated with other devices in the world using the Serial Communications Protocol You can use this to have a board Send data to another board and receive data from another board. You can also use this to have the board communicate with a workstation (Why?)
New Human Computer Interfaces - HUJI - Spring Serial Communications This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, you cannot also use pins 0 and 1 for digital i/o. –Serial.begin(speed)Serial.begin –int Serial.available()Serial.available –int Serial.read()Serial.read –Serial.flush()Serial.flush –Serial.print(data)Serial.print –Serial.println(data)Serial.println WORKSHOP:
Some More About Sensors
New Human Computer Interfaces - HUJI - Spring Push buttonSlide switch Toggle switch Rocker switch Types of Input Switches
New Human Computer Interfaces - HUJI - Spring Sensitive Switches Hair trigger/whisker switch Roller switch Mercury/Tilt switch Magnetic/Reed switch
New Human Computer Interfaces - HUJI - Spring Analog Sensors Force Sensitive Resistor (FSR)Pressure sensors
New Human Computer Interfaces - HUJI - Spring Analog Sensors PhotocellTemperature Sensor/Thermistor
New Human Computer Interfaces - HUJI - Spring AccelerometersFlex Sensor And more … And more: Capacitance sensors Piezoelectric sensors More info: ITP Sensor Workshop ReportITP Sensor Workshop Report
Changing the World: Actuators
New Human Computer Interfaces - HUJI - Spring Examples
New Human Computer Interfaces - HUJI - Spring Actuators Pneumatic –Air Pressure causing movement Hydraulic –Liquid Pressure causing movement Electronic –Electro-magnetic movement Motors (Kinetic) Speakers (Audio) Lights (Visual) More Info
New Human Computer Interfaces - HUJI - Spring Linear vs. Rotary movement Torque Gear Motors
New Human Computer Interfaces - HUJI - Spring Speed (RPM) Movement – mechanics Controlling the Position Feedback about the position How much weight can it carry Torque How much power does it need Price Selecting a Motors
New Human Computer Interfaces - HUJI - Spring Speed (RPM) Movement – mechanics Controlling the Position Feedback about the position How much weight can it carry Torque How much power does it need Price Selecting a Motors 1. The moment of a force; the measure of a force's tendency to produce torsion and rotation about an axis, equal to the vector product of the radius vector from the axis of rotation to the point of application of the force and the force vector. 2. A turning or twisting force.
New Human Computer Interfaces - HUJI - Spring Types of Motors Stepper DC servo DC
New Human Computer Interfaces - HUJI - Spring DC Motor: Cheap. Very easy to connect Minimum control Turns 360 degrees. Can add components for more control: –Speed: change the voltage using a POT –Direction: change the polarity –Position: can’t! Add an H-Bridge circuit Motors
New Human Computer Interfaces - HUJI - Spring DC Servo: Expensive Very easy to connect Includes all components Turns 90 degrees to each side Full control: –Speed: change the voltage –Position: Needs CHECKING Motors Waiting for answer from Oren
New Human Computer Interfaces - HUJI - Spring DC Servo - Controlling the position: They rotate 0 to 180 degrees depending on the pulsewidth. About 1.5 sec to move 180 degrees. The DC Servo takes a pulse of between 1-2 ms every 20 ms. A pulse of 1 ms will turn the motor to 0 degrees; 1.5 MS will turn to 90 degrees, 2 ms will turn it to 180 degrees To keep a servo in its current position pulse it with the same pulse width every ms to keep it there. Controlling a Servo
New Human Computer Interfaces - HUJI - Spring Stepper: Cheap Usually 12V Hard to connect Need extra components Turns 360 degrees. Can stay still in one position Full control: –Position –Speed Motors
New Human Computer Interfaces - HUJI - Spring We want to control a few elements: Speed Strength Direction Position Controlling Motors
New Human Computer Interfaces - HUJI - Spring We want to control a few elements: Speed power Strength Current Direction current direction/Pulse Position Pulse Controlling Motors
New Human Computer Interfaces - HUJI - Spring Controlling the position: Controlling Motors DC Motor Controller בקר (H-Bridge) Encoder BS1 משובFeedback PWM
New Human Computer Interfaces - HUJI - Spring Using PWM to control the position: For each motor we know the RPM: in X Volt, how many rounds per minute. From this info we can calculate how many degrees a pulse moves in a certain time. When accuracy is important inertia should be taken into account (and gear to balance it) Controlling Motors
New Human Computer Interfaces - HUJI - Spring Where to get motors? חנויות טיסנים חנויות רובוטיקה חנויות אלקטרוניקה
PAUSE What have we been dealing with so far?
New Human Computer Interfaces - HUJI - Spring Vision SOUND Analog INPUT Digital Input Sensing the world Controlling the world Digital Output Analog Output Computing Communications MOVEMENT (Motors) Output to the PC Controlling 220V world Movement Position Change Pressure Temperature Audio Video
New Human Computer Interfaces - HUJI - Spring Projects What’s a good project? Process Milestones Presentations
New Human Computer Interfaces - HUJI - Spring What’s a Good Project Explores interesting, and preferably, novel scenarios Shows interesting use of the technology Exhibits a working prototype for at least one main part of the scenario. Explains how it fits into the wider scenario. Includes good documentation –Project explanation, process, problems, code, possible improvements –Project Poster
New Human Computer Interfaces - HUJI - Spring Project If we have time: –Class Discussion of Projects Home Work: –Prepare a Project Proposal: Intro – What problem am I trying to solve Research (what exists…) Concept Technology Milestones (7 weeks)