Continuing My Project

Hello,everyone :slight_smile: .

  Some months ago ( if some of you remember ) I was working on my quadruped project, things were going fine fixing some problems around it until i faced the torque problem with the servos. Since then i left it aside to deal with college and save some money for it. Now im back to it and im planning on finishing it this month or the next one.


 I made a little redesigning with the central body, basically increased it size (radius) to contain both the battery and the BB2 plus i changed the material from aluminium sheets to balsa wood, roughly the weight of the robot hasn't changed significantly, its still about **[size=150]1kg[/size]**. Now.. I want your help with picking the right servos for the torque.

I made a drawing to show you the positioning of the servos ( the blue boxes ) and the distance of them from the middle:

truploader.com/view/225189

At the moment, all the servos are mighty mini 225 servos. There is a problem with servos 4R and 4L, they cant hold the body up and i think they’re the ones that need replacing . i need suggestions of what to replace them with, im thinking 645 ultra torque, not sure if they’re right or an overkill though . The femur is 3 inch from servo center to center.

Anyhelp is appreciated, sorry for the long text .

Edit: I almost forgot, whats the radius of CH3-R central body ?

Hmm, usually there is a response at this time , is it a holiday :stuck_out_tongue: ?

I try to answer all posts. Sometimes a bump is needed


All of our hexapods use between a 2.25" to 3.25" femur. The CH3-R and Phoenix are 3". The diameter of the horizontal axis points on the chassis is 10.75". We use 485’s on the CH3-R but there is nothing better than 645’s. I have never heard of truploader, so I’m not going there
 Why not just host the images here and they will just appear in the post?

Thanks for the reply Robot Dude, I was afraid the image is little too big, truploader is a simple upload and view site but i understand your caution, this is the image:

http://www.truploader.com/uploads/4_9_2012/225189Bot.png

hmm, 10.25" :astonished: , and i thought my robot was too big x)

Go for the 645’s - my robot’s about 2.25kg and they work well when it’s doing press-ups. :mrgreen:

yea, i might do that, just incase i added more parts to the robot, ill still be on the safe side :stuck_out_tongue:

Good evening everyone, sorry for the disappearance but i didn’t really have time to work on the robot till recently.

i added 645 mg servos at 3L and 4L joints (according to the drawing), but unfortunately still cant stand up and im not sure where to go from here. i cant really remove much from the chassis, im thinking of shortening the femur, its about 7cm currently . other than that, im stuck :neutral_face:

Shortening the legs might be the easiest solutuion. If that fails, you might possibly devise some linkage operated legs to get more force (and less movement distance) for the legs. Always good to build a test leg for new designs before ordering parts for all legs.

You might want to post some images of the bot and your wiring. There is no reason to change the mechanical hardware if you have a power problem


I thought the same, unfortunatly im not home at the moment, ill post pictures asap

recently i’ve been trying to lift the robot a little to see how the supports hold. but it seems that whatever angle i input all servos go directly to middle. im using this code at the moment:

[code]

enableservo
main

ang var byte
ang = 90

posr var byte
posl var byte

posr = 2550
posl = 2550

hservo[0\1500\128]
hservo[1\posr\128]
hservo[2\posr\128]

hservo[3\1500\128]
hservo[4\posl\128]
hservo[5\posl\128]

hservo[6\1500\128]
hservo[7\posl\128]
hservo[8\posl\128]

hservo[9\1500\128]
hservo[10\posr\128]
hservo[11\posr\128]

goto main[/code]

no matter what are the values for posr(right) and posl(left) the servos rotate to middle.The values i tried so far are 0 100 255 750 1500 2550, they all gave the same results, any idea whats going wrong ?

Don’t have much time, but Hsero values are not in ms time units, couple of sticky topics on this.

Like maybe: viewtopic.php?f=4&t=3224&start=17

Kurt

I’ve read that post and modified the code so that i can change from -12000 to 12000 with the right stick of the controller, unfortunately servos hardly budge from the center position. still trying different things but no success yet.

Why don’t you throw the new version of the code up here so we can see what you are doing?

[code]
;-----------Bot Board Selection----------

;PS2 Controller / BotBoard II
DAT con P12
CMD con P13
SEL con P14
CLK con P15
;-----------------------------

index var byte
temp var byte(19)
mode var byte
Small_Motor var byte
Large_Motor var byte

;PS2Init
high CLK

low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8,$43\8,$0\8,$1\8,$0\8] ;CONFIG_MODE_ENTER
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$44\8,$00\8,$01\8,$03\8,$00\8,$00\8,$00\8,$00\8] ;SET_MODE_AND_LOCK
high SEL
pause 100

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$4F\8,$00\8,$FF\8,$FF\8,$03\8,$00\8,$00\8,$00\8] ;SET_DS2_NATIVE_MODE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$4D\8,$00\8,$00\8,$01\8,$FF\8,$FF\8,$FF\8,$FF\8] ;VIBRATION_ENABLE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$5A\8,$5A\8,$5A\8,$5A\8,$5A\8] ;CONFIG_MODE_EXIT_DS2_NATIVE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8] ;CONFIG_MODE_EXIT
high SEL
pause 1

