Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: h3ro on July 31, 2007, 06:13:24 AM

Title: PC to RC connection, without microcontroller?
Post by: h3ro on July 31, 2007, 06:13:24 AM
Hallo,

I am looking for a device which I can plug into my PC and use to communicate with a standard RC receiver(Like the one you find in a RC car)
It also needs to be possible to control the device with c/c++. I have been looking for this for a long time now, but unfortunately I have not found anything I could use.

The thing is that I want to get into robotics, but I have close to no clue about electronics. But I am fairly experienced with normal RC stuff and some programming, so I was hoping that I could connect my PC to some RC equipment and control the serves directly for the PC, eliminating the scary microcontroller stuff.

Thanks for your time.
Ole Kristian
Title: Re: PC to RC connection, without microcontroller?
Post by: HDL_CinC_Dragon on July 31, 2007, 08:05:11 PM
Im sure you could do that with no problem using a serial port and cable from your computer to your RC transmitter.


But the fact of the matter if, you want to get into Robotics. You MUST work with micro controllers at some point. Otherwise its not really robotics...
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 01, 2007, 04:10:12 AM
Quote
But the fact of the matter if, you want to get into Robotics. You MUST work with micro controllers at some point. Otherwise its not really robotics...

I see your point. But for this project I am going to need a fair amount of processing power so I guess I can save a bit of money on using my PC to do the processing stuff instead of buying a really powerful microcontroller. 
Title: Re: PC to RC connection, without microcontroller?
Post by: Hal9000 on August 01, 2007, 05:42:24 AM
Wha? A serial port to an RC transmitter? I'm not too sure about that man

Maybe a parallel port may suffice

aka
http://ashishrd.blogspot.com/2006/11/controlling-leds-with-parallel-port.html (http://ashishrd.blogspot.com/2006/11/controlling-leds-with-parallel-port.html)

'nuff said

*kisses fist*
Title: Re: PC to RC connection, without microcontroller?
Post by: Gertlex on August 01, 2007, 08:56:11 AM
Bluetooth may be an option.  Not a cheap one though. (I could forsee it costing $75 just for the two blutooth components if you don't have any of it yet)

Then again I might be wrong. Is your plan here to *not* modify the R/C car or whatever?  My project with bluetooth (see a recent thread...) involved totally replacing the R/C guts of a car and using bluetooth + serovos + servo controller....

Edit: I hope we don't get on your nerves too much with the "oh you could do this instead."  I know the feeling of being set on getting a certain setup to work, while others are suggesting you start over with a totally different approach :)
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 01, 2007, 09:16:05 AM
Thank you for the ideas.

It is possible to connect the PC directly to the Rc transmitter, but that normally requires a fairly expensive transmitter ($1k++)

The bluetooth looks really nice, but Im not sure I have the money/experience to pull that off right now, but the link in your project is bookmarked. Going to be cheeking back on your thread to see how you do. Going to try something like that one day for sure.

I think for now I will try to  do as Hal9000 suggested. It looks the easiest/cheapest.
Anyone know if there is possible to add some kind of "charge security"(No idea what its called in English) to prevent me from destroying my PC? I have a old one I can play with, but it would be nice to be able to fuck up more the once :P

Thanks again. Feel free to come with more suggestions.
Title: Re: PC to RC connection, without microcontroller?
Post by: HDL_CinC_Dragon on August 01, 2007, 03:19:19 PM
"Charge Security" = "Surge Protection"

You could put a fuse in series with GND on the parallel port.

I know USB cables put out .4A(Checked it with my DMM lol) so perhaps a 1A fuse in series with GND should do what you need it to quite nicely... I dont think 1A will kill anything...

so just make sure the very first thing that your Ground wire touches is one end of a fuse and you should be ok =)
Title: Re: PC to RC connection, without microcontroller?
Post by: dunk on August 01, 2007, 04:55:22 PM
Quote
"Charge Security" = "Surge Protection"
no. he means "driver circuit".
the simplest form would be a single transistor between each pin and the load.

Quote
I dont think 1A will kill anything...
1A will permanently fry the driver in your parallel port.
do not connect anything that will draw more than a few milliamps to your parallel port.
if you want to know how much current your parallel port can source or sink, search for it. it won't take long.

everybody:
please be careful before suggesting people try very destructive things with their expensive equipment.

