cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

gbrochard
New Contributor

Hello

currently high school student in Terminal STI2D in france, i need in the frame of my classes, control a servo motor with a PSoC Card. Despite a many research in web, I can't find any information.

could you help me. Please.

 

Cordially

 

Gabin BROCHARD

0 Likes
3 Replies
BiBi_1928986
Valued Contributor

Hello.

Have a look at this page for detailed description on how a servo works:
Servo (radio control) - Wikipedia
Hobby Servo Tutorial - learn.sparkfun.com

There are thousands of examples on the web showing how a servo works that you can adapt for your project.

Regards.

0 Likes
odissey1
Honored Contributor II

gbrochard,

To summarize Wiki, to control a servo you need to generate a train of short pulses (between 1ms to 2ms long), repeating each 20ms (50Hz). When pulses length is 1ms, the servo is in 0deg position, and for 2ms pulses it rotates to 90deg position.

     The pulse train can be generated by various techniques, the simplest one would be using  PWM block in a Single Shot mode, triggered by a 50Hz clock. When PWM Compare register varies between 100 to 200 (using 100kHz PWM clock), the output pulse will change from 1ms to 2ms. 

     For more meaningful help, please provide the servo's part number. 

0 Likes
WaMa_286156
Contributor II

If you are looking at an R/C servo motor system, you send out a series of pulses at a base frequency.  If I remember correctly, the "center" frequency is 1,000 hertz.  moving higher that 1,000 hertz moves the servo one direction, lower than 1000 hertz moves the servo another direction.

Try using some PWM's.

If you are controlling a stepper motor, I have an article at https://socmaker.com/?p=940 that shows the internal PSOC5LP components to help you do that.

 

 

0 Likes