https://github.com/borud/thermo
Arduino temperature sensor logger
https://github.com/borud/thermo
Last synced: over 1 year ago
JSON representation
Arduino temperature sensor logger
- Host: GitHub
- URL: https://github.com/borud/thermo
- Owner: borud
- Created: 2014-08-18T20:24:59.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-10T03:07:57.000Z (over 11 years ago)
- Last Synced: 2023-03-31T12:58:06.718Z (about 3 years ago)
- Language: C++
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Thermo
__*This is a work in progress so some of the code might be messy or
unclear.*__
__For some reason the Xively and WiFi code will not play nice with
newer versions of the Arduino IDE. Version 1.0.5 does *NOT* work,
while 1.0.2 appears to work. Have not investigated why. If you know
why and feel like contributing, please fork the project and send me a
pull-request.__
The goal of this project is to learn about measuring body temperature,
so the software will implement whatever I need to experiment with
this. The goal isn't necessarily to produce a polished product at the
end.
If you find this code usable or if you are able to learn from it,
please feel free to clone the project on Github. That way I can
perhaps learn something from you and you can contribute features that
I might include in my version.
## How to get this to work
### `private.h`
There's a header file called `private.h` which you will notice is
missing from this project. This is because this is where private
information such as WiFi ssid and password is stored as well as Xively
credentials.
I've provided a file named `private_template.h` which you should copy
to `private.h` and then edit that. __Take care not to check
`private.h` into any public repositories, or your WiFi and Xively
credentials will become public__.
### `thermo_config.h`
This file contains a bunch of configuration settings and a few useful
global definitions. Have a look at it. In particular you will need
to modify this if you want to add more sensors than the default max
number (3 sensors).
(If you add more sensors you'll have to look at the code in
`thermo_xively.cpp` as well. There's a terribly stupid hack there to
define feeds, and if you need more feeds you need to edit this)
## Hardware.
To use this software you need the following hardware:
- 4-digit, 8-segment LED display from SparkFun
- Maxim MAX7219 LED driver
- Dallas DS18B20 digital temperature sensors
- Arduino Uno
You will also need a few resistors and capacitors.
## Software and dependencies.
You will need the Arduino IDE or a suitable toolchain able to run
`avr-gcc`, upload the software to the Arduino etc.
The following libraries are used by this software
- OneWire library
- DallasTemperature
- LedControl
- WiFi
I suggest you get the latest versions of everything since having older
versions of some libraries may result in compile-time errors that may
be confusing.
## Possible future enhancements.
- Networking in order to log sensor to some service capable of
recording timeseries (there are several).
- Low-power features to run this system off a battery so I can use
it for wearable systems.
- Document hardware including wiring diagram, component values and
some explanations.
I might also try out different temperature sensors. If you know of
sensors that might be more suitable do not hesitate to drop me a line.
I'd love for something that can sample faster and provide higher
accuracy.
## Display status codes
### Boot sequence
- **b-10** - Boot-time sensor scan. Looks for sensors connected to
the OneWire bus.
- **b-20** - Connecting to WiFi.
- **b-21** - Found WiFi shield.
- **b-99** - Boot finished. (Normally just a brief flash).
### Errors
The following error codes may be displayed:
- **E-01** - No temperature sensor or sensor has been unplugged.
- **E-02** - Negative temperature (*display only supports positive
temperatures up to 99.99 degrees Celsius. May also be indicative
of sensors being unplugged.*).
- **E-03** - Getting DS18x20 sensor address failed.
- **E-20** - Sensor index out of bounds. Indicates a programming
error in `thermo_sensor.cpp`
- **E-21** - Sensor index out of bounds. Indicates a programming
error in `thermo_xively.cpp`.
### Reboot
- **P-01** - No temperature sensors connected. Keeps rebooting
every 2 seconds until one is connected.
## Useful links
### Dallas DS18B20 temperature sensor
- http://www.milesburton.com/Dallas_Temperature_Control_Library
### Maxim MAX7219 Led display driver
- http://playground.arduino.cc/Main/MAX72XXHardware
- http://tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/