free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes :: Forums :: Project Development :: Project Help
 
<< Previous thread | Next thread >>
i need help regarding home automation over internet
Go to page  [1] 2
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
vinay
Wed Jul 11 2007, 08:52AM
 User Offline
Registered Member #1796
Joined: Tue Jun 26 2007, 08:06AM

Posts: 9
Thanked 1 time in 1 posts
hello sir,
i am vinay B tech EEE. Sir can u please say me how to connest the device like tube,bulb and other device in the appliance section of the cirucit.



vinay
Back to top



This post has been thanked 1 time
 BLUETOOTH 
Ajay
Wed Jul 11 2007, 12:49PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
Vinay,
if you want to 220V appliances, then you can make use of relays. To connect relays there are two ways, either you can use opto couplers or relay drivers like ULN2003A for switching of relays. the connector where the appliances are shown will directly go to the opto coupler i/p or the driver inputs. This way you can switch real 220V appliances.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Ritesh
Sat Jul 14 2007, 12:28AM
 User Offline
Registered Member #65
Joined: Tue Aug 29 2006, 03:10AM

Posts: 54
Thanked 10 times in 10 posts
To drive relay you need more than 20mA – the current can one pin drive. This is why you cannot connect relay directly to microcontrollers pin. To drive relay you need to connect simple amplifier made of one transistor.

One important part of this circuit is the diode, which protects circuit from induction caused when switching relay.

This circuit is more general as instead relay you can connect any other load like lamps, DC motors if you need to control more than one relay, you might consider using ICs like ULN2003 or ULN2803. These IC’s have Darlington transistors inside and can drive up to 500mA each

To switch on a relay in this case you need simply write “1” to port pin. And current doesn’t exceed the allowed limit of microcontroller.



Back to top



This post has been thanked 1 time
 vinay 
SGH
Sat Sep 08 2007, 10:04PM
 User Offline
Registered Member #672
Joined: Tue Mar 06 2007, 10:47PM

Posts: 38
Thanked 3 times in 3 posts
I'm using AT89S51 + ULN2803 (operated at 12 V) to turn on relay. At first start of program, I wrote mov P0,#0 to turn off all relay as when first power up, P0 always in logic 1 which will turn on the relay.

I only need to turn on the relay 3 - 4 times a day in a very short duration (10 second).

Will the way I initiate the state of P0 cause any problem in the program flow ?. Any solution so I don't have to change the state of port P0 when first power up ?.


Thanks,
SGH
Back to top


۞ TPS ۞
Sun Sep 09 2007, 01:46AM

 User Offline
Registered Member #2712
Joined: Tue Jul 31 2007, 12:06AM

Posts: 470
Thanked 67 times in 57 posts
make sure that power for AT89s51 (+5V) and ULN2803 (+12 if you are using 12V relay) not get mixed !

Online Component Shoppe
http://www.onlinetps.com/
Components at cheap rates in India
Back to top


Ajay
Sun Sep 09 2007, 09:42AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
Hi SGH, i think you need to explain the basic operation of your circuit.. and the reason why you are using reply..
also.. if you have any problem with ULN2803 then use optocoupler.. that is also one of the best option..
and on startup you can make the circuit such that.. o/p is off when i/p is On.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


vinay
Sun Sep 09 2007, 11:20AM
 User Offline
Registered Member #1796
Joined: Tue Jun 26 2007, 08:06AM

Posts: 9
Thanked 1 time in 1 posts
hello sir
i am jagdish. i am new to this using of C language for micro controller cding. I have read the code of C language for this project. But there are a few commands which i was not able to under stand.How can i get to know what they actually mean. For ex:bit_8 code mesg1[]={0x00,0x00,0x00,0x0F,0x08,0x0B,0x08,0x0B};
and there are few other commands and syntaxes. How can i learn to use these differnt new set of C language commands.

vinay
Back to top


Ajay
Sun Sep 09 2007, 01:03PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
Hi vinay..
here is a good point that you can note down in yor notepad or something.. Whenever you download or get a code written in C or any other language..
always take a look at the files which are included.. i.e. under #include directive.. that tells you what all files are to be read along with the current file.

So in my code.. i have also included some of the header files.. like you are saying what is bit_8 i think this answer is there in the file HAreg.h which has all the datatypes defined.
bit_8 is an 8-bit data type and is a typedef of unsigned char. There is nothing new in the code.. just instead of writing a big "unsigned char" i defined it as bit_8 so easy for me to write in programs. Hope you are getting my point.
There is nothing new.. its just the same C language.. which you used to study.. all you need is to pay little more attention and you must take a very close look at all the files

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


SGH
Sun Sep 09 2007, 06:32PM
 User Offline
Registered Member #672
Joined: Tue Mar 06 2007, 10:47PM

Posts: 38
Thanked 3 times in 3 posts
I forgot to mentioned that my circuit also has DS1307 + LCD. The circuit works as follows : when the time setting as same as time shown by DS1307, mcu will send signal to ULN2803 to turn on relay. Relay then will turn on water pump for 10 second. In a day, there will be 3 - 4 times the pump will turned on.

At the beginning of my code, I wrote mov P0,#0 to turn off all relay as when first power up, P0 always in logic 1 which will turn on the relay.

I know I can reverse the connection on the relay contact output but the relay will be in on state almost all the time and only turn off for 3 times x 10 second.

Will the way I initiate the state of P0 cause any problem in the program flow ?. Any solution so I don't have to change the state of port P0 when first power up ?.


Thanks,
SGH
Back to top


Ajay
Mon Sep 10 2007, 03:26AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
use external pullups and P0 will act like normal I/o ports.. no problem with that.. use 2.2K pullup.
And reverse the connection of relay such that 1 is off and 0 is on. that will solve your problem

--
Please try to post in your thread only this creates confusion for other users..

[ Edited Mon Sep 10 2007, 03:28AM ]

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Go to page  [1] 2  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems