| View previous topic :: View next topic |
| Author |
Message |
nighteagle
Joined: 29 Aug 2010 Posts: 6
|
Posted: Tue Aug 31, 2010 8:52 am Post subject: |
|
|
Hi, kbb
so i build the bootloader from the source-codes...
I create a new projekt an added the files and then the AVR-Studio give me succesfully compiled hexfile.
I want to use RC-Signalling and enabled the pulse control in the source code.
But where can i find the default velocity parmaters in the source code?
With i2c and the osif the paramters can not store into eeprom. I think this is a bug? |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Tue Aug 31, 2010 8:24 pm Post subject: |
|
|
| nighteagle wrote: | I use an AVR-Progger to flashed this hex:
/OpenServo/AVR_OpenServo_V3/ATmega168_OpenServo.hex
With this firmware all goes true. But this version haven't had the "I" paramater!?!? |
Correct, that version does not fully implement a PID and there is also no apparent “velocity control”.
| nighteagle wrote: | So i'm looking for the version with fully PID-Parameters.
Which ist the right hex-file?
I use a standard Hitec-Servo with an poti.
Have i to use this version?:
ATmega168_OpenServo_V3-pot_twichk.hex
Can i set the velocity so that the servo with PWM-RC-Mode use this velocity?
I set the parameters with osif in I2C and use the "save-button" to save it in eeprom.. i read the paramters to verify and all seems okay.
But the servo use the max. velocity in RC_Mode..
What the problem? |
None of the .hex files currently found in “experimental” have “pulse control enabled”; based on your next message I think you may now be able to build the right one yourself? You will need to check my reply to your adjacent post with regard to setting the velocity.
Last edited by kbb on Tue Aug 31, 2010 8:29 pm; edited 1 time in total |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Tue Aug 31, 2010 8:25 pm Post subject: |
|
|
| nighteagle wrote: | so i build the bootloader from the source-codes...
I create a new projekt an added the files and then the AVR-Studio give me succesfully compiled hexfile.
I want to use RC-Signalling and enabled the pulse control in the source code.
But where can i find the default velocity parmaters in the source code?
With i2c and the osif the paramters can not store into eeprom. I think this is a bug? |
An oversight rather than a bug; I would guess it never came to anyones direct attention before now.
You’re up and running (more or less)?
You will note the need to edit “config.h” to turn on the functionality you need, and off the functionality you do not need. And redo it if you re-download it on top of what you have already (be careful not to lose any changes you make that you need to keep). I usually work in a separate directory.
Currently there is no way to set a “default” velocity over I2C/TWI and have it retained across power-cycling or reboots.
You could set a permanent default. If you look in main.c you will find:
| Code: | | registers_write_word(REG_SEEK_VELOCITY_HI, REG_SEEK_VELOCITY_LO, 0); |
The 0 is the default.
However, that is probably not much use if you only use RC PWM to control it unless you only need a fixed velocity.
It appears you would also need to remove
| Code: | // The seek velocity will always be zero.
registers_write_word(REG_SEEK_VELOCITY_HI, REG_SEEK_VELOCITY_LO, 0); |
from pulsectl.c.
I have not tried an OpenServo with pulse control, but will see if I can find time to get one set up for testing. So the obvious caveat with the above is I have not tested it.
In due course we should easily be able to add a default velocity register. We just need to be careful to slot it into the right place in the address range (i.e. avoid conflicts with “-dev”). |
|
| Back to top |
|
 |
nighteagle
Joined: 29 Aug 2010 Posts: 6
|
Posted: Tue Aug 31, 2010 8:57 pm Post subject: |
|
|
Ohhh Okay,
i change the velocity in the main.c and the pulsctl.c
"In due course we should easily be able to add a default velocity register. "
Joop!
Good Idea... for many application is a permanent slower speed needed and for a very good look of openservo is a permanent register for the velocity a good idea.
In the RC-Line you can configure your own perfect servo with openservo when this register is also permanent as the others.
mfg
nighteagle |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Tue Aug 31, 2010 9:04 pm Post subject: |
|
|
Currently there are three branches of V3 firmware in CVS:
AVR_OpenServo_V3
AVR_OpenServo_V3-dev
AVR_OpenServo_V3-experimental
As far as I can see both AVR_OpenServo_V3 and AVR_OpenServo_V3-dev ended up being divergent development branches. Both appear to have had useful changes made to them (possibly only OpenEncoder support has been added in the case of AVR_OpenServo_V3).
I needed to provide a “quick fix” to a firmware with OpenEncoder support, so we recently gained AVR_OpenServo_V3-experimental (a modified version of AVR_OpenServo_V3). It has also side tracked me from the V4 board design.
So the situation is a bit untidy and I also suspect that there may be changes between AVR_OpenServo_V3 and AVR_OpenServo_V3-dev that may be inconsistent with some software. There is also my own experimental firmware (which is where I got the changes to create AVR_OpenServo_V3-experimental from AVR_OpenServo_V3).
What to do?
Due to shortness of time (and a desire to get back to the project that I want to use OpenServo for):
1. Complete the full rotation support for the current AVR_OpenServo_V3-experimental.
2. See about adding a non-volatile (or default) velocity register to it.
Then we either leave it be for a bit and concentrate on V4 (the grand design would be to create a single firmware code base that could be built for either platform). Or create a new AVR_OpenServo_V3-experimental based on AVR_OpenServo_V3-dev. This would entail:
1. Adding the OpenEncoder support to it.
2. Adding the changes from the pre-existing AVR_OpenServo_V3-experimental.
3. Add some other minor improvements from my other experimental firmware.
Then think about V4?
Comments? |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 350 Location: Maine USA
|
Posted: Tue Aug 31, 2010 11:38 pm Post subject: |
|
|
| I'd like to vote for 1. Complete the full rotation support for the current AVR_OpenServo_V3-experimental. Then velocity control. They both sound like fairly simple fixes that get things going well. Then the V4 with new features. |
|
| Back to top |
|
 |
nighteagle
Joined: 29 Aug 2010 Posts: 6
|
Posted: Wed Sep 01, 2010 7:45 am Post subject: |
|
|
I'd like to vote for the first solution.
I think the V4 is a firmware with many new features and for a new board design!?
In this case a non volatile velocity is for the new firmware also interested. |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Wed Sep 01, 2010 9:20 pm Post subject: |
|
|
| jharvey wrote: | | I'd like to vote for 1. Complete the full rotation support for the current AVR_OpenServo_V3-experimental. Then velocity control. They both sound like fairly simple fixes that get things going well. Then the V4 with new features. |
Okay, clarification time!
| kbb wrote: | 1. Complete the full rotation support for the current AVR_OpenServo_V3-experimental.
2. See about adding a non-volatile (or default) velocity register to it. |
I was implying that these being done first was a given.
There is already an implementation of velocity control in the experimental firmware. |
|
| Back to top |
|
 |
|