Author Topic: Computer to Robot  (Read 3722 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Computer to Robot
« on: June 30, 2007, 09:14:45 PM »
Can anyone please tell me how to make a program to control a robot through a serial port of a parallel port of a computer?
I need to know which programming language to use and how.
Please help
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline KambeiX

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: Computer to Robot
« Reply #1 on: June 30, 2007, 10:48:14 PM »
At the computer side, you can use the language you are most familiar with, like C, Visual Basic, java, etc.

As for the robot, you have many alternatives. For controlling DC motors, you can use the parallel port and some basic components, but if you want to control more devices like servos and monitor sensors, you should use a microcontroller with serial interface, there are many like pic and avr and program them to do serial communications with the computer.

Again, for the microcontrollers, you have many choices of programming languages. the most common are variants of C and BASIC.


Offline sotu

  • Supreme Robot
  • *****
  • Posts: 350
  • Helpful? 0
  • ïBB - Eye Biped Bot
    • Easy Built Biped Bot
Re: Computer to Robot
« Reply #2 on: July 01, 2007, 03:18:06 AM »
I'm having trouble with the same, so kambeix how do you make the microcontroller understand the different of the languages?
I dident really understand the question myself, but i know in my head what i mean and its hard to tell exactly what i mean.
Also im new in programming so if i decide to use, eks: BASIC or C how do i start writing it, if i have no idea at all?
How to build a biped bot:

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Computer to Robot
« Reply #3 on: July 01, 2007, 06:07:45 AM »
yes but what are the command I   use. Are there any sample programs online?
Like if I press the up arrow the robot should get a signal through the serial port to go forward. how do I actually program that on visual basic?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline KambeiX

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: Computer to Robot
« Reply #4 on: July 01, 2007, 03:07:11 PM »
Let's see...

Airman00:

First of all, if you don't know anything about programming, you should look for a plug-and-play solution, like the pololu USB 16 servo controller (http://www.pololu.com/products/pololu/0390/) and the SSC II (http://www.seetron.com/ssc.htm) which are compatible, among many others.

Try to find a motor/servo controller that has free software so you don't have to go into programming.

Then, if you really want to learn programming, start with some BASIC and Visual BASIC tutorials, you will find plenty of tutorials.


sotu:

For a microcontroller to understand a language, you need a compiler for that language / microcontrller.

For PIC microcontrollers, there is a free C compiler for PIC18F series, that you can download from microchip.com

There are also BASIC compilers like Proton and the one that comes with Pic Simulator IDE.

Also, if you buy a BASIC Stamp from Parallax, they provide software for programming in BASIC.

There is also Visual Programming languages like Niple (http://www.niplesoft.net) that don't require programming experience.



Offline suren

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Computer to Robot
« Reply #5 on: July 09, 2007, 07:40:08 PM »
Hi Airman,
I have done the similar thing.I controlled four motors and took a input from a IR sensor..
and the best thing if u dont want to use any difficult programming u can control it with matlab..It has very simple commands for parallel port and serial port..
but if u are still intrested in working with C,this article provides a complete solution to all your worries.
http://www.machinegrid.com/content/view/30/1/
http://www.machinegrid.com/content/view/31/1/
I am sure after reading these two articles you will not face any problems..

Offline Robotboy86

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 0
Re: Computer to Robot
« Reply #6 on: July 09, 2007, 08:52:03 PM »
Computer to robot is a bundle of worms all in itself..  basically the most common way to do this is to use "sub systems", which basically means you use MCU's with serial ports in order to control the smaller systems..

For example, in my balance bot I plan to use the basicAtom Pro-24m with an io board to control the balancing..  so it will take in the gyro's and acceleramators and do some quick calculations and then determine what motor commands to send to the h-bridge to control the motors.  It will do this and just repeat it forever, every calculation loop or so it will read the serial buffer to check for commands.  Such as go forward, back, side, side, etc etc.  Or requests for data and stuff...

While lots of robots use only a single MCU to do everything..   using a mini-itx or laptop as the brain of the bot.. you can link together a few mcu's and diffirent things VIA serial ports and create a far more robust robot.. and also use the mini-itx to do more crazy things.. such as wifi, blueototh, image proccessing, gps, etc etc..   a lot of things are avialable for computers now, that are NOT around for robots yet..


I feel mini-itx/laptop options allow really great starts to robots.. but it is more expensive. more complicated.. and can be seriously difficult.  As an example:

One might think that you can use the mini-itx to control quick responses such as bump sensors and such.. but the system is not meant for interrupts.  You have let the intterrupts be controlled by MCU's typically..  while mini-itx is great for mapping and all

ANyways, rambling :)

 


Get Your Ad Here

data_list