Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.61 KB

README.org

File metadata and controls

33 lines (24 loc) · 1.61 KB

Inside&Outside thermometer

This is an ATtiny85 project to measure the ambient temperature of my office and the outside temperature. The temperatures are measured with two DS18B20 sensor and the values are shown on a SSD1306 0.96” OLED display. The code is written in C++17/20 with two goals in mind: small code size and low power consumption.

images/in_action_640px.png

Note: The photo above is outdated because now there is a push button to turn on the device.

Circuit

images/circuit.png

Note: The image is outdated because now there is a push button to turn on the device.

Code size

This project uses 1794bytes if compiled with avr-gcc 10.2 and -Os.

Power consumption

The system stays at power down mode sleep consuming 0.5uA @ 5V and it wakes up when the power switch is pressed. The process of taking one temperature value lasts ~100ms and the pair of temperatures are displayed by 8 seconds, after that the system goes to sleep again. Another important point is that the contrast of the display is defined to be the lowest possible. The system reaches a peak of ~3.87mA when it wakes up to take the temperatures. The MCU is running under 1Mhz clock.

Dependencies

  1. ssd1306
  2. ds18b20
  3. avrcxx
  4. power_switch

Requirements

  1. avr-gcc 10.2 with -std=c++20 -Os