Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and.

Slides:



Advertisements
Similar presentations
MODULE 9 – CONTROL SYSTEMS: MICROPROCESSOR CONTROL
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
EMS1EP Lecture 9 Analog to Digital Conversion (ADC) Dr. Robert Ross.
Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
How to use Arduino By: Andrew Hoffmaster.
Embedded Sumo 1T4 – 1T5 UTRA.
Basic DC Motor Circuits
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
Intro to Arduino with LilyPad Make a MakerSpace, Artisan’s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett.
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Introduction.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Basic Circuits – Lab 2 Arduino and Sensors
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.
Microprocessors Tutorial 1: Arduino Basics
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Introduction to the Arduino
Conductive Textiles Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and PlugandWear Versione.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Microprocessors Tutorial 1: Arduino Basics
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Rebecca Bruce and Susan Reiser, May 2015 Analog Input and Output.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
ME 120: User-defined functions: average analog input reading Arduino Programming – Part 5: User-defined functions ME 120 Mechanical and Materials Engineering.
Microcontroller basics Embedded systems for mortals.
Electronic instrumentation Digitization of Analog Signal in TD
Pulse-Width Modulation: Simulating variable DC output
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Hacking on Arduino George Patterson
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
Microcontroller basics
Get Your Project Started with Arduino
UCD ElecSoc Robotics Club 2017/2018
Sensors with Arduino A Microcontroller.
Arduino - Introduction
Control the color and brightness of an RGB LED with a Potentiometer
How to avoid catching things on fire.
Analog Input through POT
Roller Coaster Design Project
Introduction to Arduinos
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
What is an Arduino ? Open Source electronic prototyping platform based on flexible easy to use hardware and software.
IoT Programming the Particle Photon.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Arduino : Introduction & Programming
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
Sensors and actuators Sensors Resistive sensors
CTY SAR FCPS Shawn Lupoli, Elliot Tan
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Introduction to Arduinos
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and PlugandWear Versione January 2010

Analog

Analog Input

Resistance 3 the degree to which a substance or device opposes the passage of an electric current, causing energy dissipation.

What is Analog? Analog electronic components work by varying the current of electricity The Arduino has a built in Analog to Digital converter. The ADC translates analog signal to a digital code. This is very important to textile sensors

Arduino Analog to Digital Convertor 10 bit ADC 5V 0V = level 0 5V = level V = level V = level V = level V = level 1022 = 2 10 = 1024 levels = V (4.8 mV)/ 1024

analog input Use the analogRead function to read from an analog sensor We need load the value into a variable variable = analogRead(PIN); textileresistence = analogRead(buttonPin); be sure to declare your variables in setup int texe; texe = analogRead(10);

The trick to reading an analog input Analog Read requires an extra resistor. This resistor helps define 0V or 5V leaving no possibility for an empty reading. Leaving this out can lead to misinformation

Analog Output Sometimes on and off is just not enough.

Digital to analog Converter (DaC) One of the amazing things about Arduino is it’s ability to vary the output voltage on Pins 3,5,6,9,10,11 This allows us to dim LED’s or change the sound of a piezo (Music) Acceptable output signal levels 5V 0V 0.9V 4.2V HIGH LOW

How it works 3,5,6,9,10,11 Only on PINS 3,5,6,9,10,11 Blinking faster than the eye can see. It’s actually fake.

analog write 5V 0V Use the analogWrite function to vary voltage on pins 3,5,6,9,10,11 Analog Write works on a 0 to 255 (8 bit) scale analogWrite(PIN,VALUE); Each value step is equal to.02 volts 2.5V127

Let’s Try it Load up the sketch /Examples/Analog/Fadi ng Note how it fades.

Let’s Try it Load up the sketch /Examples/Analog/AnalogInput Connect the aligator clips to - and a0 Search for conductive materials

So now we can read our sensors. BUT what ARE THEY SAYING?

Serial Port SERIAL COMMUNICATION

Serial Port Serial requires PINs 1 & 0 The function Serial.begin() opens the serial port and sets it’s speed in setup. The function Serial.print() writes a value to the serial port The function Serial.println() writes a new line to the serial port // initiate Serial Com and set speed // SPEED Serial.begin(9600); // Print the VALUE to the serial port Serial.print(VALUE); // Print a newline to the serial port Serial.println(“Soft Sensor”);

Mmmm… Serial Serial output lets us understand what our sketch is doing. Serial lets us use our arduino as a meter. Load sketch Example/ Basics / AnalogReadSerial /* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor This example code is in the public domain. */void setup() { Serial.begin(9600);}void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue, DEC);}