mpsm311 electronic projects for artists sp16

58
Processing, Max/MSP/Jitter, pd (puredata), Arduino and (maybe) Raspberry Pi MPSM311 Electronic Projects for Artists SP16

Upload: others

Post on 08-Apr-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MPSM311 Electronic Projects for Artists SP16

Processing, Max/MSP/Jitter, pd (puredata),Arduino and (maybe) Raspberry Pi

MPSM311Electronic Projects for Artists SP16

Page 2: MPSM311 Electronic Projects for Artists SP16

1. Electricity

Page 3: MPSM311 Electronic Projects for Artists SP16

The Greek word for “amber”is “elektron”

Electricity is the movement of electrical charge through acircuit (usually, flowing electrons.)

Page 4: MPSM311 Electronic Projects for Artists SP16

Women in ancient Greece noticed that rubbing their amber jewelryagainst silk caused it to accumulate a charge -which they used to

shock small frogs at parties.

Page 5: MPSM311 Electronic Projects for Artists SP16
Page 6: MPSM311 Electronic Projects for Artists SP16

We can make this intuitive generalization:

– Electrical current (like electrons from a voltage source) tries to flow taking the path of least resistance, to ground." (-From “+” to “-”.)

Page 7: MPSM311 Electronic Projects for Artists SP16

Some Definitions:– Electricity (electrons flowing through a circuit) has two principle properties: voltage and current.

- Electromotive potential (symbol: V, or sometimes the more archaic E) is the difference in potential energy between two points in a circuit. It is measured in units called volts (after Alessandro Volta, inventor of the battery.) In the metaphor of water and plumbing often used to visualize electrical charge flowing in a circuit, voltage would be thought of as water pressure.

- Current: (symbol: I for “intensité”) Current is the rate of flow, or volume of electrical charge through a circuit. The unit of measure is the ampere, usually shortened to “amp” (after French physicist André- Marie Ampère.) It's a measure of how many electrons go past a given point in a circuit per second. (In the water metaphor, current can be thought of as the diameter of the pipe.)

- Power (symbol: W) Volts and amps multiplied together equals the total amount of electrical power in the circuit, measured in units called watts (after James Watt, Scottish inventor and engineer.)

- Resistance (symbol: Ω -Greek letter for omega) Also called impedance, is measured in units called ohms (after German physicist, Georg Ohm.)

Page 8: MPSM311 Electronic Projects for Artists SP16

Thinking about current:The famous “water metaphor”

Electrical components called “resistors” slow down the flow of electrons, and areessential for controlling the flow of electricity in a circuit. The electrical energy lostwhen current goes through a resistor is transformed into heat. The property ofimpedance (resistance) in a resistor is measured in units called ohms. In the metaphor, it's represented by pinching the water pipe.

The diameter of the pipe (or volume of water flowing) is a metaphor for current. It is measured in units called amperes (amps.)

One ampere = a volume of one coulomb per second. -A coulomb is a measure of charge equal to 6.24 * 1018 electrons.

The water pressure(measured betweentwo points) is ametaphor forelectromotivepotential, measuredin units called volts.

Page 9: MPSM311 Electronic Projects for Artists SP16

Simple DC Circuit (open):

Materials that have lots of “free electrons” in their atomic structurethat move easily from and between their valence shells are referred toas conductors (e.g. copper, gold.) Conversely, materials withrelatively few free electrons are called insulators (e.g. wood, rubber.)If the electromotive potential is great enough, just about anything canbecome a conductor, even the air in the sky (in the case of lightning.)

Here is perhaps the simplest circuit we could build. In this case the light bulb is the “load” inthe circuit, controlled by a “single pole, single throw” (SPST) switch. (More on switches later.)

Page 10: MPSM311 Electronic Projects for Artists SP16

Simple DC Circuit (closed):

DC (Direct Current) circuits harness the power of the electricalcurrent flowing from a positive source, energizing a load of somekind as it passes through it to ground.

Page 11: MPSM311 Electronic Projects for Artists SP16

Simple DC Circuit (short!):

- Always make sure there is a load of some kind on the circuit. A paththrough a conductor directly from source to ground is called a shortcircuit (very bad.) It will cause the power source to over-heat and die.In this case it would cause the battery to get very hot and die. If thishappens with AC current in your home it can cause catastrophic fires.

Page 12: MPSM311 Electronic Projects for Artists SP16

Series and Parallel:

When connected “in parallel”, batteries' voltages are unaffected, but thecurrent (measured in amperes) is increased. In the above example, twoAA batteries (1.5 volts each) wired in parallel supply 1.5 volts to thecircuit, but can do so for a longer time than a single battery alone.

When connected “in series”, DC voltage sources are added. In theabove example, two AA batteries (1.5 volts each) wired in seriessupply 3 volts to the circuit. (1.5 + 1.5 = 3.)

