Close
0%
0%

remote water system

controlling and monitoring electronic devices remotely such as water distribution system

Similar projects worth following
This project will be able to control solenoid valve as well as measure water flow remotely.

Although final application here is water system, this project can be used for any autonomous projects which requires interaction with electronics parts and communication over data network.

This project will combine both phone embedded functionalities (connectivity, camera, sensors gps) and advantage of a device board (GPIO for electronic interactions, embedded linux distribution..) making it perfect fit for building cheap, autonomous system.

It will try to meet following requirements:

- reliable system with highest availability despite unexpected scenario: ability to recover from reboot, data connexion loss, ...

- regular update (+ media uploading) to remote server (github)
- self update from github (ability to update embedded software remotely)
- failsafe recover mecanism with sms control in case of emergency, ...

- ability to use hardware which is a bit deprecated, giving a chance for old devices to be reused (you probably have, as me, some old phone you no longer use but  still suitable for this kind of task) :

  • 1 × spare phone (android froyo 2.2 minimal version) using galaxy ace with gingerbread 3.7
  • 1 × RPI like board embedding linux distribution here cubieboard 2 with arch linux arm
  • 1 × A dedicated sim card with data plan can be purchased in France for as low as 5eur/month for 20GB
  • 1 × 12V solenoid valve I used one from water timer
  • 1 × water flow meter

  • establish connection to the world

    Etienne M05/31/2020 at 19:05 0 comments

    The first step was enabling cubieboard to access data network using android usb tethering.
    initial setup with cubieboard connected to android phone through USB cable.

    Although android embed this option natively since a long time, I couldn't use it on this old phone (despite android version being gingerbread), for a reason I still ignore. This would have greatly simplified the task.

    So I had to try another solution which was used on very first android version prior to usb tethering native support.

    Fortunately arch wiki came at rescue, https://wiki.archlinux.org/index.php/Android_tethering#USB_tethering_with_AziLink

    It requires a bit of setup but finally I could make it work.

    Not everything is perfect as there are still some issues with DNS notably but the essential is here.

    You may not  have to do the same thing if your phone automatically support usb tethering, but otherwise you'll need to install azilink on your phone, adb tools + openvpn on arch linux ..., and do some basic setup to make it work... (described on arch wiki and AziLink docs)

    Another goal of this first step, was being able to ssh through cubieboard without any ethernet cable (meaning not using local network) but only through internet.

    This wasn't trivial, as the cubieboard is hidden behind phone network and ssh server cannot be reached directly as you would with a normal internet connection. So a reverse tunnel must be put in place to do so. I'll try to write build step with more in depth explanation but the idea is to make the cubieboard automatically initiate an ssh connection to the computer that you want to use to reach cubieboard.

    This implies cubieboard has to do it itself because it is on its own, through a service which always watch if tunnel is active and relaunch it in case of failure (check the github project where I'll upload important files).

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates