View Full Version : how to take output from 555 working as rain alarm for microcontroller?

06-29-2011, 05:55 PM
I'm making a bigger circuit which involves rain alarm as well. I've attached the image file of circuit diagram I'm using..
My problem is, that although the circuit is working good and an LED placed instead of buzzer is glowing as it should be.. But, I can't figure out that how should I give it as input to microcontroller? The current seems to be flowing from +ve of battery into the pin 3 of IC 555. So, if I connect the microcontroller input pin to the pin 3 of 555, then current automatically finds path to ground through microcontroller and the LED would keep glowing even if sensors are without water. I tried to connect microcontroller to +ve of battery through very high resistance, expecting inverted outputs.. Without water 1 should be read, and with water 0 should be read as a smaller resistance path would have been found through 555. But this doesn't seem to work either.
Any help regarding how to transmit signal of water having detected or not to the microcontroller?

06-29-2011, 11:08 PM
There are surely many more efficient ways to do it, but in your place I would just connect pin 3 to the microcontroller and control the LED separately through another pin of the microcontroller.

06-29-2011, 11:08 PM
Hi.. Just attach a 3.3K ohm resistor between your pin 3 of ur 555 ic and +ve(Vcc). Now you can connect pin3 to your Microcontroller without any problem. You said you have already used a very high resistance.. please tell me what value have you used.. But 3.3 K ohm should work..

07-11-2011, 10:49 AM
@pratheek and maddy_nish: If I directly connect the microcontroller to the pin 3 of 555 irrespective of amount of resistance used, still conceptually the microcontroller should always be reading an input of 1, irrespective of functionality or presence of 555. Because I guess that the current will directly find path from +ve of battery to the series resister (if any) and then into Microcontroller, exiting through the ground of Microcontroller..

I am assuming that under normal working, 555 would internally block the pin 3 when there is no water... Thus current reaching the pin 3, does not internally flow from pin 3 to ground...
But by attaching a microcontroller at pin 3, irrespective of wether or not the 555 internally blocks the path between pin 3 and ground or not, the current will always find a path to ground via tha microcontroller. So, Microcontroller should always find High input coming from +ve to its input pin, via some series resistance..

So, that leaves my problem unsolved..

Please correct me if I'm wrong..

07-11-2011, 10:59 AM
Your voltage in the circuit of 555 is 3V.. That would not be sufficient for the uc.. Just connect our 555 to five volts and then interface it with uc.. It should work.. I have interfaced it the same way earlier also.. it worked for me.. Just check the output voltage from 555 when high.. It must atleast be 3V so that its not ambiguous.. Only then the uc would read it..

07-11-2011, 11:06 AM
and make sure u hav connected gnd of 555 and uc together...