Project - Zeus, a Hexapod

Next thing I would check is to see, what SSC pin is defined in your program. If it is from powerpod, it will probably look something like:

SSC32 con p8

Is is defined as in my case P11 but I think the default is P8… Then make sure the wire going between the BB2 and the SSC-32 is on that pin. Also make sure that there is a ground wire between the two boards…

I would also measure to make sure I had voltage at both the VL and the VS terminals… I have pulled my hair out before when my power wire to the SSC-32 came lose and it had now power… Also I would check to make sure that all of my servo wires are plugged in properly. That is in the pictures they look uneven. I have had a few times where a servo was plugged in off 1 pin (gnd on power pin, power on signal, signal nothing) or the other way…

Yes it is easy to write a quick and dirty basic program that simply moves one of the servos back and forth. Maybe something like:

Main:
    serout SSC32,i38400,"#0P1100T500", 13]
    pause 1000
    serout SSC32,i38400,"#0P1900T500", 13]
    pause 1000
    goto Main

Warning: I could easily have screwed something up while typing this in. Also whenever I run test like this, I usually put my Hex robot on some stand. I often use a 50-100 writable CD/DVD case to hold it up.

Good Luck!
Kurt

First off I want to apologize for this. We have tried all the normal things… You seem to have a particularly weird problem here.

The fact that the SSC-32 is receiving some data but not the control data is perplexing. It leads me to think PS2, but it is connecting…

When the legs snap into position do you see the SSC-32 LED light up just before?

Does it blink at any point after turning the power on?

Do you happen to have another PS2 controller there you could swap in as a test?

It might be time to try Kurts idea of running the PS2 test program to see what the thing is doing.

Hey guys :slight_smile:

Well, I had a break from trying to figure it out for a few days, decided to take a breather basically :slight_smile:

So - Im going to have a go at fixing it up today.

Ill go through what you guys said, and let you know the answers:

Kurte:

a) SSC32 pin8 is correct on the BB2 and also in the code

b) I checked the power cables, they all appear to be in correctly, and all the things with LEDs light up (therefore, some power must be getting to it) and all the servos move (powerpod moving them) - i dont have a multimeter handy so i cant check the specific voltages, but I think that the power cables are ok.

c) The servo plugs are not quite straight, the pictures are quite zoomed in so it exagerates how wonky they are, but they dont seem to want to straighten up and bounce back to their positions when manipulating them - also, all 18 servos move left and right through powerpod, so I assume that means they are all plugged in correctly.

d) I tried your code, and got this error: “Error: FILE C:\DOCUMENTS AND SETTINGS\TOSHI\DESKTOP\TEST.BAS(LINE 2) : [TOKEN ,] : Unexpected token type” - so Im going to read about the code and see if i can figure out how to write a program to move a servo myself. thanks for the tip, i popped the robot up on a large jar for the testing.

Robot Dude: (or Jim, or James, im not sure how you prefer to be referred to :slight_smile:)

No need to apologise, I realise this is quite an ambitious project for my first attempt :smiling_imp: I suppose im a masochist.

a) I was watching very closely - yes, the SSC32 LED does light up when the legs move in the first place - Im thinking of taking a vid and youtube-linking it here so I can show you what I mean without having to describe it. The LED flashes multiple times, as the legs move up, and then back down into place.

b) it doesnt blink at any point after turning it on, and it does its initial legs up/down then beep.

c) I dont have another PS2 controller, but I am seriously considering purchasing a 2nd one for backup/testing purposes. I would just like to add that I am not above replacing parts at this point (hell, i already dropped a serious amount of cash, I can afford a 2nd BAP or BB2)

d) I am going to do the PS2 test program now, Ill reply when its finished (and I try and interpret the data)

Thanks again for the help, I appreciate it, and know that very few other people in the world could be helping out here, and probably no one else in New Zealand :mrgreen:

In saying that, do you think I should post in other forums than the “Multi-Leg” forum, ie the “Bot Board” forum?

What this does, is continue to print “255” under each heading, ad infinitum.

Nothing changes with button presses.

So, I can assume that the PS2 controller is connecting (by the red and green lights not blinking on the PS2 reciever) but not actually sending any data? or just sending gibberish data?

