Question: Use the PWM feature on the microcontroller to drive the Hitec HS-311 hobby servo motor shown in E8.5. The control signal is for this servo

Use the PWM feature on the microcontroller to drive the Hitec HS-311 hobby servo motor shown in E8.5. The control signal is for this servo motor is a PWM signal (5 volts) at frequency of 20-60 Hz. The pulse width of the control signal, which ranges from 0.7 to 2.4 ms, controls the position of the hobby servo. At 0.7 ms, the servo is at one extreme of its motion range, while at 2.4 ms it is at the other extreme. At 1.5 ms pulse width, the servo is in the center or mid-position. This servo has a motion range of ± 90 °. Use the rotary pot to adjust the pulse width (or duty cycle) setting of the control signal. When the rotary pot is at one extreme of its travel, the pulse width setting should be 0.7 ms. Turning the pot clockwise from that position should increase the pulse width setting. When the rotary pot is at the other extreme of its motion, the pulse width setting should be 2.4 ms. Implement an infinite do-loop to read the desired pulse width and to adjust the duty cycle of the PWM signal (use PIN #3 for PWM). Add a small delay (100 ms) in each run through the loop.

(LOOKING FOR SHORT ARDUINO CODE THAT DOES NOT USE THE SERVO LIBRARY)

 

Step by Step Solution

3.44 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To drive the Hitec HS311 hobby servo motor using a microcontrollers PWM Pulse Width Modulation feature youll need to configure the PWM signal with the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!