Tag Archives: paludarium controller

Cloud-native ramblings: Adding Redis

Many people think I am “just” building a paludarium… But they don’t see the complex world of automation behind it. In fact, there is a full blown application running the paludarium, build in a limited-but-functional cloud-native architecture.

This architecture is limited… Because you can have multiple instances of your microservices… But in the end there is only one piece of hardware to control. A single relais, a single led light, a single pump, a single valve and a single level sensor. And this is a problem; what if multiple microservices all talk to the one hardware platform at the same time? I needed a way to put a lock on who can send commands, and Redis came to the rescue.

The limitations of having “one hardware”

What if you have all kinds of microservices and functions that all want to talk to a single hardware platform? There are several functions and services that want to talk to the hardware:

Read more »

Artemis v1.22: The new automation module

As you may have noticed, I love calling everything a “module” more and more. And with good reason: If you build a project of this size, splitting up in modules makes sense. It allows you to focus on PART of the problem, and replace the module if you find something smarter / better.

Required specs for the new automation hardware

As I was building out something new, I figured it should be big and bad enough to handle anything I want to throw at it, PLUS have room for future expansion. As I was falling in love with many smaller light sources again, and the RGB-CCT led panels, I came to the conclusion that whatever hardware I build, it has to have MANY channels I can use to control and possibly dim all hardware. Just as an idea, I wanted to use three RGB-CCT led panels, and those use 5 channels each for red, green, blue, cold- and warm white. So that is 15 PWM channels at 24V already maxing out an Arduino Mega (which has exactly 15 PWM outputs). So I needed more. Time to grab back to my faithful PCA9586 PWM I2C-based controllers. I would not place them onboard this time, but design them as separate modules that I could either place on top of the Artemis Controller, or optionally somewhere else (just running power to them and the I2C connection).

In the end, this is the huge wishlist I cam up with regarding the automation hardware:

Read more »

Adding software features to Artemis

New things! Everything is progressing nicely. Did additional testing on the 230VAC detection circuit and wrote software to read SHT31 digital humidity/temperature sensors. Also added a ClosedLoop function so analog inputs can be used to compare to store values and have an outputs act on the comparison.

230VAC detection

Finally I had the time to properly measure the mains voltage inputs. No shorts or anything… So I decided to go on and plug in the mains voltage into the Artemis.

The 230VAC detection circuit is connected to D48 (ICP5 on the Arduino), which mean I could potentially measure the exact frequency of the mains AC voltage. Still, I do not require to have that, so instead I built a simple timer that resets if the phase comes up, and counts down if the phase disappears. This way I always have a stable reading on the signal, even when the Artemis accidentally measures on an exact phase zero crossing.

        if (digitalRead(PIN_230V_DETECT) == LOW) // Active? Reset Timer.
        {
                TIM_50HzDetect = 10;
        }
        else
        {
                if (TIM_50HzDetect) // Not active -> count 2 zero and stay.
                {
                        TIM_50HzDetect--;
                }
        }
Read more »

Putting Artemis through it paces

The hardware is finally in! This post is a geeky tech post as a result 😉 I had some issues soldering an SMT component that was not in stock at the PCB manufacturer… So I needed to solder that manually. After that the rest of the THT components were soldered, and then it was test, update software, test, update software.

Just like the computer render – but this time it is for real! The first prototype is just about ready to go!

Manually soldering a TSSOP28

As I quickly discovered – no fun. The Chinese PCB manufacturer mounted all SMT components, except one: The PCA9685 PWM timer which was out of stock.

So I ordered the chips separately and manually soldered the thing. Using a soldering iron and soldering flux I managed to get the component soldered. Up close it is REALLY ugly, but eh, it works:

Read more »

Paludarium 2020: Electronics!

I admit… I have failed to post any new blogs on my current Paludarium setup. I posted the construction of the wooden cabinet… And then it stopped. I did however finish the build, and maybe I’ll add a post on that one later. In this post I introduce a new paludarium design, and it is getting ready to be actually build! It is going to be bigger, better, faster, more! ehhh… more automated than EVER.

The problem with these larger projects is that there are SO many bits and pieces to put together. Today I am writing up part one as I am almost ready to push the button on ordering a complete PCB that will contain practically all electronics required for my new Paludarium 2020 build!

Requirements for the electronics

I wanted to be sure I’d create a PCB that has all stuff on board I might be needing, without overdoing things. Still, I ended up with a huge amount of speeds and feeds. Here they are in random order:

Read more »