Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Arduino - An Introduction (Updated)

Pral2a
April 09, 2018

Arduino - An Introduction (Updated)

An introduction to Arduino at Fab Lab Bcn | IAAC.

This is a compilation based on many sources, all images are property of their respective owners.

Pral2a

April 09, 2018
Tweet

More Decks by Pral2a

Other Decks in Education

Transcript

  1. 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
  2. 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^% <Xj\f]i\gX`ij_XccY\X[\j`^e`[\Xc# efkXeX]k\ik_fl^_k% D\ki`ZfijkXe[Xi[#efkYfk_% JZ_\dXk`Zjj_XccY\`eZcl[\[% dXb\q`e\%Zfd ;iX]k\[YpD`jk\iAXcfgp#n`k_Xjj`jkXeZ\]ifdG_`cc`gKfiife\Xe[J`dfe?`cc%
  3. 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
  4. 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
  5. 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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3C 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.
  6. +

  7. 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
  8. 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
  9. 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.
  10. 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
  11. 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
  12. 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/
  13. H-Bridge > 40mA or > 5V + DC motor control

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

    (+-/-+) http://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing/ lm293d
  15. 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/