=== === === Atmel Mega8 based ODIN driver === === Copyright (c) 2009 Michael Buesch === === === This is an Atmel Mega8 based replacement for the GAL22V10 driver chips on the ODIN motion control board. More information on the ODIN board can be found here: http://www.deutsche-werke.de/hardwar.htm http://www.deutsche-werke.de/ The board can also be purchased on that website. The hardware documentation and the firmware of this replacement module (referred to as "m8driver") is licensed under the GNU General Public License version 2 or (at your option) any later version. The m8driver advantages over the standard GAL22V10 controllers ============================================================== The m8driver has some advantages over the standard GAL22V10 chips: Electrical characteristics: Better electrical characteristics and much better noise immunity. Due to weak internal pullups and a Vin-low of max0.8V it is possible that noise from the stepper motors is picked up by the input signals of the GAL22V10. This will result in "ghost" steps that make a rattling sound. The m8driver's ATMega8 is rated to a Vin-low of max1.0V (but in practice it's much higher) and strong pullups are applied to the inputs. So the m8driver is _much_ less sensitive to noise. Customization: The source code of the GAL22V10 firmware is not released by the original author of the device, so it is not easily possible to reprogram the device to other microstep sizes by the user. The closed source design of the original drivers does not allow the user to tweak the hardware to his needs. The ODIN author offers a reprogramming-service, but that is very inconvenient and does cost some money (shipping cost, at least) and time. The m8driver is released under the GPL, so you are free to modify it and tweak it to your specific setup. It's also easily possible to compile the firmware for other microstep sizes. The default is 25 microsteps, but you can override this by specifying STEPS=XX to the "make" command, where XX is the desired microstep count. Lots of possible microstep rates: The m8driver can be configured from 1 microstep (fullstep) to 60 microsteps. Additionally you can get the 30 microsteps _without_ modifying the hardware. (The original GAL22V10 drivers need electrical hardware modification for the 30 step variant.) Note that as the output DACs are only 4 bit, higher step rates than about 30 do not gain much (if any) precision. It is possible to get even higher than 60 microstep rates, if demanded by your setup, but this requires modification of the sourcecode. Please contact me, if you need this. There are no electrical changes required to the ODIN board. The m8driver fits into the existing two GAL22V10 chip sockets. Only a small change to the heat sink is required to gain some extra space for the m8driver boards. But you can always remove the m8drivers again and re-install the GAL22V10. It's Plug-And-Play. Building the firmware from sources ================================== Building of the firmware requires the following tools to be installed: * make - The GNU version of the "make" utility. On Debian Linux run this command to install it: apt-get install make * gcc - The GNU C compiler On Debian Linux run this command to install it: apt-get install build-essential * avra - Assembler for Atmel AVR microcontrollers On Debian Linux run this command to install it: apt-get install avra * avrdude - Software for programming Atmel AVR microcontrollers On Debian Linux run this command to install it: apt-get install avrdude Go to the odin_extensions/m8driver/firmware subdirectory. For a standard build with 25 microsteps just run the make command: make clean make If you want other microstep counts, just pass STEPS=XX to the make command, where XX is the desired microstep count: make clean make STEPS=18 To flash the firmware to the m8driver, use these commands: make writefuse make install This will write the fuses and upload the firmware to the device flash memory. The Makefile assumes that an AVRISP-mkII USB programmer is used. If you use a different programmer, you can pass the PROGRAMMER and/or PROGPORT parameters to the make command: make writefuse PROGRAMMER=stk500pp PROGPORT="/dev/parport0" make install PROGRAMMER=stk500pp PROGPORT="/dev/parport0" See the avrdude manpage on the -c parameter for the possible PROGRAMMER options. See the avrdude manpage on the -P parameter for the possible PROGPORT options.