Retrointerfacing

- connecting past and future -

Archive for August, 2008

Arduino bootloader for ATmega32

with 13 comments

The Arduino boards mainly use Atmega8 or ATmega168 controllers. For most of the projects and boards I have been working with in the last years, I have been using mega32 (more memory, more IO). In order to make use of the excellent Arduino resources, making my boards Arduino Compatible seems a logical choice. First thing to do was to rewrite the bootloader. In the following ZIP file you’ll find the modified source (untidied, but working) for an Atmega32 runnning at 16MHz. Also the modified ‘boards.txt’ file that resides in your Arduino hardware directory is in the ZIP. bootloader sources.

The bootloader can be compiled using the makefile in the zip archive, simply typing make in a console (from the correct directory, with correct path settings. I have WINavr as main avr compiler on my system)

In order to make code examples work, a re-mapping of input- and output pins is necessary. IN the discussion on the Arduino forum files where posted with a suggested re-mapping. (unfortunately they didn’t rewrite the bootloader for ATmega32, so I had to do that) I have tested uploading a serial-port example and a simple blinky, using the pin-mapping from AndreS from robotcraft.ca. Their arduino mega32 mapping sources have been posted in above forum. Overwriting the files with same names in hardware/cores/arduino directory does the trick.
I also recompiled bootloaders for other boards with ATmega8 running at 8MHz, see a page on http://www.edwindertien.nl/interactivos/index.html

Unfortunately the bootloader is rather large (2k). For an educational platform (MasterClass robot) we have been using a smaller bootloader (512K) which is AVR911 appnote compatible. (also using AVRdude to do the programming). More on this (mega32) platform can be found on http://www.ce.utwente.nl/e13 in the folder ‘education’.

A newer discussion on avrBootloaders, including the AVRdude commands used are on the wiki.

Written by admin

August 25th, 2008 at 5:24 pm

Posted in Arduino,DIY,Robotics

Tagged with ,

Hacking the Tschibo Vacuum

with 2 comments

Tchibo Vacuum robot In the netherlands a lot of webshops have the Tchibo Vacuum robot on on sale at ridiculous discount prices. <30EUR for a robot with two motorized wheels, encoders, bumpers, battery, obstacle sensors, and (best of all) very straightforward electronics!

On this forum the message was posted that the Tchibo robot is a Roomba – Original clone, so perhaps this article is of use of Roomba Original owners too. Other great resource is ofcourse the roomba hacking forum

The electronics of the Tchibo consist of an ATmega8 microcontroller running at 8 MHz, with two 74HC245 bus drivers for inputs and an 74HC373 for outputs. Everything runs on 5V. Motors (two for driving, and 3(!) for cleaning) are controlled by respectively an L298 dual bridge driver and a power MOSFET.

At first I was hoping to hack into the original Atmel microcontroller, and use its serial port pins to make a ‘tap’ into the robot. Unfortunately PC0 and PC1 of the controller have been used to control the latch-inputs of the bus drivers. The approach I settled for was to take a different microcontroller (ATmega32) with more IO-pins and use that to take the place of the original ATmega8.

mega32board atmega8adapter

I really like the Arduino standard, so I took this opportunity to make one of my mega32 boards Arduino compatible, in order to have an Arduino Vacuum Robot. This mostly consisted of rewriting the exisiting STK500-compatible bootloader sources in order to work on the mega32. In the next post I will discuss the software and sources.

Written by admin

August 25th, 2008 at 5:06 pm

Posted in Arduino,DIY,Robotics

Tagged with

Panoramic pictures with Flatbed Scanner

without comments

first portrait   In make issue 14 was an article about using a flatbed scanner for making pictures. We took this idea one step further making panoramic pictures using a rotating stand…. all in one evening’s work :)
parts
All that’s needed is one magnifying glass (The one from your third hand does fine) scanner, box, tape and music stand.
how to
Just rotate the camera while making the picture scan. Unstretch the image afterwards…
harmen shooting portret Scanner setup

Written by admin

August 5th, 2008 at 7:09 pm

Posted in DIY,imaging

Tagged with

Amplifying a reed organ

with one comment

electrifying instruments
Organ with lid open A way of ‘electrifying’ acoustic instruments is addition of a microphone or pickup. While piezo pickups are often used and are very simple to interface (glue the piezo speaker of an anoying melody-playing birthday card to the body of your guitar and you’re there) the sound quality can be quite poor. Especially for instruments which involve air, more than body resonance, a piezo pickup is not the way to go. Electret condenser microphones are however cheap and still quite simple to interface. I’ll show in this post how we used electret mikes to electrify an old Mannborg reed organ.
electret mikes
unidirectional microphone They are present in almost every device for personal audio, from phone headsets to computer mikes. The thing is that most mikes you’ll find will be omni-directional, so they pickup a lot of noise and unwanted sounds. For good results you’ll have to use directional electret capsules. The difference (in mechanical make-up) is that directional mikes have six tiny holes in the backplate. Don’t ask me why. It probably has something to do with canceling out sound waves that come from all sides… long distance directional miking is still a dark art to me….
electronics
Electret mikes need 1.5V to run their internal pre-amp circuitry. This 1.5V DC voltage needs to be decoupled from the audio signal by means of 4.7 uF capacitors. More mikes can be connected parallel, to capture the sound over a wider range (we used 4 for our organ). With potentiometers it is possible to balance between high and low side-mikes, one end-potentiometer is added to adjust output volume. The battery power is switched on/off by means of the output jack’s switch contacts. That’s all. See the schematic for more details. The schematic is drawn with TinyCad. I have ordered the parts at Farnell, see the partlist. The parts have been mounted on stripboard.
schematic drawing parts assembly
mechanics
installing the microphones In the reed organ the best room available was in the lid of the organ. We mounted the microphones on pieces of metal (fat paper clips) using heat-shrink tube. The microphones are not ‘mechanically’ coupled to the paper clips, they dangle free on a small end of the connecting wire (3mm). This is done to minimize contact noise.
result
This youtube clip shows the result.
If you’re not into DIY and want to buy commercial products.. check out http://www.microvox.demon.co.uk/products.htm (not that I’m in anyway connected to them, but I think they sell nice products in the sub-shure/akg/sennheiser/SD-systems range)
The sound quality of the youtube clip is hard to judge. Here two soundclips: one is the clean organ part, the other is how it sits in the mixof a song bythe Gonnagles

Written by admin

August 5th, 2008 at 3:42 pm

Posted in DIY,music

Tagged with