Download presentation
Presentation is loading. Please wait.
Published byImogen Payne Modified over 9 years ago
1
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58
2
-Announcements -Next Time -One Minute Report Questions -Arduino Part 1: Type and Blink Today:
3
-Everyone bring HW #4 and #5 hardware? -USB cables? -Arduino Unos? -Laptop? Announcements:
4
-Review Syllabus changes… Announcements:
5
Meetings tomorrow: -7:15Team 2 -8:00 -8:45 -9:30Team 4 -10:30Team 1 -11:15 -1:00Team 5 -1:45Team 6 -2:30Team 3 -3:15Team 8 - Announcements:
6
-Bring proposals, comments, and grade sheets -Bring questions and comments -Bring homework #6 – multiple copies if ordering from different locations -Bring budget -Whole team does not need to be there Announcements:
7
- Grades received yesterday - Need to add proposal and presentation scores - Will hand out passwords and post grades on Tuesday - Late 1 Minute Reports and those on different paper… Announcements:
8
General Proposal Comments: - HOBOs – Why? - GoPros – Many are using… - Imaging tests - Schedules are your plans to launch and your team's grade. Make them detailed. - Testing, like schedules must contain a lot of thought. Test everything and then test it some more. Test with mass sims. - Sensor calibration -Practice taking data and analyzing it - Requirements – RFP vs. Mission -Mission – WHY and WHAT -Arduino plan and usage – What you get - Industry examples Announcements:
9
General Presentation Comments: - Late vs. On-time - Practice vs. not practice - Eye Charts - Reading the slides and eye contact - Introductions - Answering questions - Overall, pretty good presentations Announcements:
16
Colorado Space Grant Consortium Next Time… Arduino Part 3 Next Time… Arduino Part 3
17
Colorado Space Grant Consortium Arduino Part 1: Type and Blink Class #3 Arduino Part 1: Type and Blink Class #3
18
18 What’s under the hood? Arduino Overview: USB 9V DC Power In 14 Digital Input/Outputs 6 Analog Inputs 3.3 V 5.0 VGND ATmega328 - 10 Bit ADC - 16 MHz - 32 KB Flash - I2C & SPI - 40 to +85C Serial I/O External Interrupts 5.0 V Regulator
19
19 Arduino Overview:
20
20 The Easy Stuff… Arduino Overview: USB 9V DC Power In 3.3 V 5.0 VGND 5.0 V Regulator
21
21 Arduino Overview:
22
22 The Chip… Arduino Overview: ATmega328 - 10 Bit ADC - 16 MHz - 32 KB Flash - I2C & SPI - 40 to +85C
23
23 Arduino Overview:
24
24 Other… Arduino Overview: 14 Digital Input/Outputs 6 Analog Inputs Serial I/O External Interrupts
25
25 Arduino Overview:
26
Digital: - Bits and Bytes, On/Off, 1 or 0, high or low, non-continuous 26 Red line – 2 bits = less info Green line – 4 bits = more info
27
Digital: -A state is one unique combination of bits -1 bit – 0 or 1 = 2 states = 2 1 -2 bits – 00, 01, 10, 11 = 4 states = 2 2 -4 bits – 0000, 0001….1111 = 16 States = 2 4 -8 bits = 00000000….11111111 = 256 states = 2 8 -16 bits = 0000000000000000…1111111111111111 = 65,536 states = 2 16 -More bits provides more precision over a given voltage range -If it is necessary to record small changes, more precision (bits), is required -8 bits is a byte -10 bits is how many bytes? 27
28
28 -What is the difference between 8-bit and 10-bit conversions? -An 8-bit conversion has 2 8 (0 to 255) possible values, -Resolution is 1/(2 8 – 1) * 5V = 1/255 * 5V = 0.0196 V Analog vs. Digital
29
29 -A 10-bit conversion has 2 10 (0 to 1024) possible values -Resolution is 1/(2 10 – 1) * 5V = 1/1023 * 5V = 0.00489 V -For a device that is very precise, a 10-bit conversion allows for a higher resolution on the data (high-range accelerometers) Analog vs. Digital
30
30
31
Analog vs. Digital 42.0 C temp Real World 4.20V = 42.0 C 0C = 0V 5V = 3 0V = 0 3 = 11 binary Storage for later use 50C = 5V 31 2 bit ADC 4.20V = 4 (4.20V / 5.0V * 4) = 3.36 = 3 Real World to Analog Voltage ADC = Analog to Digital Converter = Voltage to Binary
32
Sensor & Storage 42.0 C temp Real World 4.20V = 42.0 C 0C = 0V 5V = 1023 0V = 0 860 = 1101011100 binary Storage for later use 50C = 5V 32 10 bit ADC 4.20V = 860 (4.20V / 5.0V * 1024) = 860.14 = 860 Real World to Analog Voltage ADC = Analog to Digital Converter = Voltage to Binary
33
33 Let’s take it for a drive… Arduino Overview: USB 9V DC Power In 14 Digital Input/Outputs 6 Analog Inputs 3.3 V 5.0 VGND ATmega328 - 10 Bit ADC - 16 MHz - 32 KB Flash - I2C & SPI - 40 to +85C Serial I/O External Interrupts 5 V Regulator
34
34 - Launch the Arduino Software 1.0.1 - Sketch Arduino Overview:
35
35 - File/Examples/01.Basics/BareMinimum Arduino Overview:
36
36 Arduino Overview: Compile Upload Serial Monitor Message Box Code
37
37 Arduino Overview: Code
38
38 Arduino Overview: - Connect your Arduino Uno to your laptop via the USB cable - Select right board = Tools/Board/Arduino Uno
39
39 Arduino Overview: 1. Compile code and check for messages 2. Upload code to Arduino (checking communication with board) #1#1 #2#2
40
40 Arduino Overview: - Any problems? - Everyone, please wait until this has been completed
41
41 - Add the following to the sketch… Arduino Overview:
42
42 - Add the following to the sketch… Arduino Overview:
43
43 - Add the following to the sketch… Arduino Overview:
44
44 Arduino Overview: 1. Compile code and check for messages 2. Upload code to Arduino (checking communication with board) #1#1 #2#2
45
45 - Does LED blink? - Change the delay in the sketch and try again - Do you see a change? Arduino Overview:
46
46 - If you can Blink an LED, you can do anything - Why? Arduino Overview:
47
47 - Remove USB cable - Connect an LED (+ lead) to pin 13 and (- lead) to GND - Connect USB cable - Does LED light up? - What is happening? Arduino Overview:
48
48 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
49
49 - Connect resistor row to GND on your Arduino Arduino Overview:
50
50 - Connect + lead of LED to Arduino pin 9 Arduino Overview:
51
51 - Modify sketch to have LED blink on pin 9 through your breadboard - Compile and Upload the code - Do the LEDs blink? - Switch pin number in sketch and hardware - Tinker until all teams here Arduino Overview:
52
52 - Understanding what is happening on pin 9 - High ( = 1 ) and Low ( = 0 ) state - Let’s use the Arduino Serial Monitor to verify - Change delay to 3 seconds Arduino Overview:
53
53 - Modify the sketch to add the following variable Arduino Overview:
54
54 - Modify the sketch to add the following to the setup Arduino Overview:
55
55 - Modify the sketch to add the following to the loop Arduino Overview:
56
56 - Compile and Upload your code - Verify blink is every 3 seconds then… - Click Serial Monitor icon Arduino Overview:
57
57 - “LED is 1 or 0” correspond with on or off of LED? Arduino Overview:
58
58 - Now let’s modify our sketch to add an analog input - Let’s use the potentiometer from HW #4 Arduino Overview:
59
59 - Connect the Red wire to +5V, Black to GND, and White to A0 Arduino Overview:
60
60 - Leave the LED connected to pin 9 but it won’t blink Arduino Overview:
61
61 - Modify your sketch to add the following variable Arduino Overview:
62
62 - Modify your sketch to add the following to your loop - Comment out all LED blink and Serial Print for LED Arduino Overview:
63
63 - Compile and Upload your code - Click Serial Monitor icon Arduino Overview:
64
64 - “A0 is ” should change as you turn the potentiometer Arduino Overview:
65
65 - What does this number mean? - What resolution is it? 8 bit, 10 bit, 16 bit? - Modify sketch to Serial Print both 10 bit value and corresponding voltage value - Recompile and upload - Tinker until everyone is at this point Arduino Overview:
66
66 - Let’s connect the A0 to the LED with software - Turn your potentiometer fully counterclockwise - What do you think will happen? Arduino Overview:
67
67 - Modify sketch to add the following line: Arduino Overview:
68
68 - Compile and Upload - Activate Serial Monitor - Begin turning potentiometer clockwise - What happens? - Why? - 10 bit vs. 8 bit?255 vs 1023? Look at the monitor… Arduino Overview:
69
69 - When 255 is hit, resets - Let’s map our 10 bit analog to a 8 bit digital - Add the following variable to your sketch Arduino Overview:
70
70 - Add the following lines to your loop Arduino Overview:
71
71 - Compile and Upload - Activate Serial Monitor - Begin turning potentiometer clockwise - What happens? - 255 = 1023? Arduino Overview:
72
72 - Potentiometer is acting like an analog sensor - We can now hook up any analog sensor and see its value (at least through serial) - What other sensors can we hook up? - Let’s add some… - But first let’s add the Protoshield Arduino Overview:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.