Internet-Connected Smart Water Meter

details

This project is about smart water meter that makes people read the water meter and display on LCD through Internet.

components: 1. An Arduino UNO R3 board

2. Arduino Ethernet Shield R3

3. A liquid flow sensor

4. A Hitachi HD44780 DRIVER compatible LCD Screen (16 x 2)

5. A 10K ohm resistor

6. A 10K ohm potentiometer

7. Few Jumper wires with male and female headers

8. A breadboard

Hardware :

  • Connect positive terminal of the water flow sensor to Arduino 5V.
  • Connect negative terminal of the water flow sensor to Arduino GND.
  • Connect DATA terminal of the water flow sensor to Arduino digital pin 2.

 

Code :

int pin = 2; //Water flow sensor attached to digital pin 2
volatile unsigned int pulse;
const int pulses_per_litre = 450;
void setup()
{
   Serial.begin(9600);
   pinMode(pin, INPUT);
   attachInterrupt(0, count_pulse, RISING);
}
void loop()
{
   pulse = 0;
   interrupts();
   delay(1000);
   noInterrupts();
   Serial.print("Pulses per second: ");
   Serial.println(pulse);
}
void count_pulse()
{
   pulse++;
}

Result :

URL :https://www.packtpub.com/books/content/internet-connected-smart-water-meter-0

This project is about smart water meter that makes people read the water meter and display on LCD through Internet.

components: 1. An Arduino UNO R3 board

2. Arduino Ethernet Shield R3

3. A liquid flow sensor

4. A Hitachi HD44780 DRIVER compatible LCD Screen (16 x 2)

5. A 10K ohm resistor

6. A 10K ohm potentiometer

7. Few Jumper wires with male and female headers

8. A breadboard

Hardware :

  • Connect positive terminal of the water flow sensor to Arduino 5V.
  • Connect negative terminal of the water flow sensor to Arduino GND.
  • Connect DATA terminal of the water flow sensor to Arduino digital pin 2.

 

Code :

int pin = 2; //Water flow sensor attached to digital pin 2
volatile unsigned int pulse;
const int pulses_per_litre = 450;
void setup()
{
   Serial.begin(9600);
   pinMode(pin, INPUT);
   attachInterrupt(0, count_pulse, RISING);
}
void loop()
{
   pulse = 0;
   interrupts();
   delay(1000);
   noInterrupts();
   Serial.print("Pulses per second: ");
   Serial.println(pulse);
}
void count_pulse()
{
   pulse++;
}

Result :

URL :https://www.packtpub.com/books/content/internet-connected-smart-water-meter-0

COMMENTS

Please Login to comment
  Subscribe  
Notify of