Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Arduinos to Teach Engineering Concepts

Similar presentations


Presentation on theme: "Using Arduinos to Teach Engineering Concepts"— Presentation transcript:

1 Using Arduinos to Teach Engineering Concepts
Andrew G. Bell October 27, 2016

2 Background Ivy Tech Ivy Tech Community College is Indiana’s largest public postsecondary institution and the nation’s largest singly accredited statewide community college system. We offer Associates of Science degrees in: Electrical Engineering Technology Mechanical Engineering Technology Engineering Technology Pre- Engineering Nanotechnology Design Technology over 40 degree programs

3 What is an Arduino? What is an Arduino? Arduino is a inexpensive Microcontroller CCA that interface to your PC via USB They typically cost ~ 20 to 25 and are available many places online Software to program them is free, open source. Arduino Uno (and other models) have daughter boards call “shields” that you can stack Shields include Motor Drives, Prototype boards, Displays, etc. Arduino microcontrollers have become very popular with hobbyist, students and colleges.

4 Arduino Uno Arduino Uno Prototype Shield
What is an Arduino? Arduino Uno Specification Microcontroller ATmega328P Operating Voltage 5V Input Voltage 7-12V Digital I/O Pins 14 Analog Input Pins 6 Flash Memory 32 KB SRAM 2 KB EEPROM 1 KB Clock Speed 16 MHz PC Interface USB Arduino Uno Prototype Shield

5 Our Approach - Using Arduino & LabView for Teaching MEMS Devices
Discovery Based 1.) Give students general idea and requirements for design 2.) Provide students with resources to design, build and test 3.) Provide feedback as needed but don’t micromanage 4.) Allow students time to learn, fail and succeed 5.) Provide positive feedback and recognition 6.) Step back and let them learn …

6 NI Tools Multisim schematic Utliboard PWB
Our Results - Using Arduino & LabView for Teaching MEMS Devices NI Tools Multisim schematic Utliboard PWB

7 DAK for MEMS SCME Pressure Sensor Kit Includes – Arduino Uno based
Arduinos are key to our program DAK for MEMS SCME Pressure Sensor Kit Includes – Arduino Uno based DAK interface module, instruction manual, Executable LabView Data acquisition software, USB cable, and pressure sensor interface cable.

8 DAK for MEMS SCME Cantilever Kit
Strain Gauge with Custom Shield and Arduino DAK for MEMS SCME Cantilever Kit Includes - Arduino Uno based DAK interface module, instruction manual, executable LabView Data acquisition software, USB cable, and Cantilever beam Strain gauge interface – Discovered “How to make a Strain Gauge”

9 Wuxi – 100W Single Axis Solar Panel Tracker
Using Arduino to position Solar Panel - Global Wuxi – 100W Single Axis Solar Panel Tracker

10 Video https://www.youtube.com/watch?v=ibURmCctnWk
Using Arduino to position Solar Panel Video

11 Student Lab Notebook examples
Student Work Student Lab Notebook examples Ultrasonic Sensor (Adam Beauchot) Photo Diode (Adam Beauchot) LCD Examples (Ryan Noyes) Two direction Solar Tracker (Ryan Noyes)

12 Arduino Project 1 and 2 Using Sensors: This project used two sensors together, a light sensing diode and a range finding sonic eye. The objective was to get the sonic eye to determine the range of an object and or determine if their was movement in a room only at night time, similar to a type of burglar alarm.

13 Video https://www.youtube.com/watch?v=aQlpAhh8WyI
Arduino Project 1 and 2 Video

14 Using LCD Display: Arduino Project 3 // include the library code:
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis() / 1000);

15 Using Motors and Sensors:
Arduino Project 4 Using Motors and Sensors: To Servos V H 6V DC Vertical Servo Horizontal Servo

16 Arduino Project 4 Video

17 BB8 using Arduino https://www.youtube.com/watch?v=0nQ-1o1mHpI
The future BB8 using Arduino Andy Bell Department Chair – Engineering Ivy Tech Community College – Northeast Phone:   : Fax: :  SDKB Technology Center, Room TC1240R, 3800 N. Anthony Blvd.,  Fort Wayne, IN 46805

