1 of 24

Unit 3 - Oscillation

Lab 3D: Driven Oscillations

UCLA Physics Department

1

University of California, Los Angeles

Department of Physics and Astronomy

Physics 4AL

2 of 24

Outline of Lab 3D

  • 3D In-Lab
    • Driven oscillations overview
    • Components of the forced oscillation setup
    • Drive the arduino setup at various frequencies and record amplitudes

UCLA Physics Department

3 of 24

Driven Oscillations

UCLA Physics Department

3

4 of 24

Driven oscillations

  • A simple harmonic system undergoes driven oscillations when we apply a periodic driving force that puts energy into the system at a specific frequency

  • The plot above (left) shows the amplitude of the oscillation as a function of time

  • The plot below (left) shows the settling amplitude as a function of driving frequency. The x-axis is the ratio of driving frequency to the natural frequency

5 of 24

Driven Oscillations Objective

  • Driving the system at a frequency equal to its natural frequency is called resonance

  • During resonance the system will oscillate at large amplitudes compared to the amplitude of the driving system

  • At frequencies higher and lower than resonance, the amplitude drops

  • Notice that it takes about a minute for the system to reach a “settling amplitude”

6 of 24

Driven Oscillations Near Resonance

  • When the driving frequency is very close to the resonant frequency, the system will still oscillate near the driving frequency

  • However, the amplitude of these oscillations will change slowly in a sinusoidal pattern with time

  • We want to find the maximum amplitude of these oscillations as a function of the driving frequency

max. amplitude = (16 cm - 14 cm) / 2 = 1 cm

7 of 24

Driven Oscillations Objective

  • We will be using an external motor to add a periodic force to the circuit. We will use a 2nd arduino (arduino B) to control our forcing frequency

  • The forces on the mass are the sum of spring, the damping force from air resistance and the external periodic force

  • You will be measuring the amplitude of the oscillations as measured by the ultrasound from your 1st arduino (arduino A) after a settling period for several values of the forcing frequency to reproduce the bottom curve

8 of 24

Experimental Setup

UCLA Physics Department

8

9 of 24

Materials - Motor driver

  • The motor driver will be powered and controlled by the arduino and it will move the clip up and down

  • Make sure you “unlock” the motor driver for use

  • We will attach our spring at the end of the clip

10 of 24

Materials - L293D

  • The L293D is an integrated circuit that uses voltage pulses from the Arduino to drive the motor. You have one in your Arduino kit

  • There are two inputs as well as the GND from the Arduino to the L293D (shown later). One of them enables the output of signals from the Arduino to the motor driver

  • The Arduino ENABLE1 pin is marked in the control software with the ENABLE variable

  • The INPUT2 pin is marked in the control software with the DIRA variable. By switching this pin between high and low voltage, we can control the oscillations of the motor

11 of 24

Materials - Power supply module

  • The power supply module allows us to add additional current to the circuit, allowing us to increase the amplitude of the motor driver. This power supply module is in your Arduino kit

  • The module attaches to the full-size breadboard. Orient the module so that the + voltage side of the power supply lines up with the + strip on the breadboard

  • The power supply module has two jumper cables. Attach these jumper cables between the pins labelled 5V

12 of 24

Setup - Motor driver

  • Mount the motor driver to the spring stand such that it is facing downward and the axis of the spring is perpendicular to the ground

  • Attach the spring to the motor driver using the bottom alligator clip

13 of 24

Setup - Motor driver

  • Ensure that the red and black wires are plugged into your motor driver

  • At the other end of these wires, attach the wires from your kit that we will connect to the L293D chip

14 of 24

Setup - Power Supply & L293D

  • Place the L293D in the middle of the breadboard and position it such that the notch points towards the power supply module
  • Use the wiring diagram on the next slide for Arduino B

  • Arduino A is the same as you have used in the last few labs, we will connect the bluetooth module again but we will not be using the accelerometer

15 of 24

Setup - L293D wiring

Input 2: Pin 3

GND

Output 2

16 of 24

Setup - Power supply module

  • Now plug in the batteries to the external power supply

  • Make sure that the LED on the power supply is turned on. If not, press the white on/off button

17 of 24

Setup - Arduino A

  • Since we only use the ultrasonic sensor, we will be using the code from previous labs

  • Attach your arduino setup using string to the bottom of the spring. Make sure that your Arduino is <= 20 cm off the ground, as we want very precise distance measurements

  • Connect your Bluetooth module to your computer to verify that you can get data

18 of 24

Data Collection

UCLA Physics Department

18

19 of 24

Driven Oscillations Code

  • Upload the driving force code to Arduino B (the one connected to L293D)
  • In this code, you will change the variable forceHalfPeriod to change the delay between moving the spring down and moving it back up. This sequence creates a periodic square wave. Set the forceHalfPeriod to half the time period of the system (the unit for forceHalfPeriod is ms).
  • You know the approximate k (18 N/m) and the approximate mass (0.2 kg). With this information, we can find the approximate frequency and time period of the system.

  • With the values of k and m above, T ~ 0.7 s which means that we need to set the forceHalfPeriod to T/2 which is 350 ms to achieve resonance
  • Your particular setup may have a different resonant frequency, but it should be similar

20 of 24

Data Collection - Resonance Plot

  • Set the forceHalfPeriod to half the natural time period of the system

  • Hold the reset button on Arduino B and let Arduino A setup come to rest. Release the reset button and observe the motion of the Arduino A setup

  • If Arduino A is oscillating faster than the forcing motor, decrease the forceHalfPeriod, and if the forcing motor is faster, increase the forceHalfPeriod

21 of 24

Data Collection - Resonance Plot

  • Once you are at the correct frequency, open the serial monitor to get data from the ultrasonic sensor on Arduino A. Plot this distance vs. time

  • At resonance, the amplitude of the system should steadily increase to a maximum (about 1 cm in this lab). Note down this maximum amplitude

  • We may not get the exact resonant frequency, but we should be able to get quite close. Refer to slide 6 to see what the behavior is near resonance

22 of 24

Data Collection - Amplitude vs. Frequency

  • Next, generate a scatter plot like the bottom plot by plotting the settling amplitude vs. frequency

  • Change the forceHalfPeriod by about 20 ms in the code to get driving frequencies above and below the natural frequency of the system

  • Wait about 1 minute per data point to ensure that the system settles, then take about 10 periods of oscillation

23 of 24

Data Collection - Amplitude vs. Frequency

  • Record the settling amplitudes and driving frequencies above and below the natural frequency

  • Record data for >= 2 driving frequencies on either side of resonance for >= 5 total data points (2 per side + 1 for resonance)

  • The x-axis of this scatter plot is the ratio of driving frequency to the natural frequency:

24 of 24

Post-Lab Requirements for lab 3D

  • Plot your ultrasonic sensor distance vs. time at or near to the resonant frequency of your system. State the resonant angular frequency of your system, calculated from forceHalfPeriod

  • Create a scatter plot of settling amplitude vs. the ratio between the driving frequency and the natural frequency of the system. This should include >= 5 data points (>= 2 below resonance, >= 2 above resonance, 1 at resonance). Use both plt.scatter and plt.plot to generate this plot