| View previous topic :: View next topic |
| Author |
Message |
florianfreitag
Joined: 07 Apr 2010 Posts: 4 Location: Germany, Karlsruhe
|
Posted: Wed Jun 16, 2010 10:23 pm Post subject: Which values for a Hitec HS-645MG Servo, should run OS V3 |
|
|
Hello,
I want to use Hitec HS-645MG servos with the OpenServo. But when I compile the firmware its not working. Which registers and values I have to use for this servo?
Because there is no default HARDWARE_TYPE for this servo and the HS-475HB values are not working correctly.
So I need following informations, but where to find:
| Code: |
#elif (HARDWARE_TYPE == HARDWARE_TYPE_HITEC_HS_645MG)
// Hitec HS-645MG hardware default PID gains.
#define DEFAULT_PID_PGAIN 0x0600
#define DEFAULT_PID_DGAIN 0x0C00
#define DEFAULT_PID_IGAIN 0x0000
#define DEFAULT_PID_DEADBAND 0x01
// Hitec HS-645MG hardware default mininimum and maximum seek positions.
#define DEFAULT_MIN_SEEK 0x0060
#define DEFAULT_MAX_SEEK 0x03A0
// Hitec HS-645MG hardware default pwm frequency divider.
#define DEFAULT_PWM_FREQ_DIVIDER 0x0040
|
These values are from me and they aren't working! And at last, I want to work with the CVS OSV3 stable version but I also want to test things with the dev-version. Because I saw there are a few differences.
It would be very nice if somebody can help me!! |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 350 Location: Maine USA
|
Posted: Thu Jun 17, 2010 9:27 am Post subject: |
|
|
| Perhaps other can help with the information you have posted. I would need more information. What's the platform you are compiling with, Linux, windows, other? Did you check out a CVS copy of the code? If so did that compile with out changes? If not what were the error messages? Have you made changes to the code since it was checked out? |
|
| Back to top |
|
 |
rotdrop
Joined: 15 Dec 2009 Posts: 16 Location: Germany, Ruhrpott
|
Posted: Thu Jun 17, 2010 10:52 am Post subject: |
|
|
I have done some very quick testing with a Hitec 645MG, and for me the values for used for the 475HB in the config.h file seem to work as well for the 645MG, I have only adjusted the minium/maximum seek positions.
So what do you mean by "not working correctly"?
Best regards,
Claus |
|
| Back to top |
|
 |
florianfreitag
Joined: 07 Apr 2010 Posts: 4 Location: Germany, Karlsruhe
|
Posted: Fri Jun 18, 2010 2:06 am Post subject: |
|
|
Thanks for your quick answers!
My platform is Windows XP with AVR Studio and I've checked out the latest CVS snapshot. There are no other modifications on the code. There are no compiler errors and no warnings. The error is that the servo goes direct to his min or max position or it does nothing.
I think these values are not correct. @rotdrop What are your values for these variables?
Best regards! |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 350 Location: Maine USA
|
Posted: Fri Jun 18, 2010 9:53 am Post subject: |
|
|
Max values often means the motor leads are backwards. The software commands CW, and the motor goes CCW, which makes the error signal increase, so it commands faster CW, but it goes faster CCW, until it hits the limit.
Doing nothing can mean a variety of things. Some common ones include a need to set PID setting, or turning on and off the PWM. Compiling in the PID settings is handy, however you can change them on the fly via I2C. Is this servo being commanded via I2C? |
|
| Back to top |
|
 |
rotdrop
Joined: 15 Dec 2009 Posts: 16 Location: Germany, Ruhrpott
|
Posted: Thu Jun 24, 2010 11:31 am Post subject: |
|
|
@florian: After porting the OSIF test application from Qt3 to Qt4 I can confirm that my instance of the OS controller installed in my version of a Hitec 645MG servo works with just the same PID values as the Hitec 475. Didn't test it in a real application, though.
Cheers,
Claus |
|
| Back to top |
|
 |
|