Society of Robots - Robot Forum

General Misc => Misc => Topic started by: JumpJet on October 01, 2007, 04:50:09 PM

Title: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 04:50:09 PM
what i want to do is hook my laptop to a robot chassis and us it to take "live" control of the robot.
However i know little about electronics (i can sodder!) almost no programming.

If anyone could help, i would be very grateful!
Title: Re: I want to make a PC-bot
Post by: creedcradle on October 01, 2007, 05:02:47 PM
if that is the case then to control the robot you can use the following

1. Parallel port- you can use Visual basic or C to program it and control the bot- you cant escape programming here  :D

2. serial port - (RS232) - still visual basic or C language can be used

3. to make it harder use USB control - this is the most complicated among the three, you will have complex circuitry

but as a beginner try to use parallel port
controls

on the electronics side:

1. you have to know the parallel port configuration ; use google or wikipedia

hope these helps

Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 05:10:45 PM
If i used a USB to serial converter would i still have to program in the USB langauge?

Also what kind of circuit would i have to use for the motors and IR rangefinder?
Title: Re: I want to make a PC-bot
Post by: creedcradle on October 01, 2007, 05:16:48 PM
If i used a USB to serial converter would i still have to program in the USB langauge?


laptop-usb-serial-robot --> then your pc will program the usb and your robot will be programmed using serial communication [say a microcontroller]





Also what kind of circuit would i have to use for the motors and IR rangefinder?

Admin has a tutorial for IR range finder; on the main page of SoR
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 05:18:10 PM
thanks, but will this give me live control?
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 05:28:55 PM
hey jumpjet if you want ez control use Phidgets.
check my blog of my pc-bot at erobots.blogspot.com


Sorry about not putting any videos or pics, im just so busy for a competition with another robot
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 05:36:42 PM
thanks, but that is a little out of my price range. Is there anything similar that costs less?

PS
your chives v2 looks like what i want to make.
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 05:43:41 PM
a phidget interface kit is only 70 bucks.

What is your price range, and what extra features do you want on your robot.
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 05:47:54 PM
i am not very worried about features, so i want the base to cost about $50 (spent all my money on the laptop) if i am being impractical tell me
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 05:50:46 PM
if you want to do it el cheapo way then make your control come from a serial port or a parallel port.
Look what this guy did - http://ashishrd.blogspot.com/ and also check his other projects.

I recall that if you download roborealm ( a free machine vision software) google roborealm, you can directly control the serial and parallel port! the control is in one of the things on the side.

Also you got to think about what base you want.  I used wheelchair motors( but only because sometimes I like to stand on chives and drive around with a joystick)

Provide a lot of details of exactly what you want your robot to do, approximate height, approximate weight, and budget.
Be here for another hour probably....
Keep em comin   ;D
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 05:55:43 PM
what i really ment was i want to spend 50 just on electronics

PS
thanks for your help
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 06:00:39 PM
You want something like this: https://www.zagrosrobotics.com/shop/item.asp?itemid=523&catid=1 (https://www.zagrosrobotics.com/shop/item.asp?itemid=523&catid=1)

Basically look for the parts for this base.

Search around for 12Volt 20inlb torque motors. ( thats the major cost!) Make sure its DC so it can run off batteries!           

You should wire the motors to your parallel port or serial port using relays ( details on my blog as well as a schematic) they are very cheap, probably less than 10 bucks for all the relays you need( 4 of them)

I would suggest you buy a cheap laptop on ebay and spend most of the money on parts, just make sure the laptop is XP or vista and has wifi..

Vista has excellent speech recognition which I use,

Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 06:06:26 PM
Duh! relays! of course! thank you!
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 06:09:54 PM
no problemo

post the motors you found and then one of us at the forum can tell you if there good for your needs.

As for relays I would check out AllElectronics.com       I bought automotive relays AND their relay sockets for cheap from them. But those relays handle like 30 amps.   First pick your batteries and motors, then your relays.
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 06:15:01 PM
a DC gearhead wheelchair motor like the one you used sounds right for my purposes. is there any specific kind i should look for?
Title: Re: I want to make a PC-bot
Post by: airman00 on October 01, 2007, 06:19:41 PM
wheelchair motors are overkill for what you want.....

if you decide to go with them, look what I wrote on my blog about using wheelchair motors



BUT BETTER YET
look what I found , exactly what you needed!
http://www.societyofrobots.com/robotforum/index.php?topic=1318.0 (http://www.societyofrobots.com/robotforum/index.php?topic=1318.0)

Title: Re: I want to make a PC-bot
Post by: JumpJet on October 01, 2007, 06:24:23 PM
wow that IS perfect.

I used Google SketchUp to make this 3D model. The internal components will be smaller in real life so there will be more room and instead of a car battery I will use some DeWalt LiIon batterys.
Title: Re: I want to make a PC-bot
Post by: creedcradle on October 06, 2007, 06:57:33 PM
Sketch observation:

