somewhere in... blog
x
ফোনেটিক ইউনিজয় বিজয়

গাড়ী চালান কম্পিউটার দিয়ে

০৫ ই মে, ২০১১ রাত ১০:০৪
এই পোস্টটি শেয়ার করতে চাইলে :

ছোটবেলায় আপনারা নিশ্চই রিমোট কন্ট্রোল গাড়ী চালিয়েছেন সবাই।আজ আমরা সেই গাড়ী চালাব কম্পিউটার দিয়ে।চলুন শুরু করা যাক।
আমি একটা ডকুমেন্ট লিখেছি। সকলের সুবিধার জন্য ইংলিশ এ লিখলাম।
পুরো রিপোট নিচের লিঙ্ক এ দেয়া আছে ছবি সহ।আশা করি আপনাদের ভাল লাগবে। নিজেই বানিয়ে দেখুন না কেমন মজা।:D pc controlled RC car Document.pdf

1. INTRODUCTION

Interface computer with external device is quite enjoyable and interesting. We can command any device connecting with pc through software. A radio controlled car is our interfacing project which can be operate through keyboard. The goal of this project is to learn and create an opportunity to give command any device with radio frequency via computer. So we builds a communication with RC mini car with Computer.

2. TOOLS & MATERIALS REQUIRED:|

HARDWARE
1. Mini RC Car & Remote
2. (5) Wires 1-2ft long (or 1 cat5 network cable)
3. Misc. small wires
4. Wire Stripper (or knife)
5. Screwdriver(s)
6. Scissors or Wire Cutters
7. Soldering Iron.(Some basic soldering skills)
8. Solder
9. (4) 2N3904 NPN Transistors
10. (1) Small bread board
11. Male Parallel Port Connector/ cable
12. Digitial Multimeter if Avaliable

SOFTWARE
1. Visual basic 6 or later.
2. Port90int api.
3. Dlportio.dll



3. PROCEDURE;)
Step 1:
• Screw Hole Locations
• Remove the screws and the remote face should come off easily.
• Take note of the button locations and remove the bottom right screw holding the PCB in place.
• The PCB is still attached. Snip the wires close to the circuit board, but leave enough of the wire to identify the color, for when re-attaching later.
• The PCB should now be free, making it easier to work on.
Step2:
• Turn over the PCB (printed circuit board).
• Under each button there are four solder joints. These are actually (2) sets of (2) joints.
• Identify the wire that the negative side of the battery was connected to. This will connect to one of the large green areas on the board.
• For each switch, two of the solder joints will be located in this green region. Leave those joints alone.
• What we are concerned with, is the positive "side" of the switch. For each switch, you need to identify which side is negative and which is positive.
• Solder a wire onto each positive side and one wire to a negative terminal (there are many negative terminals on the PCB, it doesn't matter which you choose).
• We have 1 wire per switch soldered, and one wire to the negative terminal. Our board, with the wires soldered can be seen to the left. Boxes are drawn in to show the same groups of four shown above.

Step3:
This is the most challenging part of the project.
• Take the male parallel port connector cable and solder short wires to pins 2,3,4,5,23.
• Pins 2-5 will carry the data (forward, reverse, left, right) and pin 23 is ground. Side note: when doing any pc-parallel port interfacing, pins 2-9 are easily controlled data pins and pins 18-25 are all ground. Other pins have specialty functions and can be used in interesting ways.
• The rest consists on building a circuit, using the schematic (diagram) we have made up.
• For this we need, a bunch of small wires, solder board, (4) 2N3904 NPN Transistors.
• Print out the schematic below and build the circuit. (Note: the ground is the Parallel Port Pin 23 and Remote Negative Terminal connected together, there is no 'third' ground.)

4. SOFTWARE

• The remote will still function normally if you use it just by pressing the buttons, but to control it with the computer, software is needed.
• We built this hardware and wrote the software to control it. To control what we have just constructed, we will need the software as well.
• To make the software work, we need to know the port address of your parallel port.
• The most common address (888) is the default.
• The software was written in Visual Basic 6 or later.
• We also need to run this software Port90int api (its for load the DLPORTIO.sys) and DLPORTIO.dll.
• Port90int api must install and DLPORTIO.dll must place in rc_codeProject1.NETbin.
• With the software, the computer sends a signal from the parallel port to the transistor.
• The transistor closes the circuit between the ground and the positive side of the button switch. This is the exact same thing that happens when we press the button manually. So essentially, the computer is pressing the buttons for you.
• Because we can control the computer, it means we can make the car programmable and other neat stuff like that.
Software Foreground:

Source code: B-)
Rc_code: (Form1.vb)

