PWM? phase width modulation

Thread Starter

Rk17

Joined Apr 23, 2011
43
what does phase width modulation mean? Im searching the net for info on how to program a pic to control a servo but i kinda see this a lot. Can someone please ellaborate it tnx!
 

BillB3857

Joined Feb 28, 2009
2,570
Don't know for a fact, but I would guess that Phase Width Modulation would be equated to having SCR controls operated at a line frequency. By controlling the phase relationship of the SCR triggers to the line, the output is controlled. Again, just a guess, but I think it sounds reasonable. How about other opinions.
 

DerStrom8

Joined Feb 20, 2011
2,390
I have only used PWM with a 555 timer--basically, all it does is adjust the duty cycle of a square wave signal. In other words, it changes the length of on time vs off time during one cycle. Make sense?
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
Don't know for a fact, but I would guess that Phase Width Modulation would be equated to having SCR controls operated at a line frequency. By controlling the phase relationship of the SCR triggers to the line, the output is controlled. Again, just a guess, but I think it sounds reasonable. How about other opinions.
I'd support you on that, but a guess as well.
 

Thread Starter

Rk17

Joined Apr 23, 2011
43
oh sori bout that.. yeah its pulse width modulation,, nwei,, how could you control a servo with it? can you please share me any source code relating to this? i wish to control a servo with it.. My idea is to rotate the servo to +90 then -90 with a given timespan,,for example +90 degrees to - 90degrees every 2 seconds. But how could i program that in c code? or .asm code? im using mplab compiler v 8.66 tnx
 

djsfantasi

Joined Apr 11, 2010
9,156
A good description of hobby servos is available at this link http://www.lynxmotion.com/images/html/servo01.htm

On that page is a description of how to control a servo by varying a pulse signal. I have extracted it below:

Controlling a Servo
Servos are controlled with a 5vdc positive-going variable pulse width that repeats every 20mS. The pulse length determines the servo output shaft position but the 20mS frame rate is not position critical. The frame rate does need to repeat at least every 20mS or it will lose power or even stutter. The servo was designed for pulse widths that vary from 1.0mS to 2.0mS, where 1.5mS is centered. In the normal range the servo will move +/- 45 degrees from the centered (neutral) position.
Most servos can be positioned to around +/- 90 degrees from neutral by expanding the range to 0.75mS to 2.25mS. However, care must be taken to avoid commanding a servo beyond its capabilities. Personal experience with Hitec servos reveals all of the standard size servos can achieve a full 180 degree range. Micro and special purpose servos are often limited to less than 180 degrees.
 

BillB3857

Joined Feb 28, 2009
2,570
It looks like the output gets wider and narrower to me;). I really think it is all in the semantics and the terms could almost be used interchangeably. Similar to the Lightfire's thread about "ground".
 
Top