enablehservo ;-------------------------------------------------------------------------------------------
main

;-----------PS2 Mode----------
low SEL
; asking “mode” to PS2 controller
shiftout CMD,CLK,FASTLSBPRE,$1\8]
; reading “mode” from PS2 controller
; 73(hex) is dualshock1 (digital buttons)
; 79(hex) is dualshock2 (analog buttons)
shiftin DAT,CLK,FASTLSBPOST,[mode\8]
high SEL
;-----------------------------

pause 1

;-----------PS2 Data----------
low SEL
; asking data to PS2 controller
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8]
; reading data from controller
; (don’t use a “for-next” loop, it’s too slow to read PS2 data)
shiftin DAT,CLK,FASTLSBPOST,[temp(0)\8,temp(1)\8,temp(2)\8,temp(3)\8,temp(4)\8,temp(5)\8,temp(6)\8,temp(7)\8,temp(8)\8, |
temp(9)\8,temp(10)\8,temp(11)\8,temp(12)\8,temp(13)\8,temp(14)\8,temp(15)\8,temp(16)\8,temp(17)\8,temp(18)\8]
high SEL
;-----------------------------

pause 1

;-----------PS2 Vibration motors----------
Small_Motor = 1 - Temp(1).bit5 ; Numeric right arrow button (Small Motor on/off)
Large_Motor = Temp(8) ; Analog left arrow button (Large Motor speed)

low SEL
; asking data to PS2 controller (again)
; sending at the same time the vibration motors speed to perform
; (using the previously read analog buttons position ( <- : large motor, -> : small motor )
; the more you press on these buttons, the more the corresponding motor vibrates fast
; some wireless PS2 controllers react only to the large motor command and some have no motor at all.
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8,$0\8,Small_Motor\8,Large_Motor\8]
; we don’t care about reading the data from the controller here.
; so, why not use this to read PS2 data the first time? because it’s not working:
; as the PS2 controller is starting to send data just after receiving the
; “shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8
”<------here
; and as we are sending after that some data for motors “
 ,$0\8,temp(7)\8,temp(8)\8]”
; it’s now too late to read all the data from the PS2 controller
; because there’s already some bytes sent by it and lost (no buffer here).
high SEL
;-----------------------------

;-----------Basic Micro IDE terminal----------
; sending carriage return (CR = 13) and the PS2 mode(hex) to the PC
serout S_OUT,i57600,[13, hex2 mode\2] ; Basic Micro IDE <= 02.2.1.1
;serout S_OUT,I8N1_57600,[13, hex2 mode\2] ; Basic Micro IDE <= 05.3.0.0
;serout S_OUT,i57600,[13, hex2 mode\2] ; Basic Micro Pro IDE <= 08.0.1.7

for index = 1 to 18 ; temp(0) contains a dummy variable so we don’t send it to the PC
; sending all the data to the PC
serout S_OUT,i57600," “, dec3 temp(index)\3] ; Basic Micro IDE <= 02.2.1.1
;serout S_OUT,I8N1_57600,” “, dec3 temp(index)\3] ; Basic Micro IDE <= 05.3.0.0
;serout S_OUT,i57600,” ", dec3 temp(index)\3] ; Basic Micro Pro IDE <= 08.0.1.7
next
;----------------------------- 1 = 0 deg | 63.5 = 45 deg | 127 = 90 deg 190.5 = 135deg 254 = 360deg

posr var byte
posl var byte

posr = -(temp(4)/128)*12000
posl = -posr

hservo[0\0\128]
hservo[1\posr\128]
hservo[2-posr\128]

hservo[3\0\128]
hservo[4\posl\128]
hservo[5-posl\128]

hservo[6\0\128]
hservo[7\posl\128]
hservo[8-posl\128]

hservo[9\0\128]
hservo[10\posr\128]
hservo[11-posr\128]

goto main[/code]

You need to change the variable from a byte to an sword
 Think about it


Change the posr and posl to sword data type, byte is only 0-255.

hmm, worked pretty well, i thought “sword” only contained letters. Thanks for the heads up. ill post my progress with the code and the results as time goes by :slight_smile:

If you have little experience programming the variable types can be misleading. In the electronics world a ‘word’ is simply two bytes. It really has nothing to do with words or letters lol

I have a decent knowledge in C++ programming but i didn’t see “word” type variable in it. Anyway, I fixed the code and its running great with the PS2 controller and finally got the robot to stand up :slight_smile:.

http://s7.postimage.org/tn9e5ydpn/2012_07_17_18_30_00.jpg http://s17.postimage.org/3umfzb8kv/2012_07_17_18_30_24.jpg

im working on the servo positioning at the moment, some servos need a little degree shift to hit 0 angle. When they are at the right position ill move to programming the gait code.

One question though, is there a way to speed up the compiler? it is taking pretty long even if i change only one number, it gets quite tedious when fine tuning the servos.