Option Strict Off
Option Explicit On
Friend Class Form1
Inherits System.Windows.Forms.Form
' Programmed by Farjana Yeasmin Omee, Farzana Haque Mitu, Shiam Shabbir Himel

'

Public address As Short 'to store the parallel port address'
Public output As Short 'to store the value to be output to be put to the parallel port'
Public down, up, lleft As Object
Public right_Renamed As Boolean 'to keep track of which buttons are already pressed
Private Declare Sub DlPortWritePortUchar Lib "dlportio.dll" (ByVal Port As Integer, ByVal Value As Byte)

Private Sub Form1_KeyDown(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Dim KeyCode As Short = eventArgs.KeyCode
Dim Shift As Short = eventArgs.KeyData &H10000
'------------------------------------------------------------------'
'This section of code detects which key is being pressed. Once the
'key is pressed, it changes the colour of the label to red and adds the
'correct value to ouput. 1,2,4,8 are the correct values. To write
'to the parallel port, it's done in binary. 1 in binary is 00000001
'2 in binary is 00000010, 4 in binary is 00000100, 8 in binary is 00001000
'so by saying "out DlPortWritePortUchar, 4" we are actually turning on one pin of the parallel port
'If we say "out 888, (1+2)" or "DlPortWritePortUchar 888, 3" we are turning on two pins, pins 1 and 2.
'-------------------------------------------------------------------'

If KeyCode = System.Windows.Forms.Keys.Up And up True Then
Label1.ForeColor = System.Drawing.ColorTranslator.FromOle(&HC0) : output = output + 1
up = True
End If

If KeyCode = System.Windows.Forms.Keys.Down And down True Then
Label2.ForeColor = System.Drawing.ColorTranslator.FromOle(&HC0) : output = output + 2
down = True
End If
If KeyCode = System.Windows.Forms.Keys.Left And lleft True Then
Label3.ForeColor = System.Drawing.ColorTranslator.FromOle(&HC0) : output = output + 4

lleft = True
End If
If KeyCode = System.Windows.Forms.Keys.Right And right_Renamed True Then Label4.ForeColor = System.Drawing.ColorTranslator.FromOle(&HC0) : output = output + 8 : right_Renamed = True
Label6.Text = CStr(output) 'This is only for debugging. This is the value that is output to the parallel port
DlPortWritePortUchar(address, output) 'The command to output to the parallel port
End Sub

Private Sub Form1_KeyUp(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
Dim KeyCode As Short = eventArgs.KeyCode
Dim Shift As Short = eventArgs.KeyData &H10000
'------------------------------------------------------------------'
'This section of code detects when a pressed key has been lifted.
'changes the label's colour back to black and subtracts a value from
'output. It does the opposite of the keydown code, in that it turns
'off a parallel pin rather than turning it on.
'-------------------------------------------------------------------'

If KeyCode = System.Windows.Forms.Keys.Up Then
Label1.ForeColor = System.Drawing.ColorTranslator.FromOle(&H0) : output = output - 1
up = False
End If
If KeyCode = System.Windows.Forms.Keys.Down Then
Label2.ForeColor = System.Drawing.ColorTranslator.FromOle(&H0) : output = output - 2
down = False
End If
If KeyCode = System.Windows.Forms.Keys.Left Then
Label3.ForeColor = System.Drawing.ColorTranslator.FromOle(&H0) : output = output - 4

lleft = False
End If
If KeyCode = System.Windows.Forms.Keys.Right Then Label4.ForeColor = System.Drawing.ColorTranslator.FromOle(&H0) : output = output - 8 : right_Renamed = False
Label6.Text = CStr(output) 'This is only for debugging. This is the value that is output to the parallel port
DlPortWritePortUchar(address, output) 'The command to output to the parallel port
End Sub

Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
'Just setting stuff up:
address = 888 'Parallel port address. Change to whatever it needs to be.
'Note: 888 in decimal is 0x378 in hex. Other popular addresses are 658 and 956.
output = 0 'starts output off at 0
Label6.Text = CStr(output)
DlPortWritePortUchar(address, output) 'makes sure nothing it being output to the parallel port as soon as the program starts.
End Sub
End Class


১টি মন্তব্য ১টি উত্তর

আপনার মন্তব্য লিখুন

ছবি সংযুক্ত করতে এখানে ড্রাগ করে আনুন অথবা কম্পিউটারের নির্ধারিত স্থান থেকে সংযুক্ত করুন (সর্বোচ্চ ইমেজ সাইজঃ ১০ মেগাবাইট)
Shore O Shore A Hrosho I Dirgho I Hrosho U Dirgho U Ri E OI O OU Ka Kha Ga Gha Uma Cha Chha Ja Jha Yon To TTho Do Dho MurdhonNo TTo Tho DDo DDho No Po Fo Bo Vo Mo Ontoshto Zo Ro Lo Talobyo Sho Murdhonyo So Dontyo So Ho Zukto Kho Doye Bindu Ro Dhoye Bindu Ro Ontosthyo Yo Khondo Tto Uniswor Bisworgo Chondro Bindu A Kar E Kar O Kar Hrosho I Kar Dirgho I Kar Hrosho U Kar Dirgho U Kar Ou Kar Oi Kar Joiner Ro Fola Zo Fola Ref Ri Kar Hoshonto Doi Bo Dari SpaceBar
এই পোস্টটি শেয়ার করতে চাইলে :
আলোচিত ব্লগ

পানির অপচয় রোধ: ইসলামের চিরন্তন শিক্ষা এবং সমকালীন বিশ্বের গভীর সংকট

লিখেছেন নতুন নকিব, ১৫ ই ডিসেম্বর, ২০২৫ সকাল ৮:৪৬

পানির অপচয় রোধ: ইসলামের চিরন্তন শিক্ষা এবং সমকালীন বিশ্বের গভীর সংকট



পানি জীবনের মূল উৎস। এটি ছাড়া কোনো প্রাণের অস্তিত্ব সম্ভব নয়। পবিত্র কুরআনে আল্লাহ তা'আলা ইরশাদ করেন:

وَجَعَلۡنَا... ...বাকিটুকু পড়ুন

মায়াময় স্মৃতি, পবিত্র হজ্জ্ব- ২০২৫….(৭)

লিখেছেন খায়রুল আহসান, ১৫ ই ডিসেম্বর, ২০২৫ সকাল ৯:০৭

ষষ্ঠ পর্বের লিঙ্কঃ মায়াময় স্মৃতি, পবিত্র হজ্জ্ব- ২০২৫-….(৬)

০৬ জুন ২০২৫ তারিখে সূর্যোদয়ের পরে পরেই আমাদেরকে বাসে করে আরাফাতের ময়দানে নিয়ে আসা হলো। এই দিনটি বছরের পবিত্রতম দিন।... ...বাকিটুকু পড়ুন

হাদিকে shoot করে লাভবান হলো কে?

লিখেছেন সৈয়দ মশিউর রহমান, ১৫ ই ডিসেম্বর, ২০২৫ বিকাল ৩:২৪


শরিফ ওসমান হাদি যিনি সাধারণত ওসমান হাদি নামে পরিচিত একজন বাংলাদেশি রাজনৈতিক কর্মী ও বক্তা, যিনি জুলাই গণঅভ্যুত্থান-পরবর্তী সময়ে গঠিত রাজনৈতিক-সাংস্কৃতিক সংগঠন ইনকিলাব মঞ্চের মুখপাত্র হিসেবে পরিচিত। তিনি ত্রয়োদশ... ...বাকিটুকু পড়ুন

আধা রাজাকারি পোষ্ট ......

লিখেছেন কলিমুদ্দি দফাদার, ১৫ ই ডিসেম্বর, ২০২৫ বিকাল ৩:৫৬


আমি স্বাধীন বাংলাদেশে জন্মগ্রহণ করেছি। আমার কাছে একাত্তরের মুক্তিযুদ্ধ, স্বাধীনতা, বা পূর্ব পাকিস্তানের সঙ্গে আজকের বাংলাদেশের তুলনা—এসব নিয়ে কোনো আবেগ বা নস্টালজিয়া নেই। আমি জন্মগতভাবেই স্বাধীন দেশের নাগরিক, কিন্তু... ...বাকিটুকু পড়ুন

ইন্দিরা কেন ভারতীয় বাহিনীকে বাংলাদেশে দীর্ঘদিন রাখেনি?

লিখেছেন জেন একাত্তর, ১৫ ই ডিসেম্বর, ২০২৫ বিকাল ৫:২০



কারণ, কোল্ডওয়ারের সেই যুগে (১৯৭১সাল ), আমেরিকা ও চীন পাকিস্তানের পক্ষে ছিলো; ইন্দিরা বাংলাদেশে সৈন্য রেখে বিশ্বের বড় শক্তিগুলোর সাথে বিতন্ডায় জড়াতে চাহেনি।

ব্লগে নতুন পাগলের উদ্ভব ঘটেছে;... ...বাকিটুকু পড়ুন

×