- Arduino DUE R3
- DS3231 Real time clock
- RGB led
- OLED display
- Serial to USB converter
- Relay boards, 8 channel, optocoupler
- Motorized valves
- DS18B20 temperature sensors
- MPX5010DP differential pressure sensors
- SIM800L GSM module, sending text messages in case of alarm (not yet impl.)
- Power supplies, 24Vdc, 3.3 Vdc
- Visual studio 2017
- VMicro (Arduino IDE)
- MS Access
- MS Excell
Already the third article about the fishtank. The software for the control of the valves is ready, see also article Fishtank(2). Extra functionality is added to the valves; when going from handmode to automatic mode again, the valve is going to the state of the control. Also added; when the valve is in handmode and the control is commanding the valve, a valve error is standard raised.
I have also added soft- and hardware for the necassery clock. In this case a DS3231. This RTC is operating on 3.3Vdc, communicates by I2C and can present the room/panel temperature in the future. When HMI is started on the PC, the current time of the PC is send to the board and the time on the RTC is updated (this is part of the AFSM standard software).
Also connected via I2C is an OLED display. Presented on the OLED are the date/time, the temperature of the water and the room temperature. Last but not least the status of the installation; Normal, Warning, Alarm. The installation status is also presented by a RGB-led. The RGB-led will be placed in the cabinet of the sea tank (in sight). On the picture also 2 of the valves, connected to the board. Mention the special board for holding the DUE; to make the control a little bit "industrial" i bought a DIN-rail MEGA board holder for the connection of all wires.
... almost time to think about the building of a panel...
While testing the software, the need for extra simulation software is a must. The control is operational -for the part of adding osmose water- but i had to simulate the level of the different tanks during testing, by masking/setting the levels to the approprate value. This functionality -setting the levels by hand- is possibly, but i wanted to make it automatic. For the simulaton of the tank levels i made a matrix, with all possible routes and possible states of pumps, osmose, draines and even the evaporation of water.
Below the matrix:
This activation matrix is part of a spreadsheet, with tank data (dimensions), pump data (L/h), valve positions (open/close) and numbers for the water evaporation (% per 24h). The 3 last numbers of the table present the change of tanklevels in mm/sec, depending on routes and pump- and osmose data. A dash in the matrix persents "don't care". The matrix is imported in the Arduino. A timer is fired every second to check the matrix and process the different values of the 3 tanks.
See also the trend figures below;
The functionality of adding osmose water to the sump is now operational. Now starting with the make of salt water and then adding the most important instruments; temperature is already present, TDS, pH and conductivity planned to implement in the control....