Connect the oscilloscope probe to PA4 for verifying the correct behavior of the DAC. Run the program. Does everything work as expected? Connect everything as shown in figure 8. Run your program again. Turn on the motor changing the motor’s switch to the position indicated by 1. Does everything work as expected? Observe in particular the voltage shown in the panel meter. The voltage should never exceed 3V for avoiding damaging the board. Turn off the motor changing the motor’s switch to the position indicated by 0. Fig 8. Part VII: On-off closed-loop motor control Connect everything as shown in figure 9. Elaborate a program to: Generate a timer interrupt with a time interval equal to the motor’s time constant divided by 20. When the interrupt is generated, Measure the voltage coming from the tachometer (via PC1). Convert this voltage to rps and send it to the LCD display. If the voltage delivered by the ADC is less or equal than the setpoint (1.5V) set the DAC output value to 3V; else set the DAC output to 0V. Download the code to the STM32F3 discovery board. Connect the oscilloscope to the ADC input. Turn on the motor changing the motor’s switch to the position indicated by 1. Run the program. Get the time response of the system using the oscilloscope. Does everything work as expected? Turn off the motor changing the motor’s switch to the position indicated by 0. Part VIII: Proportional closed-loop motor control Connect everything as shown in figure 9. Calculate KP using Table 3. Elaborate a program to: Generate a timer interrupt with a time interval equal to the motor’s time constant divided by 20. When the interrupt is generated,
Connect the oscilloscope probe to PA4 for verifying the correct behavior of the DAC. Run the program. Does everything work as expected? Connect everything as shown in figure 8. Run your program again. Turn on the motor changing the motor’s switch to the position indicated by 1. Does everything work as expected? Observe in particular the voltage shown in the panel meter. The voltage should never exceed 3V for avoiding damaging the board. Turn off the motor changing the motor’s switch to the position indicated by 0. Fig 8. Part VII: On-off closed-loop motor control Connect everything as shown in figure 9. Elaborate a program to: Generate a timer interrupt with a time interval equal to the motor’s time constant divided by 20. When the interrupt is generated, Measure the voltage coming from the tachometer (via PC1). Convert this voltage to rps and send it to the LCD display. If the voltage delivered by the ADC is less or equal than the setpoint (1.5V) set the DAC output value to 3V; else set the DAC output to 0V. Download the code to the STM32F3 discovery board. Connect the oscilloscope to the ADC input. Turn on the motor changing the motor’s switch to the position indicated by 1. Run the program. Get the time response of the system using the oscilloscope. Does everything work as expected? Turn off the motor changing the motor’s switch to the position indicated by 0. Part VIII: Proportional closed-loop motor control Connect everything as shown in figure 9. Calculate KP using Table 3. Elaborate a program to: Generate a timer interrupt with a time interval equal to the motor’s time constant divided by 20. When the interrupt is generated,