1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
This is the README file to the DF10CH Atmolight Controller Project.
Written by: Andreas Auras (yak54@gmx.net)
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-Prozessor
pwm_boot/ Bootloader firmware for PWM-Prozessor
usb_appl/ Application firmware for USB-Prozessor
usb_boot/ Bootloader firmware for USB-Prozessor
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
MANIFEST.in File used by Python installation script
windows/ MS Windows related files
----------------------
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:
----------------------
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 flash into the processors. For this you need a dedicated AVR programmer.
The application firmware could later be flash 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
------------------------------------------------
The DF10CH setup programm and test application uses the USB library "libusb" for communication to the controllers.
Currently there exits two different version of this libary called "libusb 0.1" and libusb 1.0".
For Linux you must install the newer implementation "libusb 1.0".
On debian based systems this is packages: libusb-1.0-0.
For MS Windows you need to install the "libusb-win32 device driver" which is a port of "libusb 0.1":
* Log in as a user with administrator privileges.
* Download the latest device driver binary package (libusb-win32-device-bin-x.x.x.x.zip or tar.gz) from http://sourceforge.net/projects/libusb-win32/files/
* Extract it to a temporary directory.
* Copy the DF10CH.inf and DF10CH.cat files from the windows/ subdirectory to the temporary directory
* Unplug the device(s) from the system.
* Open the Windows Device Manager and remove all incorrectly installed USB devices (device entries with a yellow exclamation mark).
* Reconnect the device(s) to the system.
* When Windows asks for a driver, choose the inf-file(s) copyed above. On Win2k, WinXP, Windows will warn that the driver is is not 'digitally signed'.
Ignore this message and continue with the installation. It is similar for Windows Vista and Windows 7 32bit systems.
For 64bit Vista and Windows 7 systems, a valid digital signature is required. Please read more about the Microsoft Kernel Mode Code Signing (KMCS) policy for more information.
* Open the Windows Device Manager to verify that the device is installed correctly. Run the test program (testlibusb-win.exe) from the 'bin directory'.
It should print out the descriptors of your device(s).
* A reboot isn't necessary.
------------------------------------
Installation of DF10Ch setup program
------------------------------------
For running the DF10CH setup program you need a installed python environment version 2.6,
the python modules TKinter, Image, ImageTk, ImageDraw and PyUSB and a installed libusb library.
On debian based systems these are packages: python2.6, python-tk, python-imaging, python-imaging-tk,
python-usb, 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
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
-----------------------------------------------------
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.
Currently this application is not tested against MS-Windows because there is no existing
port of libusb 1.0 for this platform!!
cd test_appl
make
Running the application:
./df10ch-test <number-of-test-loops>
e.g. ./df10ch-test 50
|