Hi !
I just try the servo component in the lastest Flowcode 4 for PIC.
I found a pulse between 1000µS to 2.280µS.
The servomotor I used permit a pulse between 600µS to 2400µS
What can I change in the PIC_Servo.c file to access to the full range of my motor ?
Thank you so much
Mathy
About the servo component
Moderator: Benj
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Re: About the servo component
The servo duty cycle is set in the TIMER1_COMPA_vect interrupt handler.
The value is created by adding the servo position value to the trimm offset value. The result is then multiplied by a scaling factor, MX_SERVO_CLK_COUNT, before being sent to the timer registers.
Modification of the adjustment range will require changes to be made to these calculations in the C source code.
The value is created by adding the servo position value to the trimm offset value. The result is then multiplied by a scaling factor, MX_SERVO_CLK_COUNT, before being sent to the timer registers.
Modification of the adjustment range will require changes to be made to these calculations in the C source code.
Re: About the servo component
Hi all,
Almost 2 years, I raise the post for more details on this issue.
What needs to change as the code to be able to operate the servos angles larger.
My engine work equally 600US and 2400us.
Best regards
Bruno
Almost 2 years, I raise the post for more details on this issue.
What needs to change as the code to be able to operate the servos angles larger.
My engine work equally 600US and 2400us.
Best regards
Bruno
Re: About the servo component
Hi Bruno
Can you post a flowchrt and what type of servo are you using
Regards
Dazz
Can you post a flowchrt and what type of servo are you using
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: About the servo component
Hello Diaz,
I'm using the servo on the Actuator Training Panel.
The reference is HS-311. The documentation says that the angle is 120 °, but the test shows that can have up to 180 °.
I took the example of the following resources: Worksheet 3 "Driving the servo motor" page12
http://www.matrixmultimedia.com/resourc ... S-80-2.pdf, we can control the servo with time to 600uS 2400us; also the angle of rotation is 180 °
but the following examples: http://www.matrixmultimedia.com/resourc ... php?id=532, the postion of Sevos is limited to a time of 1ms to 2ms when using the component "servo": also, the angle of rotation is limited to 120 °.
How to change these default values?
Best regards
Bruno
I'm using the servo on the Actuator Training Panel.
The reference is HS-311. The documentation says that the angle is 120 °, but the test shows that can have up to 180 °.
I took the example of the following resources: Worksheet 3 "Driving the servo motor" page12
http://www.matrixmultimedia.com/resourc ... S-80-2.pdf, we can control the servo with time to 600uS 2400us; also the angle of rotation is 180 °
but the following examples: http://www.matrixmultimedia.com/resourc ... php?id=532, the postion of Sevos is limited to a time of 1ms to 2ms when using the component "servo": also, the angle of rotation is limited to 120 °.
How to change these default values?
Best regards
Bruno