ESPico ULM

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
Since I'm mostly working from home now, I really want a tank on my desk. I've also been goofing off alot lately with the ESP32 microcontroller, and well, why not scratch two itches at once?

So the plan is, an ultra-low-maintenance pico tank, by utilizing an ESP32 to be the brains of the whole operation.

Goals for this project:
  1. Low maintenance. Automatic water changes, ATO.
  2. Connected to and run by Home Assistant, using the ESPHome platform on an ESP32 m/c.
  3. Lights will be a dense matrix of individually controllable RGBW lights, so I can fine tune the output and do sunrise/sunset/moonlight.
  4. Touch panel controls on the front of the aquarium for readout of parameters, and easy control (push button to do water change).
  5. Closed loop plumbing.
  6. As much as possible running on 12 or 5 volt from a single power supply.
  7. Power usage monitoring for critical equipment.
  8. 3D printed stand and hood.
Now, before you say "if you want a pico, just stick a light over a box" or "RGBW matrix is a bad idea because blah", my answer to you is that I'm doing this because I want to fiddle, not because my primary goal is a thriving pico tank. If it works it works, if it doesn't, oops. This is an excuse to order PCB's, wire things up in stupid ways, and fiddle with using an ESP32 to automate a real-world device. For those of you hoping to follow a build with lots of pretty pictures of tiny corals, this might not be for you. Alot of this build will be details on the electronics and mechanics that control it, and figuring out how to make it do what I want.

The plan:

I have an old 1.6g tank. 9" x 6" x 7". An Ocean Free U-Tank, that I got from lord knows where, eons ago, because I thought it would make a fun toy. I tried at one point to do a pico with it, but back then the best I could do was a power compact light, and metal hood. The tank was unmanageable. Way too much evaporation to keep up with, too much heat from the PC lights, monstrous salt spray from the HOB. Overall it was nothing more than a noisy, annoying light on my desk.

1611483043100.png


There it is, as I yanked it out of the old aquarium storage pile the other day... so first step is, soak it in citric acid and clean it up.

1611483135553.png


Well that cleaned up nicely.

Now the plan here, is that it's going to be a closed loop design. It's such a small tank, that I want as little in the actual aquarium as possible to intrude. Having a powerhead in there just isn't reasonable. What I'm thinking is bare bottom, with probably a white ABS sheet on the bottom, and then a central tower in the back, to hide what little equipment needs to go in there, (specifically, the ATO sensor, the pH/temp probe, and the various tubes for the ATO/AWC.

So of course, the next thing to do, is to discover if this is tempered glass or not, the hard way!

1611483505678.png


All marked up and ready to drill...

1611483558589.png


Phew! Not tempered!

I figured that the tank is small enough, that I could just throw it up on the drill press, and have at it. That would make it much easier to keep the bit level and do clean holes. I used a clamp, and some scrap wood to brace it, so when the bit broke through I wouldn't shatter the glass. Especially with me putting 6 holes in such a tiny panel. I was about 50% convinced I would blow the whole back panel off rather than succeed here...

1611483711376.png


But no! It worked!

1611483750133.png


And here is a test fitting of one of the 3/8" RO bulkheads I'll be using for the closed loop. For those of you wondering, a 21mm drill makes perfect holes. I spent an additional 30 minutes or so with a diamond file cleaning the holes up a little. There is a tiny bit of breakthrough on the inside, but it was the best I could do. I ordered some O-rings to help seal these up once installed, but for now, I at least have a place to start.

With the holes drilled, and my shop floor not covered in glass, it's now time to order all the parts:

  • MeanWell RT-125B power supply. Gives me a big 5v and 12v rail to run everything off.
  • 2 4-channel i2c relay boards to flip power to various components.
  • A dual-head 20ml/min peristaltic pump (12VDC). It's a nifty design that has 2 heads on one motor shaft. My theory is to use this to do the AWC, because the heads should self-balance input and output.
  • A Nema 17 stepper peristaltic pump for the AWC.
  • A pile of optical water level sensors for the various jugs of saltwater, RO/DI, wastewater, and the ATO.
  • A DFRobot pH breakout board
  • DS18B20 temp probe
  • A 144 LED per meter individually addressable LED strip RGB + cool white.
  • 2 130GPH 12v centrifugal pumps.
  • a Nextion 3.4" TFT display
  • an ESP32 (of course)
  • 2 INA3221 3-Channel DC Current Sensors
  • a few CT sensors for measuring the mains power
  • Stepper driver
  • A pile of 3/8" and 1/4" RO fittings, tubing and bulkheads
  • 4 airtight food containers for holding the various water things
  • an Oxo Flip-Lock glass container for the chaeto reactor
That much should get me started. I think the first thing to really work on will be the pumps. I want to try plumbing them in various configurations, and see just how much flow they generate. I really don't want a "blow the skin off an acro" level of flow in there, so I need to be careful.

Problems I don't have solutions for yet, so will need to be fiddled as I go:
  1. Heater. Do I even need one? Might not.. If I do, no idea what to use here that will be small enough and not in the main display.
  2. If I seal up the OXO container and run a closed loop through it, will it survive the pressure or blow the lid off?
  3. The one or two rocks I put in here will have very low ability to function as a biological filter. Will they be enough, or do I desperately need the chaeto to work? Will anything else help here? Would a tiny cube of marinepure bio-block even help at all?
  4. Can I use a series of check-valves, and Y-plumb both pumps into a left-right alternating flow, but use both to drive the chaeto reactor?
  5. Am I going to run out of GPIO pins on an ESP32?
I have no idea if this will work or not, but it will at least be fun!
 

lapin

10K Club member
View Badges
Joined
Dec 16, 2017
Messages
10,790
Reaction score
17,952
Location
Austin
Rating - 0%
0   0   0
Nice
 
OP
OP
garbled

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
Minor updates, mostly annoyances:

I got the power supply in. A meanwell RT-125B. This should have been a perfect PSU, however, there are two versions of this PSU, and apparently the older version, which I have, won't let you power up with less than 2amps on the 5v rail, which makes it incredibly difficult to work with.. sigh.. so need a different PSU.

I also got the pumps in, and that's a different problem. The 3/8" RO bulkheads don't come with any seals. I tried to just thread them on, and they leaked a ton. So I had to go and order gaskets for them. If the ones I got work, I'll note the type and size here. I'm also slightly questioning my use of RO tubing for the plumbing, as 3/8" tubing is not as flexible as 1/4", so it's a little fiddly to plumb...

Finally I ended up ordering a plate of 1/8" aluminum, because I think the LED's are going to generate some heat, and I need a sink to mount them to. The adhesive on these things are always useless, so my current plan is to drill tiny holes in it, and use stainless steel wire to kind of zip-tie the LED's to the plate through the back.. Need to do more tesitng on the LED's though, as I haven't even gotten them to light up with all the PSU issues...

So.. slow progress.. :)
 

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Following! I once tried to do a similar closed loop on a 3G tank, needless to say my drilling efforts were not as clean as yours...
 
OP
OP
garbled

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
I hope to have a useful update here after this weekend. The short story is that those little 3/8" bulkheads have *very* tiny flanges, and even though I was nearly perfect in my drilling, and had almost no breakthrough, the tiny amount I had was a problem for these bulkheads. I've literally spent the last 2 weeks trying different flanges, bushings, washers and o-rings until I finally got it to stop leaking. Will post later this weekend with photos and details.
 
OP
OP
garbled

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
So the pumps came in awhile back, and I thought I'd do a quick test to make sure they didn't have so much power they just threw water all over the desk.

1613328790091.png


Long story short. It was a nightmare. Turns out that the little 3/8" RO bulkheads have a very tiny flange on them. So tiny, that even my miniscule breakout on the inside of the glass was too much for them. Because they also have a flat side on the threads, this means no matter how many gaskets, washers, and o-rings I threw at it, nothing would stop the leaking. The only remedy was to flip them around, and mount them backwards. Lesson learned, don't use 3/8" RO fittings on glass. Use at least 1/2".

