Microcontroller › AVR › How to switch off the appliance
- This topic has 15 replies, 3 voices, and was last updated 13 years, 9 months ago by
Aina.
-
AuthorPosts
-
May 14, 2011 at 1:10 pm #933
Aina
ParticipantHi,
I am trying to control the fan via relays and pc’s parallel port.First time by running the c# code it turned on the fan but later on if i stop debugging of the program fan is not switched off.It is just swtiched off by unplugging the adapter. And second time whenever i plug the adapter it is turned on without running the program.It works by plugging the adapter just. I want to control it whenever i press the button in c# it is turned off and by pressing the other button it should be turned on. I dont know how to resolve this?? If any one knows then plz let me know.
Thanks in advance.
Regards,
AinaMay 16, 2011 at 1:55 am #6207romel emperado
Participantyou need stability in you program.. be specific about the logic you give to the pins controlling the relay..
May 16, 2011 at 6:48 am #6224dagakshay
Participanthello Aina,
Check for the following things.
does your really is still proper?
another case it migh be that your PC is now giving the pervious output what is latched by you program in the first time. so when ever you start you programe you must define all the input and the outputs. as soon you start the programe just send the a oppsite conditon on the prallel port wht you send to switch it on. now when ever you will start you code the the fan will go OFF first and as soon you press the on swith it will get ON.
i hope you got a idea what to do?
May 16, 2011 at 7:54 am #6227Aina
Participantyes thanks i have resolved my problem.My appliances are now being controlled but can i modify the circuit of relays that you posted by attaching some temperature sensors with that circuit?? If so how to do that and which parts of circuit to modify?? Secondaly in case of appliances pc sends signal to relays when sms is recieved from gsm modem to switch the appliances but in case of relays the process is reversed. Sensors will sense any kind of temperature rise or fire and will send signals to relays that will be forwarded to pc. I dont know how to modify the circuit for sensors. Here is the circuit diagram which i followed:
http://jaspreetscodezone.blogspot.com/2008/01/interfacing-relays-using-parallel-port.html
If you know or have any kind of circuit diagram for this please let me know.
Thanks
May 16, 2011 at 11:17 am #6234dagakshay
Participanthwllo Aina,
i didn’t get you can you be more specified what you want to change in tht ckt??? expalin those points again
May 16, 2011 at 12:22 pm #6237Aina
ParticipantI want to attach the smoke or fire sensor in the given circuit, so whenever there is smoke in the surrounding environment a signal is sent to pc via parallel port.
May 16, 2011 at 1:28 pm #6241romel emperado
Participantyou can do that.. just input a digital signal to parallel port when fire is present..
let say the port by default is logic low then if fire is present then it will turn to logic high
May 16, 2011 at 2:01 pm #6243Aina
ParticipantOk but how to attach sensors with the circuit?? the following circuit diagram i have used to switch the light on and off and is working fine.
http://jaspreetscodezone.blogspot.com/2008/01/interfacing-relays-using-p…
May 17, 2011 at 2:41 am #6246romel emperado
Participantfirst you need to find a sensor circuit you want whatever it is..
understand the circuit how it works. it should have a digital output that will trigger the input of your parallel port for the program to know that the sensor senses something unusual.
example your have smoke detector circuit… when the sensor does not sense any smoke at all the output of the smoke sensor circuit is 0 or logic low and if smoke is sensed then it will trigger to logic high og 1.. thats all.. actually you need only 2 wires to do that exluding the power lines.
May 17, 2011 at 7:30 am #6255Aina
ParticipantThe problem is still there, i donot want to build the circuit of sensors, i just want to modify the given circuit by attaching some sort of sensor such as temperture or fire sensor. First thing is that how to attach sensors with relays as shown in the given circuit:
http://jaspreetscodezone.blogspot.com/2008/01/interfacing-relays-using-p…
May 17, 2011 at 9:43 pm #6261romel emperado
Participantthats not a sensor circuit.. that is only relay driver chip.. your sensor will not gonna work if you just connect directly in that chip.. go search a sensor circuit in google of your choice.
May 17, 2011 at 9:45 pm #6262romel emperado
Participantsensors are treated as INPUT devices.. and that chip you are referring to is for an output device….
May 18, 2011 at 7:24 am #6268dagakshay
Participanthello Aina,
Mostly LDR is used for making smoke detector sensors.
http://electroschematics.com/2545/smoke-detector-circuit/
http://www.sensorcircuitdiagram.com/2010/11/23/smoke-detector-circuit-based-on-the-tda2002-ic/
use the output dirctly from emitter of transistor transistor… you need not use the rest of the ckt.
May 18, 2011 at 12:16 pm #6274Aina
Participantok thanks. But how will i interface it with pc parallel port because whenever there is smoke in the surrounding environment it should pass a signal to pc indicating smoke or temperature rise.
May 19, 2011 at 10:52 am #6280dagakshay
Participanthttp://www.engineersgarage.com/electronic-circuits/automatic-night-lamp
http://www.engineersgarage.com/electronic-circuit/infrared-ir-sensor
http://www.engineersgarage.com/electronic-circuits/light-sensor-photodiode
http://www.engineersgarage.com/electronic-circuits/automatic-light-dark-indicator
see these links that will help you out
-
AuthorPosts
- You must be logged in to reply to this topic.