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.
http://www.element14.com/community/videos/10919/l/the-henrietta-project--servo-motor-operation
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:
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.
Conclusions
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:
videos:
http://www.element14.com/community/videos/10720/l/henrietta-eyes-animation-demo
http://www.element14.com/community/videos/10789/l/the-henrietta-project--bluetooth
http://www.element14.com/community/videos/10808/l/the-henrietta-project--voice-control
http://www.element14.com/community/videos/10809/l/the-henrietta-project--light-sensor
http://www.element14.com/community/videos/10810/l/the-henrietta-project--gps-clock
http://www.element14.com/community/videos/10851/l/the-henrietta-project--pc-app
http://www.element14.com/community/videos/10854/l/the-henrietta-project--pc-app-operation
http://www.element14.com/community/videos/10850/l/the-henrietta-project--touch-pad
http://www.element14.com/community/videos/10876/l/the-henrietta-project--android-app