Download presentation
Presentation is loading. Please wait.
Published byPamela Ford Modified over 8 years ago
1
Introduction to Arduino Microcontrollers (Death by Powerpoint)
2
Overview Background Background Microcontroller defined/Why Arduino's? Microcontroller defined/Why Arduino's? Types of Arduino microcontrollers Types of Arduino microcontrollers What To Get (Hardware and Software) What To Get (Hardware and Software) Electronic Circuits Electronic Circuits Projects Projects Examples Examples Inspiring the next generation of coders, hardware experts and tinkers. Inspiring the next generation of coders, hardware experts and tinkers.
3
Microcontrollers – One Definition Programmers work in the virtual world. Programmers work in the virtual world. Machinery works in the physical world. Machinery works in the physical world. How does one connect the virtual world to the physical world? How does one connect the virtual world to the physical world? Enter the microcontroller. Enter the microcontroller. A microcontroller is basically a small-scale computer with generalized (and programmable) inputs and outputs. A microcontroller is basically a small-scale computer with generalized (and programmable) inputs and outputs. The inputs and outputs can be manipulated by and can manipulate the physical world. The inputs and outputs can be manipulated by and can manipulate the physical world.
4
Arduino – Official Definition Taken from the official web site (arduino.cc): Taken from the official web site (arduino.cc): Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
5
Why Arduino? For whatever reason, Arduino microcontrollers have become the de facto standard. For whatever reason, Arduino microcontrollers have become the de facto standard. Make Magazine features many projects using Arduino microcontrollers. Make Magazine features many projects using Arduino microcontrollers. Strives for the balance between ease of use and usefulness. Strives for the balance between ease of use and usefulness. Programming languages seen as major obstacle. Programming languages seen as major obstacle. Arduino C is a greatly simplified version of C++. Arduino C is a greatly simplified version of C++. Inexpensive from as little as £1!. Inexpensive from as little as £1!.
6
Why Arduino in Education? Programming Skills. Programming Skills. Electronic Skills. Electronic Skills. Making the leap. Making the leap. Inspiration. Inspiration. Practical learning. Hacking! (Changing the way things work) Practical learning. Hacking! (Changing the way things work) Cost! Cost! So much so that the BBC got in on the act with > So much so that the BBC got in on the act with >
7
The BBC Micro:bit Still a microcontroller. Still a microcontroller. Similar concept. Similar concept. Similar abilities. Similar abilities. Similar programing. Similar programing. Beginner friendly. Beginner friendly. Will be everywhere. Will be everywhere. Not as practical for bigger projects. Not as practical for bigger projects.
8
Learn through Doing. We learn fastest when inspired to play. We learn fastest when inspired to play. To Tinker. To Tinker. To create, debug, and make something that works! To create, debug, and make something that works! Electronics are cheap, kids can afford to create, play with and break / rebuild all sorts of projects. Electronics are cheap, kids can afford to create, play with and break / rebuild all sorts of projects. Basic Arduino kits are cheap enough to give to kids! Basic Arduino kits are cheap enough to give to kids! Electronics are not a form of magic, take control. Electronics are not a form of magic, take control.
9
What Can Arduino Do? It can CONTROL devices. It can CONTROL devices. It can SENSE through sensors. It can SENSE through sensors. It can INTERACT with the environment. It can INTERACT with the environment. It can PROCESS what it senses. It can PROCESS what it senses. It can OUTPUT to other devices or programs. It can OUTPUT to other devices or programs.
10
Practical Applications. Displays. Displays. Data Logging. Data Logging. Robots. Robots. Hacking. Hacking. Toys. Toys. Games. Games. Creating. Creating. Controlling. Controlling.
11
Arduino Types Many different versions Many different versions Number of input/output channels Number of input/output channels Form factor Form factor Processor Processor Leonardo Leonardo Due Due Micro Micro LilyPad LilyPad Esplora Esplora Uno Uno
12
Arduino Uno Close Up The pins are in three groups: The pins are in three groups: Invented in 2010 Invented in 2010 14 digital pins 14 digital pins 6 analog pins 6 analog pins power power
13
Mega Compared to the Uno, the Mega: Compared to the Uno, the Mega: Many more communication pins Many more communication pins More memory More memory Some interface hardware doesn't work Some interface hardware doesn't work
14
Micro When size matters: Micro, Nano, Mini When size matters: Micro, Nano, Mini Includes all functionality of the Leonardo Includes all functionality of the Leonardo Easily usable on a breadboard Easily usable on a breadboard
15
LilyPad LilyPad is popular for clothing-based projects. LilyPad is popular for clothing-based projects.
16
Where to Start Get an Arduino (starter kit). Get an Arduino (starter kit). Download the the IDE. Download the the IDE. Connect the Arduino. Connect the Arduino. Configure the compiler. Configure the compiler. Connect the circuit. Connect the circuit. Write the program. Write the program. Get frustrated/Debug/Get it to work. Get frustrated/Debug/Get it to work. Get excited and immediately start next project Get excited and immediately start next project (sleep is for wimps)
17
Arduino Starter Kits Pre Selected Retail Kits. Pre Selected Retail Kits. Advantage that multiple projects (and instructions) are usually included. Advantage that multiple projects (and instructions) are usually included. Ebay Kits. Ebay Kits. Usually of very good quality and much cheaper than retail. Usually of very good quality and much cheaper than retail. Website Lists and purchase through Ebay. Website Lists and purchase through Ebay. There are a plethora of sites offering part lists for the beginner with associated projects. There are a plethora of sites offering part lists for the beginner with associated projects.
18
Typical £20 Kit.
19
Shields Shields are circuit boards that plug into the top of an Arduino. Shields are circuit boards that plug into the top of an Arduino. They extend the capabilities of an Arduino. They extend the capabilities of an Arduino. Examples: Examples: Ethernet Ethernet GPS GPS Motor Motor Prototype Prototype shieldlist.org shieldlist.org
23
What to Get – My Recommendation Required: Required: Arduino (such as Uno) Arduino (such as Uno) USB A-B (printer) cable USB A-B (printer) cable Breadboard Breadboard Hookup wire Hookup wire LED's LED's Resistors Resistors Sensors Sensors Switches Switches Good Idea: Good Idea: Capacitors Capacitors Transistors Transistors DC motor/servo DC motor/servo Relay Relay Advanced: Advanced: Soldering iron & solder Soldering iron & solder Heat shrink tubing Heat shrink tubing 9V battery adapter 9V battery adapter Bench power supply Bench power supply
24
What to get (Advanced) LCD Shield. LCD Shield. Multi Input Output Board. Multi Input Output Board. Motor Control Shield. Motor Control Shield. Servos. Servos. Relays. Relays. Led Strips. Led Strips. Prototype boards & Shields. Prototype boards & Shields. Bread Boards with PSU. Bread Boards with PSU. Lots of leds, resistors, motors, transistors & wires! Lots of leds, resistors, motors, transistors & wires!
25
Arduino Program Development Based on C++ without 80% of the instructions. Based on C++ without 80% of the instructions. A handful of new commands. A handful of new commands. Programs are called 'sketches'. Programs are called 'sketches'. Sketches need two functions: Sketches need two functions: void setup( ) void setup( ) void loop( ) void loop( ) setup( ) runs first and once. setup( ) runs first and once. loop( ) runs over and over, until power is lost or a new sketch is loaded. loop( ) runs over and over, until power is lost or a new sketch is loaded.
26
Arduino C Arduino sketches are centered around the pins on an Arduino board. Arduino sketches are centered around the pins on an Arduino board. Arduino sketches always loop. Arduino sketches always loop. void loop( ) {} is equivalent to while(1) { } void loop( ) {} is equivalent to while(1) { } The pins can be thought of as global variables. The pins can be thought of as global variables.
27
Arduino C Specific Functions pinMode(pin, mode) pinMode(pin, mode) Designates the specified pin for input or output digitalWrite(pin, value) digitalWrite(pin, value) Sends a voltage level to the designated pin digitalRead(pin) digitalRead(pin) Reads the current voltage level from the designated pin analog versions of above analog versions of above analogRead's range is 0 to 1023 analogRead's range is 0 to 1023 serial commands serial commands print, println, write print, println, write
29
Compiler Features Numerous sample sketches are included in the compiler Numerous sample sketches are included in the compiler Located under File, Examples Located under File, Examples Once a sketch is written, it is uploaded by clicking on File, Upload, or by pressing U Once a sketch is written, it is uploaded by clicking on File, Upload, or by pressing U
30
Basic LED Circuit Connect the positive (+) lead of a power source to the long leg of an LED. Connect the positive (+) lead of a power source to the long leg of an LED. Connect other leg of the LED to a resistor. Connect other leg of the LED to a resistor. High resistance means a darker light. High resistance means a darker light. Low resistance means brighter light. Low resistance means brighter light. No resistance means a burned out LED. No resistance means a burned out LED. Connect other leg of the resistor to the negative lead of the power source. Connect other leg of the resistor to the negative lead of the power source.
31
Let the Good Times Roll! At this point we have: At this point we have: Purchased a starter kit, including the Arduino Purchased a starter kit, including the Arduino Connected and configured the Arduino Connected and configured the Arduino Connected a simple LED circuit Connected a simple LED circuit Let's write some code! Let's write some code!
32
Blink Sketch void setup( ) { pinMode(13, OUTPUT); pinMode(13, OUTPUT);} void loop( ) { digitalWrite(13, HIGH); digitalWrite(13, HIGH); delay(1000); delay(1000); digitalWrite(13, LOW); digitalWrite(13, LOW); delay(1000); delay(1000);} Connected to one end of the circuit Connected to other end of the circuit
33
So What? Great. Blinking lights. Not impressed. Great. Blinking lights. Not impressed. Blinking Signal can be reused in hundreds of projects. Control sirens, flashing lights, motors, valves, an SOS Beacon Project (light and sound). Blinking Signal can be reused in hundreds of projects. Control sirens, flashing lights, motors, valves, an SOS Beacon Project (light and sound). Only covered output thus far. Only covered output thus far. Can use analog inputs to detect physical phenomena. Can use analog inputs to detect physical phenomena.
34
Inputs Digital inputs will come to the Arduino as either on or off (HIGH or LOW, respectively). Digital inputs will come to the Arduino as either on or off (HIGH or LOW, respectively). HIGH is 5VDC. HIGH is 5VDC. LOW is 0VDC. LOW is 0VDC. Analog inputs will come to the Arduino as a range of numbers, based upon the electrical characteristics of the circuit. Analog inputs will come to the Arduino as a range of numbers, based upon the electrical characteristics of the circuit. 0 to 1023 0 to 1023.0049 V per digit (4.9 mV).0049 V per digit (4.9 mV) Read time is 100 microseconds (10,000 a second) Read time is 100 microseconds (10,000 a second)
35
Analog Input-Application The variable resistor can be replaced with a sensor. The variable resistor can be replaced with a sensor. For example, a photo resistor. For example, a photo resistor. Depending upon the light level at the photo resistor: Depending upon the light level at the photo resistor: Turn on a light Turn on a light Increase or decrease the brightness of an LED (or an LED array) Increase or decrease the brightness of an LED (or an LED array) Most sensors are simply variable resistors, but vary their resistance based on some physical characteristic. Most sensors are simply variable resistors, but vary their resistance based on some physical characteristic.
36
Sensors Sensors can be both binary or a range. Sensors can be both binary or a range. Usually, sensors that measure a range of values vary their resistance to reflect their detection. Usually, sensors that measure a range of values vary their resistance to reflect their detection. Arduinos can only sense voltages, not resistances. Arduinos can only sense voltages, not resistances. Sensors that only vary their resistances require a circuit called a voltage divider to provide the Arduino a voltage. Sensors that only vary their resistances require a circuit called a voltage divider to provide the Arduino a voltage.
37
Common Sensors Dials on a radio are simply potentiometers Dials on a radio are simply potentiometers Temperature Temperature Light Light Angle Angle Switches Switches did the user throw a switch or push a button? did the user throw a switch or push a button? Accelerometer (measures motion and tilt) Accelerometer (measures motion and tilt) Infrared sensor & light Infrared sensor & light Hall effect sensor and magnet Hall effect sensor and magnet Ball tilt sensor (for measuring orientation) Ball tilt sensor (for measuring orientation) Force Force
38
Projects. Hacking pound shop electronics. Hacking pound shop electronics. Anoyatron. Anoyatron. Data Loggers for science projects. Data Loggers for science projects. Distance Sensor. Distance Sensor. Pretty Lights. Pretty Lights. Automation. Automation. Solve a real world problem. Solve a real world problem. Clock. Clock.
39
Anoyatron. Costs < £2 Costs < £2 Beeps at random intervals. Beeps at random intervals. Takes less that 30minutes to make. Takes less that 30minutes to make. Runs on a single 3v Battery. Runs on a single 3v Battery. Will run for 40 years on the power from this single battery. Will run for 40 years on the power from this single battery. Wins friends in the workplace! Wins friends in the workplace!
41
Advanced Projects. Robots! Robots! Big Displays! Big Displays! 3D Scanners & Printers! 3D Scanners & Printers! Drones! Drones! Intruder Alarm. Intruder Alarm. CNC Machine. CNC Machine. LED interactive table. LED interactive table. Web Server. Web Server.
42
Simple Robot. Features, Features, Self correcting. Self correcting. Handles Multiple tasks. Handles Multiple tasks. Various Logic for dealing with obstacles. Various Logic for dealing with obstacles. Behaviour seems more intelligent than it is. Behaviour seems more intelligent than it is. Works by repeatedly banging it’s head on walls. Works by repeatedly banging it’s head on walls. Seems well suited to an educational environment. Seems well suited to an educational environment.
43
Conclusion The Arduino microcontroller is a low cost way to enter into the hobby of robotics & Electronics. The Arduino microcontroller is a low cost way to enter into the hobby of robotics & Electronics. The Arduino has two plusses over any other: The Arduino has two plusses over any other: The user community The user community Extensive online library of code and projects Extensive online library of code and projects Viewed as the "base" system, upon which all other microcontrollers are built. Compatibility. Viewed as the "base" system, upon which all other microcontrollers are built. Compatibility. So get a kit, and start ushering in the inevitable takeover of our robotic overlords! So get a kit, and start ushering in the inevitable takeover of our robotic overlords!
44
Introduction to Arduino Microcontrollers
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.