Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Replacing AX12 firmware and Attaching Gyro/Accelerometer

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
8 postsPage 1 of 1
8 postsPage 1 of 1

Replacing AX12 firmware and Attaching Gyro/Accelerometer

Post by limor » Tue Mar 06, 2007 10:00 pm

Post by limor
Tue Mar 06, 2007 10:00 pm

I need faster and smoother current sensing from the AX12 for the feedback-control project we're doing. I also need good speed control rather than holding-position control. So the idea is basically to replace the firmware of the AX12 with propriatry one. And while doing that, if there's a spare ADC port on the Atmega8, maybe connect it to an analog gyro or Accelerometer and provide support for reading its values from the AX12..

Supporting all the features in the AX12 manual is quite a lot of work. However, I don't really need some of the features for the purpose of feedback speed control (for example, I dont need the holding-position PID control compliance stuff). On the other hand I'd love to have good speed control which is currently missing.

Has anyone ventured in this direction or has some recomendations?


BTW: there's an AX12 firmware-upgrade feature on the Behavior control GUI. The latest firmware is available here.
I need faster and smoother current sensing from the AX12 for the feedback-control project we're doing. I also need good speed control rather than holding-position control. So the idea is basically to replace the firmware of the AX12 with propriatry one. And while doing that, if there's a spare ADC port on the Atmega8, maybe connect it to an analog gyro or Accelerometer and provide support for reading its values from the AX12..

Supporting all the features in the AX12 manual is quite a lot of work. However, I don't really need some of the features for the purpose of feedback speed control (for example, I dont need the holding-position PID control compliance stuff). On the other hand I'd love to have good speed control which is currently missing.

Has anyone ventured in this direction or has some recomendations?


BTW: there's an AX12 firmware-upgrade feature on the Behavior control GUI. The latest firmware is available here.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Tue Mar 06, 2007 11:04 pm

Post by JonHylands
Tue Mar 06, 2007 11:04 pm

limor,

This is something we're considering doing. We're not really interested in speed control, but in using the servos as force-driven actuators. However, there's no reason not to do a decent job on the speed control at the same time.

With respect to the gyro - my six axis board will interface quite nicely with just a single axis gyro (using the breakout board version from Sparkfun), and you can ignore the other 5 A/D values.

I should have a printed PCB available within a month, and I'll be selling populated & tested boards shortly after that.

My brother has a baby-orangutang board, and he's going to try the code tonight. There's no reason it won't work, and if it does, you can use that with up to six analog sensors of any type with my code.

edit: the baby-orangutang board comes with a 20 Mhz resonator, so you can't run the UART at 1.0 Mbps without switching to either a 16 MHz or 8 MHz resonator...

- Jon
limor,

This is something we're considering doing. We're not really interested in speed control, but in using the servos as force-driven actuators. However, there's no reason not to do a decent job on the speed control at the same time.

With respect to the gyro - my six axis board will interface quite nicely with just a single axis gyro (using the breakout board version from Sparkfun), and you can ignore the other 5 A/D values.

I should have a printed PCB available within a month, and I'll be selling populated & tested boards shortly after that.

My brother has a baby-orangutang board, and he's going to try the code tonight. There's no reason it won't work, and if it does, you can use that with up to six analog sensors of any type with my code.

edit: the baby-orangutang board comes with a 20 Mhz resonator, so you can't run the UART at 1.0 Mbps without switching to either a 16 MHz or 8 MHz resonator...

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by JonHylands » Tue Mar 06, 2007 11:12 pm

Post by JonHylands
Tue Mar 06, 2007 11:12 pm

My brother pointed out that the Arduino Stamp comes with a 16 MHz crystal, so it should be compatible with using it as a bioloid sensor...

http://www.sparkfun.com/commerce/product_info.php?products_id=8164

- Jon
My brother pointed out that the Arduino Stamp comes with a 16 MHz crystal, so it should be compatible with using it as a bioloid sensor...

http://www.sparkfun.com/commerce/product_info.php?products_id=8164

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by limor » Wed Mar 07, 2007 9:53 am

Post by limor
Wed Mar 07, 2007 9:53 am

JonHylands wrote:limor,
This is something we're considering doing. We're not really interested in speed control, but in using the servos as force-driven actuators. However, there's no reason not to do a decent job on the speed control at the same time.

Actually, by turning off the compliance parameters (free turn mode), can't you control the voltage driving the motor?
JonHylands wrote:limor,
This is something we're considering doing. We're not really interested in speed control, but in using the servos as force-driven actuators. However, there's no reason not to do a decent job on the speed control at the same time.

Actually, by turning off the compliance parameters (free turn mode), can't you control the voltage driving the motor?
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Wed Mar 07, 2007 1:36 pm

Post by JonHylands
Wed Mar 07, 2007 1:36 pm

I'm not sure I follow you, limor.

We're trying to use the AX-12 as a servo, not a gearmotor.

