One of the backburner thoughts through this challenge was whether or not I could use a thermistor in a simple circuit to control my humming bird feeder heater.
So I did a little bit of extra experimenting...
Spoiler alert: it's not that simple.
Here was the thought: I could use a voltage divider with the thermistor, just as we have done when using it as a temperature sensor for microcontrollers, but use the output to control a transistor. I could use the 5 volt input from a USB phone charger that runs the heater to also run the circuit that would control it.
The first tricky bit I ran into is that transistors don't seem to just turn on and off with a voltage threshold - they kind of fade on and off as the voltage goes up or down.
I thought I could solve that by using a zener diode.
By using a zener diode rated for 4.7 volts, I could choose my voltage divider bias resistor to match such that the Vout of the voltage divider would be under 4.7 volts (=OFF) for temperatures higher than, say, 15 degrees C, and over 4.7 volts (=ON) for lower temperatures - that could then be used to control the transistor to turn on and off the 5v USB-powered hand-warmer heater I'm using to keep my hummingbird feeder from freezing.
I used an online voltage divider calculator to figure out that I could use a roughly 5.6 kOhm resistor for the bias resistor, and it should work to get the correct voltages to control the transistor, and thus the heater. I'm using an LED as a simple test, and I realize that once I got it running I would likely need a second transistor to control the heater, rather than having this one power it directly.
Here is a picture of my notes... noticeably erased and rewritten several times over before I got it sort of right :D
It includes my theoretical circuit too.
I then proceeded to build it on a little breadboard to try it out:
But when I turned it on...
Hmmm....
It's definitely not under 15 degrees in here :/
And touching the thermistor didn't turn it off either.
I then measured the input voltage going to the breadboard and I realized at least one of my assumptions was wrong: the input voltage is not exactly 5 volts. In fact, depending on which charger I use to power the board, it can vary from 5 volts to 5.2 volts. I think all of that is within the USB standard.
Checking the voltage divider calculator, I noticed that a small voltage change like that can have a huge impact on the trigger point of the circuit. Sigh.
It's very possible I messed up something in the way I built the circuit, but it does seem to be very sensitive to input voltage, regardless of whether that's an issue.
So then I guess I have a few options - I could possibly use a 3.3v regulator to power the voltage divider circuit, but then I'd have to use a different zener diode. I'm not sure if that would work, but it will definitely add more complexity to the circuit.
The other option is that I've noticed people using OpAmps for this kind of control circuit, which I think takes care of issues with voltage fluctuations, but I'm not sure.
I've also read that PTC thermistors, which increase their resistance with temperature, could be used (almost?) directly in line with the heater - as the temperature rises, the extra resistance will keep reducing the amount of current, and thus the amount of heating. Unfortunately, the kit only included NTC thermistors, so I wasn't able to try that out.
Conclusion:
Using a thermistor as a thermostat control circuit is not as easy as it first seemed!
The easiest option for me, at this point, is to stick with the bi-metallic thermostat that I'm currently using. It's a bit rough but does the trick of keeping the nectar warm while not letting it get too warm.
I do intend to check out a few chip-style temperature switches in the future too, as those are small, and it appears I could use one to control a transistor with much better accuracy than I have now.
I was hoping to keep the heating separate from the monitoring, but I guess another possibility could be to use the same microcontroller that monitors the temperatures to also control the heater. Those little ESP-based controllers I'm using have been VERY reliable. I've had to reset the Raspberry Pi server a few times, but never those sensors, so that would probably be a trustworthy enough option.
Top Comments