This is the README file to the DF10CH Atmolight Controller Project. Written by: Andreas Auras (yak54@inkennet.de) See the file COPYING for license information. This project is hosted at: http://projects.vdr-developer.org/projects/show/atmolight-controller More documentation (currently only in german language) about this project can be found at: http://www.vdr-wiki.de/wiki/index.php/VDR_Wiki:DF10CH_Atmolight_Kontroller This project uses Objective Development's firmware-only USB driver V-USB for Atmel AVR microcontrollers. For more information please visit http://www.obdev.at/vusb/ See the files usbdrv/License.txt, usbdrv/CommercialLicense.txt, usbdrv/USBID-License.txt and usbdrv/Readme.txt for license information about using V-USB. This directory contains the firmware, DF10CH setup program and KiCad files of hardware design: README The file you are currently reading HISTORY History of changes Makfile Makefile for generating everything df10ch_setup_pkg/ Python modules needed by the DF10CH setup program pwm_appl/ Application firmware for PWM-Processor pwm_boot/ Bootloader firmware for PWM-Processor usb_appl/ Application firmware for USB-Processor usb_boot/ Bootloader firmware for USB-Processor usbdrv/ Objective Development's firmware-only USB driver V-USB for Atmel AVR microcontrollers test_appl/ Controller test application kicad/ KiCad files of hardware design: circuit and board layout df10ch_common.h Common include file used by firmware df10ch_usb_proto.h Include file with definitions of implemented USB communication protocol df10ch_setup.py Main python script of DF10CH setup program setup.py Python script used for installation of Df10CH setup program winsetup.py Python script used for building the Df10CH binary distribution for Windows MANIFEST.in File used by Python installation script windows/ MS Windows related files linux/ Linux related files project/ Visual C++ 2010 project files for building the df10ch_test program for windows dist/df10ch_firmware.tar.gz Archive with recent build of firmware files dist/df10ch_setup-??.tar.gz Recent build of setup program for linux platform dist/df10ch_win_dist.tar.gz Binary distribution for Windows ---------------------- Building the hardware: ---------------------- You will find design files of circuit and board layout for use in KiCad within the kicad/ subdirectory. The files are generated with KiCad version 20090216-final. File "10ch_pwm_ctrl-solder-side.ps" is a postscript plot of the board layout File "10ch_pwm_ctrl-silks_cmp.ps" is a postscript plot of the component placement File "10ch_pwm_ctrl.lst" is a list of the needed hardware components for the board You can produce other plot formats (e.g. Gerber, HPGL) and drill files by using KiCads plot features. You can download KiCad from here: http://kicad.sourceforge.net ---------------------- Building the firmware: ---------------------- Note: "dist/df10ch_firmware.tar.gz" contains already a recent version of the compiled firmware ready for programming. For building the firmware for the two Atmel AVR microcontrollers you need AVR-GCC installed. On debian based systems these are packages avr-gcc, binutils-avr, avr-libc, avrdude Each firmware sub directory contains a Makefile for compiling and flashing of firmware: Compiling firmware: make Flashing firmware with avrdude: make prog --> programming of flash, fuse and lockbits make flash --> only programming of flash Options to avrdude can be specified with: make prog AVRDUDE="avrdude -c stk500v2 -P avrdoper" Normally only the bootloaders are flashed into the processors. For this you need a dedicated AVR programmer. The application firmware could later be flashed via the DF10CH setup program. This has the advantage that updates of the application firmware could be easily done over the USB interface without the need for a dedicated AVR programmer. If you like you could directly flash the application firmware without the bootloaders. But you will lose the firmware update feature of the DF10CH setup program. ------------------------------------------------ Installation of USB driver for DF10CH controller ------------------------------------------------ Note: "dist/df10ch_win_dist.tar.gz" contains the "zadig" executable and libusb-1.0 for windows. The DF10CH setup program and test application uses the USB library "libusb 1.0" for communication to the controllers. On debian based systems this is packages: libusb-1.0-0. For MS Windows you need to install the "WinUSB" device driver which can be installed with a nice dedicated setup program called 'zadig' that could be downloaded from here: http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Main_Page Attach your controller to your windows box and follow the usage instructions for 'zadig' that could be found here: http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Zadig The program should show the DF10CH controller in the device selection box. Select the device and install the 'WinUSB' driver for it. In case there is already a (older) driver installed for the controller the device will not be shown. Select "Options/List all Devices", select the DF10CH device and reinstall the 'WinUSB' driver. ------------------------------------ Installation of DF10CH setup program ------------------------------------ Note: "dist/df10ch_setup-??.tar.gz" contains a recent compiled version of the setup program for Linux. "dist/df10ch_win_dist.tar.gz" contains are ready to execute version of the setup program for Windows. For running the DF10CH setup program under Linux you need a installed python environment version 2.6, the python modules TKinter, Image, ImageTk, ImageDraw and a installed 'libusb 1.0' library. On debian based systems these are packages: python2.6, python-tk, python-imaging, python-imaging-tk, libusb-1.0-0 You can start the program directly from the distribution directory with: python df10ch_setup.py You can also install the program to the default python installation location with: python setup.py install Now df10ch_setup.py should be simply in your standard PATH for execution. Start it with: df10ch_setup.py If the setup program does not find any controller(s) under Linux the problem may be missing access rights to the usb device. Either execute the program with 'root' privileges and/or install the udev rule file 'linux/45-df10ch.rules' after customizing it for your needs to /etc/udev/rules.d to change the privileges settings for the USB device. Windows users should use the ready compiled df10ch_setup program from the windows binary distribution. From within the binary distribution directory start the setup program with: .\df10ch_setup.bat The setup program understands the following command line option: -d N Set debug level to N -s N Set number of simulated controllers. With this option you can play with the program without having hardware. ----------------------------------------------------- Compiling and running the controller test application ----------------------------------------------------- Note: "dist/df10ch_win_dist.tar.gz" contains already the compiled controller test application for Windows. In sub directory test_appl there is a controller test application that could be executed at your host computer. It sends brightness values from min to max and max to min in one test loop to each connected controller in parallel with the maximum possible speed. To get maximum load at controller you should have a setup so that each controller's channel drives a different area. This is the initial setup of a controller if you do not have already changed the channel mapping with the setup program. For compiling the application you need a installed libusb 1.0 library. On debian based systems this is packages: libusb-1.0-0. cd test_appl make Running the application: ./df10ch-test e.g. ./df10ch-test 50 Again windows users should use the ready compiled df10ch_test program from the windows binary distribution. From within the binary distribution directory start the test program with: .\df10ch_test.exe