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:

servoSetup1.png

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.

 

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:

http://www.element14.com/community/videos/10631/l/smarter-life-challenge--the-henrietta-project-intro

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2013/12/15/smarter-life-challenge--the-henrietta-project

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2013/12/17/smarter-life-challenge--the-henrietta-project--touch-screen-subsystem

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2013/12/23/smarter-life-challenge--the-henrietta-project--personality-infusion

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2013/12/29/smarter-life-challenge--the-henrietta-project--wire-wrap-versus-jumpers

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/01/smarter-life-challenge--the-henrietta-project--bluetooth-operation

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/02/smarter-life-challenge--the-henrietta-project--furnace-interface

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/02/smarter-life-challenge--the-henrietta-project--light-sensor

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/03/smarter-life-challenge--the-henrietta-project--gps-clock

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/02/smarter-life-kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/10/smarter-life-challenge--the-henrietta-project--pc-app

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pioneer_kit/blog/2014/01/12/smarter-life-challenge--the-henrietta-project--android-app

 

videos:

http://www.element14.com/community/videos/10631/l/smarter-life-challenge--the-henrietta-project-intro

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