Final year degree project for engineers Final year projects based on microcontrollers
Microcontroller based different projects abstract and source code
AT89s51 microcontroller projects Motion control
at89c2051 motor controller and other light projects
Tutorials of microcontroller 8051, A step by step easy to use self learning rapidex
Click Here to Advertise on My Blog

Tuesday, August 23, 2011

Control solid state relays up to 50 with microcontroller 8051

This project is developed to control up to 50 solid state relays individually. The project is good learning material for students who which to expand the input output lines of microcontroller and want to control many devices.
This project is a basic idea for bank load implementation.
Features of bank load project using microcontroller 8051:-
1. Up to 50 external devices can be separately controlled with microcontroller.
2. The ON or OFF status of each external hardware device is currently shown with the help of LED, which will be replace with optical isolator to interface the relays or other high load device.
3. This project received serial RS232 commands to control the bank load.
4. To turn any LED (relay attached with the it on any output line), the command is
n_ _ or N_ _ i.e. here n or N stands for "ON" and at blank spaces put the number 01 to 50. so we can say that to turn on the led number 5, command will be n05 or N05.
4. Similarly to turn OFF, the command will be f05 or F05.
5. To expand the output lines, latches 74ls373 are used which are selected with decoded 74ls138 one by one.

The circuit diagram of the project is as follows:

The code is written in C language and C51 keil compiler is used.

