Rhino: A wireless liquids temperature sensor with Wifi
Please see the video before reading the article.
A liquids temperature sensor, battery free and airtight designed for environments of difficult access like water tanks or when cables are not desired for aesthetics like a fish tank.
It’s compose by two modules: The sensor and the hub. This 2 modules align by using neodymium magnets embedded on their cases so the wireless power transfer coils are always align. The sensor module is placed inside the water tank and its held in position by the magnets of the hub module placed outside. The sensor module is completely power by the hub using the FT1235 module and its temperature readings are send to the hub using high frequency IR light capable of traversing most plastics and glass. The hub uses a ESP8266 for wifi connectivity and push the readings to a remote server running a custom state of art TCP server.
The philosophy behind this sensor is; place it and forget it. The prototype cases are 3d printed and the PCBs are made by a professional manufacturer in China.
How it works
You connect the Hub to any 2 amps capable USB power supply using the micro USB 2 female connector on the bottom. If this is the first time the device gets powered you’ll need to configure the wifi connection. Rhino will create a wifi network called HookNinja (that’s the name of a library I wrote a while ago to handle wifi captive servers, source code available at the end of this article), you can connect to this network to setup Rhino and define the wifi network it will use later on to transfer the temperature readings to the server.
When Rhino is connected to your wifi network, the blue status led will stop blinking. You can now attach the sensor module and use the magnets to guide the submersion, the data transmission will start automatically.
All the data is send to the Rhino server, and you can visualize it (please go the Software section of this article to know how to do it).
Schematics and CAD
Schematics and PCB are available for download and fork at https://upverter.com/domingo/0b81fda16c0a709c/RhinoModule/
Upverter is a free cloud tool for schematics and pcb design.
You can download the Gerber files here: RHINO_gerber
Bill of Materials
Reference | Description | Package | Quantity |
C5 | Generic Capacitor (1e-07F) | 0805 (2012 metric) | 1 |
D3 Power | Generic LED | 0805 (2012 metric), polarized | 2 |
D4 | 5mm 940nm IR LED | RADIAL | 1 |
F1 | Fuse SMD | 1812 | 1 |
J8 | 3 pin Header, 0.1″ / 2.54mm Pitch, Through-hole, Generic | 1 | |
P71 | MICRO USB, 2.0 TYPE B, RECETPACLE, SMT | 1 | |
PGR Reset_S | SMT_SWITCH_3MM0_2MM0 | 2 | |
Q1 | NPN General Purpose Amplifier | SOT-23 | 1 |
R10 | Generic Resistor (10000) | 0805 (2012 metric) | 1 |
R11 R12 R5 R7 | Generic Resistor (1000) | 0805 (2012 metric) | 4 |
R13 R18 | Generic Resistor (4700) | 0805 (2012 metric) | 2 |
R14 | Generic Resistor (470) | 0805 (2012 metric) | 1 |
R15 | Generic Resistor (33) | 0805 (2012 metric) | 1 |
R16 R17 | Generic Resistor (22) | 0805 (2012 metric) | 2 |
U118 | TO-92-3 | 1 | |
U127 | SENSOR_PTH_5MM0_4MM80 | 1 | |
U135 | FT1235M | 1 | |
U136 | No description | 1 | |
U141 | Thermo and Humidity Sensor | 4 pin single row pin package | 1 |
U25 | ESP8266 based module | ESP-12 | 1 |
U26 | 500mA-Peak 3.3V Output LDO Regulator | SOT-23 | 1 |
U72 | AVR ISP(6pin) Connector | 1 | |
U98 | Atmel ATmega328 TQFP32 | TQFP32 | 1 |
Y100 | 16MHz Crystal 9pf 10ppm | XTAL_42 | 1 |
Server Software
The software architecture of the server (where temperature reading are stored) is based on microservices.
DEMO
https://hook.ninja/ (Sorry for the name, this is my personal testing server)
email: test@test.com
password: 2255
There are 3 services involved:
Rhino webserver: This microservice handles the web interface where the user can login to see the reading in real time.
API: This handles the API server, for authentication and data gathering.
Socket Server: This microservice is a TCP server that keeps the Rhino hardware module connected for receiving data.
All this services are Nodejs applications running on a linux machine controlled by a process manager service called PM2.
You can download the code here: RHINO_microservices
(I did not include the SSL key certificate for security reasons, you can run it in http mode or use your own certificates)
Firmware
There are 2 firmware in this project since there are 2 processor. The ATMega from Atmel 328 runnig 16Mhz for the sensor module and the LX106 from Tensilica running 80Mhz for the Hub module. Both of this codes can be compiled using the arduino IDE but for this project I used PlatformIO.
HUB firmware: HNfirmware
Sensor firmware: rhinoSensor
Final words…
As a proof of concept the device is valid, of course it is a rushed prototype and there is a lot of mistakes that can be easily corrected in a second run. It took me almost 3 months to complete since I want it to look as professional as possible in the short amount of time available for the contest.