Link to home
Start Free TrialLog in
Avatar of Polish_guy
Polish_guy

asked on

Controling A Robot thru a serial port

Hello I am looking to put together a robot and am wondering if i can control it thru the computer.. I heard that you can do it in qbasic... all i need is simply to know how to send a signal thru the port so ie. i can make a lightbulb blink... i know how to program in turing and a bit of qbasic and turbo pascal
Avatar of simonet
simonet
Flag of Brazil image

Hello,

interesting question!

I once bought a robotic arm (Scara) that I could control from my PC using Basic. I no longer have the robot nor the software, but here's where I bought it from:

Mondo-Tronics (RobotStore)
www.robotstore.com

They sell several kits (look in their Catalog) that allow you add serial interface connection to your robot. The kit also comes with a Basic "SDK" so you can easily control the robot.  

Basic you'll need to buy the Basic Stamp , which can be found here:

http://207.215.219.151/bin2/hazel.exe?client=89131133&action=serve&item=electronics/brains_controllers.html

Yours,

Alex
Why was my answer rejected?
Avatar of Polish_guy
Polish_guy

ASKER

because i burned out my mb....
ASKER CERTIFIED SOLUTION
Avatar of simonet
simonet
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Actually, in case you are not too keen on using QBasic, you can use C. That would probably make your job much easier. All you need to do to read/write a byte to the serial port is to use the inport() and outport() functions. Anyway, what's "mb"?
The parallel port is probably the best one to use.  You can have basically 8 out pins & 8 inputs (cant remember which pin numbers but you will find them in a wee search of the web).

The out pins can be connected to transistors which switch a higher current, so your parallel port is not doing anything outside its normal operational parameters.

QBasic has something like INP and OUT functions, but you can get a DLL someplace on the net that gives the same functionality in VB.

I have done this myself, but didn't get further than having 8 LEDs turning on & off on my desktop. Lots of potential there tho...

Les - lhf@galen.co.nz
I have controlled many things via serial and parallel ports over the past few years.  Both ands80 and Lupus are correct.  The parallel port will give you more inputs and outputs and the C programming language is much more powerful and versatile for such applications.  The IN and OUT functions of basic will, however, work for very simple port reads and writes.

As far as the parallel port inputs go the Data pins are pin numbers 2 - 9 representing Data Bits 0 - 7 respectively.  Pins 18 - 25 are ground.

You can build a simple open collector circuit to interface to the parallel port.  I have used such an interface mostly for controlling stepper motors.  There are countless websites that address the different ways for building these circuits.  Do a search for stepper motor driver circuitry and you should have no trouble finding schematics you can build.  I'm not sure how much you are familiar with electronics, but you will need to consider your voltage and current needs in order to build the proper circuit and avoid further "burn ups".  I might also suggest some optoisolators to totally isolate your PC from the outside circuitry.

Hope this gives you some direction and good luck.  Robots are a lot of fun.

Bob