dunk.
Title: Re: PC to RC connection, without microcontroller?
Post by: HDL_CinC_Dragon on August 01, 2007, 06:14:21 PM
damn, sorry Dunk...
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 02, 2007, 04:05:34 AM
Quote
no. he means "driver circuit".
the simplest form would be a single transistor between each pin and the load.
Yes, that is what I mean. Name on technical stuff is often hard to find translations for, as all you non-english people probably know.

How do I find how "big" the transistor needs to be? I guess theres some kind of calculation to find it. Is it so that everytime I do something stupid the transistor blows and I have to replace it? Or does it work more like a buffer, protecting the PC from the dangerus A?

Thanks for the great help so far :)
Title: Re: PC to RC connection, without microcontroller?
Post by: Hal9000 on August 02, 2007, 05:52:21 AM
Wouldn't the uln2003 chip do this?

This is a motor driver chip of course, but this just has a tonne of darlington transistors in right?

Tell me if i'm wrong, but this is what i would try and use.
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 02, 2007, 08:59:43 AM
In my garage I found a few old Futaba 2-channel receivers that I can play with. Is this something I could use for my project or is it to hard/not useful?

If I choose to do this the "serial port way", what do I need to be able to make my engines turn both ways?

I have also been looking at the USB serve controller tutorial here at the page. That look like something that would be nice for my title project, but I looks kind of hard for being a first timer project.
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 08, 2007, 09:56:11 AM
I have bought a few LEDs to play with no. Starting simple.

When I connect the LEDs to the parallel port they start to glow. The glow no matter what I do.

Does anyone know of a simple software I can use to test things out? Dont want to start with the programming before I got it all working on the electronic side.
Title: Re: PC to RC connection, without microcontroller?
Post by: elixier on August 08, 2007, 11:56:16 AM
I have bought a few LEDs to play with no. Starting simple.

When I connect the LEDs to the parallel port they start to glow. The glow no matter what I do.

Does anyone know of a simple software I can use to test things out? Dont want to start with the programming before I got it all working on the electronic side.

Now start stepwise now
Step1: First of connect all the eight LED with positive leads to the corresponding output of the Parallel Port and the negaive of all LED connect it to the ground.

Step2: Remenber you are using your LED to get the driving current from the PC, so u must take extra care not to experiment more or be very precise in ur work.

Step 3 step 2 is mainly written because Parallel Port can drive or can source current up to 20mA.

Step 4: after the Hardware is ready now comes the software part.

Step5: U can use the function of the C++ to output a byte of information from the PC to be written to the Parallel Port and to ur Hardware ultimately.

Step 6: syntax of the function is: outportb(add,value);

step 7" remember to include "dos.h" header in ur program.

Step 8 an example of such a program is:
#include<stdio.h>
#include<dos.h>
void main()
{int x=378;
outportb(378,34x);
}

In outportb(add,value)

The add is the add of ur PC parallel port and value is the no in bits which u want to output.

Now to find the add of ur Parallel Port.....(XP SP2)

step1: Go to My Computer right clik MANAGE.
step2: go to DEVICE MANAGER.
step3:go to PORTS(COM & LPT)
step4: Go to ECP(Printer Port)
step 5: go to Resources and u will find ur Parallel Port Add.

END
Title: Re: PC to RC connection, without microcontroller?
Post by: h3ro on August 08, 2007, 02:24:03 PM
Thank you for that very good answare.

But "outportb" does not work. The compiler says its a new function thats not defined (dev-c++)
Maybe I am doing something stupid?

Also, dont I need something in order to access the port, due to security stuff in XP?

Just tried to download "visual c++ express", so I can you the inpout32.dll thing instead. What a pain!
First of all the windows page is impossible to manover around and the text there does not explain things at all. At least not for a beginner as me.
And I cant download the SDK as a setup file, I have to install it right away, which is great as my laptop dont have a internet connection.

If I had a Linux cd here right now I would change!
Ok, im finished whining over microsoft now.
Title: Re: PC to RC connection, without microcontroller?
Post by: Admin on August 11, 2007, 09:30:53 AM
I got EXACTLY what you want :P

http://www.societyofrobots.com/robotforum/index.php?topic=14.msg1953
(make sure you also check out the very last post for diagrams)