Name: NetID:
Lab 5.1: 07/18/2023 Lab 5.2: 07/25/2023
Due Date: 8/1/2023
Statement of Purpose:
The lab is subdivided into two parts. Each part purports to implement a method that controls a
DC-motor. The first part of the lab uses pulse width modulation (PWM) to control the motor. A
PWM generates an analog signal out of a digital one by tuning the duty cycle of the digital
signal. However, the PWM signal coming from our Arduino Nano Every has two components: a
DC offset and a sinusoidal signal. Therefore, a loss pass filter is implemented to attenuate the
sinusoidal part of the PWM signal. Finally, a MOSFET transistor is used to amplify the filtered
PWM signal going through the motor.
The second part of the lab dismisses the low pass filter circuit and opts for a closed loop control
of the motor. In this closed loop control, the motor is intended to reach a reference RPM value.
The actual RPM is calculated considering the number of magnets passed every loop time of the
motor. The difference between the reference RPM value and the actual RPM of the motor is then
calculated. This difference is multiplied by a constant and added to the PWM signal thus
adjusting the RPM of the motor close to the reference RPM.
Plan
Figure 1: Schematic of the circuit to control the motor using fitltered PWM signal.
, Figure 2: Fritzing Breadboard of the circuit to control the motor using fitltered PWM signal.
Figure 3: Schematic of the circuit to control the motor in a closed loop.