close
insta

Overview

Imagine being an employee of  WaterCo™’s (a water utility service company) meterer. [change this] Every day seems repetitive: meter this, meter that, and meter those. On your afternoon break, you browse through your social media feed to pass time. Along the feed, you come across one of CreateLabz’s mini-project: A Smart Water Meter.

It’s no easy feat to meter hundreds of households. Aside from the repetitive tasks, you could utilize your time for something more productive. So you walk up to your boss, and straight up told him this idea.

If implemented properly, households can see their current water consumption, water flow, and estimated calculated water bill in real time.

Software Used

  • Arduino IDE

Hardware Used

Libraries Used

Application Description

This project is crafted in order to demonstrate the connectivity between two LoRa nodes. LoRa devices are usually implemented in the fields where battery consumption, and range is a critical factor.

Although LoRa devices are set-up as a “star-of-stars” network topology, this node-to-node communication will be enough to transmit one sensor data to a server. If multiple clients are involved, a gateway is built to accommodate all receiving information towards the cloud service. It trades off the data capacity for its long range.

Dragino LoRa Shield v1.4

From the Dragino Wiki itself, The Dragino LoRa Shield is a long range transceiver on a Arduino shield form factor and based on Open source library.The LoRa Shield allows the user to send data and reach extremely long ranges at low data-rates.It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.

LoRa , which means Long Range, is a modulation scheme (Linear Chirp Spread Spectrum) developed by Semtech that uses frequency chirps with a linear relationship of frequency with time to encode information.

This website describes and explains LoRa : https://www.iotforall.com/a-primer-for-loralorawan/

 

This device will enable us to transfer the Water Flow Meter data to another node up to ~10km (in open area, theoretically).

 

ENC28J60 Ethernet Module

LoRa devices are set-up for data acquisition purposes. One method to store data is to use Micro/SD card modules. SD card modules are normally used when data sensors are logged in a long period of time. When data are needed in real-time, it’s better to use a cloud service. Cloud services, that specializes in data acquisition, usually has a built-in data visualizers.(such as line charts, gauges, and the like).

When connecting to the internet, there are many options to choose from : GSM, WiFi, and LAN. For this particular project, we will use a LAN connection to connect to the internet.

According to the datasheet, the ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to serve as an Ethernet network interface for any controller equipped with SPI.

 

myDevices Cayenne

Expected Final Output ! 🙂

From their webpage, myDevices is an Internet of Things solutions company. We accelerate IoT development and empower enterprises to quickly design, prototype, and commercialize IoT solutions.

1.CayenneClick this “Sign In” Button

2.After the website redirects you, fill-up the necessary information

3. Follow the steps provided by Cayenne. They are very simple and straightforward to follow. For this project, select “Arduino”

 

4. Properly connect the Ethernet Module to the important wiring.

5. Here comes the tricky part. Note that in any of the example sketches provided by Cayenne, there’s no sketch for ENC28J60. You need to download the following libraries listed above. The MQTT Username, Password, and Client ID is essential for authentication purposes.

 

6. Cayenne will wait for a device to connect. Upload the “dummy” sketch so that Cayenne will register the device. This will create a temporary widget named “Channel 0”, that has receives the running sketch time in milliseconds.

7. There are many available widgets in Cayenne for the user to explore. Sometimes when adding widgets, the data received by Cayenne will not be registered (although shown in Live Data). When such instance happens, try to remove, and re-add the widget.

YF-S201 Hall Effect Water Flow Meter / Sensor

According to Hobbytronics, this Water Flow Meter contains a rotating pinwheel to measure the flow of the liquid passing through. The rotating pinwheel generates a magnetic field that is sensed by a hall effect sensor, which is sealed.

Along the project, you will also need these materials.

Hose Coupler
Hose End
Water Hose

Hall Effect Sensor

A Hall Effect Sensor is a transducer/sensor, similar to a IR Proximity sensor, that changes its output voltage in proportion to a nearby magnetic field. If you had opened a hard disk drive or some motor with feedback, you can see this as a tiny Integrated Chip near the motor.

Image result for Hall Effect Sensor
Taken from https://www.slideshare.net/ADARSHARYA2/hall-effect-and-hall-effect-sensor

 

Set-up the Hardware

Client Set-up
Server Set-up
Jpeg

Code

Client

 

Server

Code Breakdown

Whenever a RISING edge of the Water Flow Sensor is noticed, this function is called. The function simply serves as counting up to the variable flow_frequency by 1.

Conclusion

Today’s innovation is more or less about improving the previous devices. Smart Water Meter , coupled with a pneumatic valve, can reduce water consumption via strict regulation. Another advantage of using such devices is its real-time update. Whether you are at office or vacation, it only requires internet connectivity to view the data.

References

Information

http://community.mydevices.com/t/is-enc28j60-supported/1044/7

http://www.hobbytronics.co.uk/download/YF-S201.ino

http://www.hobbytronics.co.uk/yf-s201-water-flow-meter

http://wiki.dragino.com/index.php?title=Lora_Shield

 

Pictures

http://www.hobbytronics.co.uk/yf-s201-water-flow-meter

https://www.amazon.com/Tru-Flate-21-133-Male-Hose-Fitting/dp/B001ADWE78

Tags : cayenneDragino LoRa Shieldenc28j60ethernetinternet of thingsiotLoRamydevicesSmart Water MeterWater Flow sensorwireless

Leave a Response