Interfacing P4 and a car... - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Hardware > Monitors, Printers and Peripherals
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 08-20-2003, 11:01 PM   #1 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default Interfacing P4 and a car...

Hey guys... remember me? I was here for a while and left again? Anyway this is kinda of an Hardware question for any HW experts out there.

This year(final year) of my technical education we have make a big project to show. So me and my group members decided that we make kind of an interfaced thing between a computer and a external computer. So what we're planning to do is make a car (simple box with 4 wheels) and some how get it interfaced with a computer. How is that possible?

Like if your press the up arrow the car will go up, if you press down it will go down and left and right. You get the point...

One of my friends told me that one guy some how interfaced a few LEDs to the printer port and made them glow by pressing keys or something. One guy in another forum told me to do it through the serial ports (which I know nothing about).

Any one hear know anything of this?

We've studied the basic micro controllers (8155, 8255, 8279, etc) so I have a little know how of how interrupts and such work.

Any idea any one?
__________________

Myth Pharoah is offline  
Old 08-21-2003, 05:10 AM   #2 (permalink)
True Techie
 
Join Date: Jul 2003
Posts: 141
Default

Ok.. I did a bit of work with this kinda thing a LONG time ago.. I'll try to dredge up the memories here for you..

Probably the easiest way would be to go through a serial port.. A serial port is just a simple comm port and operates at a very base level (information goes in... information comes back.. That's it)..

Where you are going to run into a bit of a problem is with the interpretation of that information. You would have to code a program that sent information to the serial (or comm) port. That's fairly easy to do (I was doing it in Qbasic), and very well documented in the programming languages that I have seen/used. Since there isn't really anything that the computer will need to be checking in relation to the activity of the "car" you won't need to worry a whole lot about any information coming back. In fact, there shouldn't be any coming back..

However, and here is where it gets tricky.. On the "car" end.. you will need a curcuit board of some kind that interprets the information coming from the computer. The card would follow this logic patern -when I recieve instruction A I will send a digital signal to curcuit B.-

Curcuit B would optimally be connected to a actuator of some sort that would close a curcuit and cause an action (ie causing the rear wheels to spin when pressing the backward and forward arrows).

This is very similar to the way an RC car works. The only major difference would be that the "car" and computer would be physically connected with a cable.

I would look very closely at how an RC vehicle works and fashion it after that. You can get RC actuators very inexpensively now, and I am sure that there are probably lots of books available about how RC vehicles work..

Hope this helps some..

Alexander
__________________

__________________
Thermaltake Xaser II A5000C (w/ 5 case fans)
AMD 2500+ (OCed to 3200+)
Asus A7N8X Deluxe
1 Gig Corsair XMS low latency pc3200
2x 80g Maxtor SATA (w/ Raid 0)
128Mb Nvidia GeForce FX 5700 Ultra
480w Thermaltake PSU
Video Capture Card (titantv.com ROCKS!)
16 Sony DVD Rom
52x/32x/52x Optorite CDRW
Alexander is offline  
Old 08-21-2003, 03:06 PM   #3 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default

Wow, thanks man.

What is RC cars?

Also is it possible through parallel ports?
Myth Pharoah is offline  
Old 08-21-2003, 03:11 PM   #4 (permalink)
True Techie
 
Join Date: Jul 2003
Posts: 141
Default

RC - Remote Control (like Tyco RC)

http://www.tycorc.com/us/index.asp

I've never worked through parallel ports for a hardware interface, but I don't see why it wouldn't be possible. It's a type of communication port too, you would just have to do some research and find out how to code a program to pass information through it. It shouldn't be overly difficult, alot of printers still use parallel ports as the harware/PC interface.

Alexander
__________________
Thermaltake Xaser II A5000C (w/ 5 case fans)
AMD 2500+ (OCed to 3200+)
Asus A7N8X Deluxe
1 Gig Corsair XMS low latency pc3200
2x 80g Maxtor SATA (w/ Raid 0)
128Mb Nvidia GeForce FX 5700 Ultra
480w Thermaltake PSU
Video Capture Card (titantv.com ROCKS!)
16 Sony DVD Rom
52x/32x/52x Optorite CDRW
Alexander is offline  
Old 08-22-2003, 07:28 AM   #5 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default

No the problem is how to interpret that signals sent through the port. I'm pretty sure sending data will be easy, but can I understand it? I can make it so that when the up arrow is pressed a certain switch goes into ON state and so on?
Myth Pharoah is offline  
Old 08-22-2003, 09:17 AM   #6 (permalink)
Techie Beyond Description
 
Apokalipse's Avatar
 
Join Date: Jun 2003
Location: Melbourne, Australia
Posts: 14,559
Default

i'm wondering what sort of information you would be sending to and from the "car" anyway, would it be to tell the car to make an action or is it something completely different?
__________________
Apokalipse is offline  
Old 08-23-2003, 01:33 PM   #7 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default

Well I want it this way.

I'll have 4 different circuits for each direction movement.

So what I want is, when I press the up arrow, the switch for going forward will be go into ON state, or if not the circuit will be completed in other words.... how do I do that? Transistors?

So like when I press the up arrow key, some signal is sent through some silly port, which completes the front motion circuit.

Any idea how I can do this?
Myth Pharoah is offline  
Old 08-23-2003, 09:37 PM   #8 (permalink)
Techie Beyond Description
 
Apokalipse's Avatar
 
Join Date: Jun 2003
Location: Melbourne, Australia
Posts: 14,559
Default

then it would just rely on what hardware you've got for it:
yes i think having the right transistor would help; there are different types of transistors, the"AND" "OR" "XOR" "NAND" "NOT" "NOR" - there might be more

XOR:
1 & 1 = 0
1 & 0 = 1
0 & 1 = 1
0 & 0 = 0

AND:
0 & 0 = 0
0 & 1 = 0
1 & 0 = 0
1 & 1 = 1

OR:
0 & 0 = 0
0 & 1 = 1
1 & 0 = 1
1 & 1 = 1

NAND:
0 & 0 = 1
0 & 1 = 1
1 & 0 = 1
1 & 1 = 0

NOR:
0 & 0 = 1
0 & 1 = 0
1 & 0 = 0
1 & 1 = 0

NOT: just cancels everything out
1 = 0
0 = 0
__________________
Apokalipse is offline  
Old 08-24-2003, 12:32 AM   #9 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default

Well I know all those operations and their truth tables... but how do I understand them? I'm know I'm being stubborn here but I have no idea.

Like say I send a signal over the 3 pin(that's a data pin right?) to the car. Now the 3rd pin is connected to the forward motion circuit, ok?

Now on the car, I only have 2 motors to control motion, and now the 3rd pin is connected to this forward motrion circuit.

So how does when sending say logic 1, to pin 3 complete that circuit?
Myth Pharoah is offline  
Old 08-25-2003, 09:57 AM   #10 (permalink)
Junior Techie
 
Join Date: Mar 2003
Posts: 74
Send a message via ICQ to Myth Pharoah
Default

Hello?
__________________

Myth Pharoah is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 05:43 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.