Slide 1

Slide 1 text

Arduino An introduction Guillem Camprodon, 2010-18 This is a compilation based on many sources, all images are property of their respective owners. BARCELONA FAB$LAB BARCELONA FAB*LAB CMYK BARCELONA FAB*LAB BARCELONA FAB&LAB CMYK ARIAL LIBERATION SANS * PROPUESTAS DE TIPOGRAFÍA RAFÍA

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

D\Xe`e^]lcXe[jg\Z`]`ZgXikjc`jkjj_XccY\`eZcl[\[% :Xj\jj_XccY\\Xjpkffg\e% 9Xkk\i`\jj_XccY\ i\gcXZ\XYc\% Jg\Z`XckffcjXi\Xccfn\[fecp]fi[Xie ^ff[i\Xjfej% Gif]`k`e^Ypj\cc`e^\og\ej`m\jg\Z`Xc kffcj`jnife^#Xe[efkdXb`e^jg\Z`XckffcjXmX`cXYc\ `j\m\enfij\% Kfio`jFB2kXdg\igiff]`jiXi\cpFB% :fdgfe\ekj#efk\ek`i\jlYXjj\dYc`\j#j_XccY\ i\gcXZ\XYc\% :fejldXYc\j#c`b\]lj\jXe[]`ck\ij#j_Xcc Y\\XjpkfXZZ\jj% :`iZl`kYfXi[jj_XccY\Zfdd\ek\[% Gfn\i]ifdLJ9`j^ff[2gfn\i]ifdgifgi`\kXip gfn\iX[Xgk\ij`jYX[% JkXe[Xi[Zfee\Zkfijj_Xcc _Xm\g`eflkj[\]`e\[% @]`kjeXgjj_lk#`kj_XccjeXg fg\e% JZi\njY\kk\ik_Xe^cl\j% ;fZjXe[[i`m\ij j_Xcc_Xm\g\idXc`ebjXe[j_Xcci\j`[\]fiXccg\ig\kl`kp XkXiZ_`m\%fi^% 

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

1946

Slide 7

Slide 7 text

1959

Slide 8

Slide 8 text

1968

Slide 9

Slide 9 text

1971

Slide 10

Slide 10 text

1976

Slide 11

Slide 11 text

1982

Slide 12

Slide 12 text

1996

Slide 13

Slide 13 text

1996

Slide 14

Slide 14 text

2010

Slide 15

Slide 15 text

2017

Slide 16

Slide 16 text

Apollo Arduino Raspberry iPhone 6 2 MHz 16 MHz 700 MHz x 2 1400 MHz x 2 4kB RAM 2kB RAM 512MB RAM 1GB RAM 72kB ROM 32kB FLASH 8GB FLASH 16GB FLASH

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

http://people.interactionivrea.org/h.barragan/thesis/thesis_low_res.pdf

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

http://arduino.cc/en/Main/Hardware

Slide 27

Slide 27 text

http://arduino.cc/en/Main/Hardware

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

https://www.sparkfun.com/arduino_guide http://www.bareconductive.com/wp-content/uploads/2015/03/ BareConductive_MicrocontrollerGuide1.pdf

Slide 30

Slide 30 text

http://www.makershed.com/Articles.asp?ID=302&Click=127972 https://learn.adafruit.com/embedded-linux-board-comparison

Slide 31

Slide 31 text

DETAILS / TECH SPECS ARDUINO LEONARDO ATmega32U4 at 16 MHz 0 0 CE, FCC 2.5 KB ITALY TOUCH BOARD ATmega32U4 at 16 MHz 12 0 CE, FCC 2.5 KB UK INTEL EDISON (ARDUINO B/O KIT) Dual Core Intel Atom at 500 MHz Intel Quark microcontroller at 100 MHz 0 0 1 GB CHINA FREESCALE FREEDOM MKL46Z256VLLZ4 at 48 MHz 15 1 CE 32 KB CHINA LILYPAD ARDUINO Atmega328 at 8 MHz 0 0 2 KB USA ADAFRUIT TRINKET Attiny85 at 8 MHz 0 0 512 B USA SPARK CORE STM32F103 at 72 MHz 0 0 20 KB CHINA RASPBERRY PI (MODEL B+) BCM2835 at 700 MHz 0 4 CE, FCC 512 MB UK BEAGLEBONE BLACK ARM Cortex-A8 AM335x at 1 GHz 2x 32-bit RISC processor at 200 MHz 0 1 CE, FCC 512 MB USA UDOO QUAD ARM Cortex-A9 Quad core at 1GHz Atmel SAM3X8E at 84 MHz 0 2 CE, FCC 1 GB ITALY MAKEY MAKEY ATmega32U4 at 16 MHz 6 0 CE 2.5 KB CHINA DENTAKU OTOTO ATmega32U4 at 16 MHz 12 0 CE, FCC 2.5 KB UK Number of touch sensors Capacitive sensing (one-handed triggering) Proximity sensing (trigger without touch) Onboard MP3 / WAV / OGG / FLAC / MIDI playback Onboard polyphonic MIDI synthesis Micro SD card slot On / Off switch Lithium Polymer (LiPo) cell charging via USB Can run from a Lithium Polymer (LiPo) cell Can act as a USB serial device Can act as a USB keyboard or mouse Can act as a USB MIDI interface Arduino shield compatible Onboard headphone / line output Onboard video out Can be programmed using the Arduino IDE Number of USB host sockets Onboard LAN Onboard WIFI Onboard SATA Works out of the box Approvals Country of manufacture CO-PROCESSOR RAM ONBOARD PROCESSOR This MICROCONTROLLER GUIDE represents independent research by Bare Conductive and information found in the data sheets of the above products. We treat it as a valuable resource but also envision it to grow and develop with your input. Please email us at [email protected] with any comments or suggestions you have, we will be sure to get back to you! is just asking to get thrown around. Programming this board has a steeper learning curve than Arduino, but is much more powerful once you get going. It’s also compatible with MBED, so you can program in your web browser without installing anything. machine is free, or have an alarm go off when your bus is close by, use the Spark Core! With WiFi connectivity at its heart and browser-based programming, you won’t have to install anything to start making. on our list, it also has the same shield layout as the Arduino Mega, so you can choose from a world of add-ons (3.3V). Onboard WiFi and Ethernet make connecting to the rest of the planet easy. The support and active community are fantastic as well. loads of spare pins to control everything. Great for complex projects that require tons of sensors, serious processing power and connectivity. The Beaglebone has a rabid (ha ha) community of users to help get your project off the ground. bareconductive.com / make Microcontroller Guide 2015.01 / v1

Slide 32

Slide 32 text

http://shieldlist.org/

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

ATMEGA8 ICSP +5V GND +5V +5V GND GND GND +5V GND 100n GND 47u 47u GND GND GND GND GREEN GND +5V YELLOW YELLOW M7 GND MC33269D-5.0 MC33269ST-5.0T3 100n GND 500mA +5V +5V 100n GND YELLOW GND FDN304V +5V LM358D LM358D GND GND +5V 100n +5V ATMEGA8U2-MU GND 100n ICSP +5V GND GND 16MHz 16MHz GND PGB1010604 PGB1010604 BLM21 1M 1K 1K 1K 1K GND 10K 10K 10K 10K 100n 1u 1K 1K 1K 1K 22R 22R 22R 22R 1u 1M 16MHz 16MHz TS42 22p 22p 22p 22p GND GND GND 27R (ADC5)PC5 28 (ADC4)PC4 27 (ADC3)PC3 26 (ADC2)PC2 25 (ADC1)PC1 24 (ADC0)PC0) 23 (SCK)PB5 19 (MISO)PB4 18 (MOSI)PB3 17 (SS)PB2 16 (OC1)PB1 15 (ICP)PB0 14 (AIN1)PD7 13 (AIN0)PD6 12 (T1)PD5 11 (T0)PD4 6 (INT1)PD3 5 (INT0)PD2 4 (TXD)PD1 3 (RXD)PD0 2 GND 8 VCC 7 AVCC 20 AREF 21 XTAL1 9 XTAL2 10 RESET 1 AGND 22 ZIC1 1 2 3 4 5 6 ICSP 1 2 3 4 5 6 7 8 IOL 1 2 3 4 5 6 7 8 IOH 1 2 3 4 5 6 AD C2 PC1 PC2 ON RX TX D1 1 1 2 2 3 3 1 2 3 4 P$1 P$1 P$2 P$2 X2 VI 3 1 VO 2 IC2 ADJ 1 IN 3 OUT 4 2 IC1 1 2 3 4 5 6 POWER C4 F1 C7 L T1 2 3 1 U1A 6 5 7 U1B 8 4 C1 (PCINT9/OC1B)PC5 25 (PCINT10)PC4 26 (INT4/ICP1/CLK0)PC7 22 (OC1A/PCINT8)PC6 23 (AIN2/PCINT11)PC2 5 (PCINT5)PB5 19 (T1/PCINT4)PB4 18 (PD0/MISO/PCINT3)PB3 17 (PDI/MOSI/PCINT2)PB2 16 (SCLK/PCINT1)PB1 15 (SS/PCINT0)PB0 14 (CTS/HWB/AIN6/TO/INT7)PD7 13 (RTS/AIN5/INT6)PD6 12 (XCK/AIN4/PCINT12)PD5 11 (INT5/AIN3)PD4 10 (TXD1/INT3)PD3 9 (RXD1/AIN1/INT2)PD2 8 (AIN0/INT1)PD1 7 (OC0B/INT0)PD0 6 GND 3 VCC 4 AVCC 32 UVCC 31 XTAL1 1 XTAL2(PC0) 2 RESET(PC1/DW) 24 UGND 28 U3 PAD EXP UCAP 27 D- 30 D+ 29 (PCINT6)PB6 20 (PCINT7/OC0A/OC1C)PB7 21 C5 1 2 3 4 5 6 ICSP1 Y2 Y1 2 1 UBOOT Z1 Z2 2 1 GROUND L1 2 1 RESET-EN R2 1 8 RN2A 2 7 RN2B 3 6 RN2C 4 5 RN2D 1 8 RN1A 2 7 RN1B 3 6 RN1C 4 5 RN1D C6 C8 1 8 RN4A 2 7 RN4B 3 6 RN4C 4 5 RN4D 1 8 RN3A 2 7 RN3B 3 6 RN3C 4 5 RN3D C3 R1 2 1 Q1 2 1 Q2 1 3 4 2 RESET 5 C10 C12 C9 C11 IN 1 EN 3 NC/FB 4 OUT 5 GND 2 R3 +5V +5V GND AREF AREF RESET RESET VIN VIN VIN M8RXD M8RXD M8TXD M8TXD SCK PWRIN D- D+ +3V3 +3V3 +3V3 MISO MOSI SS SS DTR GATE_CMD CMP USBVCC USBVCC USBVCC XTAL2 XTAL2 XTAL1 XTAL1 VUCAP RD- RD- RD+ RD+ RESET2 MISO2 MOSI2 SCK2 USHIELD UGND UGND XUSB XT2 XT2 XT1 XT1 RXLED TXLED AD0 AD1 AD2 AD3 AD4 AD5 IO2 IO1 IO0 IO3 IO4 IO5 IO6 IO7 IO8 IO9 XT1R + + USB 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Arduino UNO Reference Design USB boot En TM Reference Designs ARE PROVIDED "AS IS" AND "WITH ALL FAULTS". Arduino DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, Arduino may make changes to specifications and product descriptions at any time, without notice. The Customer must not REGARDING PRODUCTS, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Arduino reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The product information on the Web Site or Materials is subject to change without notice. Do not finalize a design with this information.

Slide 40

Slide 40 text

+

Slide 41

Slide 41 text

13 avr-gcc avr-libc avrdude http://www.nongnu.org/avr-libc/ Arduino.h Wire Serial SPI Ethernet SD EEPROM “Libraries” Arduino bootloader Arduino IDE core.a avr-ar blink.ino blink.cpp avr-objcopy blink.cpp.o SPI.cpp.o blink.cpp.elf blink.cpp.hex blink binary make

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

Digital IN / OUT x13 Analog IN x6 ~ Analog OUT (PWM) x6

Slide 44

Slide 44 text

INPUTS OUTPUTS DIGITAL (on / off) digitalRead HIGH / LOW 255 / 0 digitalWrite HIGH / LOW 255 / 0 ANALOG (less / more) analogRead 0 - 1023 analogWrite PWM 0 - 255

Slide 45

Slide 45 text

digitalRead digitalRead(pin); LOW/HIGH 0/255 HIGH 255 LOW 0 0 1 5 volts 0 volts IN

Slide 46

Slide 46 text

digitalWrite digitalRead(pin, value); LOW/HIGH 0/255 HIGH 255 LOW 0 0 1 5 volts 0 volts OUT

Slide 47

Slide 47 text

analogRead analogRead(pin); 0-1023 ADC (Analog to Digital Converter) 10 bits

Slide 48

Slide 48 text

analogWrite analogWrite(pin, value); 0-255 PWM (Pulse-width modulation)

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

arduino.cc fritzing.org processing.org

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

- + “hello, world!”

Slide 53

Slide 53 text

“hello, world!”

Slide 54

Slide 54 text

http://arduino.cc/en/ Reference/HomePage

Slide 55

Slide 55 text

Hands On http://www.seeedstudio.com/wiki/Arduino_Sidekick_Basic_Kit http://www.cooking-hacks.com/arduino-starter-kit

Slide 56

Slide 56 text

The Breadboard (aka Protoboard) http://www.protostack.com/blog/2011/09/8-breadboard-hacks/

Slide 57

Slide 57 text

The Breadboard (aka Protoboard)

Slide 58

Slide 58 text

Arduino Output 5V max 40 mA x PIN

Slide 59

Slide 59 text

Why resistors?

Slide 60

Slide 60 text

5V Max 40mA x PIN The resistor is your friend.

Slide 61

Slide 61 text

http://www.dannyg.com/examples/res2/resistor.htm http://www.csgnetwork.com/resistcolcalc.html http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculatorext Resistors

Slide 62

Slide 62 text

http://www.dannyg.com/examples/res2/resistor.htm http://www.csgnetwork.com/resistcolcalc.html http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculatorext Resistors

Slide 63

Slide 63 text

1000Ω = 4.6V / 0.003A R = (5V - 2V) / 0.003A http:// www.raltron.c om/cust/ tools/ voltage_divid er.asp The resistor is your friend.

Slide 64

Slide 64 text

LEDs on/off or PWM (digitalWrite / analogWrite) LED’s

Slide 65

Slide 65 text

255-value 255 RGB LED’s http://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds

Slide 66

Slide 66 text

http://learn.adafruit.com/thermistor Thermistor http://pastie.org/8467723

Slide 67

Slide 67 text

Servos #include http://arduino.cc/en/Reference/Servo

Slide 68

Slide 68 text

Servos Any Digital Pins (disables PWM on 9 and 10) a servo could take more power than the one the usb can provide, use an external power supply

Slide 69

Slide 69 text

Servos Close loop control The primary characteristic in selecting a motor is torque. Torque determines how much Figure 8-2. Relationship between the pulse width and the servo angle; the servo output arm moves proportionally as the pulse width increases from 1 ms to 2 ms

Slide 70

Slide 70 text

Mosfet off). The polarity of the diode is important; there is a colored band indicating the cathode—this should be connected to the solenoid positive power supply. Electromagnetic relays are activated just like solenoids. A special relay called a solid state relay (SSR) has internal electronics that can be driven directly from an Arduino pin without the need for the transistor. Check the data sheet for your relay to see what Figure 8-7. Driving a solenoid with a transistor > 40mA or > 5V http://bildr.org/2012/03/rfp30n06le-arduino/

Slide 71

Slide 71 text

Mosfet on/off or PWM (digitalWrite / analogWrite)

Slide 72

Slide 72 text

H-Bridge > 40mA or > 5V + DC motor control (+-/-+) http://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing/ lm293d

Slide 73

Slide 73 text

on/off or PWM (digitalWrite /analogWrite) H-Bridge

Slide 74

Slide 74 text

Stepper > 40mA or > 5V + DC motor control (+-/-+) http://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing/ lm293d

Slide 75

Slide 75 text

Stepper http://bildr.org/2011/06/easydriver/ Libraries • https://www.arduino.cc/en/Reference/Stepper • http://www.airspayce.com/mikem/arduino/AccelStepper/


Slide 76

Slide 76 text

suppliers

Slide 77

Slide 77 text

Shops in Barcelona Onda Radio http://www.ondaradio.es/productos/buscar.aspx?v=A000066 Location https://plus.google.com/100101416647173159883/about?hl=en Diotronic http://www.diotronic.com/raspberry-pi-arduino/arduino/placas_p_1080.aspx Location https://plus.google.com/117114665537047889067/about?hl=en Ro-Botica http://ro-botica.com/ Location https://plus.google.com/110636064159550584786/about?hl=en On-Line Shops near Barcelona (2-4 day shipping) Cooking Hacks http://www.cooking-hacks.com (Zaragoza) SnootLab http://snootlab.com/ (Toulouse) BricoGeek http://www.bricogeek.com/shop/ (Carballo, Galicia) Reflexiona http://www.reflexiona.biz/ (Bilbao) Electan http://www.electan.com/ (Alicante) International SparkFun http://www.sparkfun.com/ Adafruit http://adafruit.com/ Liquid Ware http://www.liquidware.com/shop Itead Studio http://iteadstudio.com/store/ Seeed Studio http://seeedstudio.com/ Modern Device http://shop.moderndevice.com/

Slide 78

Slide 78 text

tutorials

Slide 79

Slide 79 text

learn.adafruit.com learn.sparkfun.com bildr.org arduino.cc/en/Tutorial/HomePage

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

wiki.fablabbcn.org /Arduino