Skip to content

pcsquirrel/digital-dc-power-supply

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

Digital DC Power Supply

This repository contains all documentation and files related to the digital DC bench power supply kit that I have built. I purchased the kit (including a LCD display and three ATmega8 microcontrollers) from tuxgraphics.org in October 2006 for € 40.

As of 2015-12-12, there are three separate hardware versions. I have hardware version 1.0 which is documented at linuxfocus.org:

  • Part 1: The Hardware (LinuxFocus article 379)
  • Part 2: The Software (LinuxFocus article 384)
  • Part 3: Command and Control from the PC (LinuxFocus article 389)
  • Programming the AVR microcontroller with GCC, libc 1.0.4 (LinuxFocus article 352)

Build Notes and Decisions

The 1.0 kit documentation left many choices unclear or up to the reader.

Power Supply Transformer

Article 379 documents two choices when using a transformer and rectifier as opposed to a laptop power brick, a 22V 2.5A version and a 30V 2.0A version. The article states that the input voltage (DC to CONN6 on the circuit board) should be at least 2V greater than the max output voltage.

22V 2.5A

  • Article 379 specifies a 18V 2.5A transformer (reason: 18V AC * 1.4 = 25V DC rectified and smoothed)
  • 3000 µ F reservoir capacitor (reason: at least 1000 µ F per ampere)
  • R10 should be 4.7K Ω
  • The circuit diagram says: replace Z1 by a wire for the 24V version (maybe typo, should be 22V?)

30V 2.0A

  • Article 379 specifies a 24V 2.0A transformer (reason: 24 AC * 1.4 = 33.6V DC rectified and smoothed)
  • 2200 µ F reservoir capacitor (reason: at least 1000 µ F per ampere)
  • R10 should be 6.8K Ω as indicated in the circuit diagram. Note that article 379 states that R10 should be 5.7K Ω, but that appears to be an error. The microcontroller operates at 5V so the maximum output of the DAC is 5V which means that the maximum output voltage behind the power transistor will be 5.0 - 0.7 = 4.3V. For 30V output we must at least amplify the 4.3V by a factor of 7. According to article 379, Vampl = (R10 + R11) / R11. Given that R11 is 1.0K Ω, then the circuit diagram R10 value of 6.8K Ω would result in a Vampl of 7.8. Since I don't have a 6.8K Ω resistor, I used a 4.7K Ω resistor in series with a 2.2K Ω resistor for R10.
  • The circuit diagram says: Z1, C7, R35 only for 30V version

Choosing the transformer

I chose a Triad F-192X Power Transformer

  • Maximum Power: 48VA
  • Primary: 115V 50/60Hz
  • Secondary: 24.0VCT @ 2.0A

I confused myself with the multiple "input" voltages in this circuit. Given a 24V transformer:

  1. The input voltage to the transformer is 115V RMS AC.
  2. The input voltage to the rectifier diodes is 24V RMS AC.
  3. The input voltage to the reservoir capacitor is a little more complex. The peak voltage is 24 RMS AC * 1.414 = 33.6V DC, where 1.414 = sqrt(2). Possibly it should be 1.4V less, due to the drop across two silicon diodes.
  4. The input voltage at CONN6 on the circuit board is variable according to the current draw. At a current draw of 2.0A and a 2200 µ F reservoir capacitor, the average voltage will be 33.6 - 5.5 * 0.5 = 29.8V.

It appears that I chose the 30V version when I sourced the transformer, but it seems that I chose the 22V version when sourcing the 3300 µ F reservoir capacitor.

Primary Fuse

None of the kit documentation indicated the need for a fuse, but it sounded like a good idea.

  • Choosing the fuse rating is notoriously difficult.
  • The fuse should come before the switch. This guards against the possibility of the switch failing closed.
  • From Fuses and Fusing @ The Valve Wizard:
    • The primary fuse should be rated for around 1.5 to 2 times the normal primary operating current. You can work this out by adding up the (maximum average) power used by each of the secondary windings, then divide by the mains voltage.
    • 1A is typical of most amps up to 60W.
  • Normally, you size to protect the transformer.

The transformer rated current = 48VA / 115V = 0.42A. A slow-blow fuse of 1A is 2 times the maximum primary operating current and should allow for transformer inrush current.

Rectifier

Article 379 states:

A power diodes bridge with 4 diodes which are specified for a low voltage drop (e.g BYV29-500) gives a good rectifier.

I sourced a 10PH40 rectifier pack:

  • Single Phase, Full Wave Bridge
  • Rated voltage: 400 V
  • Output current: 10 A
  • Max. forward voltage drop, VF = 1.0 V @ IF = 2.5 A

