Temperature Monitoring via USB Thermometer
HOME
|
PLANTS
|
GREENHOUSE
|
GALLERY
|
CONSERVATORIES
|
BLOG
|
BOOKS
|
LINKS
|
CALENDAR
|
This is a quick and dirty page with some notes on computerized temperature logging:
NOTE as of 1/5/2010:
Now supports HID interface on TEMPer devices ... I think. Thanks to
Andy Karels for help with the code.
The Plan
I wanted to be able to get real-time temperature/humidity monitoring and logging for my greenhouse, as well as perhaps some additional computer control. For not too much money.
The Hardware
A Chinese company Shenzen RDing Tech manufactures some cheap USB temperature sensing sticks, including one called TEMPerHum which also measures humidity.
These are BARELY available in the US - I had to import mine through an outfit in Hong Kong.
For $23, you get it surprisingly fast. Mine were silver colored, and come with a short USB extension cord and a disk with software and a driver.
I also picked up a FitPC Slim, which is a very tiny computer that runs Windows XP, has 3 USB ports, a VGA port, an Ethernet port and WiFi. It's made by an Israeli company that normally does embedded computers.
The Software
In a word, the included software sucks. It's apparently gotten somewhat better, but it's not very reliable and not exactly pretty.
Searching the web, I found that Björn Böttcher had written a neat little program to control the devices and upload the information in a variety of ways. Unfortunately, he said on his site in December of 2008 that he was not going to continue development.
Luckily, he released it in open source. It's written in C Sharp and a free development environment is available from Microsoft.
I took his code and fixed a few bugs that appeared in my setup. I also made some changes to the way the graphs look. I hope he doesn't mind too much.
My modified program and code are available here:
To install the executable, you first must get the program that came on the CD with the device working - you need the USB Serial Driver installed. You also will need .NET Framework 3.5 installed. Then just run the executable. I think. If I knew the right way to distribute the software with all prerequisites, I would. But I don't and I can't be bothered right now to figure it all out.
Updates are chiefly as follows:
A Revision
- Multiple fixes to the Fahrenheit/Celsius handling for barbaric Americans such as myself.
- Logging of temperature & humidity is now correct.
- HTTP Upload of temperature & humidity is now correct and more robust, running in a background thread.
- FTP Upload now runs in a separate thread and talks well to Yahoo FTP server.
- Serial Communications are more reliable - I was getting blue-screens from the USB serial driver because the program was not waiting long enough between commands.
- Graph displays separate scales for temperature and humidity.
B Revision
- Program support for multiple devices.
- Web Server and XML Server updated/repaired
- FTP reliability improved ( was allowing dropped packets on flaky connections.
C Revision
- Further FTP corruption issue fixed.
- Stability improvements with no Lang or WebServer subfolders.
- Status Notifier Added
D Revision
- Found and fixed an error in the i2c interface which was dropping bit[8] of the conversion results. Also fixed a strange post-readback work-around which was not fixing the problem.
E Revision
- Settings tab to add custom titles to the graphs.
- Independent Offset and Slope calibration for up to 4 devices added to settings.
F Revision
- Now works properly with both Temper and TemperHUM. Will still not work in a mixed setting, however.
- Hopefully some stability updates to the FTP & Serial Communications.
G Revision
- Fixed crash when notification area message was less than 20 chars, which showed up in certain error conditions causing the whole program to crash on errors.
- Fixed crash when no device connected.
- Changed datetime axis of graph labels.
- Now works with non-standard TEMPerHUM devices where y89=255.
- Added default ports for SMTP & FTP.
- Fixed e-mail alerting system and alert box display.
H Revision
- Now works with TEMPerNTC. This shows up as two devices: one external and one internal.
- Added Weather Underground upload option and more URL grabber flexibility.
- Additional crash fixes related to ftp connections being dropped. Program now operates for weeks at a time in my setup.
- Multiple device mode now works in a mixed setting ( ie: you can use 1 TEMPerHUM, 1 TEMPer and 1 TEMPerNTC at the same time, or any other combination ).
I Revision
- Fix to alert system from farenheit.
J Revision
- Additional fixes to alert system, fixed blocking of updates from alert dialog.
- FTP Robustness fix for disconnect after login.
K Revision
- Now works with older NTC probes.
- Slower serial port code for use in noisy environments.
L Revision
- Code to fix localization problem reading NTC files.
- Serial port no longer closed after each transaction improves robustness.
- FTP Thread now killed after hanging for 5 cycles.
M Revision
- Added ability to have different alerts for the first four devices.
N Revision
- TEMPerHID support added thanks to Andy Karels.
- Settings box text bugfix.
- Faster reading speed in I2C mode.
- Restart on device fail option.
The Results?
I have a couple of TEMPerHum devices hooked up in my cool house, and they should show up below. You might need to refresh your browser every so often:
|
|
| Outside | Inside
|
Albert's Greenhouse Pages are Copyright 2004-2009, Albert M. Huntington
HOME
|
PLANTS
|
GREENHOUSE
|
GALLERY
|
CONSERVATORIES
|
BLOG
|
BOOKS
|
LINKS
| |