1613328924705.png


However, in the above photo, you can see the ripple from the single pump running one side. This will be the main circulation pump for the tank. My original plan was to mount the pumps right behind the tank like that, but you can see it takes alot of space. I'm not sure I want to mount them very remote though, nor do I have a good place to put them if I do.. So I'm still thinking that part over.. There still needs to be one more pump above the one shown, for the chaeto reactor.

1613329312781.png


So instead, I decided to work on the lights. First, I got a 1/8" thick piece of aluminum, and cut it down to size, and marked where the LED's would go, and where holes needed to be drilled out.

1613329389413.png


Drilling the holes was simple enough. I have 4 holes on the corners to mount the plate to the hood with M3 bolts.

You can also see in that photo the RGBW LED's for the lights. These are individually controllable LED strips, 144 LEDs/meter. That means I can turn just one on, and set it to whatever color I want. What I learned however, is that unlike the other strip lights, these are an absolute nightmare to solder.

1613329552842.png


If you look closely, you can see the lines between each LED where you can cut the strip. However, if you cut it there, I assure you, you will never get a wire soldered onto that little half-pad. Instead, I had to sacrifice an LED for every cut, and cut right up against the body of the next LED in the strip, in order to get the whole pad. Even then soldering these was a nightmare. I ruined 2 or 3 strips just trying to get it all to work..

1613329728626.png


However, you can see here, it does work. This is maybe 1/4 power, 100% blue, 20% white. 136 LED's. 4 rows of 29 and then 2 rows of 20 in the back..

1613330264052.png


This is NOT the final aquascape, or even the rocks that will be used. I just wanted to throw some rocks in to see how they would look with the lights.

Now I need to figure out the various water level sensors, paint the back of the tank, 3d print the overflow tower, and a bunch of other steps.. still a ton to do here, but it's getting somewhere.
 
OP
OP
garbled

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
Some more progress this weekend. I finished up the schematic, ordered some boards, and then immediately realized I forgot a sensor. Luckily I can probably just patch it in on the boards with some jumper wire when they get here, but grr.

1613998914894.png


This is the main board. An ESP32 at the heart. Quick overview:

An A4988 drives the stepper motor that will do auto topoff. I want to add water slowly for that, so I wanted something precise.
An i2c relay board will control 4 relays. 2 for the main pumps, 1 for the automatic water change, and 1 for the lights on the chaeto.
An INA3221 will monitor the power draw of the 12v loads, namely the pumps and the chaeto lights.
4 DFrobot gravity water level sensors for the various containers of water and the tank water level.
1 DFrobot gravity pH sensor
an ADS1115 to monitor voltages for the pH, the 5v supply, and two ACS712 sensors for 5v power usage (the main lights are 5v).

The DBHD15's are VGA headers, which I will use instead of a bundle of wires between the various locations. The idea is that the tank will have a VGA cable and 2 16ga wires for 5v power run to it, for all of it's sensors and display. Then there will be another pair of boards to run a VGA cable between the main board and the water containers, for all the level sensors down there. This keeps me from having a pile of wires to deal with, and I have a million VGA cables lying around anyhow.

The main control unit will house most of the circuits, as well as the pumps, and the ATX PSU. I'll run a set of the following from the main unit to the tank:

2 3/8" closed loop tubes
2 1/4" refugium tubes
2 1/4" AWC tubes
1 1/4" ATO tube
1 VGA cable
2 16ga power

And then under the desk there will be 3 water containers, Salt, RODI, and wastewater, each with level sensors. A VGA cable runs to that to supply the wiring for the sensors.

The whole thing will have 1 wall plug from the ATX PSU.

I've also been working on the overflow tower and the hood. The hood is currently printing (a 2 day print!), but I printed some drafts first of partial areas to make sure it would fit. Got it working after 2 tests. The central overflow has been more difficult...

1613999860459.png


