ArkSync - Update #001
Long time no see! I've been busy working on a new project called ArkSync, an environmental monitoring and regulation system . This is the first update about the software, but the project itself has been in development for a while. Remember this post about Aeroponics Farming : The Project? Well, we are finally building the system that will control and regulate environments for aeroponics farming and more!
Not only for Aeroponics
I realize I didn't make any update, but I've been busy on preparing my testing environments. First of all, I installed a greenhouse in my backyard to start harvesting some plants and have some place to test my high pressure aeroponics system.
But the cost of the hardware and the complexity of the system made me think that ArkSync could be used for more than just aeroponics and could be applied to something more accessible. This allows me to continue making progress on the software while I gather the resources to build the aeroponics system. I already have some parts such as the tubing, nozzles, water pressure tank, valves, ... but I still need to get the high pressure pump and a relief valve essential for the safety of the system (and humans).
So in the meantime, I decided to build a small scale environmental control system that can be used for an aquarium. It still offers a water environment to control, but it's easier to setup and still fun since I love aquariums!
It will be the perfect testbed for ArkSync:
- Water temperature monitoring
- PH level monitoring
- Dissolved oxygen level monitoring
As you can see, no regulation yet. I keep it simple for now to focus on the software side of things.
Hardware
Raspberry Pi 4
I ordered a Raspberry Pi 4 model B with 8GB. It has way more than enough power to run the software, InfluxDB for the time series database, the RPI OS and some other dev tools I will need to debug such as Grafana. The Raspberry comes with an Argon One M.2 case to cool the board and offer easy access to the GPIO pins and ports.
I use an external SSD drive for faster I/O operations and longer lifespan compared to a microSD card.
In addition, I got a Waveshare 7 inch touchscreen display to have a local interface. It allows me to test very early the cross-compilation and UX of the software for desktop on ARM and x86_64 architectures.
Sensors
This is maybe the most exciting part, but also the most costly! I'm saving some money to get industrial grade sensors. The reason behind this is that I want to have reliable and accurate measurements to make a good prototype of ArkSync. Here's the list of the Atlas Scientific kits I plan to buy from Sensors Probes:
Each kit mainly comes with a sensor, an EZO circuit board to convert the analog signal to digital (I2C) and a carrier board to connect everything easily (plus isolation except for the temperature sensor). The kits also include calibration solutions and accessories to maintain the sensors.
This is quite an investment but I will be able to use them later for the aeroponics system.
Then the goal will be to read the data from the sensors using the I2C protocol and send it to ArkSync for calibration, storage and visualization.
Software
ArkSync is written in Rust and uses the Tauri framework to build cross-platform desktop applications. You can find the project on my GitHub repository. The frontend is built with Leptos and TailwindCSS. The front is then compiled to WebAssembly.
So far I made good progress on the grid layout and responsiveness. You get draggable and resizable panels, and sticky effects to correctly place the widgets on the grid. The next steps will be to fix some bugs and implement collision detection (aabb algorithm) to avoid overlapping panels.
I'm basically reimplementing React Grid Layout in Rust and Leptos!
Tauri uses the WebKitGTK engine on Linux, and while I have some CSS limitations, it works pretty well. The main challenge is to find a way to run it smoothly on the Raspberry Pi 4. I already observed some performance issues if I use big screen resolutions or if I have too demanding peripheral devices connected to the RPI via USB.
I'm not really concerned about it, I can still decide to run ArkSync headless and use a web interface to connect remotely. But having a local interface forces me to optimize the software and be more efficient with resources. I've compared with some projects using Iced and I experienced the same GUI performance issues. So the bottleneck seems to be the Raspberry Pi here.
What's next?
I have so many tasks to do! But for now I think the main focus for me is the software, especially the GUI part. For once it's maybe the most challenging part of the project. Everything on the backend side seems quite straightforward and thanks to the EZO boards from Atlas Scientific, I don't have to deal with the complexity of reading analog signals from the sensors.
If you enjoyed this update, feel free to follow the project on GitHub and to follow me on Bsky if you want to comment or ask questions! See you soon for the next update!