I managed to get a lot done on the aquarium controller this weekend.
Saturday was mostly spent doing an overhaul of the Pi and Arduino code. My initial code was all very static which made it difficult to add new inputs/outputs. I spent a fair amount of time converting these values into arrays and making their associated functions more generic. I still need to modify the code some so that I can name the outputs using the ini file, but for the most part, I think it’s done.
I was able to get the main relay box built. It’s working well and I’m quite proud of myself for squeezing the relay board and all the wiring into such a small box.
Next I got the temperature probe working. I’m using a DS18B20 1-wire temperature probe. The Arduino is configured to take a measurement every 4 seconds, although I only make adjustments every 10. The idea is to have most of the Arduino’s time spent communicating with the Pi and only making IO changes every so often.
Lastly, I started building the box for the Controller to live in. I mounted the face plates for the IO to the back of the box and I have the two controller boards mounted to a sub-floor. The last task will be to put the sides on the box and a cover. I haven’t decided if I’m going to use plywood for the cover, or acrylic. I’m not sure if I want to be able to see all the flashing lights inside the box.
My son woke up from his nap and wanted to help. I put him in the supervisor role and provided him the proper FATHER approved ear protection.