From this angle, you can see the 1/8" ABS I'm going to glue to the bottom, because it's barebottom, and I wanted white to emulate sand. (Ideally it will all be purple or something eventually, yes). It also looks at this angle like the overflow works. It doesn't...

1613999980981.png


The interior drop there is just too much. Obviously it breaks the water level sensor, so that had to be relocated outside, but I'm also worried that the upper return tube is too close to the water's surface. I'm now printing iteration #4, with slightly larger weirs, to try and balance it properly. The other problem is the drop is so significant, that the temperature probe won't even touch the water...

But overall, progress is being made. Ordered a fancy PSU for it. I think once I have a little more progress on the tower, I can start designing the tank stand, and then finally the box for the PSU and pumps.
 

revhtree

Owner Administrator
View Badges
Joined
May 8, 2006
Messages
47,775
Reaction score
87,315
Rating - 100%
1   0   0
Some more progress this weekend. I finished up the schematic, ordered some boards, and then immediately realized I forgot a sensor. Luckily I can probably just patch it in on the boards with some jumper wire when they get here, but grr.

1613998914894.png


This is the main board. An ESP32 at the heart. Quick overview:

An A4988 drives the stepper motor that will do auto topoff. I want to add water slowly for that, so I wanted something precise.
An i2c relay board will control 4 relays. 2 for the main pumps, 1 for the automatic water change, and 1 for the lights on the chaeto.
An INA3221 will monitor the power draw of the 12v loads, namely the pumps and the chaeto lights.
4 DFrobot gravity water level sensors for the various containers of water and the tank water level.
1 DFrobot gravity pH sensor
an ADS1115 to monitor voltages for the pH, the 5v supply, and two ACS712 sensors for 5v power usage (the main lights are 5v).

The DBHD15's are VGA headers, which I will use instead of a bundle of wires between the various locations. The idea is that the tank will have a VGA cable and 2 16ga wires for 5v power run to it, for all of it's sensors and display. Then there will be another pair of boards to run a VGA cable between the main board and the water containers, for all the level sensors down there. This keeps me from having a pile of wires to deal with, and I have a million VGA cables lying around anyhow.

The main control unit will house most of the circuits, as well as the pumps, and the ATX PSU. I'll run a set of the following from the main unit to the tank:

2 3/8" closed loop tubes
2 1/4" refugium tubes
2 1/4" AWC tubes
1 1/4" ATO tube
1 VGA cable
2 16ga power

And then under the desk there will be 3 water containers, Salt, RODI, and wastewater, each with level sensors. A VGA cable runs to that to supply the wiring for the sensors.

The whole thing will have 1 wall plug from the ATX PSU.

I've also been working on the overflow tower and the hood. The hood is currently printing (a 2 day print!), but I printed some drafts first of partial areas to make sure it would fit. Got it working after 2 tests. The central overflow has been more difficult...

1613999860459.png


From this angle, you can see the 1/8" ABS I'm going to glue to the bottom, because it's barebottom, and I wanted white to emulate sand. (Ideally it will all be purple or something eventually, yes). It also looks at this angle like the overflow works. It doesn't...

1613999980981.png


The interior drop there is just too much. Obviously it breaks the water level sensor, so that had to be relocated outside, but I'm also worried that the upper return tube is too close to the water's surface. I'm now printing iteration #4, with slightly larger weirs, to try and balance it properly. The other problem is the drop is so significant, that the temperature probe won't even touch the water...

But overall, progress is being made. Ordered a fancy PSU for it. I think once I have a little more progress on the tower, I can start designing the tank stand, and then finally the box for the PSU and pumps.

So dang cool!
 
OP
OP
garbled

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
I got pulled off this project because of all the sump work on the big tank. (Swapped the whole sump out, etc). I have the boards in, and the hood is printed, so I just need to do some assembly to check a few things out, and then maybe I can print the base. Need to get back to it soon, just finishing up some tuning on the big tank, because it has live things and has to come first for now. :)
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 39 32.5%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 28 23.3%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 23 19.2%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 30 25.0%
  • Other.

    Votes: 0 0.0%
Back
Top