it seems the angle with respect to the Y-axis is around 5 degrees,.. just make sure that your bot wont turn up side down when there is drastic change of speed, and also if you consider that your pc-bot would do a reverse direction then same thing may happen...
Title: Re: I want to make a PC-bot
Post by: airman00 on October 06, 2007, 07:02:38 PM
nice sketch but i would suggest the motors and robot being mounted on a flat wooden base with caster coming from under it.

Also, a  word of the wise. When buying the wiring buy different colors. Make your schematic and your robot color coded. If something fails  you know what to do! Seperate modules from each other for easy fixing( by module I mean power controller, interface ,etc.)

Also, install a kill switch. Read what I wrote here. Even if you are not using wheelchair motors it applies to you !
http://www.societyofrobots.com/robotforum/index.php?topic=1904.0 (http://www.societyofrobots.com/robotforum/index.php?topic=1904.0)

Hope I helped,
Eric
Title: Re: I want to make a PC-bot
Post by: Admin on October 11, 2007, 06:50:21 PM
Quote
Duh! relays! of course! thank you
just know that you can't directly drive relays with the serial port . . . I'd recommend something like this:
http://www.dimensionengineering.com/Sabertooth2X25.htm

(its too expensive for you, but it can accept serial commands)

Just google around . . .
Title: Re: I want to make a PC-bot
Post by: airman00 on October 11, 2007, 09:15:36 PM
Unless you use a microcontroller to decode the serial output and give digital output to the relays, duh!  :D
(or just use a parallel port to get digital output)

Hooray for relays!
Title: Re: I want to make a PC-bot
Post by: Admin on October 12, 2007, 04:33:45 AM
Quote
Unless you use a microcontroller to decode the serial output and give digital output to the relays, duh!
lol, no. relays require much more power than a decoded serial output can give . . . you need to amplify it with a mosfet (the hard way) or motor driver
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 12, 2007, 08:45:13 AM
what if i use a parallel port? don't they give, like, 5 volts?

or what about this? http://www.pololu.com/products/pololu/0101/ (http://www.pololu.com/products/pololu/0101/)
Title: Re: I want to make a PC-bot
Post by: airman00 on October 12, 2007, 10:58:59 AM
yes but you can have the parallel port switch a 5V relay which in turn switches 12V @ 5 amps!

The motor driver you posted looks good too but its for a microcontrollers serial port ( you might be able to use the computers serial port, but I personally do not know how)


Or use phidgets to control a relay which controls a motor( but you lose speed control by doing that)
check my blog for details or search google for phidgets ( only about $75 to buy)
Title: Re: I want to make a PC-bot
Post by: Admin on October 12, 2007, 11:36:15 AM
Quote
don't they give, like, 5 volts?
relays require power, which is voltage times current (not just voltage). serial/parallel ports cannot give out enough current to power a relay. and if you try, dont blame me for a fried serial port :P

that pololu controller will work, but you will need an rs232 adaptor between your computer serial/usb port and the controller (I havent read the manual, but Im fairly sure of it). adaptors cost between $5 and $20. or you can make your own with a max232 IC and 4 caps.
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 12, 2007, 12:05:55 PM
ok, thanks.

I received my pololu USB to serial adapter and motor controller today. I installed the drivers, but where do I start with progarmming?
Title: Re: I want to make a PC-bot
Post by: airman00 on October 23, 2007, 05:10:02 PM
What do you want  your robot to do?
Title: Re: I want to make a PC-bot
Post by: Admin on October 24, 2007, 04:45:45 AM
Look for sample code that uses your servo controller and figure out how it works. Google around for a bit, and check their forum for users who posted code.

(one of my biggest complaints about Pololu is they rarely write sample code for their own products)

Hmmmm what sensors do you plan to use? Have you considered RoboRealm software?
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 27, 2007, 09:38:29 AM
right now I would be happy if I could use the arrow keys to run the motors.
I have installed roborealm but I don't have a webcam.
I need a compiler right?
Title: Re: I want to make a PC-bot
Post by: airman00 on October 27, 2007, 05:47:27 PM
compiler for what?

In what language can you program the serial controller in?
Is it just directly to the serial port?


with my experience with Phidgets , I used Visual Basic. But then again ,that was an HID USB device



Hmmm, on Roborealm there are ways to control the serial port directly. Then you would have to find the proper command on the serial port to control it. Do some tutorials on RoboRealm and if you have any questions post on this forum or on the official RoboRealm Forum.

,Eric

p.s. I would suggest the Logitech Orbit webcam, it can pan and tilt. I bought mine on ebay.
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 28, 2007, 11:16:00 AM
I am using a USB to microconntroller serial coverter.
Title: Re: I want to make a PC-bot
Post by: airman00 on October 28, 2007, 11:48:56 AM
Ok,

any documentation online about it?


also, RoboRealm does have a direct Serial control program. ( though im not sure about the USB to serial part)
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 28, 2007, 12:26:16 PM
this is the adapterhttp://www.pololu.com/products/pololu/0391/ (http://www.pololu.com/products/pololu/0391/), and this is the controllerhttp://www.pololu.com/products/pololu/0101/ (http://www.pololu.com/products/pololu/0101/) I got the one that responds to 0, 1, 2 and 3.

new:
I hooked ut up and registers as COM4 on roborealm
Title: Re: I want to make a PC-bot
Post by: airman00 on October 28, 2007, 03:00:00 PM
Houston we have a problem.


The roborealm allows direct control to the SERIAL PORT and NOT the USB port.

Once you figure how to directly control the USB port from a program on your computer, then look at page 8 of the user manual http://www.pololu.com/products/pololu/0101/smc01a_user_guide.pdf (http://www.pololu.com/products/pololu/0101/smc01a_user_guide.pdf) for the syntax of the serial commands.

On the website it says
Quote
The USB adapter's drivers make it look like a standard serial port to the operating system, allowing you to connect to all of your existing software, such as servo controller interface programs, through a USB port.

If what the website says is true then you would just select the virtual serial port. Tell me what happens,( install all the drivers from the roborealm website)


read the user manual a bunch of times, and remember to look at circuits using that motor controller, and figure out the voltages and amperage needed to NOT fry the USB port/ serial port.

More details about the virtual serial port or if its just a USB port!

,Eric

Title: Re: I want to make a PC-bot
Post by: JumpJet on October 28, 2007, 03:23:33 PM
I shows up as COM4 when I plug it in, so I gess it is a virtual serial port. What drivers on Roborealm? there is only one download.
Title: Re: I want to make a PC-bot
Post by: airman00 on October 28, 2007, 03:44:48 PM
no drivers, just download roborealm

use the serial commands found in the user guide for info.


It should be pretty straightforward from then on.


On roborealm click the Control tab on the left. Then click Other. Then click Serial.

There, youre all set!  :D
Title: Re: I want to make a PC-bot
Post by: JumpJet on October 28, 2007, 03:52:59 PM
Thanks, but I need help with code
Title: Re: I want to make a PC-bot
Post by: airman00 on November 02, 2007, 12:01:45 PM
Read roborealm tutorials on how to read key press events and then do an IF   THEN command to direct serial commands.


After you have researched it more , I will be able to assist you ( a bit)  :P

,Eric
Title: Re: I want to make a PC-bot
Post by: JumpJet on November 02, 2007, 02:30:29 PM
I could not find that. Here is what I have so far.[
Title: Re: I want to make a PC-bot
Post by: airman00 on November 02, 2007, 02:38:12 PM
Did the serial command you send control the motor controller appropriately? Meaning, did it work???


Here is the explanation for the IF command http://www.roborealm.com/help/If_Statement.php (http://www.roborealm.com/help/If_Statement.php)
for the key presses : http://www.roborealm.com/help/Keyboard.php (http://www.roborealm.com/help/Keyboard.php)


be sure to tell me how it goes!

,Eric



Title: Re: I want to make a PC-bot
Post by: JumpJet on November 02, 2007, 04:25:14 PM
No, it did not work.
Title: Re: I want to make a PC-bot
Post by: airman00 on November 08, 2007, 07:20:59 PM
look at the video at my blog for inspiration
http://erobots.blogspot.com (http://erobots.blogspot.com)


Did you get the serial controller to work? Or did you just give up?
Title: Re: I want to make a PC-bot
Post by: JumpJet on November 08, 2007, 07:45:31 PM
What video?

No, I was waiting for your advice
Title: Re: I want to make a PC-bot
Post by: airman00 on November 08, 2007, 09:16:16 PM
Oh sorry its not there yet
whatever it is here: http://www.societyofrobots.com/robotforum/index.php?topic=2314.msg15499#new (http://ttp://www.societyofrobots.com/robotforum/index.php?topic=2314.msg15499#new)


For the serial controller :
this is the best I  can tell you  , make sure you are giving the proper serial data at the right baud rate to the controller . Make sure the controller is powered and wired correctly.

Please post pics or even a video of your setup - how you wired the motors
also do some research on serial ports or post a new topic here specifically about using a serial port. Make sure not to fry the serial port!

If i think of anything , ill get back to you
Title: Re: I want to make a PC-bot
Post by: JumpJet on November 22, 2007, 10:31:08 AM
Ok, here is my set up. this is the link to the converter: http://www.pololu.com/products/pololu/0391/ (http://www.pololu.com/products/pololu/0391/)
Title: Re: I want to make a PC-bot
Post by: airman00 on November 25, 2007, 11:38:15 AM
Check to make sure that the motor controller is actually getting a serial signal in the first place.
Use a microcontroller to verify the signal.....



Please post screenshots of your RoboRealm program
make a screenshot like this http://kb.wisc.edu/helpdesk/page.php?id=863 (http://kb.wisc.edu/helpdesk/page.php?id=863)


I would suggest making a new thread to this one - the title should be something like USB to serial motorcontroller problems

be sure to write a ton of details on your setup
Title: Re: I want to make a PC-bot
Post by: JumpJet on November 27, 2007, 01:49:49 PM
I don't have a micro controller...

there is a screenshot on page 1