EDIT: Incidentally, when I click “Program” In the basic Micro studio, does that delete the previous program that was on the chip?

EDIT 2: Wow, turns out the programming language is pretty tricky for “move leg A back and forwards”. props to you guys who know it inside out. I started reading the Basic Micro tutorial as to how to write the code, when i realised it would be a long time before it refers to “and type this to move a robot leg” :slight_smile:

This clinches it. It’s the PS2 controller. It connects but no data is being transferred. We will organize a free replacement from the distributor you used to purchase. Hang in there, this is solved…

Thanks dude, I will PM you with the details. I will keep this thread updated with how/when it works.

I played with the code, and with some help from my uncles, realised i had to set the constants (which i hadnt done). I also took out a space, but im not sure if that did anything, it quite easily may not have done anything.

SSC32 con p8 Main: serout SSC32,i38400,"#0P1100T500",13] pause 1000 serout SSC32,i38400,"#0P1900T500", 13] pause 1000 goto Main

this code however, worked great, and made one of the legs work like a windscreen wiper, and moved back and forth.

I conclude this must mean that the BB2 and BAP are recieving the instructions correctly from the program, and transmitting it to the SSC32, and then the SSC32 is correctly moving the servos.

Therefore, it must have been the controller all along.

I have taken some new pictures of Zeus, please click the picture if you would like to take a look at some more :slight_smile:

2.bp.blogspot.com/-hGrDlvj4DBM/TlSz8z9nvsI/AAAAAAAAABY/iOpw2xrIYh8/s320/fullsizerobot.JPG

Hey guys :slight_smile:

Well, I got a new PS2 controller and reciever today, and after testing it out, there is no change to the PS2 test (found here: lynxmotion.com/images/html/build034.htm)

I tried changing some settings from the default ones to see if I could get a different result, but no luck.

To reiterate, the PS2 test program on terminal one reports back a value of “255” for every column and row, but it constantly updates the 255 value (infinitely keeping on printing them all)

I hope we are narrowing down what could be wrong with the controls, could it be the cable itself? That connects the reciever to the BB2?

Also, I have a wired PS2 controller I am going to test today, would this still work since there are no batteries in a wired controller?

Just tried the tethered controller, it turned on (has a red power LED) but still no response from the robot.

I think ive narrowed it down though, the controller/reciever seems to be working fine, it just doesnt connect to the bot board 2 - the only other part i havent replaced is the PS2 controller cable (ive now ordered a replacement, so ill see if that works by replacing the cable).

Does anyone have any further suggestions for me to try and narrow the problem down further? Any tests, or BAP programs?

Couple of things to try…

1)Go back to the PS2 test program (the one you reported on Aug 19…), See if it is still giving all FF/255) type responses. Make sure that the jumper is set for +5V for the power going to the receiver (not VS)

  1. On the BB2 are the three jumpers marked with 2 in the diagram: lynxmotion.com/images/html/build151.htm
    installed or not… If they are in, you might try with them off…

  2. It would be great to see what is going on with a logic analyzer, but… We should try to verify that the IO lines 12-15 are working at all. You can easily test 12-14 with the built-in LEDS. For this you need to have the 3 jumpers I mentioned in 2 plugged in. Then you can use a simple program like:

Main:
    toggle P12
    pause 100
    toggle p13
    pause 100
    toggle p14
    pause 100
    goto main

You should see the 3 LEDs go on and off with about a 10th second between each LED changing… If you have a 3 servo extension wire, I would sometimes play with jumpering 3 IO pins to the LEDS. Simply plug one end into the 3 IO pins you wish to try, undo the 3 shunts I mentioned in 2) and plug the other end of the servo extension into the top pins where the shunts were… You can then change the above program to the IO pins you jumpered from… I sometimes do this with programs with for example IO pins 4-6 to use the LEDS for debugging while I have a PS2 plugged into pins 12-15… But you can do this to for example do pins 13-15 to see if pin 15 works…

Hopefully we will find out something

Kurt

Hi Kurte :slight_smile:

Ive managed to get a couple of hours to work on this problem, ill let you know what ive done:

  1. used the PS2 test program:

controller A, with both reciever A and B produced the “FF 255 255 255…” result
controller B, with both reciever A and B produced the “FF 255 255 255…” result
I still got the “FF 255 255 255…” result when the controllers were turned off, when the reciever was flashing its red light instead of a constant red light, so it seemed to make no difference wether or not the controller was working.

the jumper is definitely set for +5V on the reciever.

  1. those jumpers are definitely taken out, as per the instruction “For both chassis styles, make sure that the ABC buttons / LED jumpers are removed.” from the 99c build webpage.

  2. what exactly is a logic analyzer? is it possible to purchase one through lynxmotion?

anyway, i plugged in the jumpers for the 3 LEDs, and then ran the program:

all 3 lights flashed just how you said they would - with a short delay.

i then reloaded my zeus.bas program with the LED pins still in, A doesnt blink, B is constantly on, and C blinks on and off. not sure if thats helpful or not.

by 3 servo extension wire, do you mean this one? sedoniatech.com.au/sea-02.htm
or do you mean the “Y” connector one? sedoniatech.com.au/sya-01.htm
I can order one in, as they are pretty cheap, it just wont arrive for a week or so.

anyway, i cant do the test using the servo cable, to see if pin 15 works, but it looks like pins 12-14 do work.

EDIT:

I had a thought, regarding the “FF 255 255 255…” infinite loop, so i unplugged the reciever, and ran the test again. This gave the same result. So then, i unplugged the cable right out of the bot board II, so there was no cable plugged into pins 12-15 at all, and the PS2 controller test still gave the “FF 255 255 255…” infinite loop result.

Does that make sense to anyone? I know that if you change settings, to different baud rates and stuff, the PS2 controller test will either report back nonsense numerals, or just one set of FF 255s (which dont change), so why is it constantly reporting back 255 for every column?

OK, so far I am not seeing anything obvious in your results.

Servo Extension wire: I always try to have some on hand… Ones like: lynxmotion.com/p-83-servo-ex … le-12.aspx
I also like the Y cables for debugging… lynxmotion.com/p-81-servo-y- … cable.aspx, which looks like similar to the ones in the link you mentioned… Note: now that I have a decent crimper and some HITEC servo wire, I can make some of my own, but it is sure easer just to get them pre made!

You can always simply use a piece of wire to hold between the IO pin for P15 and one of the pins for an LED, but if 12-14 work it is likely that 15 works as well.

If you had a couple of Servo wires, I would have suggested that we try doing the DIY form of servo cable.

As for Logic Analyzer, It is not necessarily something everyone needs, but boy does it help me out in cases like this! I don’t think Lynxmotion sells any of them. There are several out there, I have one of these: saleae.com/logic16/ but the number of times I need to debug more than 8 IO pins at a time is not often so … You can also use an oscilloscope to do this as well, but they often only show up to 2 IO lines.

Don’t remember if any of your controllers are Lynxmotion controllers or not, but with a few other controllers I have found that, I needed to connect up the motor power wire to make them work. In the diagram: lynxmotion.com/images/html/b … tm#aglance it shows up as the 7.5V, which on some cables is the green wire others gray? You simply plug this into one of the pins connected to VS maybe even +5v.

That’s all for now. other than maybe use a multi-meter to make sure you have connectivity through the pins of the PS2 cable.

Kurt

Can you ensure there are pullup resistors on pins 12 and 15. Clock and Data. You can test this by removing all power and measuring with an ohm meter from the 5vdc line to the I/O pin. They both should measure 1k ohm. If one or the other is missing it will prevent the data from passing.

Ill pick up a multimeter tomorrow, to test both of your ideas.

Thanks for the continued help and support guys :slight_smile:

I might go and grab a few of those servo wires, they look they could come in handy in future for other things also.

I think 15 is likely to be fine as well, if the previous ones worked. Ill check that with a servo cable when they arrive also.

I had a look at the link for the logic analyzer, and was hopelessly confused. I didnt understand what it actually does, how does it analyze logic by plugging in those hook pins? How would it help in a case like this? I read some of the FAQs, but I still dont know what it does in a case like this. Anyway, $150 is a bit much right now, but thanks for the suggestion, I will keep it in mind for future projects! (or, when my wife lets me spend more money :stuck_out_tongue:)

