Feed on
Posts
Comments

Tag Archive 'attiny85'

Welcome to Part 8, before we get starting with making the PCB I thought I’d review my code/hardware plus add some more functionality to our project.

We don’t need a Watchdog f_wdt variable

On review of my code and the example watchdog code I used, I found that the watchdog f_wdt variable wasn’t adding any value to our code. I came to this conclusion because when you run the system_sleep() function and it reaches sleep_mode(); it sleeps there. When the Watchdog timer wakes it up, it heads to the watchdog vector (ISR(WDT_vect)) and now since it’s awake again it continues to run next bit of code.

// This will work because we are initialising the watchdog vector and
// once the watchdog times out, it will wake up, go here,
// do nothing and continue our code
ISR(WDT_vect) {
}

Now I’ve give you an example of where we might need the f_wdt variable.

(more…)

Read Full Post »

Welcome to Part 6, it’s been a long project so far and we are coming close to the end. In this part we’ll explain how and why we need to change our circuit and code from 5V to run at least at 1.8V.

The reason being because of communication between the Arduino and ATtiny, if you were to run the ATtiny at 1.8V and hook up the Arduino to it, the ATtiny Digital or Analog input can only go to a maximum of 1.8V. So you’re feeding 5V from the Arduino to the ATtiny at 1.8V, you’ll overload the inputs and are highly likely to damage the chip.

How can we connect both microcontrollers together if they operate at different voltages?

Option 1: If you recall from Part 4 we learned about voltage dividers, we can use this technique to divide the voltage in such a way that the Arduino’s 5V output can be divided to lower voltage. We can use a 39K resistor along with our already 10K resistor

(more…)

Read Full Post »

Welcome to Part 5, in this part we’ll talk about enabling brown out detection to our Standalone Temperature Logger as a safety mechanism. The information below about brown out detection is also available as a video explanation, I recommend viewing the video whilst reading below.

Before we do anything let’s take a look at the ATtiny85’s datasheet, we want to check what voltage range works on.

(more…)

Read Full Post »

Lets begin with Part 3 in which I’ll hook up the ATtiny85, program the simple LED blinking test, take it away from the Arduino, run it on a 9V battery and also how we are actually using the thermistor to calculate the temperature.

Firstly we’ll visit the website I gave in the first part, which shows us how to hook up the ATtiny85 to the Arduino so the Arduino can program it. Here is a mirror of the site and download files in case it’s down: HLT wiki Arduino A Ttiny 4585_files

We choose from the Arduino program to open up the ArduinoISP sketch which is below the “8. Strings” selection. Now just upload that to your Arduino.

(more…)

Read Full Post »

I plan to build a Standalone Temperature Logger with the minimum components as I can, I’ll be using the ATtiny85 and Arduino software to program it. Firstly I’ll have it run on the Arduino to confirm it’s working, then migrate it to the ATtiny85, make it run on battery and make a PCB of it all. It sounds like a simple concept, but I know there’s going to be more to it that meets the eye.

Design Characteristics

  • Use the minimum components possible
  • Power the project with batteries
  • Specify the logging delay time
  • Write temperature to EEPROM on-board
  • How to extract data from EEPROM

Now lets go through all these design characteristics.

(more…)

Read Full Post »