This section is about establishing core concepts of computation as related to physical interface. This connects the behavior of the physical world of electrical signals to the logical world of programs, numbers, and symbols.
For the exercises and assignments, we will be using the Arduino, a popular microcontroller for physical computing. The following list is an informal summary of basic concepts related to computation with physical signals and the Arduino.
An Arduino is a small low-power computer with many conventional elements: read/write memory (RAM), read-only memory (ROM), a CPU which executes logical and mathematical instructions, and input/output peripheral circuitry. This class of computers are called microcontrollers reflecting their use as microprocessors controlling hardware.
Microcontrollers are appropriate for physical computing tasks with low computational requirements. They have low power consumption and input/output peripherals specialized for hardware such as analog-to-digital converters and PWM waveform generators. They have a single-threaded programming model with no operating system so writing hardware-oriented programs can be very simple.
Physical properties such as position and light intensity are intrinsically analog since they have continuity in time and space. In contrast, computational processes involve operations on numbers representing measurements of the physical properties. We use analog to digital converters (ADCs) to make periodic measurements of electrical signals to create digital representations. These numerical digital signals are sampled in both time and value, since ADCs have a finite precision and speed.
The physical world is one of simultaneity: all atoms are constantly in motion, all physical processes are unfolding in parallel. Computation as we know it is essentially serial and local: programs process numbers one at a time (or in small batches). Signal processing programs managing signals at different sample rates must simulate this simultaneity through program structure and time management.
Digital logic signals use voltages to represent discrete symbols, usually just a binary one or zero. More complex symbols, e.g. numbers, require multiple bits, either encoded on a set of wires (a parallel data bus) or over time on a single wire used as a serial data bus. Every digital number is represented using a finite set of bits and thus has finite precision and range.
Digital logic circuits are generally intended only to convey information and are hence designed to output only small currents at logic-level voltages. Controlling enough energy to operate an actuator almost always requires amplification via a driver circuit.
Systems which only manipulate outputs are said to be open-loop. Systems using feedback that measures the physical effect of an output to govern the output are said to be closed-loop. Hobby servos are a simple example of a closed-loop position-controlled servomotor.
The lab exercises are intended to be performed by pairs of students. These will familiarize you with operating the Arduino software, building circuits to connect between the analog and digital, and digital representation of physical quantities. The exercises will be performed in the lab during class time, but also outside class as needed. The lab exercises are not graded but are essential for developing the vocabulary and skills to fulfill the graded assignments.
The lab exercises are divided into four parts, each containing a number of exercises. The lab exercises are detailed on the course website under assignments and as a set of notes and schematics in the physcomp-examples github distribution. The github files can be checked out to your own computer for reference.
The project assignments are intended to be performed by groups of students.
Create a one-in-one-out system using circuitry and a microcontroller. The general goals remain the same as the basic circuits assignment. The system should take advantage of the complex and versatile behavior enabled by software, creating a process in which energy and information are transformed computationally to connect one process to another.
One In - One Out with computation can be many things:
The physical project can be built on a breadboard, with actuators and sensors attached to scrap with tape and hot glue.
The deliverables for this graded assignment are defined in the syllabus section titled Grading Rubric.
Any one who completes the basic exercises should consider undertaking some of the optional challenge exercises.
Inspiration for project ideas can be found on the course website.