01/13/2021 at 14:12 •
I got the PCB's in the mail the other day, and finally had a chance to test them out.
01/05/2021 at 17:21 •
I worked out all the design issues, so all that was left to do was assemble and test. It was relatively straightforward to assemble, though there were a ton of wires needed to do this on a little breadboard...
I ended up adding a flow meter, so I could measure how many gallons of water passed through the prefilter and carbon block stages, so I would know that they have processed X gallons. Most of these are rated in the 5000-20000 gallon total use range, so, in theory, this is also a good indicator. It's not how many gallons you produce, it's how much you pass through these before the RO membrane, which is really hard to know without directly measuring like I did here.
It was a bit of a pain to convert the 1/8" Male NPT fitting on the transducer to 1/4" RO tubing. They make a 1/4" NPT -> RO fitting, but then I had to find a 1/8" NPT -> 1/4" NPT and that was a total pain. Found one on Amazon eventually...
With that, I basically needed to check if the numbers were sane. I have manual TDS sensors on 2 of the RO units in my house, so I was able to get measured source water in little beakers from these at different values, and was easily able to check the TDS. That part was more or less effortless, except that these TDS sensors are not temperature compensated, so I had to manually measure my tap water and use that as a hardcoded value. :(
Testing pressure basically came down to hooking the unit up to the business end of one of my RO units, adding a dial gauge inline, and then validating the readings. It was pretty accurate out of the box in the 10-70 PSI range.
Testing flow was a complete pain. Basically just had to fill gallon buckets over and over and check the total consumption numbers until I had the right number. On the device it's printed as F*23, but on the Amazon page it's noted as F*38. All the reviews talk about needing a 1.5 correction, and basically, if you use the F*38 number from the product description, it seems to just work.
With everything tested out, I printed a simple box for the board, and then hooked it to the main aquarium's RO/DI unit. This is the one that runs the most often, so it's the most important to test and understand. Got it hooked up, and immediately got good data from it. Super happy.
Now I just have to build 2 more. And these are a total PITA to wire up. I decided to try something new, and designed a PCB, and ordered 10 from JLCPCB. I'm really hoping they work, as this is my first ever PCB design. We will find out in 2 weeks!
01/05/2021 at 13:23 •
The initial idea is simple. Get a pressure sensor and some TDS sensors, hook them to an ESP32, and start pulling data. TDS tells you when the membrane is failing, or when the DI resin (if you use that) is failing. Pressure tells you when the prefilter is clogged.
I managed to find both TDS sensors, and a pressure transducer on Amazon. I started with the pressure.
The transducer reads 0-100 PSI in 0.5v to 4.5v. This means it's a 5v sensor, so I threw together a quick voltage divider, and decided to just go with that, and hook it to one of the ADC ports on the ESP. That seemed to work ok..
Then I hooked up a TDS meter. The TDS reads in the 0-2.5v range, and there is a complex formula for converting to TDS. Seems easy enough, just hook it to another ADC port. However, this is where I learned the problem with the ESP32 and it's ADC ports. It turns out that at super low voltages, between 0 and 0.1, it just reads 0. This means I basically can't tell the difference between 0 TDS, and 15 TDS. This is a horrible problem, because at like 5-7 TDS, that means your DI stage has failed, so the whole thing is useless.
I spent hours fiddling with this, before I realized I could use an ADS1115. The ADS1115 is accurate down to near zero, and can measure up to about 6v (in theory). I got myself a bunch of ADS1115's, and wired one into a level shifter, so I could run 5v to the sensors. This lets me also run the pressure transducer without a voltage divider, so the math is easier.
Boom. Works perfectly. Took a bunch of doing, but now I'm reading TDS down to zero, and getting accurate pressure data. The pressure transducer is a little flaky though. At 0 PSI, I get readings between 0.44v and 0.6v randomly. However, what I care about is the 40-70PSI range, and at those ranges, it's good enough. It's pretty stable to about a 2PSI swing, and really I just need to know if the pressure drops from 65 to 55, which it is more than accurate enough for. I just have to ignore the random -1PSI readings from it all the time when the unit is off.