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.
Link to Simple wireless temperature sensor updating web site with electric imp and Thermistor which explains how to use a cheap thermistor and resistor to measure temperature and send that data to a web server which displays the data live in a web browser.
Woot! Nicely detailed. I’ll want to try that soon before some starts, because I have some fans that would be great if automated.
@trevor i think you are having a copy & paste failure at the ‘switch (port)’ method.
you configure the wrong hardware pins on case 5,7,8,9
btw: Nice one!!
Congratulations on your ‘first prize’ placing (not sure why they gave 5 first places! still well done). Nice project and a great write up. Thanks
@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:
thermistor resistance = (bias_resistor / ( ADC_reading / 65535 )) - bias_resistor
eg if the bias resistor was 10k and the thermistor was 12k, you’d see an ADC reading of 29788ish:
thermistor resistance = (10000 / (29788/65535))-10000 = 12000
…no need to use hardware.voltage!
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.
Some good ideas. Thanks Hugo and Peter.