Welcome to Provide Your Own - attiny


Using ATtiny Chips for Arduino-Like Projects

The Arduino platform is great for prototyping. Its easy-to-use shield architecture, readily identifiable pin numbering scheme, and beginner friendly IDE and software library has created a large and loyal following. In the life of many projects, however, there comes a time when the project is to be permanently deployed. When that time comes, leaving a precious Arduino in the field is often not the best option. Instead, a specialized board with either an ATmega chip or even an ATtiny chip is the best choice.

When cost or space is a factor an ATtiny chip is an attractive alternative to the ATmega for simpler projects. Thanks to the Arduino-Tiny project, an ATtiny can be used as a drop-in replacement for most Arduino projects. This initiative provides ATtiny chip configurations as upload board choices in the standard Arduino IDE. By following the instructions described in my previous article – Program an ATtiny Using an Arduino – your Arduino sketch can be uploaded as easily to an ATtiny board as it can be to an Arduino one.

More recently, the ATtiny has gained semi-official support given the variants posted by David Mellis on Github. Please note that this new firmware specification … Read the rest

Posted in Tech | Also tagged | Section: | Comments closed

Secret Arduino Voltmeter – Measure Battery Voltage

A little known feature of Arduinos and many other AVR chips is the ability to measure the internal 1.1 volt reference. This feature can be exploited to improve the accuracy of the Arduino function – analogRead() when using the default analog reference. It can also be used to measure the Vcc supplied to the AVR chip, which provides a means of monitoring battery voltage without using a precious analog pin to do so.

I first learned of this technique from these articles – Making accurate ADC readings on the Arduino, and Secret Voltmeter. In this article, I have incorporated some additional improvements.

Motivation

There are at least two reasons to measure the voltage supplied to our Arduino (Vcc). One is if our project is battery powered, we may want to monitor that voltage to measure battery levels. Also, when battery powered, Vcc is not going to be 5.0 volts, so if we wish to make analog measurements we need to either use the internal voltage reference of 1.1 volts, or an external voltage reference. Why?

A common assumption when using analogRead() is that the analog reference voltage is 5.0 volts, when in reality it may be quite different. … Read the rest

Posted in Tech | Also tagged | Section: | Comments closed

Program an ATtiny Using an Arduino

Arduino

I am a big fan of the Arduino platform. For those who aren’t familiar with the Arduino, it is a microprocessor development environment & ecosystem. You can visit their site for more info. I started playing with the Arduino and soon discovered the ATtiny microprocessor chip, which is a much smaller cousin to the ATmega series which is used in the Arduino.  Unfortunately, the Arduino IDE did not support it. Since most micro development apps run only on Windows (I use Ubuntu Linux), and require either expensive compilers or hard to use C or Assembler, I was never up to the effort required in using the ATtiny chips.

All of this changed yesterday when I was going through my Arduino notes and came across some attempts by others to use the Arduino IDE to program the ATtiny. One fellow was successful on the ATtiny45. Another tried on the ATtiny85 but didn’t seem to get as far. After much searching, I stumbled across the Arduino-Tiny project. The project is fairly mature, and they have already done all the hard work. The result is fantastic. You can program in C++ using the regular Arduino libraries (which have been modified for the … Read the rest

Posted in Tech | Also tagged , | Section: | Comments closed