Overview What is Arduino? What is it used for? How to get started Demonstration Questions are...

24

Transcript of Overview What is Arduino? What is it used for? How to get started Demonstration Questions are...

Page 1: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
Page 2: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Overview

What is Arduino?• What is it used for?• How to get started• Demonstration

• Questions are welcome at any time.

Page 3: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

What is Arduino?

• “Arduino is an open-source physical computing platform based on a simple i/o board and a development environment that implements the Processing / Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer.“ ( www.arduino.cc, 2006 )

Page 4: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Arduino is a platform

• A physical Input / Output board (I/O) with a programmable Integrated Circuit (IC).

Page 5: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Arduino is a platform

• Also including an Integrated Development Environment (IDE) for programming.

• The language itself is based in C but is largely modeled upon the www.processing.org language.

Page 6: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

What is it used for?

• Physical Computing projects / research• Interactive Installations• Rapid prototyping

• When you wish to move beyond the traditional Mouse, Keyboard and Monitor to develop novel and custom interactions in your project work.

Page 7: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

What can it do?

• Sensors ( to sense stuff )

– Push buttons, touch pads, tilt switches.– Variable resistors (eg. volume knob / sliders)– Photoresistors (sensing light levels)– Thermistors (temperature)– Ultrasound (proximity range finder)

• Actuators ( to do stuff )

– Lights, LED’s– Motors– Speakers– Displays (LCD)

Page 8: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Why Arduino?

• It is Open Source, both in terms of Hardware and Software.

• It is cheap, the hardware can be built from components or a prefab board can be purchased for approx $35 AUD

• It can communicate with a computer via serial connection over USB (Bluetooth model coming soon!).

• It can be powered from USB or standalone DC power.

Page 9: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Why Arduino?

• It can run standalone from a computer (chip is programmable) and it has memory (a small amount).

• It can work with both Digital and Analogue electronic signals. Sensors and Actuators.

• You can make cool stuff! Some people are even making simple robots, and we all know robots are just cool.

Page 10: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
Page 11: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Not so fast!

• It’s important to note at this stage that Arduino’s are electronic devices.

• This means you MUST consider electrical safety and understand the basics before diving straight in.

• The board itself doesn’t operate at what would normally be considered dangerous Voltages or Amperage, but if in doubt at any stage of use you should seek more expert advice.

Page 12: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Getting up and running

• The power mode must be selected before you plug the board into anything.

• When powering from the USB cable (5 volts) the jumper should be closest to the USB input, for DC supply the jumper should be closest to the DC input.

Page 13: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Getting up and running

• Plug it into the USB port and install the USB drivers that come with the IDE.

• Open up the Arduino IDE and select the COM port, usually COM1 or COM2 on a Windows machine.

• Within the IDE, select the BAUD rate (communication speed for serial connections)

• Set BAUD rate to 19200 on Windows, 9600 for Mac?

Page 14: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Digital Sensors vs Analogue

Digital

• Use fixed HIGH and LOW signals to transmit data.

• Binary system, High =1, Low = 0.

• Reads input based on stream of Highs and Lows.

Analogue

• Uses infinitely variable streams of signals.

Page 15: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Digital sensors \signals

Blue = Analogue

Red = Digital

Page 16: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Digital, Analogue, PWM

• All in all it can be summarized in the following fashion.

• DIGITAL IS “On and Off”

• ANALOGUE IS “How MUCH on or off”

• PWM IS “How OFTEN on or off”

Page 17: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Digital’s Hot Sister, PWM

Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means.

Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal

spends off. The duration of "on time" is called the pulse width. To get varying analog values, you change, or modulate, that pulse width. If you repeat this on-off pattern fast enough with an LED for example, the result is as if the signal is a steady voltage between 0 and 5v controlling the brightness of the LED.

Page 18: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

How PWM works!

Page 19: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Example of PWM

• Have you ever seen the “snoozing LED” on some laptops when they’re in sleep mode? This is done by varying the WIDTH of the digital pulse sent to the LED. It starts at a low value and steadily ramps up the width then then steadily reduces the width

• In short terms = over a few seconds, ramp the duty cycle to 100, then over a few more seconds, ramp the duty cycle back to zero.

Page 20: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Relays

• A relay is just an electronic switch!

Page 21: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Basic Transistor Operation

• Transistors can be one of two things:

– A SWITCH

– AN AMPLIFIER

Page 22: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Types of Transistors

Page 23: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Transistor Legs (yeah)

• E is for EMITTER• B IS FOR BASE• C IS FOR COLLECTOR

Page 24: Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.

Acting as a switch

This is the most common behavior for Arduino purposes.