Tuxgraphics Digital DC Power Supply Unit


Compile the software and program the microcontroller:

1) edit and adapt the file hardware_settings.h 
   (calibration and selection of the right hardware type).

2) load and compile:
make 
make load

3) set the fuse bytes to 8MHz internal:
make fuse

This should result in the following settings:

avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as E4
avrdude: safemode: hfuse reads as D9


The make fuse needs to be done only once
unless you change the Atmega8 chip. make/make load
need to be repeated everytime you change something
in the software (e.g update of hardware_settings.h). 

The poweresupply must be powered up during programming
but nothing should be connected to the output. Make
sure that you do not accidently press any button
during the programming (loading the software into the uC).

Compile under windows
=====================
Please use the provided Makefile.

There are as well 3 batch files which you can use
to run the makefile. To use them edit them and change
the path as per your avr-gcc installation on your PC.
After that run them by double-clickin in the file manager
on those batch files.

 winmake.bat  -- comile, this is mandatory to use

 winload.bat  -- load software using avrdude, may also use
                 some other means of loading the softare. In that
                 case you do not need to use this batch file.

 winsetfuse.bat -- set fuse bytes using avrdude, may also use
                   some other means of loading the softare. In that
                   case you do not need to use this batch file.

Calibration
===========
To calibrate the display edit the file hardware_settings.h
Here you can change also the settings between the 30V and the 22V version.

In general you should only need to change 
U_DIVIDER and I_RESISTOR by very small amounts. 


Overview
========
This is the software for the tuxgraphics.org electronic digital DC power supply. 
A microncontroller controlled bench DC power supply unit. 

All of the control logic is implemented in software. This
saves a lot of parts compared to conventional lab-power 
supplies. This means it is cheaper, easier to build and
offers more functionallity.

Note however that this means also that the short circuit
protection is implemented in software. So be careful when
you change something in the software. If the microcontroller 
is not running properly due to a software fault then there
might not be any short circuit protection.


The software is prepared for 2 versions:
- 0-22V 0-2.5A
- 0-30V 0-2A

If you want to build a version that has a smaller output
range than any of the two version then you can just
modify the file hardware_settings.h.

The unit can be controlled remotely from a computer using
a USB serial interface. An add-on card is available from
http://shop.tuxgraphics.org which offers galvanic separation
such that you can use this power supply relative to
any reference point (e.g build two power supply and use
one as negative and one as positive power supply).

Terminal settings for remote control via your computer
======================================================
You can e.g use putty under windows
http://www.chiark.greenend.org.uk/~sgtatham/putty/ 
it supports as well serial connections
For Linux I can recommend picocom
http://code.google.com/p/picocom/
(use command picocom -l -b 9600 /dev/ttyUSB0)

port       : Virtual com port (e.g /dev/ttyUSB1 or /dev/ttyUSB0
             or COM5 under windows or ... to whatever port the
	     virtual com port maps)
flowcontrol: none
baudrate   : 9600
parity     : none
databits   : 8



-------------------------------------------------------------------
Copyright: GPL V2
Author: Guido Socher
Homepage: http://www.tuxgraphics.org/electronics/
-------------------------------------------------------------------
Change history:
digitaldcpower-0.6.0 -- 2010-05-22 first version of the new power V3.
                        This version is made for a new type of hardware
                        and will not run on any previous hardware version.

digitaldcpower-0.6.1 -- 2010-06-06 Number conversion to display string
                        improved.
                     -- Basic uart interface prompt, no remote control yet

digitaldcpower-0.6.2 -- 2010-06-26 Full UART command interface
                        
-------------------------------------------------------------------