Unit 1 - Training�Lab 1C : Introduction to Multimeter and Arduino code
UCLA Physics Department
University of California, Los Angeles
Department of Physics and Astronomy
Physics 4AL
Outline of Lab 1C
UCLA Physics Department
Introduction to Digital Multimeter
UCLA Physics Department
Digital Multimeter
Potential measurements with Digital Multimeter
DC Voltage
AC Voltage
Resistance
Continuity
Capacitance
Frequency
Current (smallest)
Current (medium)
Current (largest)
Use left input
Measuring resistance with a multimeter
Set the multimeter to the 𝛀 symbol. Connect the two leads to the two ends of a 100 Ω resistor without connecting to any power source. The multimeter might take a moment to settle on a value, but it will read out a value close to 100 ohms.
Resistance measurements (Checkpoint 1)
UCLA Physics Department
Stated Resistance (Ω) | Measured resistance (Ω) |
| |
| |
| |
Introduction to Arduino code
UCLA Physics Department
Arduino Input/Output
Input/output pins
PWM Pins(~): 3, 5, 6, 9, 10, 11
Digital Pins: 2, 4, 7, 8, 12, 13
USB input/output/power
Battery power
Output power + ground
Analog Input
Connecting an Arduino
UCLA Physics Department
10
Arduino Connection
UCLA Physics Department
Code basics
UCLA Physics Department
Code basics - void setup()
UCLA Physics Department
UCLA Physics Department
void setup() {
Commands here
}
Code basics - void loop()
UCLA Physics Department
void loop() {
Commands here
}
Code Basics - Variables
UCLA Physics Department
Code Basics - Variable types
UCLA Physics Department
Code Basics - Digital Input/Output
UCLA Physics Department
Example code - Comments
UCLA Physics Department
Example code - Upload
UCLA Physics Department
Testing Arduino with multimeter
UCLA Physics Department
Testing Arduino with multimeter
UCLA Physics Department
Digital Voltage Measurements (Checkpoint 2)
Measurement | Voltage (V) |
5 V Pin (instructions in slide 21) | |
3.3 V Pin (this pin is close to the 5V pin) | |
Digital HIGH Pin (which pin is this in your uploaded code?) | |
Introduction to circuit components
UCLA Physics Department
Electrical Components
Name of Component Electrical Diagram Actual Component Arduino Schematics
Component Polarity
Polarized
Non-Polarized
Breadboard
Black bars denote which holes are connected.
All pins on red column are connected. Similarly all pins on blue column are connected.
Breadboard Layout Example
LED operation
Commands: timing
29
External LED Blink (Checkpoint 3)
30
Code basics : Analog Input/Output
UCLA Physics Department
LED Brightness Changing
fadeAmount = -fadeAmount;
}
Note: The LED pin is changed to pin number 9. Only the ponds with the squiggly line (~) in front of them are capable of analog control.
You do not have to type in the code, you can download it here
LED Brightness Changing (Checkpoint 4)
Troubleshooting
This slide will be useful throughout the quarter.
UCLA Physics Department
Downloads and references
UCLA Physics Department
Post-lab Week 2 requirements from Lab 1C
UCLA Physics Department
36
Resistance measurements
UCLA Physics Department
Stated Resistance (Ω) | Measured resistance (Ω) |
| |
| |
| |
Digital Voltage Measurements
38
Measurement | Voltage (V) |
5 V Pin | |
3.3 V Pin | |
Digital HIGH Pin | |
External LED blink and brightness
39