Page 13: MPSM311 Electronic Projects for Artists SP16

Series and Parallel load:

The concept of being “in series” or “parallel” also applies to electricalcomponents which are wired as the load of the circuit.

Page 14: MPSM311 Electronic Projects for Artists SP16

Prefixes:

When abbreviating a unit with a prefix, the symbol for the unit follows the prefix withoutspace. Be careful about upper-case and lower-case letters (especially m and M.) 1mW is a milliwatt, or one-thousandth of a watt, but 1MW is a megawatt (one millionwatts.) The unit name is only capitalized when it is abbreviated. For example, in describingcycles-per-second we use hertz and kilohertz, but Hz and kHz.

These prefixes are universally used to scale units in science and engineering:

Page 15: MPSM311 Electronic Projects for Artists SP16

2. Calculating Machines

Page 16: MPSM311 Electronic Projects for Artists SP16

Blaise Pascal, noted mathematician, thinker, and scientist, built perhaps thefirst mechanical adding machine in 1642 based on a design described by

Hero of Alexandria in the year 2. The basic principle of his calculator is stillused today in modern-day odometers.

Page 17: MPSM311 Electronic Projects for Artists SP16

CharlesBabbage

1860

Page 18: MPSM311 Electronic Projects for Artists SP16

Lady AdaLovelace

1860

Page 19: MPSM311 Electronic Projects for Artists SP16

Joseph-Marie Jacquard, a contemporary of

Babbage, invented aloom that wove patternsusing patterns of hole

punched in cards.

Page 20: MPSM311 Electronic Projects for Artists SP16

In a vivid demonstration ofthe power of his invention,using 10,000 punch cards,he programmed a loom to

weave a portrait of himself inblack and white silk.

Page 21: MPSM311 Electronic Projects for Artists SP16

One of Babbage's firstcomputing machines, Difference Engine #1

Page 22: MPSM311 Electronic Projects for Artists SP16

The Science Museum in London project: constructing aworking Difference Engine No. 2 from 1989 to 1991

Page 23: MPSM311 Electronic Projects for Artists SP16

Building of digital electroniccomputers was crucial to the US andGreat Britain during and after WorldWar II, with the defense department

funding most of the research.

Code-breaker Alan Turing ca. 1945 (with the German

“Eniga Machine”)

Page 24: MPSM311 Electronic Projects for Artists SP16

Early digital computers wereprogrammed using punch cards,as Jacquard had used almost a

century earlier.

Page 25: MPSM311 Electronic Projects for Artists SP16

The personal computer revolution in the 80's.

Apple Computers was foundedin 1976 in a garage in California.

Page 26: MPSM311 Electronic Projects for Artists SP16

Dr. Mark Dean, an African-American computer scientist and engineer,spent over 30 years at IBM. He was chief engineer of the team that

designed the original IBM PC in the early '80s, earning him three of thenine original patents for that device.

Page 27: MPSM311 Electronic Projects for Artists SP16

3. Microcontrollers

Page 28: MPSM311 Electronic Projects for Artists SP16

A microcontroller is a small computer (a “system on a Chip”, SoC) on a single

integrated circuit containing a processor core,memory, and programmable input/output.

They were first developed in the 1970's.

Page 29: MPSM311 Electronic Projects for Artists SP16

The inventors at Bell Labs, 1948:John Bardeen, William Shockley and Walter Brattain and their original device

The microcontrollers and microprocessors were madepossible as a result of the invention of the transistor.

Page 30: MPSM311 Electronic Projects for Artists SP16

The evolution from vacuum tubes to chips.-The current generation of Intel i7 ships have 1.16 billion transistors

on a single integrated chip.

Page 31: MPSM311 Electronic Projects for Artists SP16

What's the difference between a microprocessorand a microcontroller?

Page 32: MPSM311 Electronic Projects for Artists SP16

