1 <h2>Tuxgraphics Digital DC Power Supply Unit</h2>
4 Compile the software and program the microcontroller:
6 1) edit and adapt the file hardware_settings.h
7 (calibration and selection of the right hardware type).
13 3) set the fuse bytes to 8MHz internal with BOD:
16 This should result in the following settings:
18 avrdude: Device signature = 0x1e9307
19 avrdude: safemode: lfuse reads as A4
20 avrdude: safemode: hfuse reads as D9
24 BODLEVEL Brown out detector trigger level = 1
25 BODEN Brown out detector, 0=enable = 0
26 SUT1 Select start-up time = 1
27 SUT0 Select start-up time = 0
28 CKSEL3 Select Clock source = 0
29 CKSEL2 Select Clock source = 1
30 CKSEL1 Select Clock source = 0
31 CKSEL0 Select Clock source = 0
33 The make fuse needs to be done only once
34 unless you change the Atmega8 chip. make/make load
35 need to be repeated everytime you change something
36 in the software (e.g update of hardware_settings.h).
38 The poweresupply must be powered up during programming
39 but nothing should be connected to the output. Make
40 sure that you do not accidently press any button
41 during the programming (loading the software into the uC).
45 Please use the provided Makefile.
47 There are as well 3 batch files which you can use
48 to run the makefile. To use them edit them and change
49 the path as per your avr-gcc installation on your PC.
50 After that run them by double-clickin in the file manager
53 winmake.bat -- comile, this is mandatory to use
55 winload.bat -- load software using avrdude, may also use
56 some other means of loading the softare. In that
57 case you do not need to use this batch file.
59 winsetfuse.bat -- set fuse bytes using avrdude, may also use
60 some other means of loading the softare. In that
61 case you do not need to use this batch file.
65 To calibrate the display edit the file hardware_settings.h
66 Here you can change also the settings between the 30V and the 22V version.
68 In general you should only need to change
69 U_DIVIDER and I_RESISTOR by very small amounts.
74 This is the software for the tuxgraphics.org electronic digital DC power supply.
75 A microncontroller controlled bench DC power supply unit.
77 All of the control logic is implemented in software. This
78 saves a lot of parts compared to conventional lab-power
79 supplies. This means it is cheaper, easier to build and
80 offers more functionallity.
82 Note however that this means also that the short circuit
83 protection is implemented in software. So be careful when
84 you change something in the software. If the microcontroller
85 is not running properly due to a software fault then there
86 might not be any short circuit protection.
89 The software is prepared for 2 versions:
93 If you want to build a version that has a smaller output
94 range than any of the two version then you can just
95 modify the file hardware_settings.h.
97 The unit can be controlled remotely from a computer using
98 a USB serial interface. An add-on card is available from
99 http://shop.tuxgraphics.org which offers galvanic separation
100 such that you can use this power supply relative to
101 any reference point (e.g build two power supply and use
102 one as negative and one as positive power supply).
104 Terminal settings for remote control via your computer
105 ======================================================
106 You can e.g use putty under windows
107 http://www.chiark.greenend.org.uk/~sgtatham/putty/
108 it supports as well serial connections. The other common
109 option under windows is HyperTerminal but it is more complicated
111 For Linux I can recommend picocom
112 http://code.google.com/p/picocom/
113 (use command picocom -l -b 9600 /dev/ttyUSB0)
114 Another good serial terminal for linux is gtkterm
115 http://www.jls-info.com/julien/linux/
117 Serial port settings for the terminal:
119 port : Virtual com port (e.g /dev/ttyUSB1 or /dev/ttyUSB0
120 or COM5 under windows or ... whatever port the
121 virtual com-port maps to)
122 Under linux or Mac you can use the command dmesg
123 after you have plugged in the USB cable to see to
124 which com-port/device the new virtual com port maps to.
134 <img src=screenshot-cmd-interface.gif>
137 At shop.tuxgraphics.org you can get an optically insulated
138 USB to serial interface add-on kit such that your computer
139 is galvanically separated from the power supply but still able
140 to give commands. This enables you as well to use two power supplies
141 to provide positive and negative supply voltages for e.g. an operational amplifier.
146 You can control the digital power supply by commands. A number
147 of commands are provided for this purpose. They are at the moment
148 available for Linux and Mac:
151 ddcp-script-ttyinit - initialize the COM port
152 ddcp-script-getval - get current values (same as you see on the LCD)
153 ddcp-script-setval - send a command to the power supply
155 ddcp-script-example.sh - an example shell script showing how to use
158 -------------------------------------------------------------------
161 Homepage: http://www.tuxgraphics.org/electronics/
162 -------------------------------------------------------------------
164 digitaldcpower-0.6.0 -- 2010-05-22 first version of the new power V3.
165 This version is made for a new type of hardware
166 and will not run on any previous hardware version.
168 digitaldcpower-0.6.1 -- 2010-06-06 Number conversion to display string
170 -- Basic uart interface prompt, no remote control yet
172 digitaldcpower-0.6.2 -- 2010-06-26 Full UART command interface
173 digitaldcpower-0.6.3 -- 2010-07-03 Accelerate UART command polling to
174 not loose characters when copied/pasted at high speed.
175 Line editing with backspace if terminal supports it.
176 Set BOD (brown out detector enable) fuse.
177 Script interface (ddcp-script)
179 -------------------------------------------------------------------