Project - Zeus, a Hexapod

Those readings look to be correct…

I don’t see anything obvious.

At times like this I start to draw at straws and start over. That is, I would probably remove all cables and the like from the BB2, except power and PS2 and run test again.

We know that pins 12-14 are working. We know that 12 and 15 have pull-up resistors. We don’t know yet if 15 is working. Can test with volt meter, several different ways. You could write a simple program like:

main: toggle P15 pause 500 goto main
You can use your meter, connect ground to pin, hold + of meter to P15 and you should see it change from 0 to +5v and back every about half second…

Kurt

CHECK IT OUT :stuck_out_tongue:

Turns out replacing the PS2 cable with the spare one i got today did the trick!

Works perfectly now :slight_smile:

Very happy :slight_smile:

Great!!! I am glad you have it working now!!! :smiley: :smiley:

Kurt

Thanks kurt. :slight_smile:

Im going to take a few more videos to add to my youtube channel, do some things like an introduction to (my) hexapod/s (so that my family and friends can see what it does, etc - im not intending to say that im an expert by any stretch of the imagination!) which i will repost here in case theres any interest.

I really appreciate all the help that you guys have provided, and I have been thoroughly impressed by the quality of the community on the Lynxmotion forums.

Yaahooo! I’m glad you got it going! A bad cable? That’s a first… Another soldier ready to fight the good fight! :smiley:

Hey guys :slight_smile:

So im having a lot of fun with it, and tinkering with the code to help my understanding of it a little better (just little things, like adjusting the default walking styles (gaits? or am i wrong? :slight_smile:) and swapping buttons around) and other assorted things.

What im doing right now is recording its top speeds around my property, currently I have got it going at a max speed of 468m/hr (or, .47km/hr if you prefer) - and im aiming to get him to 1000m/hr. Im going to play with the gaits a bit (not sure thats the correct term, since im not changing how it walks, just how high he rides/speed etc.).

Has anyone else gotten a CH3-R to 1km/hr? any other suggestions? Im thinking bigger servos might help with speed, but that might just affect torque/load.

Ill just add - im not going to be disappointed if he doesnt go that fast, im just enjoying playing around and walking around the place.

Also, I suck at video editing, the youtube video I did is terrible lol. Ill keep trying though. (In case you have seen my channel and that vid, the reason he started walking strange about half way through the video was that a couple of screws were coming loose at the hip joint, which i later fixed)

Hey guys :slight_smile:

I have some coding related questions, (i started a new post in the programming section, but it hasnt had any replies yet - viewtopic.php?f=28&t=7628&p=75228#p75228) but I wonder if you could help me with a little thing, basically how the servo position is controlled.

I see there are the serout commands controlling the leg servos but need some verification on the format. It appears to be something like:

serout SSC32,i38400,"#",servo-index1,servo-index2,"P1234#"13]

where the two servo-index numbers identify the servo, “P1234” mean position 1234. I can see there’s some math for converting the angle to the pulse value.

Can anyone help?

New pic of Zeus and some videos of me getting the LEDs working :slight_smile:

I’m no programming guru sorry… But I wanted to tell you it’s looking pretty good! :smiley:

Hi Toshi,

as Jim mentioned, it looks great!

Will put a few comments in on your software thread.

Kurt

Hey guys :smiley:

Thanks for the feedback, its nice to hear :slight_smile:

Anyway, ive been putting the turret on top, and connected the servos, and re-written the code to how I want it, but ive encountered a problem, which ive videoed:

It seems to me that the servos are losing power, and its causing the legs to act strange and the turret not to work properly.

Am I right? And is there an easy fix? (Like, bigger battery pack) Or should I just remove the tilt servo, and leave the turret to just “Pan” - hopefully cutting down on the power being drawn. I mean, theres no point having a turret if it causes the legs to buckle.

one would first think it looks like a power problem and the current is not getting to it, but i suspect that it might be something within your code making the turret zero out. maybe?

i assume this, as its performance is good overall and the servos are in the turret are snapping into power once the gait has finished its cycle.

can you post your code in an attachment.

could be - i did butcher the code a little to get it to do the right commands :blush:

code is attached to the bottom in an attachment.

the changes i made, (which you will probably see) gave the pan and tilt servos a command to move to a certain point in X amount of time based on the commands from the controller. I was basically testing the concept, to see if it would work. Thats when i discovered the servos failing when being combined, and suspected power issues.

To get the code to ignore what the buttons originally did, i basically commented out that particular part. since that code is probably reliant with other parts of the code, and i didnt comment them out, it could be causing problems?
zeus-toshisedit.bas (27.6 KB)

Are you powering your boards like this?

Yeah, I am :slight_smile:

one thing im confused about is that in the code you posted the Deck support is commented out. how are you using the deck support or turret?

I rewrote my own deck code - i didnt like the default deck code which basically gave me no control over the deck, it would pan and tilt by itself based on directional movement of the legs. I wanted to control the pan and tilt with the right joystick (i had swapped left and right earlier) X and Y axis.

I didnt know how to edit out the deck code properly, so i commented out parts of it till it no longer worked, and then replaced the references to those servos with my own (albeit clumsy) way of moving the turret:

if DualShock(3) <120 then serout SSC32,i38400,"#31P1000S200",13] endif if DualShock(3) >136 then serout SSC32,i38400,"#31P2000S200",13] endif

if DualShock(4) <120 then serout SSC32,i38400,"#28P1300S200",13] endif if DualShock(4) >136 then serout SSC32,i38400,"#28P1700S200",13] endif

I also tried to make a “reset” part of this code, but for some reason the servos really didnt like it and made the whole turret jump around spastically.

[code];if DualShock(3) >120 and DualShock(3) <136 then ***these three lines make the servo stutter
; serout SSC32,i38400,"#31P1500S200",13]
;endif

;if DualShock(4) >120 and DualShock(4) <136 then ***these three lines make the servo stutter
;serout SSC32,i38400,"#28P1500S200",13]
;endif[/code]

oh yes i see it now, thanks. Well a brief look at it and it doesn’t seem to be the code directly but im still wondering about the relationship between the Auto Legs Down Function and the Turret it seems that when control input has stopped the legs alternate the tripod function, and while doing this the turret seems to power up just before the second Tripod comes into action.

could maybe be a power issue, but
have you tried changing the servo or servo pin?
have you tried to use other functions of the Hexapod while tilting the turret? example: Body hight adjust to see if the turret fails when doing so?

A good way to determine if it’s code or power is to run the unmodified code and see if the servos still act like that.

Another way would be to lift the bot up on a CD spindle so the legs do not touch the ground. If it’s power related lifting it up will fix it.

If you had a scope you could see if the servo pulses are interrupted.