Practical AVR Microcontrollers

Author: Alan Trevennor
Publisher: Apress
Pages: 386
ISBN: 978-1430244462
Audience: Hardware programmers who want to do things the difficult but cheap way
Rating: 4
Reviewer: Harry Fairhead

Working with a raw AVR micro is difficult, but is it worth the effort. This book goes deeper than you might expect.

The subtitle of this book is: "Games, Gadgets, and Home Automation with the Microcontroller Used in the Arduino"  and you really need to take notice of the "Used in the Arduino". This is basically a book on using the AVR chip that is at the heart of the Arduino using the Arduino software, but not its prepackaged hardware. What are you missing out on by not using the full Arduino is a certain amount of convenience. What you gain is flexibility and reduced cost.

Put simply working with a raw AVR is harder than playing with an Arduino.

 

 

The first chapter is a history of microcontrollers and it is basically an "in praise of RISC" and you can skip it if you want to. Chapters 2 and 3 detail how to get the Arduino software working with a raw AVR chip. To do this you have to first implement a programmer that lets you connect the chip to a PC via a USB connector. Every Arduino has a programmer built in, but you really only need one to program the chip not to make use of it. Chapter 3 then goes on to explain how to get the AVR plus programmer working with the Arduino software. Right at the start of hte chapter is a really interesting comparison of using an AVR or a 555 to flash and LED. With one LED the complexity is about the same but you can't help but feel uncomfortable about using such a complex device to do the job of a simple 555. The later example, however, soon demonstrates the power of the AVR approach as you get to flash increasing numbers of LEDs.

 

Banner

 

By the end of chapter 3 you have a basic AVR setup and interfaced with the Arduino software and you can start to program it. Chapter 4 considers how to use it to make things move starting off with basic servo theory. Then we have the first project - a gem light - basically using a servo to move a light so as to show something crystalline off to best effect. This may seem like a silly application, but why not - one servo, one LED and one raw AVR chip are cheap enough to make it all reasonable?

From servos the chapter moves on to using transistors to switch loads including relays, lamps, solenoids, DC motors and stepper motors. Finally we look at sensors - switches, opto isolators, PIR sensors, reflective sensors and accelerometers. This chapter is a crash course in what you need to know to connect the AVR to the outside world. 

From this point on the book starts to move into the area of software and how it can enhance the basic hardware. Chapter 5 is called "Smarten Up"" and it explains how you can make use of the intelligence of the AVR and its software. The first example is implementing an intelligent light complete with proximity senor. Chapter 6 is about communications.

This brings us to Part 2 of the book which is all about projects.
The first is a secret panel of the sort you might use to hide something valuable that opens using a motor drive. Project 2 is a pair of servo mounted lasers - not to zap things but to keep a pet amused. Project 3 is a game involving a 4x20 LCD. Project 4 is a lighting waterfall which uses LEDs to create interesting light shows. Finally Project 5 is another game - duck shoot using LEDs and shadow puppets.

The final chapter is about the smart home. This is mostly a theoretical discussion, but towards the end you get a radio controlled light stand project. The book rounds off with some appendixes on digital electronics, using breadboards and serial comms.

This is not a book for the beginner, mostly because the approach to the same ideas and technique via the Arduino is a lot easier. With the Arduino you don't have to get involved in such low-level construction because most things are available off the shelf in the form of pre-built shields. It is more expensive but it is also more productive if you are learning.  All of the projects covered in the second half of the book could be more easily implemented using Arduino hardware - but they would be more expensive.

As long as you are reasonably competent, then the raw AVR approach is interesting and illuminating. You get to find out how the parts of a project work at a component level, rather than at module level. And, of course, the components are cheap enough for you not to need to reuse them for your next project. I enjoyed reading this book and it gave me the confidence to that I would be able to convert one of my Arduino projects into a "production" AVR implementation with no real practical problems. It is a good book for the right reader and a good longer term resource.

 

Banner


SQL Server Advanced Troubleshooting and Performance Tuning (O'Reilly)

Author: Dmitri Korotkevitch
Publisher: O'Reilly
Pages: 497
ISBN: 978-1098101923
Print:1098101928
Kindle: B0B197NYD7
Audience: DBAs & database devs
Rating: 5
Reviewer: Ian Stirk

This book aims to improve the performance of your SQL Servers, how does it fare?



Modern Software Engineering (Addison-Wesley)

Author: David Farley
Pages: 256
ISBN: 978-0137314911
Print:0137314914
Kindle: B09GG6XKS4
Audience: Software Engineers
Rating: 3.5
Reviewer: Kay Ewbank

This book is subtitled 'doing what works to build better software faster' - does it teach you how to achieve that?


More Reviews

Last Updated ( Saturday, 26 January 2013 )