Jestersix

DIY Temperature controller + more features to come?

thesassyindian

Supporting Member
Hello BAR,
In my first few weeks of starting my first ever tank, I had issues with maintaining my tank temperature. The temperature would swing over 3-4 degrees, with the heater and fan fighting each other constantly.

Turns out, the Fluval M100 heater was WAYY off it's set point. To root cause the issue, I set the heater in a 5 gal bucket overnight at the 78F set point, and in the morning, the bucket was at a toasty 85F!

This was right around the heat wave we had in the Bay a couple of months ago.

I really wanted a way that I could monitor the tank temperature remotely on my phone, and the commercially available options were way too expensive. So I made my own!

Currently, I have two temperature measurement channels with an accuracy of ± 0.8F. The unit logs data at 1Hz, logs the readings over the last 7 days and broadcasts this data over WiFi.
This can be viewed remotely on my phone. The unit has max and min temperature set points, at which it has an audible beeper, sends a notification to my phone, and automatically turns off the smart plugs that the heater or fan are connected to.

All this sits in a black Nylon case, printed on an SLS printer.

I didn't know how much I needed this till I had everything working :p

The next addition to this would be a pH monitor.

Any suggestions or comments are very welcome :)

Physical Unit:
image0.jpg


Readout on my phone:
image1.png
 

max_nano

Supporting Member
Hello BAR,
In my first few weeks of starting my first ever tank, I had issues with maintaining my tank temperature. The temperature would swing over 3-4 degrees, with the heater and fan fighting each other constantly.

Turns out, the Fluval M100 heater was WAYY off it's set point. To root cause the issue, I set the heater in a 5 gal bucket overnight at the 78F set point, and in the morning, the bucket was at a toasty 85F!

This was right around the heat wave we had in the Bay a couple of months ago.

I really wanted a way that I could monitor the tank temperature remotely on my phone, and the commercially available options were way too expensive. So I made my own!

Currently, I have two temperature measurement channels with an accuracy of ± 0.8F. The unit logs data at 1Hz, logs the readings over the last 7 days and broadcasts this data over WiFi.
This can be viewed remotely on my phone. The unit has max and min temperature set points, at which it has an audible beeper, sends a notification to my phone, and automatically turns off the smart plugs that the heater or fan are connected to.

All this sits in a black Nylon case, printed on an SLS printer.

I didn't know how much I needed this till I had everything working :p

The next addition to this would be a pH monitor.

Any suggestions or comments are very welcome :)

Physical Unit:
View attachment 17844

Readout on my phone:
View attachment 17847
So you can use the temp output to control a smart outlet with an API? Which smart outlet do you use
 

ashburn2k

Supporting Member
You sir is talented! How much did it run you in parts so far for parts?


Sent from my iPhone using Tapatalk Pro
 

thesassyindian

Supporting Member
Thanks everyone!

I have access to a 3D printer and also had almost all the parts lying around, so my best guesstimate for the total cost of electronics is around $20.

The real time investment is in developing the firmware though :)
 

Flagg37

Supporting Member
Have you checked out the open source raspberry pi stuff? Seems like it would be something you’d be interested in.
 

Eugene

Supporting Member
Have you checked out the open source raspberry pi stuff? Seems like it would be something you’d be interested in.
Raspberry alone is 40$ + SD + power supply - doesn't make too much sense when there are ESP8266/32 and/or Sonoff smart plugs controllable via any IOT API. IMHO linux is too much for those simple tasks like temp monitoring.
 

thesassyindian

Supporting Member
Have you checked out the open source raspberry pi stuff? Seems like it would be something you’d be interested in.
Thanks @Flagg37 , Yes I’ve been following the reef-pi project, but it seems unnecessarily complicated.

As @Eugene noted above, the BOM cost for that project adds up fast. Apart from what he mentioned above, that project needs an LCD screen, dosing pumps, sensors like a pH probe, etc.

Taking all that into consideration, an off the shelf system would be more practical. Though you would be paying a premium for reliability and refined software and hardware.

I do realize that I’m steeping on my own foot by saying that, but I tend to DIY stuff that has a much lower price-functionality ratio.

If anyone has any other DIY ideas, please do share!

Cheers!
 

thanh510

Supporting Member
It’s cheaper than apex for sure but did you account for your labor? . Future labor? Debugging labor?


Sent from my iPhone using Tapatalk
 

max_nano

Supporting Member
If anyone has any other DIY ideas, please do share!

Cheers!
ATO that turns on an AC pump connected to a smart plug. You could use two sensors and eventually add AWC. I’m not sure what your sensor options would be so it would probably be good to start with just ATO to test the sensors before trusting them for AWC
 

RandyC

Supporting Member
ATO that turns on an AC pump connected to a smart plug. You could use two sensors and eventually add AWC. I’m not sure what your sensor options would be so it would probably be good to start with just ATO to test the sensors before trusting them for AWC

A6E22042-1974-4250-9956-634A6F37DB1E.png
 

max_nano

Supporting Member

rygh

Webmaster
Staff member
Very cool project!!
But: Be wary of trusting RasPi for really critical things like temperature control.
Monitors are fine of course.

In the past, I did some DIY fish controller projects. Arduino, RasPi, and Photon.
Arduino was solid. Raspi was usually pretty good. Photon was poor.
On power failures, RasPi had issues coming back up properly sometimes if internet was slow to reconnect.
Plus some python library I was using had a memory leak.
 

thesassyindian

Supporting Member
Aah yes! You bring up a good point @rygh !
I always err towards micro controllers for that exact reason!

My next project is a backlit magnetic stirrer for titration tests :)
 

JVU

BOD
Staff member
Very cool.

Not sure how you calibrated your thermometers, but if you would like to calibrate them against an accurate NIST-traceable thermometer, the club has one to borrow:

Otherwise it is difficult or impossible to know if your readings are accurate (vs precise).
 

JVU

BOD
Staff member
The main problem with DIY controllers that I’ve seen are 1) fool-proof reliability and 2) scale-up to non-DIY types. Any system that doesn’t deal with these 2 issues won’t make it out of the “wow, that’s cool” phase into the “wow, that’s something I should use” phase. Most DIY projects don’t aspire to broader use, so it’s fine.
 

rygh

Webmaster
Staff member
...My next project is a backlit magnetic stirrer for titration tests :)
Sounds like you are rebuilding a reefbot. (I have one)

One of my maybe-to-do projects that you might consider was a quadruple redundant temperature CONTROLLER.
1) Main micro controller could be anything, although I was planning atmel based.
2) 4 relays, horizontal + vertical, so no single failure on/off causes a problem.
3) Hardware watchdog reset on controllers
4) Current and voltage sensors to check for faults
5) Plus an extra thermistor / pure hardware / no firmware backup circuit for over-temp shutoff.
 

thesassyindian

Supporting Member
Correct @JVU , im doing this to satisfy a need i personally had, so its well within the scope :p

Also, I have access to a NIST temperature monitor, so its calibrated to within a tolerance of that.
 
  • Like
Reactions: JVU
Top