Reservoir Capacitor

According to article 379, you need at least 1000 µ F of reservoir capacitor per ampere of input current. Given the 2.0A transformer, 2000 µ F should be sufficient, but I have used a 3300 µ F capacitor. This is connected directly to the output of the rectifier, minding the polarity.

The reservoir capacitor decreases the peak-to-peak ripple voltage, which raises the peak voltage.

For a full-wave rectifier the peak-to-peak ripple voltage can be calculated as:

$V_{pp} = \frac{I}{2fC}$

The frequency is 60Hz, so at the maximum current draw of 2.0A, a 3300 µ F capacitor results in a peak-to-peak ripple voltage of 5.5V. This is higher than I would expect, but apparently it works.

HF Interference

The Hardware version 2.0 doc suggests soldering a ceramic capacitor in the range of 10 nF to 100 nF directly behind the front output connectors to block HF signals from interfering with the LCD display electronics.

Connections

There are 6 sets of external connections on the main PCB labeled CONN1 through CONN6.

CONN1 - PROG_LOAD

SPI programming interface to the ATMega8

Pin Name ATMega8 Pin

1

RST PC6 (1)

2

MOSI PB3 (17)

3

MISO PB4 (18)

4

SCK PB5 (19)

5

GND N/A

CONN2 - Remote Control

I2C (serial) communication to PC

Pin Name DE-9 Pin

1

RTS 7

2

CD 1

3

DTR 4

4

GND 5

CONN3 - LCD

LCD Display (10 pins)

CONN4 - DC Power Out

Pin Name

1

Negative

2

Positive

CONN5 - Front Panel

Pin Use

1

S1 Voltage +

2

S2 Voltage -

3

S3 Current +, S5 Store

4

S4 Current -

5

S[1-4] Common

6

S5 Store

CONN6 - DC Power In

Pin Name

1

Positive

2

Ground

3

Negative

Enclosure

When selecting an enclosure, you must actually layout the components before sizing the enclosure. Finding a good, cheap enclosure is a real PITA. There is no way to specify your size ranges and get a list of matching items. It doesn't help that there are no standard naming conventions; enclosure, junction box, instrument case, desktop, etc. all mean different things to each of the Asian suppliers.

I eventually found ST764 (7x3x5") DIY Hobby Electronic Metal Project Enclosure Box Case by Sunetec. When it arrived, the interior dimensions were actually slightly larger at 7.25" x 5.625" x 3.375".

At 195mm x 165mm x 90mm, this Blue Metal Enclosure Case DIY Power Junction Box (uxcell) for $14 from Amazon should have worked, but it was unavailable.

This enclosure also looked interesting, but with shipping it is fairly expensive.

Front Panel Labels

For voltage, 'U' seems to be the European preference and 'V' the preference in the U.S.. Therefore I chose 'V' for the front panel labels.

Additional Parts

  • IEC 60320 C14 female connector (power socket) ripped from old computer PSU
  • fuse holder and 1A slow-blow fuse
  • power switch ripped from old computer PSU
  • large heat sink
  • double binding posts (for banana jacks)
  • 1 female D-Sub DE-9 serial connector

    When the PC serial ports began to use 9-pin connectors, they were often mislabeled as DB-9 instead of DE-9 connectors.

Programming the ATMega8

The ATMega8 is programmed using a SPI (Serial Peripheral Interface).

I purchased the Sparkfun Pocket AVR Programmer which is an USB to SPI host adapter. See the Pocket AVR Programmer Hookup Guide.

One problem is that the power supply circuit board uses a non-standard 5 pin in-line interface instead of the standard 2x3 header.

I constructed a cable adapter:

Line 2x3 pin 1x5 pin
MISO

1

3

5V

2

N/C

SCK

3

4

MOSI

4

2

RST

5

1

GND

6

5

The 5V (PWR) line is not connected because the ATMega8 gets its 5V power from the circuit board.

R3 is a 10K Ω pull-up resistor between the RST pin and the positive power supply which prevents the ATMega8 from accidentally entering programming mode.

Software

Version 0.4.9 of the software was downloaded from the LinuxFocus article 389 download page.

Related Stuff

Local Copies of Critical Docs

The LinuxFocus site which hosts the original articles has not been updated since 2005-12-09, so I have local copies here:

These documents were delivered with the kit:

About

A digital DC powersupply from linuxfocus.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 54.5%
  • KiCad Layout 39.2%
  • Shell 3.0%
  • Makefile 2.7%
  • C++ 0.6%