A microprocessor: • an IC with only the Central Processing Unit (CPU) • No RAM, ROM, or peripheral I/O on the chip. (System designers must add these externally to make these function in Desktop PC’s, Laptops, notepads, tablets, etc.• (Manufacturers include: Intel's Pentium, core 2 duo, i3, i5, ARM, PowerPC, AMD, etc. )

A microcontroller: • an IC with CPU, I/O pins, a fixed amount of RAM, ROM, all embedded on a single, 'all in one' chip. • (Manufacturers include: Microchip, ATMEL, TI, Freescale, Philips, Motorola)

Page 33: MPSM311 Electronic Projects for Artists SP16

There are many different microcontroller ICs...

Page 34: MPSM311 Electronic Projects for Artists SP16

Many are available on handy “development boards”.

Page 35: MPSM311 Electronic Projects for Artists SP16

Parallax “Basic Stamp” :

Page 36: MPSM311 Electronic Projects for Artists SP16

Arduino boards...

Leah Beuchley

Page 37: MPSM311 Electronic Projects for Artists SP16

The Arduino(or actually, the AtMega Microcontroller)

Page 38: MPSM311 Electronic Projects for Artists SP16

Photo: Randi Silberman Klett

Five of the core Arduino developer team: David Cuartielles, Gianluca Martino, Tom Igoe, David Mellis and Massimo Banzi.

Page 39: MPSM311 Electronic Projects for Artists SP16

Arduino's kind of revolutionary potential:

“ If we take a piece of technology considered, rightly or wrongly,complex, and we make it simple by working not on the technology itself

but on the experience that comes from using it, then everything getssimpler and we discover new possibilities that were not there before.

“If I were a chicken farmer, I could think of an idea to increase theefficiency or the safety of my farm. With Arduino, even those -who knowabout chickens but not about electronics and programming- are able to

achieve, by themselves and in a very short time, the kludge they need tosolve their practical problem.

All this is about moving technology towards what we might call a domainexpert. In the end, the one who raises chickens is certainly much more

expert about chickens than an engineer.”

- Massimo Banzi

Page 40: MPSM311 Electronic Projects for Artists SP16

processing.org

Project of Ben Fry and Casey Reas

Page 41: MPSM311 Electronic Projects for Artists SP16

We stand by our mission statement:

“ Processing seeks to ruin the careers of talenteddesigners by tempting them away from their usual

tools and into the world of programming andcomputation.

Similarly, the project is designed to turn engineersand computer scientists to less gainful employment

as artists and designers.”

Page 42: MPSM311 Electronic Projects for Artists SP16

By changing the relationship with code and coding...

Page 43: MPSM311 Electronic Projects for Artists SP16

Casey Reas: Installation at the Art Institute of Chicago

Page 44: MPSM311 Electronic Projects for Artists SP16

House of Cards - Radiohead directed by Aaron Koblin

“Dumping” -Lina Maria Giraldo

Page 45: MPSM311 Electronic Projects for Artists SP16

Processing comes from a large family of related languages.

(Graphic from Getting Started with Processing by Casey Reas and Ben Fry.)

Page 46: MPSM311 Electronic Projects for Artists SP16

http://www.curiousart.org/OSCON/code.zip

Page 47: MPSM311 Electronic Projects for Artists SP16

– Limor Fried (Lady Ada) AdaFruit Industries

– Hernando Barragán: “Wiring” Arduino Libraries

– Karsten Schmidt “Toxi” Processing libs

– Daniel Shiffman -”Physical Computing” with Tom Igoe @ NYU's ITP

– Leah Beuchley -designed “Lilypad” Arduino

– Dr. Rafael Hernandez pd tutorials “cheetomoskeeto” YouTube channel

Some Heroes in the Creative Free Hard/Software movement:

Limor Fried Photo: Inc com

Page 48: MPSM311 Electronic Projects for Artists SP16

Arduino is open source hardware: the Arduino hardware reference designsare distributed under a Creative Commons Attribution Share-Alike 2.5 license,

available on the Arduino Web site.

Layout and production files for some versions are also available.

The source code for the IDE is available and released under the GNU General Public License, version 2.

What is Open Source Hardware?

• License

• Schematics

• PCB layout data

• Bills of Sale (component distributors...)

Page 49: MPSM311 Electronic Projects for Artists SP16

The UNO for example, uses the ATmega 328:

• 28 pin, 8 bit IC

• Runs at 16 MHz (but chip can run at 20 MHz).

• 32K Bytes of flash memory, 2K SRAM

• 20 I/O pins: 14 digital, 6 analog (10 bit ADC)

• regulated at 5 and 3.3 volts

The Arduino is a development platform using microcontrollers from Atmel's ATmega series.

Page 50: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

1. Power- It's an electrical component, so of course you have to give it power. But like many ICs, the voltage used to operate it needs to be controlled relatively precisely.

2. I/O- Input and output, some way to communicate with the chip. This is generally done through some kind of connection to the chip's pins. Breadboards are handy.

3. Programming Interface- Some way to write programs and download them to the chip and run them.

Page 51: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

1. Power:

There are three commonly used ways for controllingthe voltage supplied to microcontrollers:

I. A voltage regulator

II. A regulated power supply

III. Battery power

Page 52: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

Voltage regulator

Page 53: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

Regulated power supply

Page 54: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

Battery pack

Page 55: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

2. I/O: I. Limited

II. “shields”

III. Roll your own.

Page 56: MPSM311 Electronic Projects for Artists SP16

Requirements for the microcontroller:

3. Programming Interface:

Page 57: MPSM311 Electronic Projects for Artists SP16

The similarity is not accidental.

Page 58: MPSM311 Electronic Projects for Artists SP16

Let's set them up andhave fun coding!