PIK-PIK RTU2 — is a controller with human machine interface, based on Arduino MKR WiFi 1010. It has datalogging and remote control functionality. High-quality industrial connectors allows connecting various kind of sensors and actuators.
The device is still in development.
- Source code for Arduino board: pik-pik_rtu2_[Ver_0.6].ino.zip (35,1 KiB)
- KiCad Wiring diagram: pik-pik_rtu2_KiCad.zip (66,3 KiB)
- PIK-PIK RTU2 Enclosure model for FreeCAD: pik-pik_-_rtu2_enclosure_rev3.FCStd (3,5 MiB)
- Protective cover against accidental battery switch operation: pik-pik_rtu2_-_power_switch_protection.blend (1,0 MiB)
- PIK-PIK RTU2XS1 Enclosure model for FreeCAD: pik-pik_-_rtu2xs1_rev2.FCStd (1,5 MiB)
- PIK-PIK RTU2XS2 Enclosure model for FreeCAD: pik-pik_-_rtu2xs2.FCStd (2,2 MiB)
- Bill of Materials: pik-pik_rtu2_-_bom.ods (45,4 KiB)
- Photo/Video Gallery (NextCloud)
Philosophy and goals
- Use free software as much as possible;
- Convenient and intuitive human-machine interface;
- Autonomy and portability; (I ordered the fattest LiPo cell that was sold)
- Security and encryption;
- Install in the country house and remotely control: refrigerator, two heaters, water pump and boiler.
- Free and open source schematics, drawings, models and source code of this project.
The wiring diagram of this project is not 100% accurate at the moment and needs clarification. Buttons do not have pull-down resistors, wiring of remote controlled sockets is incomplete.
Unfortunately I have used all available pins. PIN A2 could be freed, if disconnected from Light Sensor on Environment Shield, which is useless inside a black box.
I didn't found a reliable way to get information about USB power in the software, so I have voltage divider for USB-SENSE.
I used 3.3V ⇒ 5V DC Power and Signal converter to operate chinece LCD screen. The power converter might be unnecessary, as I learned that PMIC has boost mode. I haven't tested that yet. Needs further investigation.
It turns out that the 16-bit general purpose input/output expander PCF8575 uses open collector as output, while the datasheet gives contradictory information. So, to give positive signal to relay module, I had to build a simple inverter based on general purpose PNP transistor 2N2907A
The device will use the following sensors:
- Mounted on top of the main board is an MKR ENV Shield, which has a humidity sensor, an atmospheric pressure sensor, and a temperature sensor;
- Two external digital thermometers DS18B20. One is indoor, the other is outdoor.
Human Machine Interface (HMI)
- Standard Chinese 20x4 LCD screen with RGB color backlight (rainbow animation, wow!);
- 6 control buttons: ESC, OK, Left, Right, Up, Down. With such control, you can even enter text;
- Piezo buzzer for sound notification;
- 6 different LED colors:
- Battery charge LiPo 2.7 Ah 3.7 V;
- Time synchronization;
- I / O operations on the SD card;
- 2 spare.
- Battery power switch.
- 2 × 3 digital outputs are provided. I'm going to turn the relays on / off the power in the sockets.
- The MKR ENV Shield has an SD card slot. I set the sliver to 16 GB;
- With a specified interval, all telemetry is recorded on the SD card;
- Synchronization of time via the Internet.
- Internet connection via built-in WiFi module;
- WebServer with encryption and password: on the website, you can manage outlets, view graphs of telemetry changing over time and download logs for further processing;
- Tunnel forwarding in case ports cannot be opened.
Remote controlled power outlets
Two 230 V / 16 A / IP44 sockets controlled by chinese dual 10 A relay modules.
Video: valkatr_-_pik_pik_rtu2xs1_test.mp4 (21,6 MiB MB)
Second remote controlled power socket with slight variation.
The power cable is connected through IEC C14 Plug (the same you can find on the power source of a PC).
Third remote controlled power socket.
In this version I attempt it to make rain proof. There will be a rubber seal between the lid and the enclosure.