Both of the controllers I have are lynxmotion, and the wired one i tested was X-arcade brand. Ive seen that some others require the motor power wire to work, but it didnt seem the case with these ones, so i didnt do it.

Ok im 99% sure im getting this right -

Pin 15 - registers at 1k Ohm
Pin 12 - registers at 1k Ohm

That was from the middle pin to the top pin.

Im also going to check the PS2 connector cable, im not sure quite how to do it so im just going to measure resistance from one end to the other - I think it should work :slight_smile:

errrr

well, thats not going to work. I cant get the probe into the end that the reciever fits into. any suggestions of how i could do it without breaking apart the end of the cable?

EDIT: ah, I see, 12 and 15 are different - i did 13 and 14 as well, and they came up with OL (infinite resistance?) - so they must not be connected?

Yep 12 and 15 have a a Pull-up resistor connected to them. That is they have a 1K ohm resistor connected from the +5 to the IO pin. This is needed for example with the DAT line as on an actual PS2, there could be several PS2 controllers all using this same IO line and none of them pull the signal high, they only pull the signal low when it is appropriate to do so… Pins 13 and 14 do not need this as the processor directly drives these lines high and low and as such there is no direct connection

As for checking the cable. There are several ways to do it. One way is to undo the 2 screws holding the cover on the Lynxmotion receiver and remove the cover. You can plug it into the cable and you will have some easy wires/pins to check…

Kurt

I use a paper clip for testing cables. You should get around 0 ohms (or a very small value) for the wires in the cable. If you have a couple servo extenders you can fabricate a cable like this. (step 6 and 7)
lynxmotion.com/images/html/build155.htm

Side Note:

It is sometimes hard to explain Logic Analyzers, except through example. Recently with the beta Botboarduino board we found that the servos kept jerking around for no obvious reason. So I hooked up the logic Analyzer and found the servo signals were being corrupted. Here is a snapshot of it.

The bottom 4 signals (Yellow, Green, Blue, purple) are the PS2 signals, the one above it is the 1 servo being controlled, which should have clean pulses, but as you can see at the end of the third pulse in this example the transition to a low state was being corrupted… Side note: I figured out the Arduino PS2 library was not using atomic operations and stomped on the Servo output, which has since been fixed. The other interesting thing about this trace which you can not see at this level, is in the logic Analyzer I told it that the last 4 IO lines were using SPI (Serial Peripheral Interface), and so it was able to understand them and show me what data was being sent back in forth in the MOSI (Master Out Slave In - In our case known as CMD) and MISO (DAT) IO lines

So in a case like you are having, it would be good to see for example if the correct pulses are being sent out and the PS2 is not responding …

But we should be able to figure out what is happening without this luxury.

Kurt
But

Ok, heres the test for connectivity through the PS2 cable.

Im doing a JPG for it as well, but ill write my results also:

Ive named the 9 pins inside the reciever 1 - 9 from left to right (red LED to green LED)

Pin 1: Brown wire - ~0 Ohm,
Pin 2: White wire - ~0 Ohm,
Pin 3: Grey wire - ~0 Ohm
Pin 4: Green wire - ~30M Ohm, Red Wire - ~4.5k Ohm, Black Wire - ~0 Ohm, Blue Wire - ~30M Ohm, Yellow Wire - ~19M Ohm, Brown Wire - ~30M Ohm, White Wire - ~30M Ohm
Pin 5: Red Wire - ~0 Ohm, Black Wire - ~4.5k Ohm, Blue Wire - ~30M Ohm, Yellow Wire - ~19M Ohm, Brown Wire - ~30M Ohm, White Wire - ~30M Ohm,
Pin 6: Yellow Wire - ~0 Ohm,
Pin 7: Blue Wire - ~0 Ohm,
Pin 8:
Pin 9: Green wire - ~0 Ohm

Does this tell you anything guys? My spare PS2 cable should be coming this week, but it would be good to know if that is indeed the problem or not.