View Full Version : Control Solutions

07-20-2008, 02:47 PM
There are several people working on a Mech, so I was wondering what others were using for their MCU's, Processing, etc? I'm a Mechanical Engineer by education and a construction planner by work, so sparky boxes aren't my specialty.

I was planning on using a Lynxmotion BotBoard 1 carrying an Basic Atom Pro and a PS2 controller for the User-Interface. I've spent about 12-13 hours trying to program it, and I have yet to be able to get the PS2 controller to talk to the Atom. Lynx claims there are some mods you have to make the board, but so far nothing has worked.

I'm now thinking about going wireless serial to a PIC 16F877 (or similar) and then just using serial servo controller to manipulate the servos, but I'm curious how others are planning to accomplish it.


07-20-2008, 03:11 PM
User/Control PC running C# Joystick interface program >> Send commands over wifi to socket server running on onboard Pico-ITX >> Pico runs a c# program for walking gaits, firing and control interface >> USB Bioloid Bus Board >> AX-12 servos.

Thats how it'll work in theory. Brushing up on my C# coding skills while I wait for more parts for my Mech.

07-20-2008, 05:37 PM
I too am a ME by training. The PS2 controller is an interesting controller. It is not an easy controller to interface to microcontrollers. The proper timing for reliable is communication back and forth between them is difficult to get right because of when you have to read data bits with respect to clock timing leading edges. Some people get it figured out, and other don't, and a lot of it has to do with the choice of microcontrollers, understanding exactly how the commands work with respect to timing, and how the programs are written.

If you haven't already done yet, get a copy of some of their PS2 controller examples. And duplicate their work to make sure that the PS2 controller is working. Their code works fine. There really isn't any modifications needed with the PS2 and the Basic Atom and the Bot Board. The best piece of equipment to get is the PS2 adapter cable they sell for a couple dollars. Plug that cable to the PS2 and the other end of the Bot board, down load one of the example programs, and you should be good to go.

I don't know why people are worried about the motor vibration wires. You either have power to the vibration motors, or you don't. The exact voltage doesn't matter. Higher voltages means they spin faster. I suppose there is an upper limit. But 5V, 6V, and 9V have all worked fine with me.

I have written and published several example programs in Servo Magazine with the PS2 controller using a Basic Stamp, Basic Atom, and SX microcontrollers.

I have not been impressed with the wireless PS2 type of controllers. If you think establishing reliable communication with a direct wiring with the PS2 is difficult. It becomes a lot more complicated when going wireless. Now you have to deal with lost/corrupt data streams. Very common problem. It gets worse the further the hand piece and the receiver module gets. Leave the room and close the door, and it becomes almost useless. Very weak RF transceivers in these devices.

I have had a lot of success with having a dedicated microcontroller converting the PS2 control signals into RS-232 serial data, and then using a BlueSMiRF serial modem to transmit the data to my robots. I used this approach and turned my RoboNova into a remote control sumo robot and have competed with it in a high RF noise environment with no problem.

I like using multiple dedicated microcontrollers doing different things. For example, you can't beat the SSC-32 for a serial servo controller. Thats a dedicated controller. Then there is a dedicated controller just to handle the RF communications. Then a different controller that talks to all the different devices and routes the appropriate commands to each other.

Hope this helps

07-20-2008, 05:54 PM
Hey LoDebar :)

We would love to have you post some of your programs or examples in the tutorial section or downloads section for others to learn from if you feel inclined.

07-21-2008, 10:21 PM
To: LoDebar, Yeah I tried several of the Lynxmotion example codes, but to no avail.

I'm leaning another route now. I've been playing with Microsoft Robotics Studio for a few weeks now, and this might be a nice little project to implement. I can do preliminary tests through a wired serial cable, and go wireless in the future. I haven't gone far enough into MSRS to see if it is a good match for this application, but we'll see.

Cutting-Edge Robotics

03-13-2009, 11:38 PM
i was gogin to uses an rc boat or plane control or something close to that, but id love to learn about the computer control! especialy with a joystick, that would just be so much eisier and more fun to controle, if anyones doing this please tell me!

03-14-2009, 12:12 AM
I think you'll find that you're not going to use an R/C-anything control with a humanoid... Reading the PWM is waaay beyond the capability of the processor you have spec'd. And trying to independantly control a dozen or more servos with a couple of thumbs would be somewhere between humorous and sad. Kinda like a train-wreck you can't look away from. ;)

03-14-2009, 12:17 AM
hmmm what would u sugest then?? and i was thinking of having the controler control a forward walking, backward, side to side, and turnings, not individual servos! :) that would be funny to see though! so what should i do?

03-14-2009, 12:54 PM
I solved the problem by using an onboard PC (http://reviews.cnet.com/4505-3121_7-31958097.html?autoplay=true&tag=rtcol;relvideos)...It sounds like if Tybs is running a Pico (http://www.logicsupply.com/categories/mainboards/pico_itx?referrer=googleAd&kw=pico%20itx&nw=search&cr=2683302865&pl=&gclid=CKuVhfnvopkCFRwDagodXXsfpw) then he has an onboard PC also. Others are using Xbee (http://www.trossenrobotics.com/store/c/3099-Xbee-Zigbee.aspx) interfaces which means they are controlling their micro controllers via serial from a PC, and offloading the PC to a remote location to save on weight...(I'm sensing a trend here.)

I also have a chip that can read PWM signals (http://www.mftech.de/usb-interface_en.htm), and converts them into USB joystick data...It shows up as an HID device. It worked pretty well with charlie at our guest house...but then at work seamed to pick up a lot of noise...I figure if I had a better radio that may not be the biggest problem...but I can control charlie over wifi anyway...so big whoop. One thing though...it would require a PC.



03-14-2009, 01:40 PM
Is there a chance for interfernce problems with Xbee's? I recall reading that the scoreing targets will also Xbee's.

03-14-2009, 01:41 PM
hmmm im a bit confused, if i brought my laptop, (litle Apple PowerBookG4), i could have a joystick controlled bot but it would need an onboard computer also? I think i could do that with a quad since it should be able to suport a good amount of weight.

03-14-2009, 02:40 PM
The XBee's are very interference tolerant. Each one is addressed. If you're not on the same address, it just aint gonna pay any attention. They can be jammed, but they're surprisingly resiliant and difficult to jam. They are, after all, industrial components.

03-14-2009, 02:41 PM
I'd be surprised to see a budget quad that could carry a powerbook.

The Powerbook could be sitting off being used as a terminal, and you could have a NanoITX or even just a simple servo controller like the SSC32 on the bot. A wireless link between them and it's like the SSC32 is plugged into your laptop.

03-14-2009, 03:22 PM
haha i didnt mean putting the power book on the bot, but using it to controle the bot, and i was thinking of using the SSC32 anyway, so what would i need to buy and what else woudl i need to do to get it controlled with my laptop as the controller?

03-14-2009, 09:21 PM
hmmm, the problem is, i odnt knwo much about this exept programming the main controler i was going to use, the basic stamp II on the Bot Board II, could i have it hooked up to that? i really dont know what to do abotu controlling it now taht my rc idea is out the windor :/

03-14-2009, 09:49 PM
hmmm, the problem is, i odnt knwo much about this exept programming the main controler i was going to use, the basic stamp II on the Bot Board II, could i have it hooked up to that? i really dont know what to do abotu controlling it now taht my rc idea is out the windor :/

Standard approach:
1) Laptop/PC with a joystick (or just using the keyboard) running some program, which translates strokes/movements into messages that are sent over a wireless protocol to the robot (common ones: XBEE, bluetooth, wifi for bots using onboard PC)
2) Controller on robot receives wireless information, converts it into movement. Some controllers can do this themselves, but often, and in your case, an additional device is needed:
3) A servo controller, such as the SSC-32, takes commands and controls servos.

Alternatively, you can combine 2&3 as just an SSC-32 (although I'm not sure which wireless devices it will work with...)


03-14-2009, 11:17 PM
thanks fergs, i think ill take option 1, ill search google for "how to controle a robot wirelessly with an XBEE and a PC" if im luckey i might find something, err it will probly take a while just to find something but oh well :-D ill be up late tonight, thanks fergs, i didnt know where to start. :)

03-14-2009, 11:59 PM
1,2, and 3 were steps not options... you'll need 2 and/or 3 to go with 1


03-15-2009, 01:47 AM
sorry didnt really read it, was looking through my Pbasic manuel at servo movement

03-15-2009, 02:00 AM
ok, ive been looking at the Xbee, and it seems pretty good to me, but there are two things im worried about, 1, getting it physically hooked up tp the bot board II, and how the heck id program the Xbee to comand the Basic stamp II. ill get it one day :/

03-15-2009, 03:00 AM
You don't program the XBee. It's a serial cable without a cable.

03-15-2009, 08:25 AM
Oh good, im still trying to find how id hook it up the the Bot Board II and like, what comands id use with Pbasic to control it, and how id set up a control program on my computer, i read somewhere it can be a .net , but if i wannted a joystick, C programming :( hmmm i just google my full question and see if i come up with anything, thanks Adrenalynn! :)

03-15-2009, 08:29 AM
ill also try and see if i can send a camera feed over the Xbee, if i find a good site or something, should i post the link here?

03-15-2009, 09:23 AM
YIPPEE! i found this scematic on another post!!!! exactly for what i want! Now i just need to see exacly how id conrole it from the computer end, im going to get the SEQ software for the SSC-32 if that makes any difference.

03-15-2009, 10:27 AM
ill also try and see if i can send a camera feed over the Xbee, if i find a good site or something, should i post the link here?

Won't happen, its low bandwidth. You need a wifi camera.

If you want to learn C#, I suggest picking up a book and learning from there. I used 'teach yourself C# in 24 hours", solid book.

03-15-2009, 10:33 AM
Thanks, ill look into that book, i really want to make the controles more fun with the joystick, and a separate left hand usb pluggin controle for the WASD keys instead of arrows, i need to research wifi cameras, i have no clue on how to use them :( '

for your amazing, awesomel, mech, it would be neat if u invested in on of those goggles with an acelleromiter to control pan and tilt for the guns and camera, just an idea, would be fun, but probly to expensive for the amount of fun, :/