Shop OBEX P1 Docs P2 Docs Learn Events
PWM servo — Parallax Forums

PWM servo

ervieervie Posts: 13
edited 2007-12-03 22:00 in General Discussion
Hello,

I have a question about the PWM object. The following is said in the manual(p184, 204 in the PDF) about the PWM object :

To set the duty cycle to 50%, for example, you’d set the high time and low time to be 1 (or any two equal numbers from 1 to 255).

Why have servo's a larger lowtime than the maximum of 255 ? I'have always used 2304 as my lowtime and it worked perfectly.
I am asking this question because i am working on normal motor with the L298 controller, and it isn't working yet. The PWM seems to be the problem.

Thanks,

ervie

(I hope you understand my english...)

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-11-30 19:44
    Servos require a 1 to 2 millisecond pulse, every 20 milliseconds.
    The system tick for the javelin is 8.68 microseconds.
    20msec/8.68usec = 2304
    1.0msec/8.68usec = 115
    1.5msec/8.68usec = 173
    2.0msec/8.68usec = 230
    Since pulsewidth is much smaller than 20msec, you can keep the low time constant.

    regards peter
  • ervieervie Posts: 13
    edited 2007-12-03 22:00
    Thanks for your reply !

    It really proved usefull, our L298 works good at the moment. The post gaves us more insight in the electronic device.

    We made a mistake with the batteries, the were empty...
Sign In or Register to comment.