Discussion in "Project Help" started by    vinay    Jul 11, 2007.
Wed Jul 11 2007, 09:22 pm
#1
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.
 BLUETOOTH like this.
Thu Jul 12 2007, 01:19 am
#2
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.
Sat Jul 14 2007, 12:58 pm
#3
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.



 vinay like this.
Sun Sep 09 2007, 10:34 am
#4
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
Sun Sep 09 2007, 02:16 pm
#5
make sure that power for AT89s51 (+5V) and ULN2803 (+12 if you are using 12V relay) not get mixed !
Sun Sep 09 2007, 10:12 pm
#6
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.
Sun Sep 09 2007, 11:50 pm
#7
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.
Mon Sep 10 2007, 01:33 am
#8
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
Mon Sep 10 2007, 07:02 am
#9
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
Mon Sep 10 2007, 03:56 pm
#10
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:58 pm ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm
Zacharybus
Sun Apr 21 2024, 02:45 am