Control a RoboSapien from a PC

Hi,

I am contemplating buying a RoboSapien for fun and experimentation.

formatting link
I have found a site that lists the IR codes for the robosapien:

formatting link
And a Palm program that you can use to control it:

formatting link
What I was wondering was, would it be possible to use a cheap and cheerful USB IRDA adapter to send signals to it from a PC instead?

formatting link
That way I could write an API to control the device and make it do more interesting stuff!

Any thoughs would be greatly appreciated!

Thanks,

Bryan

Reply to
Bryan Duggan
Loading thread data ...

Hello Bryan,

great idea! I've been planning to do something similar myself. In fact, I've already bought the RoboSapien.

For the IR transmitter, I was planning to build a small circuit myself that attaches to a single bit of the parallel port (or, alternatively, one of the control lines of the serial port). The circuit would just be an 39.2kHz oscillator driving an IR LED, and controlled by this port pin of the PC. This reduces the real-time requirements of the software to a time resolution of 1200Hz, which makes it possible to do it on a very low-end PC/laptop or, alternatively, on a very advanced/inefficient operating system ;-)

IRDA is an interesting alternative, in that hardware is readily available or even already built-in in many laptops and PDAs. From the standards (at

formatting link
it seems that an IRDA transmitter does not do any modulation itself, it's just on/off pulses. That gives a lot of flexibility, but requires that you do the 39.2kHz modulation in software. Not a big deal for current computers, although under windows I'm not sure it will be trivial either. The main worry with standard IRDA hardware is that you need to somehow figure out how to control it from software.

One possibility would be to use the LIRC drivers,

formatting link
support both self-built hardware and IRDA, and WLIRC
formatting link
allows driving a simple LED+resistor from a serial port bit, even under windows. However, both LIRC and WLIRC seem to be limited to Windows95/98 or NT4, and the computer I am intending to run this on is running XP, which might complicate things. Maybe I'll reconsider and use an old laptop.

Another thing that I'd like to do is to add some feedback. The Robosapien is not exactly accurate as a feedforward robot, at least not if you are used to thinking about stepper motors, servos and the like. Reproducability is poor, even relatively simple things like walking in a straight line is not obvious, depending on how the arms are positioned and what it is carrying. Therefore, I am planning to use a simple webcam and some software, maybe in combination with a simple light on the Robosapien to allow the PC to figure out where the Robosapien is, and in which direction it is moving. This should make it possible to have the PC carry out more complex tasks, like sending the Robosapien to a predefined location with some accuracy.

A final modification I am planning is a charging station. I want to make metal strips beneath the "feet" connected to the battery compartments that are conveniently located there, and a thin plate with metal springs that the Robosapien can walk onto. By putting its feet on the springs, and having a charger connected to the springs, I can make sure the Robosapien will get charged. This will allow the PC to keep it awake indefinitely by sending at least once an hour or so a command to the Robosapien that prevents it from switching itself off. For this to work, I need the webcam thing to make sure the Robosapien can be reliably guided back to the charging station.

Does any of this make sense? Any comments/ideas?

Best regards,

Peter

formatting link

Reply to
Peter Baltus

Peter,

Some interesting ideas there. I went out and bought one on Saturday and I am impressed with it so far. I am a programmer, and I don't know much about electronics. I could build a circuit from a diagram at a push, but thats about it.

I was thinking of using one of those USB-IR transmitters to control robosapien such as a redrat:

formatting link
- Its $99 though!

Or a TIRA

formatting link
As regards feedback, I think its a great idea. I would like to use a wireless webcam.

I am a lecturer in Dublin. I think I will try and get my college to buy one and have a student do the work as a final year project!

My Robosapien does not seem to walk that well. In particular on a wooden perfectly smooth floor, he seems to get stuck. He seems to prefer carpet. Does yours do that?

Bryan

formatting link
>

Reply to
Bryan Duggan

Thanks for the pointer - I've found a similar mod. for the i-Cybie which uses a MAX233 (doesn't need external capacitors) at

formatting link
. I think a slight rewire of this might do the job. All being well, I should then be able to take control using an umbilical from a standard PC.

If the PC as a controller is viable, then the next step will be to get a Compact-Flash capable SBC running a Linux kernel that the RoboSapien can wear as a backpack. This would add plenty of opportunities for additional sensors etc.

Kinda busy till next week, expect some news then.

Reply to
Angus Marshall

Hello Bryan,

$99 for an USB-IR transmitter is rather expensive, the WLIRC transmitter consists of one resistor and one LED, which ought to be a lot cheaper, and shouldn't be difficult to build at all ;-)

In the "Pictures" section of

formatting link
there's a set of pictures about building a wireless cam into the RS, including type of camera etc. The receiver of such a cam could feed straight into a TV card on the PC. I have some code in Delphi that will fetch a picture from a TV card.

The idea about having a student work on it sounds good, that's a fringe benefit of being a lecturer that I hadn't considered yet.

My RS walks well on our smooth wooden floor, although it is not perfectly smooth any more (we had a rather large dog). When it get's stuck, is that because the feet keep sliding, or do the motors stop moving the legs/body?

Best regards,

Peter

formatting link
> >

Reply to
Peter Baltus

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.