Loading presentation...

Present Remotely

Send the link below via email or IM


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.


Intro to Arduino

No description

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:
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
Digital Input
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)
1KB EEPROM ('disk') Links http://blog.workshop88.com/buy-arduinos/





http://www.trossenrobotics.com/c/arduino-robotics.aspx Sensor Indicator Display Controller Arduino 201 Types of Sensors
Digital Sensors
Using Buttons
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
Making things spin
Making things move Arduino 301 Registers
What registers are available
What do they do?
Changing multiple pin states
Relationship between interrupts and PWM
Using interrupts for event-driven programming Low-level programming Types of Sensors Digital Sensors
Hall Effect
Reed Switch
Tilt switch Analog Sensors
Pressure Sensors
Electret Mic
Piezo Fancy Sensors
1-wire temp
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