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.
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 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 arduino, electronics