Is there a sensor where it detects if theres no water? I'm making a project for my class and the project requires us to make something that involves technology so i am using a arudino and i need a sensor that could detect if theres no water is there something like that?
No water where? soil, a drinking glass, in the air
LarryD:
No water where? soil, a drinking glass, in the air
Like a bowl lets say i put water in the bowl then i poured the water out would it detect that theres no water?
LarryD:
Here is a drawing that would work.
Pin D10 should be set up as:pinMode(10,INPUT_PULLUP);
.
So what do i use for the arduino to detect the water?
You write a sketch for the Arduino.
It should read digital pin 10.
If the read is HIGH there is no water in the glass.
If the read is LOW there is water in the glass.
You need to decide what to do next: turn on a LED light, make a speaker beep or send a message to your serial monitor.
Using an Arduino for this is overkill, unless you intend to then use the fact about the presence / absence of water to get the Arduino to do something more worthy.
Otherwise all you need is a transistor, an led and some power, like this.
I suppose it depends what you mean by "make something that involves technology"....
JimboZA:
Using an Arduino for this is overkill, unless you intend to then use the fact about the presence / absence of water to get the Arduino to do something more worthy.Otherwise all you need is a transistor, an led and some power, like this.
I suppose it depends what you mean by "make something that involves technology"....
Its confusing to explain by text
LarryD:
You write a sketch for the Arduino.
It should read digital pin 10.
If the read is HIGH there is no water in the glass.
If the read is LOW there is water in the glass.You need to decide what to do next: turn on a LED light, make a speaker beep or send a message to your serial monitor.
I'm gonna make it start beeping and something else but i forgot since its like 1 am for me.
Jim is right, if you "don't want" to use an Arduino you can use something quite basic like this:
LarryD:
Jim is right, if you "don't want" to use an Arduino you can use something quite basic like this:
I'm gonna use an arduino.
Its confusing to explain by text
There are examples in the IDE that show you how to read a digital pin.
Try them out.
Write a sketch.
If you have trouble ask for help here.
LarryD:
There are examples in the IDE that show you how to read a digital pin.
Try them out.
Write a sketch.
If you have trouble ask for help here.
So in the schematic( I think its a schematic ) so i connect a wires to a breadboard ? Since im guessing i have to do that since the black lines meet with the transistor(s) and resistor(s).
You build your circuit on a breadboard with the components seen in the schematic.
Jumper wires can be used to complete connections.
The Arduino pins are connected to the breadboard with jumpers also.
Breadboard tutorial:
http://www.ladyada.net/learn/arduino/lesson3.html
and
https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard
.
LarryD:
You build your circuit on a breadboard with the components seen in the schematic.
Jumper wires can be used to complete connections.
The Arduino pins are connected to the breadboard with jumpers also.Breadboard tutorial:
Arduino Tutorial - Lesson 3 - Breadboards and LEDs
.
Ok thanks.
Here is information on the 2N2222 :
LarryD:
Here is information on the 2N2222 :
2N2222 - Wikipedia
I forgot about this thread but i tried coding the arduino for the sensor except it always didn't work and i need some help since i always made simple project. Can you help me?
i tried coding the arduino for the sensor except it always didn't work
Show us the sketch you came up with.
.
LarryD:
Show us the sketch you came up with.
.
void setup (){
pinMode(10, OUTPUT);
void loop (){
tone(10, 1000, 10000);
}
I'm not at my computer right now (Somehow it works on my i phone but this is the code i could remember.)
I hope you didn't spend too much time at writing that sketch.
Post your sketch when you get to your computer.
.