Jul 5, 2009
Course materials for Interaction Design with Electronics workshop 2009 at UCIT
Date: August 3 – 7, 2009
Location: Graduate School in User-Centered Information Technology (UCIT) in Tampere, Finland
Course materials:
Introduction: 10.15-11:30 – PDF
Final demos from previous workshops – Youtube video
Assembling electronics: 14.00-15.00
- Basic tools
- BASIC Stamp 2 microcontroller
- 9V power adapter, USB and RS232 cables
- Breadboards
- Jumper wires
- Multimeter
- Understanding schematics
- Flow of positive charge
- Popular components
- Markings in resistor
- Markings in capacitor
- Exercise: Assemble electronics – Photo
- Checking your circuit
- Measuring voltage, resistance and conductivity
- Exercise: Assembling touch sensor – Video
Setting up development tools: 15.00 – 16.00
- Installing BASIC Stamp editor
- Installing a USB driver for Windows if necessary
- Check connectivity between the BASIC Stamp and the editor by clicking Run –> Identify.
- Download BASIC Stamp Syntax and Reference Manual – PDF
Tuesday
Programming microcontroller
Basics: 9.15-10.00
- Exercise: Introduction (Flashing LED) – Photo, Schematic, PBASIC code
- Exercise: Sending data to your PC (DEBUG, CR, TAB etc.) – PBASIC code
- Exercise: Understanding ASCII (American Standard Code for Information Interchange) – PBASIC code
- Exercise: Type of Numbers (Binary, Hexadecimal, Decimal, Signed Decimal) – PBASIC code
Architecture: 10.00-11.00
- Constants (CON) – PBASIC code
- Exercise: Variables type definitions (VAR, BIT, NIB, BYTE, WORD) – PBASIC code
- Exercise: Arrays/Strings (BYTE(n)) – PBASIC code
- Exercise: Operators (+, -, *, /, abs, //) – PBASIC code
- BS2 Memory size – PBASIC code
- Binary Digit (Bit shift, Signed Decimal etc.) – PBASIC code
Controls: 11.00-12.00
- Exercise: Functions (Label, GOTO, GOSUB, RETURN) – PBASIC code
- Exercise: Looping structure (DO LOOP) – PBASIC code
- Exercise: Looping structure 2 (FOR NEXT) – PBASIC code
- Exercise: Branching (IF THEN) – PBASIC code
- Exercise: Data controls (RANDOM) – PBASIC code
- Exercise: Time/Power Control (PAUSE, SLEEP) – PBASIC code
IO Commands: 13.00-16.00
- Digital IO (HIGH/LOW, TOGGLE)
- Exercise: Flashing LED (10 units) – JPG, Schematic, PBASIC code
- Digital IO (PULSOUT)
- Exercise: Servo motor (10 units) –Schematic, PBASIC code
- Digital IO (INPUT)
- Exercise: Switch (5 units) – JPG, Schematic, PBASIC code
- Exercise: Reed switch (5 units): Switching by magnet – Schematic, PBASIC code
- Exercise: Tilt switch (5 units): Switching by tilt – Schematic, PBASIC code
- Exercise: Piezo Film Vibration sensor: Detecting vibration (5 units) – Schematic, PBASIC code
- Exercise: QT113 touch sensor (10 units) – Schematic, PBASIC code
- Digital IO (PULSIN)
- Exercise: Memsic 2125 Accelerometer: Measuring tilt and motion (5 units) – Schematic, PBASIC code
- Exercise: Ping))) Ultrasonic Sensor: Measuring distance (5 units) – Schematic, PBASIC code
- Analog IO (PWM – Pulse-width modulation)
- Exercise: Dimming LED (10 units) – Schematic, PBASIC code
- Analog IO (RCTIME – Resistor–Capacitor circuit TIME)
- Exercise: Photoresistor: Measuring ambient light (8 units) – Schematic, PBASIC code
- Exercise: Flexiforce Sensor Demo Kit: Measuring pressure (4 units) – Schematic, PBASIC code
- Exercise: SoftPot Membrane and Rotary Potentiometer: Measuring touched location (4 units) – Schematic, PBASIC code
- Frequency (FREQOUT)
- Exercise: Piezo Speaker: Making sound (10 units) – Schematic, PBASIC code
Wednesday
Serial communication: 09.15-12.00
- RS-232
- Baud rate : One baud is one electronic state change per second.
- Parity : odd, even, or none
- Data bits : 5, 6, 7, or 8bits
- Stop bits : 1, 1.5, or 2 (often says true = 1 stop bits)
- Asynchronous Serial IO (SEROUT/SERIN, DEBUG/DEBUGIN)
- Debug command uses Asynchronous, 9600 Baud rate, None parity, 8 data bits, 1 Stop bits which is 84 in SEROUT buad mode.
- DEBUG variable = SEROUT 16, 84, [variable]
- If SEROUT uses Pin 16, the BASIC Stamp uses the dedicated serial output pin
- BASIC Stamp 2 baud mode table for SEROUT commands (More information in the BASIC Stamp Syntax and Reference Manual)
- Exercise: Reading data from Photoresistor (DEBUG / SEROUT) – Schematic, PBASIC code
- Exercise: Controlling LED (DEBUGIN / SERIN) – Schematic, PBASIC code
Connecting BASIC Stamp to computer 13:00 – 14:00
- Processing
- Demo: Reading serial data in Processing code – Schematic, Proce55ing code, PBASIC code
- Max/MSP
- Demo: Reading serial data in Max/MSP – Schematic, Max/MSP patch, PBASIC code
- Demo: Sending serial data from Max/MSP –Schematic, Max/MSP patch, PBASIC code
- Pure Data
- Demo: Reading serial data in Pure data – Schematic, Puredata patch, PBASIC code
- Demo: Sending serial data from Pure data – Schematic, Puredata patch, PBASIC code
- Flash
- Demo: Reading serial data through XML server written in Processing code – Schematic, Proce55ing code, PBASIC code, Flash file
- S60 Python via BlueSMiRF Silver bluetooth module
- Demo: Reading serial data in S60 Python – Schematic, S60 Python code , PBASIC code
Other components
- Demo: PIR (Pyroelectric InfraRed) Sensor, Motion detector – Schematic, PBASIC code, Product info
- Demo: Hitachi H48C Tri-Axis Accelerometer Module – Schematic, PBASIC code, Product info
- Demo: Hitachi HM55B Compass Module – Schematic, PBASIC code, Product info
- Demo: Sensirion Temperature/Humidity Sensor – Schematic, PBASIC code, Product info
- Demo: MLX90614 Infrared Thermometer Module (90° FOV) – Schematic, PBASIC code, Product info
- Demo: RFID Card Reader Serial – Schematic, PBASIC code, Product info, Demo video
Group work : 14:00 – 16:00
Thursday
Group work: 9.15-16.00
Friday
Group work: 9.15-12.00
Presentation: 13.00-15.00
Clearing away tools: 15:00 – 16:00
References
Nuts & Volts Columms (BASIC Stamp Application Examples)