18 Arduino Project 1 and 2 Serial.print(inches); Serial.print("in, "); Serial.print(cm); Serial.print("cm"); Serial.println(); delay(100); int val = analogRead(sensePin); if (inches >9 && val < 700){ digitalWrite(ledPin, HIGH); delay(900); digitalWrite(ledPin, LOW); } else if (inches >3 && inches <=9 && val <700){ delay(300); else if (inches >0 && inches <=3 && val <700){ else{ long microsecondsToInches(long microseconds) { // According to Parallax's datasheet for the PING))), there are // microseconds per inch (i.e. sound travels at 1130 feet per // second). This gives the distance travelled by the ping, outbound // and return, so we divide by 2 to get the distance of the obstacle. // See: return microseconds / 74 / 2; long microsecondsToCentimeters(long microseconds) // The speed of sound is 340 m/s or 29 microseconds per centimeter. // The ping travels out and back, so to find the distance of the // object we take half of the distance travelled. return microseconds / 29 / 2; The Code: This is the code required for the Arduino to control the Light sensing diode and the sonic eye in conjunction with one another. const int pingPin = 7; int sensePin = 0; int ledPin = 9; int lastDist = 0; int currentDist = 0; int thresh = 200; void setup() { // initialize serial communication: Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { // establish variables for duration of the ping, // and the distance result in inches and centimeters: long duration, inches, cm; // The PING))) is triggered by a HIGH pulse of 2 or more microseconds. // Give a short LOW pulse beforehand to ensure a clean HIGH pulse: pinMode(pingPin, OUTPUT); digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(5); // The same pin is used to read the signal from the PING))): a HIGH // pulse whose duration is the time (in microseconds) from the sending // of the ping to the reception of its echo off of an object. pinMode(pingPin, INPUT); duration = pulseIn(pingPin, HIGH); // convert the time into a distance inches = microsecondsToInches(duration); cm = microsecondsToCentimeters(duration);

19 The Code: Arduino Project 4 int botLeft = analogRead(A2);
posv = posv + 1; if(posv >= 179){ #include <Servo.h> int resetButton = analogRead(A1); if ( botLeft > botRight) { posv = 179; posh = posh -1; Servo horizontalServo; // Convert the analog reading (which goes from ) to a voltage (0 - 5V): if(posh <= 0){ Servo verticalServo; posh = 0; verticalServo.write(posv); if(resetButton >= 900 ) { int posh = 10; // variable to store the horizontal servo position float VtopLeft = topLeft * (5.0 / ); posh = 10; int posv = 10; // variable to store vertical servo position delay ( 300); float VtopRight = topRight * (5.0 / ); posv = 10; if ( botLeft > topLeft) { digitalWrite(OFFlight,HIGH); #define OFFlight 13 float VbotLeft = botLeft * (5.0 / ); posv = posv -1; delay (500); /////////////////////////////// TOP SENSORS - HORIZONTAL if(posv <= 0){ digitalWrite(OFFlight,LOW); float VbotRight = botRight * (5.0 / ); posv = 0; delay ( 500); if (topRight > topLeft ) { void setup() { pinMode(OFFlight,OUTPUT); Serial.println(botRight); // - IS CLOCKWISE ///////////////////////////////// RIGHT SENSORS - VERTICAL horizontalServo.attach(9); // attaches the servo on pin 10 to the servo object // + IS COUNTERCLOCKWISE if (topRight > botRight ) { verticalServo.attach(10); Serial.begin(9600); // initialize serial communication at 9600 bits per second: // horizontal Servo if ( topLeft > topRight) { //////////////////////////////// BOTTOM SENSORS - HORIZONTAL delay (3000); horizontalServo.write(10); verticalServo.write(10); if (botRight > botLeft ) { } posh = posh + 1; } // void loop if(posh >= 179){ void loop() { posh = 179; if ( botRight > topRight) { }// if posv = posv - 1; int topLeft = analogRead(A5); horizontalServo.write(posh); /////////////////////////////// LEFT SENSORS - VERTICAL int topRight = analogRead(A4); delay (300); int botRight = analogRead(A3); if (topLeft > botLeft ) {


Download ppt "Using Arduinos to Teach Engineering Concepts"

Similar presentations


Ads by Google