The Henrietta system is mounted in a picture frame to showcase all of her circuitry. She uses a servo motor to lift the window in front of her picture frame to provide access to the touch pad. The servo feature was included in the project to demonstrate how easy it is to control a servo motor from the PSoC4.


Servo Motor Demo Video

The following video shows the servo motor in operation. There is also an oscilloscope to show the pulse width modulation waveform through the various positions. The firmware is programmed to ramp pulse width from the closed duty cycle to the open duty cycle to minimize inertial stress on the servo gears.

Servo Set Up

Servo motors for remote control use a standardized pulse width modulation scheme to control position. The pulse width can vary from about 1 ms to 2 ms with the centre position at 1.5 ms. The pulses occur at a nominal frequency of 50 Hz or about 20 ms from the start of one pulse until the start of the next pulse. Some motors don't hit their travel limits until 0.8 ms and 2.7 ms, but all of these pulse widths represent a fairly low duty cycle. The motor in this project has a useful range from 0.8 ms to 2.6 ms. With a 1 mHz clock, 2.6 ms corresponds to 2600 counts. Below are the relevant PWM set up screens:


servoClk.png   servoPWM.png


Connection is very straightforward as these types of servo motor respond directly to 3.3 Volt PWM signals even though the power connection to the servo is 5Volts.



PSoC4 and PSoC Creator make implementing a programmable servo motor a simple task.


For more info on the Henrietta Project, which is entered in the Smarter Life Challenge, check these logs: