Hello friends,
I have problem interfacing 8051 controller with relay. I am using 12V relay to ON/OFF. The output port of the controller is set at logic zero, it gives 5V when it isnot active.
But when inputs are applied it works according to the requirement but it gives 2V, when it is active.
So if the relay is active it doesnot gets deactived at this point.
i have attached the relay circuit.
Plz help me, I need help soon.
1K resistor is there between output port and base of the transistor.
But the problem is I couldnot get less than 2V when microcontroller is active(that is when inputs are applied). I am using AT89S51.
It's output is working on logic zero.
I want to get less than 1V to properly operate the relay.
But the problem is I couldnot get less than 2V when microcontroller is active(that is when inputs are applied). I am using AT89S51.
It's output is working on logic zero.
I want to get less than 1V to properly operate the relay.
Everything is right whta you people said but my relay doesn't get deactivated, it activates all right but doesn't deactivate because of 2V.
My AT89S51 gives maximum voltage of 5V when inputs are not applied, but it gives minimum of 2V when inputs are applied, I want to get less than 1V.
How can I do this??
Dude i thaught i solved your problem i forgot to check my mail
ok you could change your software code and try
actually i had same problem then when i added 10K pull up it worked fine
1K current limitter is fine may be you should check your transistor also see that emitter of transistor is grounded.
Hi
Its a very very bad practice to connect a relay with a microcontroller like this. the relay revers voltage will directly afect the microcintroller. here ic is comparitively high thus need more ib too. Use ULN type driver. or atleast use a 2 stage transistor amplifier. Or you can also use Open Collector Inverter or buffer. Or use a 74HC series buffer/inverter/latch and then use a single transistor drive for rlay.