A few weeks ago I created my first instructable which used the Electric Imp. It’s been selected as a finalist in the SciStarter Citizen Science Contest. The Electric Imp is getting out there and being recognized. Well done Hugo and the team at Electric Imp for the invention.
@Our9thPresident - Yes this would work well for fan control. Thermistors are cheap, but accuracy is not perfect, ie you should expect +/- about 2-3 degrees. Let us know how you go. @Chrischi - Thanks for picking that up. I’ve updated the instructable. @302tt - That was interesting. It was an unexpected win actually.
One suggestion: if you connected the GND end of the resistor to a pin on the imp (eg pin1), then when not “enabled” (by configuring pin1 as an output and driving it low) the thermistor/resistor won’t take any power unless enabled - which also helps prevent the thermistor from self-heating due to the current flow.
This reduces the sleep mode power consumption significantly - from 171uA to about 6uA. Combined with using server.sleepfor() you could make a device that ran for a very long time from batteries.
One other thing; I don’t quite understand why you’re using hardware.voltage() in the calculation to find the thermistor resistance. Because the thermistor and the fixed bias resistor make a voltage divider, the middle node you sample is always a fraction of the supply voltage whatever that might be.
eg, if you are using VCC - thermistor - bias_resistor - GND:
Or, put mathematically rather than electronically: if you, in your code, substitute the equation for “voltage” into the equation for “ohms”, you’ll find that “hwvolts” cancels out.