AVR & Robotics – Tutorial #17

In this age of microelectronics and robotics, we are fortunate enough with the availablilty of a vast range of compact, easy to use and flexible robotics project kits.

Usually in almost all hobby robotics projects, the brain is a simple yet powerful microcontroller chip, which simplifies the construction, modification and future expansion tasks. Needless to say, the simplicity and robustness of AVR Atmega8 microcontroller has made it famous among hobbyists and students when it comes to robotics projects.

Nowadays, programmable robotic kits based on AVR series microcontroller Units (MCUs) has become ubiquitous!

Here you can see a Line Follower Robot (LFR) fabricated using the multipurpose robot kit, based on AVR ATMEGA8 development board, from Robosapiens.

The AVR Board (Motherboard) can work on 6V to 15V DC supply, because of the onboard voltage regulator. The control circuit is a Dual H – Bridge motor driver which is used for the locomotion of the robot. The kit is provided with two infrared (IR) proximity detectors works as line/track sensors. The AVR board (motherboard) lodges the following:

  • Atmega8 microcontroller
  • Onboard Voltage Regulator
  • Onboard 2x Motor Driver
  • Onboard indicator LEDs, control switches, connectors, etc

One special feature of this AVR board is that the Atmega8 used here is pre-loaded with Boot Loader,and hence there is no need of an external AVR programmer. Hex files can be directly loaded from your PC to the MCU through the built-in USB inteface with the help of a special (HID Boot Flash) application!

AVR USB inteface

(A bootloader is a program that runs in the microcontroller to be programmed. It receives new program information externally via some communication interface and writes that information to the program memory of the processor. With this enhancement, you can run a program on a PC to update the firmware. When you runs the PC program which talks to the bootloader already in the MCU, this sends the new binary to the bootloader, which writes it to program memory and then causes the new code to be run).

avr bootloader

Today, it is necessary to add USB to a robotic system because if you want to connect it to a PC, the mainstream conduit is USB. And you will become happy if you can connect your robot with your PC for firmware updation without any external hardware, except a standard USB cable. Now just note that bootloaders are software that can replace your hardware programmer. Instead of hooking up a programmer, you can program using a USB connection. You will ofcourse need a programmer to upload the bootloader, but you won’t ever need the programmer again. There is a lot to cover in this regard, and next part can answer many of the questions you may have. Don’t get left out… stay in the know!

→ Part 18: AVR Bootloader +
← Part 16: AVR EEPROM Handling

No Comments

Join the conversation!

Error! Please fill all fields.
Looking for the latest from TI?