OpenServo.com Forum Index OpenServo.com
Discussion of the OpenServo project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OpenServoV3 and OSIF, servo problem

 
Post new topic   Reply to topic    OpenServo.com Forum Index -> Hardware
View previous topic :: View next topic  
Author Message
BKoprinarov



Joined: 18 Feb 2010
Posts: 3

PostPosted: Thu Feb 18, 2010 1:27 pm    Post subject: OpenServoV3 and OSIF, servo problem Reply with quote

Hi,
I am not really sure if I have software or hardware problem. I will make a lucky guess and post it here. Please move the post, if it isn’t for this section.

So, my problem:
I study in the University of Wuerzburg in Germany. My practice is to integrate the Open Servo V3 board in robot, which is in development here on the robotic lab. I was supplied with the Open Servo V3 board and the Open Source InterFace board from RobotFuzz (two months ago).There already is servo for steering in the robot (Multiplex Rhino Digi 4 Digital Servo), but it overheats often and the electronic board is burning every couple of months. My task is to replace the old servo electronics with the Open Servo (the servo is remaining the same), so that the motor can have heat and position feedback. On the chair in robotics was made modification on the board. The robot is using 5V voltage so the DCDC convertor has been removed, so we can use the robot’s main power from 5V.
I have connected the OSIF board with the Open Servo and I can read and write the register, but I try to get my servo to spin already two weeks, but I am not coming forward. I have tried to follow the “Servo Documentation” tutorial and write the fowling commands
0x20 = device address (by me that is 0x10)
0x12 = SEEK_NEXT_HI
0x14 = SEEK_SPEED_HI
send position:
send: 0x20 0x12 0x03 0xD4
send speed:
send: 0x20 0x14 0x01 0x00
And I can read the status registers and the information there seems authentic.
For registers I/O I am using the openservointerface.exe (Ver. 2.1) software.
Some odd things I have determined:
1. There are two versions of the Open Servo V3 registers. “Official” and –dev. Which is the correct address table and how can I see the flash version on the board? If I have the old one, how stable is the new one and is it recommended flashing the new?
2. My voltage status in openservointerface.exe is always the same. Current 5 and Voltage 512.
3. In openservointerface.exe, when I write the minimal seek position value (upper corner right in the software, 0x2A register address), I can read the same value form PWM_FREQ_DIVIDER_HI (address 0x28).

Can you give me some tips, what is going wrong and how to get the servo to spin?

Best regards
Boris Koprinarov
Back to top
View user's profile Send private message
ginge
Site Admin


Joined: 14 Jan 2006
Posts: 1030
Location: Manchester, UK

PostPosted: Thu Feb 18, 2010 6:17 pm    Post subject: Reply with quote

Hi and welcome!

The OpenServo v3 ships with the standard 3.1 firmware, and not the -dev. You can up0load the -dev if you wish, but the register layout is different, and there are no guarantees it will work as expected. From experience it does work well, but you may lose some torque due to the backEMF speed sensing algorithm. Use at your own risk Wink

I think you are missing setting the PID parameters. The board ships with no PID parameters supplied, and need to be set.

try this link:

http://openservo.com/APIServoConfigPID

as for the openservointerface program, let me know what you see once you have movement, and I will see if we can patch/update or explain.


Cheers,

Barry
_________________
http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Mike



Joined: 21 Feb 2010
Posts: 4
Location: Edinburgh, UK

PostPosted: Sun Feb 21, 2010 5:53 pm    Post subject: Reply with quote

Hi,

I am also new to the open servo and having similar problems getting things moving so apologies in advance for any clangers I drop here.

I have followed the link you posted ginge but the information seems to be for configuration of older version of the openservo rather than V3. It seems the newer version has different registers that need updated to set the PID gain values.

I have attempted to follow the instructions on the v3 TWI page but cannot seem to change the values.

Here is what I attempt;
1) Set write enable "i2c 0x10 writebyte 0x84 0x01"
2) Select the configuration registers page "i2c 0x10 writebyte 0x2F 0x01"
3) Set the PID_PGAIN_LO values. (I believe this should be at address 0x43, is that correct?) "i2c 0x10 writebyte 0x03 0x01"

However in this case the value in the register does not change from 0x00. I am unclear if I have not set the write enable correctly or if I am trying to allocate to the wrong address. I have tried to locate the twi.h file on the site for further info but could not locate it.

Any help or advice to help me would be great. A full day of soldering and no moving servo has made for a very down-hearted man! hehehe

Much appreciated
Mike
Back to top
View user's profile Send private message
ginge
Site Admin


Joined: 14 Jan 2006
Posts: 1030
Location: Manchester, UK

PostPosted: Mon Feb 22, 2010 12:09 am    Post subject: Reply with quote

Hi Mike,

Your board ships with the v3.0 firmware, which has the same register layout as the v2 firmware. The code you are using is for the v3-dev experimental firmware. Try adjusting for these values:-

From the file registers.h in cvs:-

#define REG_PID_PGAIN_HI 0x22
#define REG_PID_PGAIN_LO 0x23
#define REG_PID_DGAIN_HI 0x24
#define REG_PID_DGAIN_LO 0x25
#define REG_PID_IGAIN_HI 0x26
#define REG_PID_IGAIN_LO 0x27

browse the file here:-
http://www.openservo.com/viewcvs/OpenServo/AVR_OpenServo_V3/registers.h?root=cvs&view=markup

I would revise your sequence as such:-

Code:

1) Set write enable "i2c 0x10 writebyte 0x84 0x01"
2) Set the PID_PGAIN_LO values. "i2c 0x10 writecyte 0x22 0x03 0x01"

_________________
http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Mike



Joined: 21 Feb 2010
Posts: 4
Location: Edinburgh, UK

PostPosted: Sun Mar 14, 2010 11:45 am    Post subject: Reply with quote

Finally got round to testing this and it worked well.

Thanks
Mike
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenServo.com Forum Index -> Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group