I've been trying to automatize some tasks related to my aquarium-keeping (such as fish-feeding, light control) while desiring to provide remote access to some of its properties (such as current water temperature and light incidence). With suchlike sensors and actuators, I could:
- better handle artificial light activation (now I have a mechanical timer controlling it, like almost everybody else, which turns on and off the aquarium's light on scheduled hours), be eco-friendly and only switch it on when truly needed (when natural light is week due to presence of clouds or after sunset);
- better care of fish-feeding, providing always the same amount of feed sharp on time.
- cross data between temperature and light incidence over time and be able to look for better places to position the aquarium;
- ...spare lots of time not having to do all that by myself!
In my earliest attempts, I used a Seeduino with an Ethernet Shield coupled with a stepper motor (being my ration feeder), a LDR(light) sensor, a PIR motion sensor and two relays. I also put, naively, two LEDs and two tactile buttons in the circuit for being able to control it thought a physical interface. I think I put so many components at the circuit that I run out of IO pins in the Arduino. Long story short, I had all kind of troubles (on the top of my mind: insufficient current supply, messy PCB with plenty of short circuit, libraries using the same timers (Ethernet shield, Stepper motor and Timers), Arduino freezing up, lots of frustration and components wasted). Today I see that my first mistake was to be too greedy about the project. I definitely should had been more simple...
Long time ago I played with Raspberry talking to Arduino trough the nrf2411 module. As I have a central Raspberry at home, already remotely accessible and with the nrf2411 module plugged in and ready to go, I decided to take advantage of it instead of using an ESP8266. (nrf2411 is also cheaper and also consumes much less energy).
The plan, this time, was simple. I designed a RGB LED strip with 6x WS2812b that I'd like to remotely control. I designed a case for it using OpenSCAD, 3d-printed and mounted the LEDs in it. Then I covered it with plastic film and hot-glued the edges in attempting to protect the circuit from the moisture it's going to be exposed of.
Then I simply attached it into the circuit I had already designed. This time I used an Arduino Pro Mini (programmed it using an USB-Serial FTDI cable) and power-supplied it using an old Samsung-phone USB charger of 1A.
Using the 3d-printer again, I quickly created a small box for housing the circuit. I put a 3-pin header in it for making it easy to attach/connect the LED strip. With 3 pieces of Dupont wires connected to each other, I managed to create a longer one that can link the LED strip positioned in the top part of the Aquarium till the circuit-case-box hid on its outside.
Then I finally installed the LED strip bar in the Aquarium.
This is how my central Raspberry Pi looks like:
In it, I wrote a program which accesses the nrf24L01 and sends RGB signals over the air. As it runs in the raspbian, I can execute it in the terminal.