If you're talking about the speed control mode, then yes, you can use the PWM to control motor speed directly, which is what I believe the AX-12 already does.

You said in your original post:

"I also need good speed control rather than holding-position control."

Are you using the AX-12 in full-rotate mode, or as a servo (300 degrees) mode?

- Jon
I'm not sure I follow you, limor.

We're trying to use the AX-12 as a servo, not a gearmotor.

If you're talking about the speed control mode, then yes, you can use the PWM to control motor speed directly, which is what I believe the AX-12 already does.

You said in your original post:

"I also need good speed control rather than holding-position control."

Are you using the AX-12 in full-rotate mode, or as a servo (300 degrees) mode?

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by lnielsen » Wed Mar 07, 2007 4:30 pm

Post by lnielsen
Wed Mar 07, 2007 4:30 pm

Have you looked at openservo.org? I was thinking of modifying some of their code for the AX12. This would allow a side by side comparison of the two systems. I am especially interested in comparing the different compliance methods.

What would be the purpose of the gyro/Accelerometer? I can see a use for Jon's 6-axis unit as a separate sensor but I don't know how I would use a 1-axis feature in each servo.
Have you looked at openservo.org? I was thinking of modifying some of their code for the AX12. This would allow a side by side comparison of the two systems. I am especially interested in comparing the different compliance methods.

What would be the purpose of the gyro/Accelerometer? I can see a use for Jon's 6-axis unit as a separate sensor but I don't know how I would use a 1-axis feature in each servo.
lnielsen
Robot Builder
Robot Builder
User avatar
Posts: 15
Joined: Thu Jan 18, 2007 1:00 am
Location: Arlington Heights, Illinois

Post by limor » Thu Mar 08, 2007 3:49 pm

Post by limor
Thu Mar 08, 2007 3:49 pm

JonHylands wrote:I'm not sure I follow you, limor.

We're trying to use the AX-12 as a servo, not a gearmotor.

If you're talking about the speed control mode, then yes, you can use the PWM to control motor speed directly, which is what I believe the AX-12 already does.


Right, but if you try apply counter-torque while the AX12 is rotating, it will not adaptively increase the amount of voltage/current to the motor in order to control the speed.

JonHylands wrote:"I also need good speed control rather than holding-position control."
Are you using the AX-12 in full-rotate mode, or as a servo (300 degrees) mode?

Currently in order to achieve speed control we use it in servo mode in order to ensure it doesn't go into the dead zone where the potentiometer doesn't read any position data. Position data at 100hz is needed in order to estimate the speed and try and control it. This could be done inside the servo. have a look at the velocity estimation posting (blogs link in main robosavvy menu on the left)
JonHylands wrote:I'm not sure I follow you, limor.

We're trying to use the AX-12 as a servo, not a gearmotor.

If you're talking about the speed control mode, then yes, you can use the PWM to control motor speed directly, which is what I believe the AX-12 already does.


Right, but if you try apply counter-torque while the AX12 is rotating, it will not adaptively increase the amount of voltage/current to the motor in order to control the speed.

JonHylands wrote:"I also need good speed control rather than holding-position control."
Are you using the AX-12 in full-rotate mode, or as a servo (300 degrees) mode?

Currently in order to achieve speed control we use it in servo mode in order to ensure it doesn't go into the dead zone where the potentiometer doesn't read any position data. Position data at 100hz is needed in order to estimate the speed and try and control it. This could be done inside the servo. have a look at the velocity estimation posting (blogs link in main robosavvy menu on the left)
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by limor » Thu Mar 08, 2007 4:33 pm

Post by limor
Thu Mar 08, 2007 4:33 pm

lnielsen wrote:Have you looked at openservo.org? I was thinking of modifying some of their code for the AX12. This would allow a side by side comparison of the two systems. I am especially interested in comparing the different compliance methods.


Thats a great idea.
What would be the purpose of the gyro/Accelerometer? I can see a use for Jon's 6-axis unit as a separate sensor but I don't know how I would use a 1-axis feature in each servo.

it depends on whether the pins are accessible on the AX12's Atmega8. It has may ADC pins, some are used for (potentiometer, current, etc). tapping into the small pins of the smd IC may be too difficult.
[/quote]
lnielsen wrote:Have you looked at openservo.org? I was thinking of modifying some of their code for the AX12. This would allow a side by side comparison of the two systems. I am especially interested in comparing the different compliance methods.


Thats a great idea.
What would be the purpose of the gyro/Accelerometer? I can see a use for Jon's 6-axis unit as a separate sensor but I don't know how I would use a 1-axis feature in each servo.

it depends on whether the pins are accessible on the AX12's Atmega8. It has may ADC pins, some are used for (potentiometer, current, etc). tapping into the small pins of the smd IC may be too difficult.
[/quote]
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK


8 postsPage 1 of 1
8 postsPage 1 of 1