Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Home Appliances control through PC using 89C51

Status
Not open for further replies.

mlkz_01

Newbie level 4
Newbie level 4
Joined
Jun 20, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,334
Hi there,

I'm assigned a project on appliances control using microcontroller 89C51.The criterion will be like that:

1) I have to create a Windows form App in C++ using MS Visual Studio 2008 that will simply send some code to serial port as Button will be pressed in the application
2) As COM port will be continuously monitored by microcontroller 89C51 so it will respond to that code and will produce corresponding actuation on its ports where Relay will be Interfaced.

Have anyone some idea , some code or helping material to develop application that can communicate with serial port...Will any body help me making my project...

The Block Diagram is shown under:

https://www.edaboard.com/attachment.php?attachmentid=60995&stc=1&d=1314971567
 

Attachments

  • homeapp.jpg
    homeapp.jpg
    28.2 KB · Views: 221
Last edited:

what you actually needed. The controller program & circuit diagram or the pc program. do some thing by yourself & and post the result if you donot got the output currect, i'll help you
 

I have made the controller program which is working as fine as it was meant to behave .I used the simulation sofware(PROTEUS ISIS v7.7 sp2).I have clear cut idea how to design hardware using relays and how to get all that stuff attached to the controller.I am new in serial port related projects and what i'm gonna need is the PC program bcoz i have no idea how to creat an application that can communnicate with the serial port of the PC .I wanna use port with DB9 connector.

Here is my controller program:

#include <AT89X51.h>
#include <standard.h>
#include<stdio.h>
void init_UART(void)
{
TMOD=0x20;
SCON=0x50;
TR1=1;
TH1=0xFA; //Baud rate set 4800
}
void send_data(unsigned char value)
{
SBUF=value;
while(TI==0);
TI=0;
}
void rx_data(unsigned char value)
{
while(RI==0);
value=SBUF;
RI=0;
P1=value;
}
void main(void)
{
P1=0xFF;
init_UART();
while(1)
{
rx_data();

}

}

Also, check out my circuit.If there is any flaw, Do tell me.
Here is the attachment
 

Attachments

  • project.rar
    16.1 KB · Views: 93
  • homeapp.jpg
    homeapp.jpg
    28.2 KB · Views: 107

you can simpley controlle the relay by sending a string from computer hyperterminal if the string matches to the strings alredy stored in the code the the appropriate relay will be powerd....like save this string in nthe arry..."relay1on".....and then send this string from hyperterminal to the controler and simple if condition will work..hope it helps
Ali Raza
 

You should use interrupt UART for this problem.
You can use hyper terminal + vitual seria port to simulation COM port
 

I just want help creating the Application that can communicate with serial port....REPLY??
 

I just made my program using Microsoft Visual Basic 2008.Thanx to all fo replying :)
 

Use 1-Wire and addressable, digital switches like DS2405,DS2406,DS2408,... this will provide just one wire bus, and you can put relay to switch device/load at place of device (device can be distant from PC).

Another option is to use PC Relay board, and over Twisted Pair cable on end use optocoupler to switch device relay away from the computer.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top