0% found this document useful (0 votes)
38 views7 pages

Microcontroller and Embedded Systems: Project Description by M. Awais Ijaz

This document describes a project to control a remote-controlled vehicle from a computer. The project uses a microcontroller to receive input from the computer's keyboard via a serial connection. The microcontroller then sends signals to relays connected to the vehicle's motors to control its direction and speed. The key components needed are a microcontroller, serial connector, relays, RF transmitter and receiver, and motors. The software reads keyboard input and sends codes to control the relays for forward, back, left and right. The microcontroller at the receiver end controls the motors accordingly to move the vehicle.

Uploaded by

Awais Ijaz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views7 pages

Microcontroller and Embedded Systems: Project Description by M. Awais Ijaz

This document describes a project to control a remote-controlled vehicle from a computer. The project uses a microcontroller to receive input from the computer's keyboard via a serial connection. The microcontroller then sends signals to relays connected to the vehicle's motors to control its direction and speed. The key components needed are a microcontroller, serial connector, relays, RF transmitter and receiver, and motors. The software reads keyboard input and sends codes to control the relays for forward, back, left and right. The microcontroller at the receiver end controls the motors accordingly to move the vehicle.

Uploaded by

Awais Ijaz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Microcontroller and Embedded systems

Project Description By M. Awais Ijaz Abdul Rauf Atif Rahim ee307070 ee307184r ee307148r

To: Sir Hassan Bin Ahmed Project: PC controlled vehicle

Introduction
Imagine yourself controlling a wireless device using your Computer. We will incorporate this idea into the control of a remote control. We will control it from our computer with all for directions and speed control as well. The two major parts to the project is the computer software and the car hardware. The software consists of receiving input from the keyboard, decoding the input and outputting the data over the serial port to the microcontroller which will send it to the relays connected to remote control, at the receiver end the receiver will get the combination and forward it to microcontroller over the car which is having the instructions to operate motors.

What we will need?


A remote-controlled vehicle with a digital controller. That is, a controller that uses switches for forward/backward/left/right, not potentiometers.

Transmitter end:
Serial connector RS232. Max 232 Microcontroller with serial communication circuit. Uln 2803 4 Relays RF transmitter(remote control)

Receiver end:
RF receiver Microcontroller Uln 2803 Motors

Design

Relays
Front

Rs 232

MAX 232

ULN 2003

Back Left

Controller
Right

Motors
Forward/back

Receiver

ULN 2003

Controller

Left/right

Codes
Transmitter end

Transmitter

#include <AT89x52.h> void main() { Unsigned char c; SCON=0x50; TMOD=0x20; TH1=-3; TR1=1; while(1) { if(1==RI) { c=SBUF; if(c=='S') { P0_0=0; // connected to LEFT switch P0_1=0; P0_2=0; // connected to RIGHT switch P0_3=0; P0_4=0; // connected to BACK switch P0_5=0; } else if(c=='B') { P0_0=1; P0_1=1; P0_2=0; P0_3=0; P0_4=0; P0_5=0; } else if(c=='R') { P0_0=0; P0_1=0; P0_2=1; P0_3=1; P0_4=0; P0_5=0; }

else if(c=='L') { P0_0=0; P0_1=0; P0_2=0; P0_3=0; P0_4=1; P0_5=1; } else if(c=='F') { P0_0=1; P0_1=1; P0_2=0; P0_3=0; P0_4=1; P0_5=1; } else if(c=='H') { P0_0=1; P0_1=1; P0_2=1; P0_3=1; P0_4=0; P0_5=0; } RI=0; } } }

Transmitter end:
#include<AT89x52.h>

void delay(unsigned int D); void main() { P0=0x07; // making it input to take 0,1,2(0 from left switch, 1 form right switch and 2 from Back switch) while(1) { if(P0_0==0 && P0_1==0 && P0_2==0) // when input is S { P0_4=0; // for forward P0_5=0; // for backward P0_6=0; // for left P0_7=0; // for right } else if(P0_0==0 && P0_1==0 && P0_2==1) // when input is L { P0_4=0; P0_5=0; P0_6=1; P0_7=0; } else if(P0_0==0 && P0_1==1 && P0_2==0) // when input is R { P0_4=0; P0_5=0; P0_6=0; P0_7=1; } else if(P0_0==1 && P0_1==0 && P0_2==0) // when input is B { P0_4=0; P0_5=1; P0_6=0; P0_7=0; } else if(P0_0==1 && P0_1==0 && P0_2==1) // when input is F { P0_4=1; P0_5=0; P0_6=0;

P0_7=0; } else if(P0_0==1 && P0_1==1 && P0_2==0) // when input is H { P0_4=0; P0_6=0; P0_7=0; P0_5=1; delay(50); P0_5=0; delay(50); } } } void delay(unsigned int D) { unsigned int x,y; for(x=0;x<1275;x++) for(y=0;y<D;y++); }

You might also like