Physics 4
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.

Unit 1 - Training Labs

Introduction to Python and Arduino

Unit 1 - Introduction to Python and Arduino

The purpose of this unit is to introduce you to the basics of creating circuits with an Arduino micro-controller and the basics of programming Python.
  • Lab 1A - Introduction
  • Lab 1B - Python training/Multimeter and Arduino training - Flashing LED
  • Lab 1C - Ohm's Law - Measuring with Multimeter and Arduino
  • Lab 1D - Deviation of Ohm's Law - VI curve of LED
  • Lab 1E - Reaction Time for LED and Buzzer
  • Lab 1F - Reaction Time for RGB LED, Report Writing

Lab 1A - Introduction

Pre-Lab 1 - Arduino Check

In this class, we will be creating circuits using an Arduino. Before the first class, please purchase an Arduino and perform the Pre-course Setup. 

Lab Instructions 1A - Introduction to Arduinos

  • Lab instructions
  • In-lab assignment 
    • Due 11:59PM Tuesday 1/7 for MW classes, 11:59 Wednesday 1/8 for T/TH class​

Pre-Lab 1B - Python Setup

All analysis in this class will be done using the Python programming language. To keep the data and code centralized, we will be storing the code on Google Drive and compiling it with the Colaboratory Jupyter notebook compiler. To ensure against academic dishonestly, all code and data will be stored in a class-wide Google Drive that the instructors have access to. There will be no portion of the tutorials turned in, but is vital for the next in-class Python tutorial. ​For each Colaboratory assignment, download the tutorials to your own Google Drive and run each cell. Complete the pre-lab 2 assignment notebook and submit on Gradescope. Consult the pre-course setup for instructions on how to run the Jupyter notebooks. 
  • Tutorial 1 - Basic Programming
  • Tutorial 2 - Arrays
  • Tutorial 3 - Basic Plotting
  • Sample dataset
  • Beginner's Python Pre-lab Notebook (Pre-lab 1B assignment)

Lab Instructions 1B - Introduction to Python and LED control

In this lab, we will continue to learn some basic Python programming. Download the Python Jupyter notebooks and upload it to your Google Drive folder. Follow the linked Python tutorial and complete the assignment by the end of class. The assignment does not need to be turned in, but it will be checked off by the TA for the day's participation credit. The plots generated from the Python in-class assignment will be submitted to Gradescope for evaluation. 
  • Python in-class assignment​
We will also be creating circuits with LEDs. 
  • Arduino in-class assignment
    • Due 11:59PM Sunday 1/12 for MW classes, 11:59 Monday 1/13 for T/TH class
  • Lab instructions​​
  • Instructor Slides For Arduino and DMM

Pre-Lab 1C

In the following lab, we will be using our Arduino kit ultrasonic sensor, the HC-SR04. Before the lab, take out the sensor and examine it closely. Additionally, unwrap the "Prototype Expansion Board" as we will be using this in the following lab. In this pre-lab you will understand the underlying principles behind the sensor. Download the slides, answer the questions, convert them to a PDF file and upload them to GradeScope. Due 11:59PM Sunday 1/12 for MW classes, 11:59 Monday 1/13 for T/TH class
  • Pre-Lab Slides

Lab Instructions 1C

Instructions
  • Lab instructions
  • Lab assignment
    • Submit to Gradescope 11:59 Tuesday for MW labs, 11:59 Wednesday for T/TH labs  
  • Instructor Slides for Ohm's Law

Jupyter Code
  • Data analysis Jupyter notebook

​Necessary code:
  • Ultrasound operation Arduino code

Lab Report 1 - Training

No report due at the end of this section.

Reference Slides

  • Reference slides 1A
  • Reference slides 1B
  • Reference slides 1C
edited Jan 19, 2023 by Javier Carmona
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.