Arduino Setup & Flexing the ExBow

Slides:



Advertisements
Similar presentations
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Advertisements

How to use Arduino By: Andrew Hoffmaster.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
Secret Door Knock Detector
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Introduction.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.
Inverting Amplifier. Introduction An inverting amplifier is a type of electrical circuit that reverses the flow of current passing through it. This reversal.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Control Angle via Button Pushes One button increases angle. Other decreases angle. Both light LED.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
Detection Circuit ENGR Pre Lab.
ECE 3450 M. A. Jupina, VU, 2016 Capacitance Sensor Project Goal: Creation of a digital capacitance sensor circuit where a variation in capacitance changes.
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.
Voltage Divider Circuits Input transducers Input transducers are devices that convert a change in physical conditions (for example, temperature) into a.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Electronic instrumentation Digitization of Analog Signal in TD
How to Build a Digital Physical System - Lab Lecture 2.
Electronic Instrumentation Project 204 Project Name: Light Level Monitor Student #1: Name ID Student #2: Name ID Student #3: Name ID.
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
CSE 341 Project : Ultrasonic Radar PRESENTED BY: NAME : AKIFA TASNEEM ID : SECTION: 02 1.
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Arduino Part 1 Topics: Microcontrollers
Application of Programming: Scratch & Arduino
Assist. Prof. Rassim Suliyev - SDU 2017
Purpose of This Minilab
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
Program the robotic arm
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
Arduino Development for Beginners
Pulse Detector Ramiro Duarte, Clayton Greenbaum Frank Paynter
Sensors with Arduino A Microcontroller.
Arduino Basics Connect Arduino to USB port
Arduino Uno and sensors
Control a motors angular position with a flex sensor
How to avoid catching things on fire.
Arduino and Grove LET’S START.
Roller Coaster Design Project
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.
McCrometer Nano Board Test Procedure
Welcome to Digital Electronics using the Arduino Board
Secret Door Knock Detector
Arduino : Introduction & Programming
Arduino Part 4 Let there be more light.
Sensors and actuators Sensors Resistive sensors
Arduino 7 Segment Display Lab
Lab #1: Getting Started.
Arduino Uno circuit basics
Arduino and Grove LET’S START.
Introduction to Arduinos
Interrupts.
Buttons.
2019 Investing Now Summer Program
Presentation transcript:

Arduino Setup & Flexing the ExBow

Installing Software (USB Stick) Install Arduino https://www.arduino.cc/en/Guide/HomePage Install Ardublock http://www.hummingbirdkit.com/learning/setting-arduino-environment-hummingbird- duo

Blink Program Begin by setting up the circuit as shown to the right The positive end (long leg) of the LED must be connected to the resistor The negative end (short leg) of the LED must be connected to ground Digital Pin 13 (D13) 1000 Ohm Resistor Long leg Short leg LED Ground https://www.arduino.cc/en/tutorial/blink

Physical Circuit

Code Initialize pin 13 as an output pin - we will output a signal to tell the LED what to do For us, wherever it says LED_BUILTIN write 13 Turn the LED on Turn the LED off

Completed Code For us, wherever it says LED_BUILTIN write 13

Output When you’re done, it should look like this

Voltage Divider “A simple circuit which turns a large voltage into a proportionally smaller one” By changing R1 and R2, we can make Vout be a fraction of Vin Try R1=1000 Ohms and R2=1000 Ohms What should you get? What about is R2 is really high? For the Exbow, R2 will be our “flex” sensor

Code

Output To see printed outputs, go to the Arduino Program and click on Tools > Serial Monitor (Text Display) or Serial Plotter (Plot Display) You should see one constant line The analog input 0-5V is converted to 0-1023 value

Voltage Divider with Flex https://learn.sparkfun.com/tutorials/sik-experiment-guide-for- arduino---v32/experiment-9-using-a-flex-sensor Voltage Divider with Flex Now we integrate the flex sensor into the voltage divider circuit

Physical Circuit

Code

Output Use Serial Plotter As you move the flex sensor back and forth you should see something to the right

Min - Max Function Range of outputs for person using the flex sensor differs Use a formula to find bounds Initiate high minimum and every time the flex sensor has a lower value, the minimum becomes that Initiate low maximum and every time the flex sensor has a higher value, the maximum becomes that

Code

Output As the flex value grows, so does the maximum As the flex value shrinks, so does the minimum Blue = actual output red=max green = min Label axis

Finding the angle Now that we have the flex values and the range of values, we can convert them to angles Find the proportional value of the flex from the MAX and MIN and multiply by 180 deg Example:

Code The left side of the equation maps the Flex value to a value between a new range of 0 to 1 (min to max) The right side then multiplies that into an angle from 0 to 180

Output Use the Serial Monitor: Tools > Serial Monitor As you move the flex sensor back and forth you should see something to the right yellow is the angle now

Servo Motor Sweep https://www.arduino.cc/en/Tutorial/Sweep

Circuit

Code

Output Use the Serial Monitor: Tools > Serial Monitor As the servo moves the arm back and forth you should see something to the right Try increasing the Max Angle to see how the arm moves

Putting it all together