Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Question about using a laptop with robotics in general

Status
Not open for further replies.

IronFist

New Member
I've recently begun to like the idea of working on a robot that would make use of Visual Basic (it's all I know, and I could do great stuff with it) on a old laptop capable of running win98.
My dad would be able to help me with the dirty electronics aspect of it, but I had some questions about actually controlling input/output with the serial port (or any other methods, but I understand this is most "popular").

First, I'm not sure how you would actually communicate with the serial device controlling the motors/giving input. Would I be sending "packets" of data (in a way, like TCP/IP?), or would it be more like sending on/off signals on a single pin, and receiving on/off?

Also, I understand from talking to another person that the data I send to the "serial board" controls a low voltage rate in some cases. As I understood, this was not enough power to run any sort of motors I'd be using, so would I need to somehow "boost" the power, or could I use this as a sort of switching method?

As you can see, I'm very new to this idea, and I understand if you think I should look into this more on my own (I've been doing a fair amount of googling on the subject of "laptop robot", but not much on what I wanted to do).

In the end, I'm looking for a fairly understandable way (for a noob) to output/input to a device via serial or something to control motors and get basic switch sensor input.

Thanks for any help you can provide ;)
 
I don't know much about the serial port myself, but I know the max232 (I think thats it) is a popular IC used to interface a circuit with the serial port.

The parallel port is fairly easy to control, you simply send an 8 bit number, so less than 256, to the port and it is represented in binary on the output lines. I don't know how to do it in VB, but in c++ all that you do is _outp(0x378, i) where i is the number output. 0x378 is the most common address for the paralllel port.
 
I recommend Jan Axelson's book 'Serial Port Complete' and her web site.
**broken link removed**
She also has the information on using Visual Basic.
There is a parallel page too.
 
First of all, you need an interface.

I recommend the Velleman K8000 to start with .. you can get a PLC for it too(the K8001, powered by a PIC).
http://www.velleman.be (Can also be found at retailers .. Maplin is one of them)

If you wan't to interface anything straight to a laptop PC the easyest way to do it is using the
parallel port(like the K8000 does). The serial port is used for communication only.

The biggest problem in using a laptop PC(or any PC for that matter) to control low-lewel devices directly is the timings.
Since your laptop is running a multitasking operating system, you can never run a program in
real-time.

The best solution is to use microcontrollers for all low level operations, and simply use the
laptop PC to give orders to the MCU(microcontroller unit) over serial or parallel(or USB for
that matter..)

Here's a flowchart for one of my robots(it doesn't use a laptop at all, but a laptop could be
replaced for the "Main MCU" you can see there):
**broken link removed**

As you can see, everyting is cut down to different layers, and then the layers communicate
with the Main-MCU who makes the final call of every operation that's made.

You asked about serial communications:
Serial is (usually) basicly just a text-string that's sent out on a serial-port at some given speed.
ASCII is used the most.
You should be aware that most microcontrollers send out serial-signal where LOW is 0 and HIGH is +5VDC(varying on controllers), but the serial-port on your computer(RS-232) want's you to send it -5VDC to -15VDC for LOW and +5VDC to +15VDC for HIGH if I'm not mistaken(don't shoot me if I'm wrong, I try to use something from 7-10VDC)
There is a MAX-chip available that can make these voltages for you in an easy way.
I think it was the max-232 or something like that..

I'd recommend that you read as much about electronics as you can, and if you're not good ad
mechanics, you ought to find someone who can assist you in that area.
 
I forgot to mention that using Visual Basic with the K8000 is very easy. VB files come
with it with example-code and all.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top