JimInCO / low-power-temp-humidity

A Battery Powered Temperature and Humidity Sensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Low Power Temperature and Humidity Sensor

Has the schematics and code to create a battery power temperature and humidity sensor. Based on the design from the Home Circuits Blog.

Setup Arduino Uno

The Arduino IDE can be used to program the ATtiny13. I followed the instructions on this instructable as they worked better for me than what was on the blog.

Connect the Uno and ATtiny

Here is the breadboard layout. ![Programmer](images/ATtiny13 Programmer_Schematic.png) The Pinout follows this table

Arduino Uno Pin ATtiny Pin Type
5v Pin 8 Vcc
GND Pin 4 GND
Pin 13 Pin 7 SCK
Pin 12 Pin 6 MISO
Pin 11 Pin 5 MOSI
Pin 10 Pin 1 RESET

This figure shows the pinout of the ATtiny13 ATtiny13 Pinout

Setting Up the Arduino As ISP (In-System Programmer)

Arduino IDE already contains the program that needs to be loaded to Arduino board, so then it acts the programmer for other boards. Navigate to Files-Examples-ArduinoISP and click on ArduinoISP. Configure Bard type to Arduino UNO, select the correct Serial Port and Upload the sketch as any other sketch to Arduino board. At this point Aruduino board is prepared to be programmer for other microcontrolers.

Downloading the Attiny13(a) Core Files

MicroCore requires Arduino IDE version 1.6.13 or greater.

Burning the Bootloader to the Attiny

Next, we want to add the Bootloader to the ATtiny

  • Go to Tools-Board and select ATtiny13.
  • After selecting ATtiny13, navigate to Tools-Processor Version and select ATtiny13a.
  • It is not necessary to change any other settings
  • Change the programmer to be set as "Arduino as ISP"
  • Finally, click the Burn Bootloader button at the bottom of the tools drop-down menu.

This is a figure of the settings ArduinoIDE

Programming the Chip

This is the last part for setting up the ATtiny. I took the code from the blog and use the Arduino IDE to program the chip. The code can be found here. A few changes to the code have been made and uploaded to this repository here.

About

A Battery Powered Temperature and Humidity Sensor

License:MIT License


Languages

Language:C++ 100.0%