Running on Batteries

Running on batteries does not carry your Arduino project very far? Well, when you want to run an Arduino project on batteries, you have to spend some thoughts on minimizing power consumption. Here we will look at what you can do when you use an AVR MCU. Often you will be able to reduce the average current consumption to a few microamps!

Continue reading

Pimp Your Pro Mini

The Arduino Pro Mini is a very minimalistic Arduino board with a small footprint. For this reason it is an ideal candidate for being used as the target board in a battery operated system. In this blogpost I’ll show you how to minimize power consumption and how to burn a new bootloader that saves flash memory, allows debugging, and fixes an annoying WDT bug.

Continue reading

Testing is not responsible for the bugs inserted into software any more than the sun is responsible for creating dust in the air.

(Dorothy Graham)

While I have talked a lot about bugs and debugging in my tutorial, I still have to tell you when to start debugging in the first place and why testing is an important task in the development process.

Another Piece of the Puzzle

For a recent geocache, which is a tribute to the well-known Tetris game, I wanted people to solve a simple physical puzzle (as shown in the image above). As a reward they get a code that they can use to open a box. So, what do you have to do to make things work? And how do you make sure that you do not have to change batteries for the next 20 years?

Continue reading

Premature optimization is the root of all evil

This quote, which is attributed to Knuth, Hoare, or Disjkstra, and which appeared first in print in a paper by Knuth 1974, does apply not only to code optimizations, as I learned it the hard way. It also applies to functional optimizations when you deal with a communication protocol, such as debugWIRE, of which there does not exist any official specification.

Debugging(4): Stub it out!

How can you use a stub in order to squash your software bugs? This blog post shows how to arrive in 7 easy steps at a working debugging solution using a gdb-stub for some 8-bit AVR MCUs. The only additional hardware you need is an ISP programmer in order to burn a new bootloader (well, if you are satisfied with a very slow running program, you do not even need this).

Continue reading

Burnt Fuses and Bricked MCUs

One of the most confusing things, in particular for newcomers, are the AVR fuses. Worse, by setting the wrong fuse bits, you can “brick” your MCU, i.e., a normal ISP-programmer cannot talk to the MCU anymore. In this blog post we will present tools that help you to set the fuse bits right. And if push comes to shove, that is the wrong fuses have been burnt, I tell you how to recover …

Continue reading

Copyright © 2021 Arduino Craft Corner

Theme by Anders NorenUp ↑