by rodmanLT » Sat Aug 22, 2009 12:54 pm
by rodmanLT
Sat Aug 22, 2009 12:54 pm
Hi all,
sorry for the delay, I was very busy...
Here is the last video:
http://www.youtube.com/watch?v=WCTvggKuPvU
Controller is AVR mega8 with inverter uC for inverted Kondo uart.
Potentiometers were bought from ebay, single turn, 10kohm.
I can post entire program in bascom later.
You can find some photos of the board and joints here:
http://blog.elektronika.lt/robotai/humanoidas/
Response is very good with 2 joints, but when I add 4 more, robot starts to lag. I think it's because of bandwith limitation. I send same commands like you move single servo sliders in HTH3.
Command looks like this in hex: 0D FE 00 01 01 40 1E 5E
0D is "start" . after this RCB3 sends me back 0D if ready.
FE is "command"
00 is "option"
01 is "channel"
01 is "speed"
40 is "position high byte"
1E is "position low byte"
5E is "checksum"
checksum is (FE+00+01+01+40+1E)AND FF
Here is the program for one axis (BascomAVR compiler):
Axis(4) = Getadc(3)
I = 4
Position(i) = Axis(i) - Offset(i)
If Position(i) < 0 Then Position(i) = 1
Position(i) = 16384 - Position(i)
Pos_h(i) = High(position(i))
Pos_l(i) = Low(position(i))
Temp = &HFE + Channel(i)
Temp = Temp + Speed
Temp = Temp + Pos_h(i)
Temp = Temp + Pos_l(i)
Temp = Temp And &HFF
Sum = Temp
Printbin #1 , &H0D
Inputbin #1 , Ready
Printbin #1 , Command ; Opt ; Channel(i) ; 1 ; Speed ; Pos_h(i) ; 1 ; Pos_l(i) ; 1 ; Sum
Channel(i) ; 1 means send 1 byte from array starting at index i.
Pos_h(i) ; 1 is the same
Offsets are used to put robot's joints always to the same starting position. With the suit on, you stand still and press the "calibrate" button. This moves robot to home position and sets "virtual" zero position for all potentiometers.
Hi all,
sorry for the delay, I was very busy...
Here is the last video:
http://www.youtube.com/watch?v=WCTvggKuPvU
Controller is AVR mega8 with inverter uC for inverted Kondo uart.
Potentiometers were bought from ebay, single turn, 10kohm.
I can post entire program in bascom later.
You can find some photos of the board and joints here:
http://blog.elektronika.lt/robotai/humanoidas/
Response is very good with 2 joints, but when I add 4 more, robot starts to lag. I think it's because of bandwith limitation. I send same commands like you move single servo sliders in HTH3.
Command looks like this in hex: 0D FE 00 01 01 40 1E 5E
0D is "start" . after this RCB3 sends me back 0D if ready.
FE is "command"
00 is "option"
01 is "channel"
01 is "speed"
40 is "position high byte"
1E is "position low byte"
5E is "checksum"
checksum is (FE+00+01+01+40+1E)AND FF
Here is the program for one axis (BascomAVR compiler):
Axis(4) = Getadc(3)
I = 4
Position(i) = Axis(i) - Offset(i)
If Position(i) < 0 Then Position(i) = 1
Position(i) = 16384 - Position(i)
Pos_h(i) = High(position(i))
Pos_l(i) = Low(position(i))
Temp = &HFE + Channel(i)
Temp = Temp + Speed
Temp = Temp + Pos_h(i)
Temp = Temp + Pos_l(i)
Temp = Temp And &HFF
Sum = Temp
Printbin #1 , &H0D
Inputbin #1 , Ready
Printbin #1 , Command ; Opt ; Channel(i) ; 1 ; Speed ; Pos_h(i) ; 1 ; Pos_l(i) ; 1 ; Sum
Channel(i) ; 1 means send 1 byte from array starting at index i.
Pos_h(i) ; 1 is the same
Offsets are used to put robot's joints always to the same starting position. With the suit on, you stand still and press the "calibrate" button. This moves robot to home position and sets "virtual" zero position for all potentiometers.