We have been receiving a ton of help requests for controlling the AL5D from a PS2 controller. We have been sending them to this tutorial. lynxmotion.com/images/html/build091.htm
However we have found a bug in the program. We are in the process of documenting the new version of the code. It will be done by the end of work today. We are sorry for the inconvenience this has caused. The new code will allow using the Bot Board II / Atom Pro with or without the SSC-32.
This is an unlisted video because I’m trying to help here not broadcast problems with these cool products - I’ll take it down too once this gets resolved.
Is this the same problem everyone else is having? Also maybe I missed it but version numbers in the source code might be a good idea - that still might be my problem now.
Yes same problem for us as well with the ALD5 arm. The new link to the code is not working right, that is what we think the problem is. It is our hope that it gets fixed today.
thanks for the link - how did you find it? The broken one I sent was right from the tutorial. anyway I tried it - that seems to be a very different program not just a bugfix.
Anyway I loaded it and unfortunately no luck. I believe the program is running because when I press ‘start’ I hear the enable/disable tones. But none of the servos will move - arm remains limp. (and again, I can check out each axis separately with lynxterm or with the previous program too)
Has anyone out there got something to work? I’m using brand new all Lynxmotion parts and no luck.
I have the new connection set up between the SSC-32 and BB2, and the baud rate has been adjusted, but the arm works very slowly, and it spazzes out. The home postion in the program also sends the arm so far back, that I needed to remove the boards and put them away from the arm so they wouldnt be crushed. New controls are also very strange, and for some reason, anything that should be done with the left, is controlled with the right, and so forth, not to mention that the wrist rotate doesnt stay in the postion i move it to…it just goes back to where it starts.
I took a look again at the original arm_pro1.bas program to see if I could figure out what may be broken. I think I found at least one of the major issues and may have resolved it. The short answer was there were two variables (TMPYPOS, TMPDISTANCE) that were defined with the type of LONG which were trying to hold signed values, so they needed to be changed to SLONG.
You can try the same in the original program if you like, or included is an updated version. However in my version I have updated the SSC-32 to be on the new IO pin and higher baud rate. Instead of hard coding the baud rate in each of the Serout commands, I used a constant which if you prefer the older slower version you can simply change that constant to i38400 instead of i115200.
Hope this helps
Kurt
P.S. - If there are still issues maybe should try changing all LONG variables to SLONG variables. arm2_pro.bas (15.6 KB)
Thanks Kurt - I have now also set up the new connection between SSC-32 and BB2 but still no joy. When you power on the SSC-32, it’s light comes on until it get serial activity - and it’s staying on for me now - so i think the serial connection is not right - but i have checked the jumpers carefully.
Confusion point: Kurt you indicated the rate is 115200 with both jumpers installed. The tutorial diagram also shows both jumper - but the table is written as 38.4k. which is right?
Hurray it works!! I finally gave up on the SSC-32 method and just tried the BB2-only method and that worked on the first try. Still some minor problems now - the radio doesn’t link reliably i have to power-cycle many times, and the gripper needs some adjustment - the new program works differently and opens the gripper automatically so some tuning is needed - but anyway we’ve over the big hurdle now. Thanks everyone. Geez this would be hard for a new customer to figure out I hope Lynxmotion clarifies those tutorials and fixes the broken links - and I never could get the SSC-32 method to work.
Now back to your setup. Since I did not see a picture of your wiring I can not for sure help figure out what is happening or not. If you use the program I updated this morning, you will see two defines:
SSC32 con p11 ;p8
SSC32BAUD con i115200 ; i38400
As I mentioned it is currently defined for P11, where the original program was on P8. If you are using the original BB2 to SSC-32 cable that had just 2 wires, you would simply need to plug with 2 female pins into the SSC-32 with the black wire connected to GND. On the BB2, you would plug the 3 wire connector into P11, with the black toward the outside of the board, which would put the yellow wire to the inside row and the middle pin is skipped.
If you are using the modified Servo extension wire approach, you plug the unmodified plug into the SSC-32, again with the Black connected to GND. On the modified end, where you remove the Red wire from the cable, you plug the red wire into the signal pin of P11 (The row toward the inside of the board). You then plug the cable plug with the other two wires into P12, with the black wire connected to ground. In this case the Yellow wire connected up to P12 is not used, but in some programs, we use this wire to receive information back from the SSC-32, like has it completed the previous move or not.
As you mentioned the other program can now be configured for either using an SSC-32 or not, but if you use the SSC-32, it expects the wiring to be as I mentioned here, where the program communicates using P11 to talk to the SSC-32.
For those of you who were using the unmodified version of arm1_pro.bas with the problem and wish to try the above program without modifying your hardware setup. You can simply change the two lines I mentioned above to:
there are I believe, as of this time, two problems with it:
1.) the serial port rate is confusing. The jumpers are shown to configure it to 115.2k. The pattern on the circuit board itself indicates that too. However the table2-2 in the tutorial says 38.4. (I think the table needs to be updated?) In kurte’s updated program (see above) you can select.
2.) the link provided for the .bas program in the tutorial is broken. Thanks to kurte for providing the correct one: lynxmotion.com/images/files/ps2arm1.bas
is that correct? that’s not what the updated tutorial shows, it shows the red in 12 and the other two in 11. Is that a typo in that post, or did you switch it in the code?
Also, I still feel like the controls are a bit funky, but this new update is better. Are there any programs that give a different buttons to different servos (aka, each servo can move independently)? I personally feel like that would be easier to control than the current program.
Probably an issue with tutorial: as pins 12-15 are used for the SSC-32. Hopefully Monday or maybe Tuesday (as Monday is a legal holiday), they can make a few minor tweaks to the tutorial to fix the issues that have come up…
As for using stick/direction to control one servo. I did that a long time ago using DIY XBee remote control for my Rover that had an arm on it. That is I used the joysticks to emulate the controls of a CAT backhoe… Maybe I will play around and try it on the PS2 control software…
pins 12-15 are currently occupied with the PS2 receiver… and the code sort of works using pins 11 for yellow/black and red in 10. (my mistake, never 12)
Independently controlled servo software would be really awesome, thanks!
I hacked a bit on Arm2_pro.bat file and have some rudimentary backhoe (Cat) type interface. Probably still needs lots of tweaks! All of the changes for this were put under #ifdef.
The idea is that if you press the R3 button (pressing in the right joystick), it toggles on or off the CAT mode. In Cat mode, The Left joystick controls the BOOM (Base and Shoulder) and the Right Joystick controls the Dipper and Bucket(Elbow and Wrist). I probably need to go outside and refresh myself on the real controls to make sure I don’t have any of the operations backwards…
You may want to play with the code to control how fast the program will allow each joint to move.
Again this not official or anything, but if you would like to try it out…
Kurt
EDIT: Changed the two remaining LONG variables to SLONG (TmpCos probably needed it, TmpSEWSEW - probably does not) arm3_pro.bas (17.1 KB)
the broken link is fixed, the table show 115.2, and all is well. Thanks guys.
I’ve been successful to get the arm to work now with both BB2-only and BB2 w/SSC-32. Yay everything works! Ok now on to the next issues - i will post separately - but has to do with gripper control and getting the RC link to sync more robustly.
Important note for those using this code: There is a DEFINE in the code you need to set correctly to enable the BB2 w/SSC-32 mode. I missed that first time around.