Section13.2Day 15 In-Class: Commanding a Servomotor
Today we’ll design the signal that commands a servomotor, and we’ll produce it on the STM32C031C6. We’ll start with what is inside the servo and what its feedback loop does, then work out how TIM14 has to be set up for a 50 Hz pulse, and then build a program that turns the potentiometer’s position into a pulse width and check that pulse on the AD2 oscilloscope. At the end we’ll look at how the servo is powered, and wire it.