#include<at89x51.h>
#include<stdio.h>
#include<stdlib.h>
unsigned char i,j;
unsigned char c;
unsigned char rs[3];
unsigned char control[7];
bit ON;
sbit ready = P3^7;
void delay(void);
void display(void);
void convert(unsigned char);
void main(void){
TMOD = 0x20;
SCON = 0x50;       
TH1  = 0xFd;      
TL1  = 0xFd;       
TR1  = 1;
TI = 1;
RI=0;
EA = 1;
P2 = 255;
P1 = 255;
 for(i = 0; i<7;i++)
 {
  P1 = i;
 P2 = 0;
 control[i]=0;
 }
 ON = 0;
 puts("To turn ON say LED # 5, Enter: n05");
 puts("To turn OFF say LED # 21, Enter: f21");
while(1)
{
 if(RI) {
 for(i=0;i<3;i++)
  {
  while(!RI) ;
  RI= 0;
  rs[i] = SBUF;
  ready = 0;
  }
  }
  
  delay();
  if(rs[0]=='n'|rs[0]=='N')ON=1;
  if(rs[0]=='f'|rs[0]=='F')ON=0;
  if(rs[1]<= 57 & rs [1]>=  48 & rs[2]<= 57 & rs [2]>=  48){
  c = (((rs[1]-48)*10)+ (rs[2]-48));
  }
  convert(c);
  display();
  // ON = 0;
  ready=1;
}
}

 void delay(void){
unsigned int z;
for(z=0;z<15000;z++);
}
void display(void)
{
 for(i = 0; i<7;i++)
 {
  P1 = i;
 P2 = control[i];

  delay();
 
 }
}
void convert(unsigned char d)
{
switch (d)
{
case(1):{if(ON)control[0]=control[0]|0x01;else control[0]=control[0]&0xfe;}
break;
case(2):{if(ON)control[0]=control[0]|0x02;else control[0]=control[0]&0xfd;}
break;
case(3):{if(ON)control[0]=control[0]|0x04;else control[0]=control[0]&0xfb;}
break;
case(4):{if(ON)control[0]=control[0]|0x08;else control[0]=control[0]&0xf7;}
break;
case(5):{if(ON)control[0]=control[0]|0x10;else control[0]=control[0]&0xef;}
break;
case(6):{if(ON)control[0]=control[0]|0x20;else control[0]=control[0]&0xdf;}
break;
case(7):{if(ON)control[0]=control[0]|0x40;else control[0]=control[0]&0xbf;}
break;
case(8):{if(ON)control[0]=control[0]|0x80;else control[0]=control[0]&0x7f;}
break;
case(9):{if(ON)control[1]=control[1]|0x01;else control[1]=control[1]&0xfe;}
break;
case(10):{if(ON)control[1]=control[1]|0x02;else control[1]=control[1]&0xfd;}
break;
case(11):{if(ON)control[1]=control[1]|0x04;else control[1]=control[1]&0xfb;}
break;
case(12):{if(ON)control[1]=control[1]|0x08;else control[1]=control[1]&0xf7;}
break;
case(13):{if(ON)control[1]=control[1]|0x10;else control[1]=control[1]&0xef;}
break;
case(14):{if(ON)control[1]=control[1]|0x20;else control[1]=control[1]&0xdf;}
break;
case(15):{if(ON)control[1]=control[1]|0x40;else control[1]=control[1]&0xbf;}
break;
case(16):{if(ON)control[1]=control[1]|0x80;else control[1]=control[1]&0x7f;}
break;
case(17):{if(ON)control[2]=control[2]|0x01;else control[2]=control[2]&0xfe;}
break;
case(18):{if(ON)control[2]=control[2]|0x02;else control[2]=control[2]&0xfd;}
break;
case(19):{if(ON)control[2]=control[2]|0x04;else control[2]=control[2]&0xfb;}
break;
case(20):{if(ON)control[2]=control[2]|0x08;else control[2]=control[2]&0xf7;}
break;
case(21):{if(ON)control[2]=control[2]|0x10;else control[2]=control[2]&0xef;}
break;
case(22):{if(ON)control[2]=control[2]|0x20;else control[2]=control[2]&0xdf;}
break;
case(23):{if(ON)control[2]=control[2]|0x40;else control[2]=control[2]&0xbf;}
break;
case(24):{if(ON)control[2]=control[2]|0x80;else control[2]=control[2]&0x7f;}
break;
case(25):{if(ON)control[3]=control[3]|0x01;else control[3]=control[3]&0xfe;}
break;
case(26):{if(ON)control[3]=control[3]|0x02;else control[3]=control[3]&0xfd;}
break;
case(27):{if(ON)control[3]=control[3]|0x04;else control[3]=control[3]&0xfb;}
break;
case(28):{if(ON)control[3]=control[3]|0x08;else control[3]=control[3]&0xf7;}
break;
case(29):{if(ON)control[3]=control[3]|0x10;else control[3]=control[3]&0xef;}
break;
case(30):{if(ON)control[3]=control[3]|0x20;else control[3]=control[3]&0xdf;}
break;
case(31):{if(ON)control[3]=control[3]|0x40;else control[3]=control[3]&0xbf;}
break;
case(32):{if(ON)control[3]=control[3]|0x80;else control[3]=control[3]&0x7f;}
break;
case(33):{if(ON)control[4]=control[4]|0x01;else control[4]=control[4]&0xfe;}
break;
case(34):{if(ON)control[4]=control[4]|0x02;else control[4]=control[4]&0xfd;}
break;
case(35):{if(ON)control[4]=control[4]|0x04;else control[4]=control[4]&0xfb;}
break;
case(36):{if(ON)control[4]=control[4]|0x08;else control[4]=control[4]&0xf7;}
break;
case(37):{if(ON)control[4]=control[4]|0x10;else control[4]=control[4]&0xef;}
break;
case(38):{if(ON)control[4]=control[4]|0x20;else control[4]=control[4]&0xdf;}
break;
case(39):{if(ON)control[4]=control[4]|0x40;else control[4]=control[4]&0xbf;}
break;
case(40):{if(ON)control[4]=control[4]|0x80;else control[4]=control[4]&0x7f;}
break;
case(41):{if(ON)control[5]=control[5]|0x01;else control[5]=control[5]&0xfe;}
break;
case(42):{if(ON)control[5]=control[5]|0x02;else control[5]=control[5]&0xfd;}
break;
case(43):{if(ON)control[5]=control[5]|0x04;else control[5]=control[5]&0xfb;}
break;
case(44):{if(ON)control[5]=control[5]|0x08;else control[5]=control[5]&0xf7;}
break;
case(45):{if(ON)control[5]=control[5]|0x10;else control[5]=control[5]&0xef;}
break;
case(46):{if(ON)control[5]=control[5]|0x20;else control[5]=control[5]&0xdf;}
break;
case(47):{if(ON)control[5]=control[5]|0x40;else control[5]=control[5]&0xbf;}
break;
case(48):{if(ON)control[5]=control[5]|0x80;else control[5]=control[5]&0x7f;}
break;
case(49):{if(ON)control[6]=control[6]|0x01;else control[6]=control[6]&0xfe;}
break;
case(50):{if(ON)control[6]=control[6]|0x02;else control[6]=control[6]&0xfd;}
break;
}
}


circuit diagram of 8051 interfacing with relay coils,relay switch atmel microcontroller,scrolling dot matrix led display using 8051,circuit diagram for line tracer using micro controller 8051,microcontroler comanda motor cc.schematic diagram sms relay control board usig gsm technology and microcontrolle 16f877 10 valvulas solenoides how to use moc3010

4 comments:

  1. Dear Dr.Rana sir

    Many thanks for posting the code and schematic for the project of bank load using microcontroller 8051.
    Is it possible to use VB6? I am not good in C language. I want to use vb6 in my project.
    It would be great help if you could built the same with vb6.

    many thanks for your time and patiance, i appreciate that.

    Regards

    Reddy

    ReplyDelete
  2. @ Reddy:
    I think you are new in the field of programming and designing microcontroller based projects.
    I want to tell you that, for your project related to bank load controller using 8051 has two parts with respect to programming.
    1. We have to write a program or code for microcontroller. This is written in C language for your project. Now using keil c51 compiler, this c-code is converted to HEX fils. Using a hardware called programmer , the hex file is then burned into microcontroller.
    2. The PC side code, yes, to make any LED ON or OFF, microcontroller seeks some instructions to be send via serial communication. The comands will be send to microcontroller using serial port RS232. Thus for this you have to write program for PC also. Now you can use VB6 for this code writting.
    3. If you are not good in VB6 and can not write it, then you can use hyper terminal applcation comes with windows till winXP. windows vista and window 7 donot have hyper terminal.
    4. To use hyper terminal , you have to do some configuration in this according to your requirements. like selection of com port, selection of buid rate.
    5. The bank load controller is designed to work on this serial communication protocol: Buad rate9600, 8N1.
    6. So, you have to use c code, given in the post, and compile it to make HEX file, using programmer to burn it. Then eithor use huper terminal and configure it or use VB6 and write program for PC for serial communication.
    ENJOY IT

    ReplyDelete
  3. Dear
    Mr.Dr.Rana

    firstly accept my sincere thanks for supporting with schematic and code.

    i got it now ,i have not done any projects in microcontroller so i was not sure of compilers and all.
    i can write code for serial port using vb6 ,first i will rig up the hardware and let you know.

    Many thanks for your quick support , i appreciate that.

    Regards

    Reddy

    ReplyDelete
  4. @ Reddy:-
    i suggest you, plz wait, i am working on an other version of this project using shift registers.

    then you decide , which one is better for you.

    download proteus ISIS and make the circuit in it. then you will chekc it on PC, without soldering any component. This is very good simulator program.

    ok
    new version will be uploaded very soon.

    ReplyDelete

Please note that my helps are not for free.
So, send me your problems and pay money for solution.ok
This is www.microcontroller51.blogspot.com comments section. Here you are requested to write your questions and problems about the microcontroller and electronics projects. Write the questions or comments in such a way that, it have all necessary information, so that i can understand and reply.If you want to send pictures and codes then e-mail me (rghkk@hotmail.com).Thanks.
All comments will be highly appriciated.

Blogroll

  • 8051 Projects
  • Microcontroller based different projects abstract and source code
    AT89s51 microcontroller projects Motion control
    at89c2051 motor controller and other light projects
    Tutorials of microcontroller 8051, A step by step easy to use self learning rapidex

    Microcontroller Forum

    Recent Comments

    About

    rs 232 and microcontrollers , 8051 intelligent robotic car gsm based digital notice board microcontroller projects+steppermotor driver, frequency counter project,TSOP1738 interfacing with AT89C51 data microcontroller 8051:data aquisition and control syatems, microcontroller interface boards, programmable interface controller ready program for rs232 interface in vb6 ,circuit diagram of car parking system for the 8051 microcontroller simple led project using 8051 with assembly language,creating a c interface between a pic and humidity sensor heart beat sensor circuit diagram,t6963 asm 89c51 free schematic,dac08,heart beat monitor with microcontroller 8051.ppt,pressure sensor digitizer,adc0802 +avr +source* -datasheet,i need project explanation of 80c51 microcontrolled based calculator,metro train prototype mini project,lcm interface circuits with 8051 microcontroller ,micro controller application example in industry ,direct logic examples sensor de presion humidity and temperature circuit ,pwm measure microcontroller ,ge sonosite diadnostic picture final project report on weather acquisition system ,82c55a to rs232 ,pc based heart beat pulse monitor microcontroller strobe led project using assemby programming 8051 motor control,ethernet microcontroller interface circuit design for temperature humidity sensor, line follower dengan mikro controller at89s51,"interface a temperature sensor lm35 with 8051 ic using an amplifier and adc 0804 ic ",lift8051 microcontroller code,dac08,heart beat sensor circuit diagram,8051 lcd,pc parelle port projects,solution de connectivité ethernet microcontroleur,t6963 asm 89c51 free schematic,89c51 microcontroller interfacing with adc 0808 data sheet,control port data port lcd,dac-08 ,stepper motor connector,moving message circuit diagrams,stepper motor configuration,c++ lesson at the at89c51,car parking design 8051,dac-08,pc to pc communication using ir transceiver with 8051 and TSOP,8051 micro controller circuit diagram,vb6 rs232,similarities and differences between the 8051 and the atmel,u-shaped photo sensor,dac0800 proteus,how to display adc data on graphic lcd,mcs51 car data acquisition,mcs51 digital automotive gauge,lcd tachometer project with pic 16f877a and micro c,lm324 analog to digital proteus,pc based data acquisition system project,max232 serial programming,max232 serial programming,mcs 8051 and glcd display models installed to run this sample.,The microcontroller AT 89S51 is serially programmed using the software ATMEL,ds1307 89c51 alarm code,16f877a pressure sensor,multiplexed port system of 8051,rs232 micro controller used in closed circuits programmed with vb,8051 heart monitor,pulse rate counter circuit diagram using micro controller,ethernet microcontroller interface circuit design for temperature humidity sensor,project schematic dac0800,industrial robot controller based on '51 microcontroller family,connect lm35 to adc, adc to 8051 and two 7-segment displays to 8051,8051 rs232 serial communication code in c,project with block diagram & circuit diagram of temperature & light monitoring & controlling,main theme of 80c51 microcontroller based calculator,solenoid valve interface with microcontroller,schematic line follower mikrokontroler at89s51,home monitoring system using 8051 c programming,zero crossing triac power control pump,gambar diagram serial port,t6963 asm 89c51 free schematic,address counter lcd interface,t6963c circuit,Electronic meters for power calculation of electricity consumption,adc0808 intel 8051,microcontroller and lcd interface,inductive proximity sensor connect microcontroller,8051, data logger 24c16,interfacing remote to microcontroller pic16f877a.h,pictures for memory orgnization of at89c51 micro controller,frequency counter with atmel flow chart,serial optical microcontroller,pulse width measurement,software codes using keil c compiler for final year projects,micro 7448 7 segment,seminar ppt-8051in automobiles,mcs 51 lcd asm interface a temp. sensor lm35 ic with 8051 using an amplifier and adc0804 with sehematic diagram?,lcd 8051,"stepper motor wires,"what is zero crossing" diac,8051 8255 chip helps,interface a dc motor with 8051 microcontroller to control the speed using a dac with diagram?,keil c51 uploading data from computer,manometer sensor i2c,temperature control using pwm and 89c51,1-wire command 8051 + assembly,keil c51 uploading data from computer,adc converter assembly program,c code for lm35 by use microprocessor,dc motor control site:www.the-crankshaft.info,micro controller clock,microcontroller valve,pdf form of electronic mini project circuit diagram based om sensor,speed detection circuits of high speed vechicles using controller 8051 and sensors,stepper motor wire, interfacing of 8051 with 4511,microcontroller lpc2148 based noise control algorithm for external signals,pin diagram of adc,mini ECG schematic diagram,interfacing of 8051 with 4511,1-wire slave,data acquisition using 8051,definition and description of automatic irrigation system,microcontroller lpc2148 based noise control algorithm,using 89c51 heart bit monitoring system,SPI INTERFACE diagrama de recorrido de sensor de latido de corazón, t6963 asm 89c51 libre esquemático, dac08, monitor de latido de corazón con microregulador 8051.ppt, digitizador de sensor de presión, adc0802 avr source*-datasheet, tengo que proyectar la explicación de 80c51 microcontroló la calculadora basada, prototipo de tren de metro proyecto mini Интерфейс Двигатель постоянного тока с 8051 микроконтроллер для управления скоростью с помощью ЦАП с диаграммой?, Keil C51 загрузки данных с вашего компьютера, манометр i2c датчик контроля температуры использованием ШИМ и 89C51 8051 + 0,1 командной провода сборки, Keil C51 загрузки данных с вашего компьютера , ADC программе сборки преобразователя, C код для использования микропроцессора LM35, DC сайте управления двигателем: www.the-crankshaft.info, микро часы контроллера, микроконтроллера клапан, PDF форме электронных схем проекта мини 如何显示图形LCD,汽车数据采集MCS51的,MCS51的车载数字仪表,转速表项目液晶与ADC日期石化16F877A微型和C,变形LM324的模拟到数字的,基于PC的数据采集系统项目,编程序列的MAX232,串行编程的MAX232,单片机8051 Glcd显示模式,安装运行此示例。中,AT 89S51单片机串行编程软件使用ATMEL公司と液晶グラフィックLCDを、車のデータ集録MCS51、MCS51自動車デジタルゲージ、タコプロジェクトの表示方法のADCの日付は、デジタル、PCベースのデータ集録システムプロジェクト、プログラミングMAX232と、MAX232のシリアルプログラミングシリアル、16F877Aは、マイクロおよびcプロテウスLM324アナログ写真mcsの8051 Glcdディスプレイモデルは、このサンプルを実行するためにインストールされています。は、AT 89S51マイクロコントローラは、シリアルソフトウェアをアトメル使用してプログラムされている lm324 voltage capacity,microcontroller 8051,.bas code rs232 to at89c2051 dot matrix,4 digits 7 segment led circuit 8051, generating frequency using 8051 circuit diagram,how to write controller by c,6 pin electrical clip,8051 based projects using keil software,8051 serial communication to pc, 8255 led driver images developing an acquisition and control system how can we measure reactance using 8051 controller i2c 8051 humidity sensor i2c 8051 humidity sensor sht,microcontroller 8051 rotabit GPS and GSM based Car locator,Send and Receive SMS Keil C code,Play music with 8051 microcontroller,LED dot matrix display using AT89C52 Interfacing GPS with 8051,Wireless keyboard with AT89S52 and nRF2401 RF module ,snake game,led lc meter snake game,LCD display,stepper motor inter facing using 8051 Top Downloads this MonthC51 code for interfacing GPS,8051 based Taximeter,GPS and GSM based Car locator, electonic code lock Send and Receive SMS Keil C code,Play music with 8051 microcontroller LED dot matrix display using AT89C52,120V light bulb on/off LCD Graphic display with AT89s51,Interfacing GPS with 8051,AT89C2051 temperature and humidity using SHT11,Ultrasonic distance meter using AT89S52 Top downloads16x128 Dot matrix moving message display,Digital Capacitance meter using AT89S52,countdown timer LCD Graphic display with AT89s51,PS2 keyboard interfacing with LCD display LED dot matrix display using AT89C52,16x64 dot-matrix LED display with Time,H bridge GPS with AT89s52 and graphics display,8051 based Taximeter,Moving message display Ultrasonic distance meter using AT89S52,simple digital voltmeter with c programming GPS with 8051 digital alaram clock 8x8 Running Texts Display sooxma technologies ,embedded systems projects at home ,interfacing 8051 with gsm modem , projects for enginnering students , android bluetooth "controller area network" ,speedometer as motor vehicle safety system microcontroller ,robotic project,prepaid electricity live monitoring ,ieee papers on gps navigation for the blind , gsm-based prepaid electricity system temperature sensor using 8051,lm324 and lm35,Temperature level monitoring in boilers using 8051 microcontroller,experiment board in instrumentation and control through the PC parallel port,TSOP 1738 interfacing with AT89C51 ,TSOP1738 interfacing with AT89C51 pdf ,solenod valve ,8051project.com ,Temperature controller using DS1820 and LCD displayTemperature controller using DS1820 and LCD display ,Interfacings of Automatic room light controller with visitor counter ,automatic plant irrigation ,TSOP1738 interfacing with AT89C51 synopsis of Lcd interfacer using 8051 microcontroller mini project with circuit diagram 8x8 led display interfacing with microcontroller data acuasition system pwm based speed control of ac motor using 8051 controller with abstract heart rate pic sms based digital notice board real time clock using 8051 microcontroller vb lpt stepermotor assembly code for lcd connected to 8051 mini project on temp controleer with ckt diagram free download 6 wires stepper motor adc0804 lpt assemply language programs with 8051 automatic-plant-watering switch buzzer diagram arrows with pic16f84 forward reverse swr meter frequency control with microcontroller esquematic electronic detector high voltage ic principle diagram 89s51 interface between gps and microcontroller velocity +adc interfacing automatic car parking system circuit triac used with pwm designing pressure sensor as student project microcontroller to drive motors interfacing adc 0809 to 89c51 videos pic microcontroller projects, level gauge 6 wire stepper motor wiring connection home monitoring system with temperature sensing and motion control using pic atmega control board sample code isolation amplifier circuit diagram using 4n33 microcontroller web emulators air fue; rartio meter with pic mcu project with schematic circuit diagram of 8086 microprocessor project microcontroller at89c51 based voting machine moving message oxygen transducer servo symbol list of components in automated carparking simple interfacing projects with microcontroller 8051 microcontroller based moving message display temperature indicator circuit using microcontroller lcd interfacing with 8051 pdf temperature sensor 8051 lcd automatic plant irrigation at89c2051 temperature how to add effect on asm display with 89s52 vhdl ttl module heart beat monitor with wave on lcd 8051 based moving message display : 89c51 micro controller led matrix www.the basic programming of edsim 8051(design of lift using flow chart) automated irrigation controle system using 8051 circut dia gram 8051 memory organization circuit layout of an automayic irrigation system ir led and ldr based heartbeat monitor with display on computer