Input/Output Assignment

Cory Messerli EGR 150 3/27/2016

ii

Input/Output Design

Submitted to Dr. Fagan EGR 150 Intro to Engineering

Prepared by Cory Messerli

March 27th, 2016

iii

Table of Contents Assignment

1

Design

1

Testing

2

Results

2

Files

2

Conclusion

2

Amount of time invested

3

1

Assignment Design, build, program and test as many devices that have input and output. You must modify something if you use someone else’s code. More points for Analog input and output.

Design After the last assignment with the Sparkfun kit, I decided to try and do a thermostat and a motor to turn on and off based off of a temperature setting. At first I thought this was going to be pretty easy. WRONG!! I was able to get the temperature sensor to work and read correctly with the Arduino circuit #7 (File 2.1) that was per set in the program. I was also able to get the motor to work correctly with the per program circuit in Arduino with circuit #12 (File 2.2). Once I tried to get the two to work together I couldn't make them work. All I did was coped and paste the circuit #7 in a new sheet and tried to get the temperature sensor to read and It would not read correctly. I even went back to the original circuit #7 in Arduino but that wouldn't even work correctly now. When I went back to the original circuit, the temp reading was -58 C. Original circuit #7 is located in (File 2.1). So I'm really not sure what's is going on with this. I need to talk with Dr. Fagan to see why this will not work now. After banging my head against the wall for 4 hrs, I gave up and went in a new direction with this assignment. I decided to try and work with circuit #6 (File2.3) which is a Photo Resistor. In this circuit, the LED will turn off when it is dark in the room. I wanted to try and get the Photo Resistor to turn off a motor when it got dark. I was able to get the circuit to work correctly, but I was unable to get the motor to work with the photo resistor. After searching on the internet on maybe something I was doing wrong, I came across a video showing how to do a night light setup with a photo cell with a servo motor. So I choice to do this instead but I did not use the servo motor setup. I just stuck with turning the LED light on and off with light. Here is the link to the video I found (Photocell). I tried to do the same setup with the original circuit #6 in Arduino, but I was unable to get the light to turn off when it was light, it would only turn on when it was light in the room, notice video (Testing 2.1). So I went with the Program from the video link and messed around with that to get the right settings to make the LED turn off and on based off the light in the room. I had to adjust the minima setting on the LED and maximum setting on the LED to make it work with the light in the room I was using. The original circuit #6 file is located at (File 2.3). The program I created is located at (File 2.4). Notice the "val = constrain (val, 240, 625); " and "int ledLevel = map(val, 240, 625, 255, 0);" in (File 2.4.) that is what I changed to get the settings right.

2

Testing I tried changing the settings in circuit #6 but I couldn't get it to work correctly. Here is Arduino circuit #6 testing video (Testing 2.1). Here is the circuit I created (Testing 2.2).

Results I was pretty happy with how it turned out, but it was a lot of work for me. This is a weak area for me in engineering. But only having one week to work on it makes things tuff to get right.

Files    

Arduino circuit #7 (File 2.1) Arduino circuit #12 (File 2.2) Arduino circuit #6 (File 2.3) Circuit I created (File 2.4)

Conclusion This was very hard for me. It is one of my weak links in EGR150. I wish I had more time to understand this but this class does not give you that time to understand. I will need to figure out how to turn off a motor from a photocell setup in the future though, because in the final project with my group this could be of value.

3

Amount of time invested (hrs) Designing

3

Testing

3.5

Writing Report

5

Total

11.5

Input-Output Design.pdf

Page 1. Whoops! There was a problem loading more pages. Input-Output Design.pdf. Input-Output Design.pdf. Open. Extract. Open with. Sign In. Main menu.

578KB Sizes 0 Downloads 248 Views

Recommend Documents

Part9- InputOutput System.pdf
Dalam format yang berbeda. • Kecepatan semua perangkat tersebut lebih lambat. dibandingkan CPU and RAM. • Membutuhkan I/O modules untuk beroperasi.