Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Intro to Arduino

No description
by

Russ Lankenau

on 2 February 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Intro to Arduino

Analog I/O Analog Input Digital I/O Pins 0-13 are available for digital input or output. Arduino Basics The arduino is a microcontroller Using the Arduino A microcontroller is a small, general purpose computer chip that is intended to do one thing. They are a cheap alternative to using a general purpose computer for simple tasks. Digital Example x = digitalRead(0); digitalWrite(0, HIGH); either HIGH or LOW The pin number we want to get or set. Common Uses:
Buttons
LEDs
Transistors
Talking to digital devices (digital ICs) Buttons with a ~ next to them support Pulse Width Modulation. This isn't truly analog output, but approximates it by turning the output on and off very quickly. Basic Example Analog Output The Arduino uses a 10-bit analog-to-digital converter (ADC) to measure analog values. This means that analog values between 0 and the reference voltage are reported as values between 0 and 1023. Analog to Digital Conversion 5v 0v 2-bit ADC What can we do with this? Arduino 101 Basics
Digital Output
Blink
Digital Input
Button
Analog Output
Pulse-width modulation
Analog Input
Darkness Detector Boring Stats! 16 MHz - my 386 ran at this speed
14 digital I/O pins
6 PWM pins (of the above 14)
6 Analog input pins
10-bit ADC
32KB Flash (Program memory)
2KB SRAM (RAM)
1KB EEPROM ('disk') Links http://blog.workshop88.com/buy-arduinos/

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

http://adafruit.com/category/17

https://www.sparkfun.com/categories/103

http://shop.evilmadscientist.com/productsmenu/tinykitlist/561

http://www.trossenrobotics.com/c/arduino-robotics.aspx Sensor Indicator Display Controller Arduino 201 Types of Sensors
Digital Sensors
Using Buttons
Debouncing
Pull-down and pull-up resistors
Analog Sensors
Using potentiometers
Analog-to-digital conversion
Fancy Stuff Sensors Arduino 202 Effectors Stuff that does stuff
Transistors and Relays
Switching high-power loads
Inductive Reactance
Motors
Making things spin
Solenoids
Making things move Arduino 301 Registers
What registers are available
What do they do?
Ports
Changing multiple pin states
Interrupts
Relationship between interrupts and PWM
Using interrupts for event-driven programming Low-level programming Types of Sensors Digital Sensors
On/Off
Buttons
Hall Effect
Reed Switch
IR
LED
Tilt switch Analog Sensors
Continuous
Potentiometer
TMP36
Pressure Sensors
Electret Mic
Piezo Fancy Sensors
Encapsulated
1-wire temp
Accelerometer
Barometer Digital Sensors Can be approximated by a button. Don't always exhibit true on/off behavior. "Ringing" may occur, especially in mechanical sensors. Details The button connects the pin to +5v when it is depressed. The 220 ohm resistor connects the pin to GND. Because it is pulling the value of the pin to ground, it is a 'pull-down' resistor. How to fix this The problem with 'ringing' When a button or switch is closed, the detected voltage does not go from 0 to 5v immediately. This can be for mechanical or electrical reasons. For a detailed treatment of the problem, read this:
http://www.eng.utah.edu/~cs5780/debouncing.pdf Fixing it! Software Hardware A simple algorithm:

1. Check sensor
2. Wait longer than the switch could possible bounce
3. Check sensor again
4. If the readings agree, return that state Analog Sensors Manual Automatic Individual components
Presented as a variable resistance
Supply your own voltage divider
More tunable
Easier to handle for beginners
Complete package (monolithic)
Presented as a variable voltage
More consistent
Many are SMD
Easier to read TMP36 Fancy Sensors Usually require some kind of protocol (SPI, I2C, RS232)
Generally SMD
A PC can be thought of as a complex sensor that speaks RS232 Shields Lots of complex functionality is packaged as Arduino 'shields'. Shields preserve the headers on the Arduino so you can still plug stuff into it, but may use some pins, making them unavailable for your application.
Full transcript