multi-function bench power supply files/multi-function... · replace a faulty power supply without...

70
Daniel K. Jones Bangor University, UK [email protected] Version 1.0 March 15 th 2012 (2011-2012) 2 nd Year Project: Multi-Function Bench Power Supply Four bench devices combined into one sleek looking, user friendly, and low cost unit. Multi-Rail Regulated Power Supply Universal Function Generator Dedicated High Precision DC Voltmeter Resistance / Capacitance Substitution with unique Parallel Change-over Although originally aimed at students due to its low cost design, this Multi-Function Bench Power Supply offers some competitive features that would normally only be seen on expensive bench equipment used by professionals. With an XR2206 based Universal Function Generator capable of up to 1MHz (when reserve range setting is used) sine, triangle, square, and an accompanying TTL output waveforms. Built-in digital DC voltmeter for external measurements, that also acts as a logic probe. Built-in resistance / capacitance substitution provides user selectable resistance from 1- 999,999Ω at up to 0.1% accuracy, with a unique parallel change-over circuit that allows the user to create RC circuits easily, and helps students learn the series / parallel relationship.

Upload: dinhdang

Post on 08-Mar-2018

226 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

Daniel K. Jones Bangor University, UK [email protected] Version 1.0 March 15

th 2012

(2011-2012) 2nd Year Project:

Multi-Function Bench Power Supply

Four bench devices combined into one sleek looking, user friendly, and low cost unit.

Multi-Rail Regulated Power Supply

Universal Function Generator

Dedicated High Precision DC Voltmeter

Resistance / Capacitance Substitution with unique Parallel Change-over

Although originally aimed at students due to its low cost design, this Multi-Function Bench Power Supply offers some competitive features that would normally only be seen on expensive bench equipment used by professionals. With an XR2206 based Universal Function Generator capable of up to 1MHz (when reserve range setting is used) sine, triangle, square, and an accompanying TTL output waveforms. Built-in digital DC voltmeter for external measurements, that also acts as a logic probe. Built-in resistance / capacitance substitution provides user selectable resistance from 1Ω - 999,999Ω at up to 0.1% accuracy, with a unique parallel change-over circuit that allows the user to create RC circuits easily, and helps students learn the series / parallel relationship.

Page 2: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

Abstract

This report details the research, design and implementation for the Multi-Function Bench

Power Supply project, from the initial idea, to the finalised design specifications of each

individual part of the project. The report details every stage of the design & build of the

prototype model, with additional ideas for future work, and limitations of the current design.

The key objective of this project is to complete a working prototype of the finalised design,

and propose a retail price for a marketable product based on overall costing of the prototype.

The secondary objectives of this project are to produce a fully assembled enclosure for the

prototype; to ensure an accurate pricing of the completed design, and to produce technical

drawings that can be used to re-create the prototype; necessary if the product is to be re-

produced on a large scale.

Page 3: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

Contents

1. The Power Supply -------------------------------------------------------------------------------------------------------- 1

1.1 Introduction ---------------------------------------------------------------------------------------------------------- 1

1.2.1 Market Research – Why use an ATX power supply? ----------------------------------------------------- 1

1.2.2 Research Method – In Depth ---------------------------------------------------------------------------------- 2

1.3 Implementation ----------------------------------------------------------------------------------------------------- 3

1.4 Limitations ------------------------------------------------------------------------------------------------------------ 4

1.5 Redundancy ---------------------------------------------------------------------------------------------------------- 4

2. The Universal Function Generator ----------------------------------------------------------------------------------- 5

2.1 Introduction ---------------------------------------------------------------------------------------------------------- 5

2.2 The XR2206 ----------------------------------------------------------------------------------------------------------- 5

2.3 Final Output Amplifier --------------------------------------------------------------------------------------------- 7

2.4 Clipping Detection -------------------------------------------------------------------------------------------------- 7

2.5 The Frequency Counter -------------------------------------------------------------------------------------------- 7

2.6 The Prototype -------------------------------------------------------------------------------------------------------- 8

3. Dedicated DC Voltmeter ------------------------------------------------------------------------------------------------ 9

3.1 Introduction ---------------------------------------------------------------------------------------------------------- 9

3.2 Research Method --------------------------------------------------------------------------------------------------- 9

3.3 Implementation ---------------------------------------------------------------------------------------------------- 10

3.4 Limitations ----------------------------------------------------------------------------------------------------------- 11

3.5 Future Work --------------------------------------------------------------------------------------------------------- 11

4. Resistance / Capacitance Substitution ----------------------------------------------------------------------------- 13

4.1 Introduction --------------------------------------------------------------------------------------------------------- 13

4.2 Research Method -------------------------------------------------------------------------------------------------- 13

4.3 Implementation ---------------------------------------------------------------------------------------------------- 14

4.4 Limitations ----------------------------------------------------------------------------------------------------------- 16

4.5 Future Work --------------------------------------------------------------------------------------------------------- 17

5. The Prototype ------------------------------------------------------------------------------------------------------------ 18

5.1 Introduction --------------------------------------------------------------------------------------------------------- 18

5.2 PCB Design ----------------------------------------------------------------------------------------------------------- 18

5.3 Working with POV-Ray -------------------------------------------------------------------------------------------- 20

5.4 The Etching Process ------------------------------------------------------------------------------------------------ 22

5.5 Assembly ------------------------------------------------------------------------------------------------------------- 25

5.6 Testing ---------------------------------------------------------------------------------------------------------------- 26

Page 4: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

6. The Enclosure ------------------------------------------------------------------------------------------------------------ 28

6.1 Introduction --------------------------------------------------------------------------------------------------------- 28

6.2 The Design ----------------------------------------------------------------------------------------------------------- 28

6.3 CAD Modelling ------------------------------------------------------------------------------------------------------ 29

6.4 Mechanical Data ---------------------------------------------------------------------------------------------------- 33

7. Bill of Materials ---------------------------------------------------------------------------------------------------------- 34

7.1 Parts for Prototype ------------------------------------------------------------------------------------------------ 34

7.2 Parts for Enclosure ------------------------------------------------------------------------------------------------- 39

8. Marketing & Proposed Retail Price --------------------------------------------------------------------------------- 40

8.1 Market Comparison ----------------------------------------------------------------------------------------------- 40

8.2 Proposed Retail Price ---------------------------------------------------------------------------------------------- 41

9. Project Schedule --------------------------------------------------------------------------------------------------------- 42

10. Separated Schematics ------------------------------------------------------------------------------------------------ 43

10.1 Power Switch / LED ---------------------------------------------------------------------------------------------- 43

10.2 Adjustable Voltage / Current Power Supply --------------------------------------------------------------- 43

10.3 Voltage Outputs / Fuses ---------------------------------------------------------------------------------------- 44

10.4 Resistance / Capacitance Substitution ---------------------------------------------------------------------- 44

10.5 Voltmeter for Adjustable Power Supply -------------------------------------------------------------------- 45

10.6 Ammeter for Power Supply ------------------------------------------------------------------------------------ 46

10.7 Dedicated DC Voltmeter ---------------------------------------------------------------------------------------- 47

10.8.1 Function Generator -------------------------------------------------------------------------------------------- 48

10.8.2 Offset Control --------------------------------------------------------------------------------------------------- 48

10.8.3 Final Amplifier -------------------------------------------------------------------------------------------------- 49

10.8.4 Clipping Detection --------------------------------------------------------------------------------------------- 49

10.8.5 Frequency Counter -------------------------------------------------------------------------------------------- 50

Discussion -------------------------------------------------------------------------------------------------------------------- 51

Conclusion -------------------------------------------------------------------------------------------------------------------- 52

References ------------------------------------------------------------------------------------------------------------------- 53

Appendices ------------------------------------------------------------------------------------------------------------------- 54

[apxA] Project Shedule Enlarged ------------------------------------------------------------------------------------ 54

[apxB] Frequency Counter AVR Code ------------------------------------------------------------------------------ 55

[apxC] PCB Transfer Images ------------------------------------------------------------------------------------------ 62

[apxD] PCB Layout Multi-Layered ----------------------------------------------------------------------------------- 65

[apxE] PCB Renditions -------------------------------------------------------------------------------------------------- 66

Page 5: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

1

1. The Power Supply

1.1 Introduction

Unlike most bench power supplies, this unit takes advantage of ultra-low cost & readily

available power supply modules used in desktop computers. This means that the user can

use any standard ATX form-factor power supply they choose, and gain complete control of

the quality & stability of the regulated voltage rails. This is useful as many users only require

basic regulation to provide the power they need. Most low-cost bench power supplies are

also only capable of very low output current, usually just enough to drive one fully built circuit

comprising of a few dozen ICs. This may be enough for basic circuits, but eventually there

would be a shortage of current, and the power supply would fail to perform.

The modular “plug & play” design of ATX power supplies allows a user to quickly and easily

replace a faulty power supply without the need to de-solder any wires or connections. Simply

remove a few screws, and unplug the 24pin (or 20pin) ATX connector, and the 4pin Molex

that powers the function generator. Replace the power supply and you‟re done, no ordering

specialised parts or waiting weeks for it to be repaired.

1.2.1 Market Research – Why use an ATX power supply?

The primary reason for this choice is simple, cost. ATX power supplies are mass produced

on a very large scale, meaning low prices all-round.

The table below shows a comparison between two example power supply options:

Advantages Disadvantages Cost

Building a power

supply from scratch

Using 78xx & 79xx

regulators with two

standard centre

tapped chassis

transformers

More linear

regulation

Ability to set own

parameters

controlled current

Takes more time

Less efficient power

Requires use of

another PCB

Requires use of large

heatsinks & possibly a

fan

Limited output current

at this price

£35

Example budget ATX

power supply

Can be found at Scan

Computers:

LN42411

Efficient power

Plug & play

Replaceable

Requires no

additional PCB

Built-in fan

High o/p current

Size

Power can be dirty

Function generator

needs dedicated

voltage regulator to

ensure stable output

£11.98

This is a generalised example; there are other power supply options available. These are the

cheapest of each that were available when writing this.

Page 6: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

2

Figure 1

Figure 1.1

1.2.2 Research Method – In Depth

There are already a lot of people using modified computer

power supplies as make-shift bench power supplies (Figure

1), there are even break-out adapters on the market that

allow users to tap into their desktop computer power supplies

and take advantage of the regulated voltage lines available.

ATX power supplies are not just a basic transformer / bridge

rectifier package coupled with a few capacitors that you

might expect to see in a low cost power supply. ATX power

supplies are standardised to minimum requirements by governing bodies mostly sited in the

US (Intel, FCC, and IEEE) [08]. This means that when you buy an off-the-shelf ATX power

supply, you know what to expect. ATX standard power supplies are switch-mode, employing

highly efficient switching regulators to regulate the power much more efficiently than linear

power supplies. As of 2007 (with the release of ATX12V 2.3) the minimum required

efficiency for ATX power supplies was standardised to 70%, with 80% being recommended

[08]. Bench power supplies however, are not standardised, so often you are left just to take

the manufacturers‟ word for how reliable & stable they are.

As ATX power supplies are switch-mode, they require a constant load to be applied before

they can switch-on. To solve this, two large power resistors are tied directly to the +12V &

+5V lines to Gnd (Figure 1.1). The values of these power resistors are aimed at more

modern ATX 2.0+ power supplies were the +5V current has

been reduced [07] and supplemented for higher current on

the +12V lines. However they are still adequate enough to be

used for older pre-ATX 2.0 power supplies. The only

noticeable affect may be a very slight drop in output voltage

on those lines (no more than ~0.3V). This can be solved by

using a slightly larger value power resistor for the affected

voltage line (say 56Ω, depending on the power supply used).

This should not be a problem for newer power supplies.

Many power supplies on the market for >£70 are only capable of 500mA or less, and some

of those only rate the peak output, not the stable; constant current that we are interested in.

The example ATX power supply listed in section 1.2.1 has two 12V rails rated at ~13A each.

Very few electronics projects would require 13A of power, but this power supply only costs

£12. What about the quality of the power output? You might say. Well, this example is to

show how cheap these ATX power supplies can be; as such it is obviously quite limited, and

the power output is probably filthy. However this is not true for all ATX power supplies.

If you were to get one for around £25 - £30 instead, in particular a well-established

manufacturer like Antec or Corsair, this would not be a problem; as those power supplies are

manufactured to a much higher standard than the current ATX12V 2.3 regulations require

[09].

Page 7: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

3

Figure 1.2

Figure 1.3

1.3 Implementation

There is some internal regulation in the Multi-Function

Bench Power Supply (Figure 1.2) to prevent overvoltage /

overcurrent damage to some of the more sensitive

components. However the main voltage rails (+12V, +5V &

-12V) are regulated entirely by the power supply itself (apart

from some stabilising on the output). The -5V rail

requirement was dropped with the release of ATX12V 1.3

[07] so a -5V regulator is included in the design. This

ensures compatibility with all standard ATX power supplies, including the older 20pin

connector type. Perfect if you have an obsolete power supply lying around.

The unit is designed to be compatible with both single & dual rail ATX power supplies. With

the added bonus of an isolated feed for the function generator if using a dual rail power

supply (most new ones are). This is beneficial if you were too accidently create a short

across the +12V output; the function generator would not be affected.

The +REG voltage rail is controlled by an L200

voltage regulator, and an LM471 operation amplifier

to allow for current limiting. The voltage is adjusted

using a 10kΩ linear control potentiometer, while the

current limiting is controlled by a 100kΩ linear

control potentiometer. The +REG output ranges from

+3V to +11V with a maximum current draw of ~1.5A,

as established during the circuit testing (Figure 1.4).

The prototype variable voltage regulator is shown here

(Figure 1.4). The voltmeter on the right shows the supply

voltage (+11.79V), while the voltmeter on the left shows

the regulated output at +5.02V. The breadboard testing

proved a complete success, and so the circuit was never

re-built on prototyping board; it went straight to the PCB

design (section 5).

The main power switch is tied to the power supply‟s built-in PS_ON line

(Figure 1.5). When the main power switch is open, the power supply will

be in standby mode; where there is only one voltage line present; +5VSB

(used to indicate the standby LED). Once the switch is closed and the

PS_ON line tied to ground; the power supply is switched on fully;

switching on all the voltage rails. This allows the user to temporarily

switch off the power to connect cables; without risk of accidental short,

and without ever needing to actually switch off the power supply. The

standby LED is green to signify when it is safe to make alterations.

Figure 1.4

Figure 1.5

Page 8: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

4

1.4 Limitations

Each voltage output rail has a dedicated fuse / circuit breaker. The positive voltage rails are

limited to 2A as standard. This is done purposely to ensure it is impossible to draw more

current than the PCB is designed to handle. There is considerable margin for error with this

limitation. The PCB trace widths are calculated using the subsequent formula: [10]

Where:

I = Maximum current (A)

dT = Temperature rise above ambient (oC)

A = Cross-sectional area (mils2)

The PCB is designed to handle 4A on each positive rail, and 1A on each negative rail (at

ambient temperature). Most ATX power supplies cannot output more than ~500mA on the

negative rails [09] so the selected 500mA fuse limitation is really just a safeguard; to prevent

damage to the PCB during fault / short-circuit conditions. It is prudent to include a fuse (or

circuit breaker) on every voltage output.

The +5V rail is intentionally limited; as the +5V line is used internally as a reference for the

voltmeters, ammeter, and also powers the LED indicators. It is important to ensure this rail is

forcefully disconnected quickly; before tripping out the power supply, or causing any damage

during fault / short-circuit conditions. For this reason, fast blow fuses should be used here.

1.5 Redundancy

There is an additional 2x2 Molex socket (visible in Figure 1.6) located near the +12V output

that can be used to boost the input current to that voltage rail if required. The 2x2 Molex

cable is the same one used to power the CPU in a desktop computer, as such, it will offer

significantly increased output current than the +12V rail provided by the main ATX power

connector. Allowing the user to safely increase the +12V fuse / circuit breaker up to 5A [10].

Higher output current is possible but would require the use of a high current rated link cable

to supplement the PCB trace, as the trace alone cannot handle any more than 6A of current

safely [10], and there isn‟t enough room on the board to make the trace any larger (Figure

1.6). It is unlikely that any average electronics project would require such a large amount of

current, as such; use of the additional 2x2 Molex connector is optional. This serves to

demonstrate how modular the PCB design is; as each feature is independent, and can be

left out of the build if costs are an issue; without the need to re-design the PCB.

There is one voltage rail available on all ATX power supplies that remains unused; +3.3V.

This was left out of the design due to the unusual voltage level, and due to limited space on

the front panel, though the +REG adjustable voltage rail can output this voltage level.

However the +3.3V rail is designed to output a significant amount of current, and so could be

utilised to provide yet another regulated voltage rail in the future.

Figure 1.6

Page 9: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

5

2. The Universal Function Generator

2.1 Introduction

This versatile Universal Function Generator is capable of producing high quality AM/FM/FSK

(Frequency-shift keying)/ASK (Amplitude-shift keying) modulated sine, triangle & square

wave outputs using standard BNC type connectors. It includes 5 widely overlapping

frequency ranges and up to 1MHz output frequency, with simultaneous 50% duty cycle 5V

TTL Schmitt triggered output. A built-in, low cost ATMEGA8 based frequency counter

displays the output frequency precisely from as low as 1Hz, up to ~400kHz.

Amplitude & offset controls tuneable for all waveforms

Built-in clipping detection

2.2 The XR2206

The function generator is based on the XR2206 monolithic function generator from Exar.

It is capable of generating high quality sine, triangle & square waveforms of high-stability and

accuracy [03].

The circuit has five widely overlapping frequency ranges, controlled by a rotary switch that

changes the capacitor selection used for the timing input of the IC (Figure 2). Higher

capacitor values give a lower frequency output. The frequency control is realised with a

100kΩ linear control potentiometer (Figure 2) with pins 2 & 3 tied together to make the

frequency adjustment taper less linear and more logarithmic (inverse log) so as to prevent

the frequency control being too sensitive to use. The frequency of oscillation, 0 is inversely

proportional to the range capacitor used × the value of Rfrequency: 0

Figure 2 Figure 2.1

Figure 2.2 Figure 2.3 Figure 2.4

Page 10: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

6

When using the FM input, a voltage from 0 – 3v is injected and the change in frequency is

proportional to the change of voltage / R31. The capacitor C65 is used as a reserve to allow

the user to specify an alternative frequency range, although this has limited functionality as

the built-in frequency counter only has a maximum input of ~400kHz before it can no-longer

detect the rising edge of the clock pulse it uses to determine the frequency. That said; the

function generator is capable of up to 1MHz frequency output (C = 10pf). The maximum

frequency range is purposely limited to ~135kHz to ensure stable operation of the frequency

counter, and to ensure a good range of overlap between the limited number of ranges.

The function generator has two inputs used for modulation of the output waveforms.

The AM input can control sine & triangle only; and is AC coupled, whereas the FM input

controls all waveforms; and is DC coupled. This allows support for FSK, ASK, FM, and AM

modulation very easily. As mentioned in section 1.2.2 the function generator has its own

voltage regulator (Figure 1.2) to prevent damage to the ICs. This regulator is also used to

ensure good regulation when using the AM input, since the output amplitude becomes a

function of Vcc, and this can affect the +12V rail if not properly regulated [04].

The pre-set trimmers Sine T1 & Triangle T2 (Figure 2.5) are

used to adjust the amplitude of the sine & triangle waveforms

to match that of the square waveform. The THD (Total

Harmonic Distortion) pre-set trimmer is used to correct for

distortion of the sine wave. Once calibrated, the TDH of the

sine wave output is less than 1% from 10Hz to 10kHz, and less

than 3% over the entire frequency range [04]. The pre-set

trimmer P4 is used to optimise the symmetry of the sine wave.

All pre-set trimmers used are the multi-turn type.

The sine & triangle output are passed through one TL08 bi-FET operation amplifier, while

the square wave output (not the TTL) is passed through another (both IC5). These are then

tied to opposite sides of a 10kΩ linear control potentiometer to act as the amplitude (level)

control. This is due to the way the amplitude of each output is determined. They are the

inverse of each other. This trick allows us to control the amplitude of every output with a

single control. Sine & triangle are effectively the same output, just manipulated in a different

way before being amplified. Notice that the centre leg of the potentiometer is the output from

the first set of operational amplifiers (see section 10.8.1).

The second set of TL08 bi-FET operational amplifiers (IC6) are used to

provide an offset adjustment. This is done by providing the IC with both a

+12V & a -12V reference, allowing the user to adjust the offset position

not only upwards but down too. The offset is controlled by a 100kΩ linear

control potentiometer (Figure 2.6) tied between -12V & Gnd.

The amplitude of the square wave is determined by the voltage divider formed by R15 & R17

before going through the bi-FET operational amplifiers (see section 10.8.1).

The TTL output is achieved using a 74HC14 Schmitt trigger (IC3) to clean up the square

wave output (sync) from the XR2206, and set the output to exactly 5V.

Figure 2.5

Figure 2.6

Page 11: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

7

2.3 Final Output Amplifier

The final output amplifier is realised with the AD817 high frequency operational amplifier,

which is ideally suited to the type of signal conditioning we need to perform at the output

stage of the function generator. It is designed to handle high capacitance loads and still

maintain excellent signal integrity [05].

Once the signal is passed through the offset

control, it is passed through the AD817

operational amplifier IC8 (Figure 2.7), where the

signal is boosted to 20V p-p. The AD817 is

powered from the same dual supplies as the

offset bi-FET operational amplifiers.

The output is then passed to the clipping

detection circuit and the output BNC connector.

2.4 Clipping Detection

Clipping detection is achieved using two comparators with specified voltage reference

determined by rectifier diodes. The comparator voltage is set to +9.21v / -9.21v allowing the

comparators to detect a voltage of greater

than +10V / lower than -10V and switch-on

the corresponding LED [11]. Clipping

detection takes approximately 3 seconds to

determine using this circuit, so it is best not

to adjust the offset or amplitude too quickly

if clipping detection is needed.

2.5 The Frequency Counter

The frequency counter is based on an ATMEGA8 8-bit AVR running at 4MHz. It is

responsible for counting the output frequency of the function generator as well as

multiplexing the 7-segement display (Figure 2.1). The original design for this was actually

taken from a previous project and modified to suit our needs.

The AVR coding was developed using CodeVisionAVR [apxB].

Originally, the frequency counter input was fed through a Schmitt trigger in an effort to

improve the frequency counter‟s ability to detect higher frequencies. While it did improve the

results, it was not very significant, only about 20kHz increase before miscounting again. So

this additional trigger was removed from the design to reduce costs. The completed

prototype frequency counter is detailed in section 2.6.

Figure 2.7

Figure 2.8

Page 12: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

8

Figure 2.11

2.6 The Prototype

The prototype function generator is shown here

(Figure 2.9). The function generator was built on

prototyping board without the final stage amplifier

or clipping detection to allow for easier fault

finding and optimisation of the final stages on

bread-board. The complete frequency counter

circuit is also shown here, displaying 28.68kHz.

The red LED (LED3) signifies kHz. The display is

easier to see once the green display filter is

positioned over it (Figure 2.10).

As demonstrated here, the coding used for the

ATMEGA8 AVR automatically shifts the decimal

point to allow for more accurate readouts. The

frequency counter has its own external oscillator

operating at 4MHz, which provides an accurate

timing reference for the IC.

The actual speed of the display multiplexing is

determined by the internal clock of the ATMEGA8

(running at 500kHz) × an integer divided by the

internal clock frequency.

Originally the display speed was a little

slower, in an effort to avoid consuming

too much calculation power, and slowing

down the interrupt controlled multiplexing

of the display [11]. After some testing, it

was determined that 2ms was not quite

fast enough, as the display “flicker” was

clearly visible.

You can see from the code comments (Figure 2.11) that the display speed is set to 1ms, and

the actual time to detect and display the frequency input to the ATMEGA8 is 400ms (less

than half a second) not a bad result for a prototype. An ISP programming port was later

added to the design to allow the AVR code to updated and improved at a later stage.

The completed prototype‟s output is demonstrated on a digital oscilloscope (Figures 2.2, 2.3

& 2.4). The square & triangle output waves shown are the final output stage waveforms.

Whereas the sine wave output (Figure 2.4) shows an output before being amplified by the

AD817. This is why sine wave output (Figure 2.4) seems rough compared to that of the

square wave output (Figure 2.3) & the triangle wave output (Figure 2.2).

Figure 2.9

Figure 2.10

Page 13: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

9

3. Dedicated DC Voltmeter

3.1 Introduction

One very useful additional feature of the Multi-Function Bench Power Supply is the built-in

dedicated DC voltmeter. Capable of accurately measuring external voltages of up to 200V

DC with four selectable voltage ranges.

Accuracy of up to 10mV DC

Low cost

digit 7-segment LED display

Negative voltage indicator

Works with both internal & external voltages e.g. batteries

Compatible with standard 4mm insulated test leads

3.2 Research Method

Much of the design for the voltmeters was actually taken from a previous project done by

myself a few years ago (voltmeter in Figure 1.4). The ICL7107 is a unique analogue to digital

converter based voltmeter IC package by Intersil. It offers all the functions required by any

panel voltage meter, high precision, wide availability of components, and low cost. It was

important that the display matched that of the function generator‟s frequency counter, and so

needed to be based around 7-segment displays. This is the only low cost “off-the-shelf” IC

package that is capable of providing the type of display we need.

As briefly mentioned in section 3.1, the ICL7107 is capable of measuring up to 200V DC. In-

fact, it can measure much higher than that, as the voltage measuring range is determined by

a voltage divider on the input to the IC [02]. The actual maximum voltage range of the project

is 199.9v (199.9) as the ICL7107 only uses

digits of the quad 7-segment display used.

The same is true for the other voltage ranges. The 200mv range is actually limited to 199mv

(0.199), the 2v range is actually limited to 1.999v (1.999) etc. For simplicity, we shall

consider the ranges 200mv, 2v, 20V, and 200V DC. Higher ranges are not necessary as we

are only interested in measuring the DC output of the power supply, or other low voltage DC

sources, such as batteries.

Figure 3 Figure 3.1

Page 14: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

10

3.3 Implementation

As there are two voltmeters (and one ammeter) built-in to the project, it was important to

ensure full functionality for each purpose. The voltmeter used for the Dedicated DC

Voltmeter must allow for an external voltage reference (-V) whereas the one used to

measure the voltage on the +REG output of the power supply needs to be referenced to the

internal reference of the power supply (Gnd). To solve this problem in one, a jumper was

added to the design (Figure 3.2), allowing the user

to set in the voltage reference of each voltmeter to

either internal or external. This meant that only one

design needed to be implemented twice in the

project, reducing the design time. This also allows

the user to change to the internal voltage reference

on the Dedicated DC Voltmeter, allowing the meter

to be used with just one test lead, rather than two

(for measuring voltages generated by the power

supply itself). By default, the external reference is

used for the Dedicated DC Voltmeter, and the

internal reference is used for the other voltmeter.

The generalised circuit design for the ICL7107 is taken from the specifications detailed in the

accompanying data sheet [02]. Much of the design has not changed. However there were a

few modifications needed.

The oscillator frequency of the ICL7107 is determined by this formula: fOSC

[02]. Where

R = the value of R1, R7 & R22, and C = the value of C1, C8 & C13. The ICL7107 data sheet

recommends using an oscillator frequency of 48kHz to get the display to change quick

enough to be used for varying voltages. However after some testing it was determined that

this is a little too fast if the voltage being measured is not properly stable, as the display

reading fluctuates too quickly to get a valid reading. Therefore the IC timing needed to be

modified to adjust the rate of change of the display. The display change rate is determined

by the oscillator time period tOSC

which is multiplied by an integer of 16,000 to find the

display rate in milliseconds. The original display change rate was 333ms [02]. By changing

the value of R from the original 100kΩ, to 180kΩ gives a display change rate of 640ms,

almost double the original. This modification makes it much easier to read the display if the

voltage being measured is fluctuating.

The ammeter is realised using the same ICL7107 circuit as the voltmeters, with exception to

how the input is arranged. In-order to modify the voltmeter to measure current, a large power

resistor (R121) is connected across the input (before the voltage divider). This 0.1Ω power

resistor is small enough as not to cause a significant voltage drop on the voltage outputs, but

allows the small current to be passed through a voltage divider and measured. Technically

we are still measuring the voltage here, just manipulating it such a way that it calculates the

current for us (based on the input resistance of R121).

Figure 3.2

Page 15: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

11

3.4 Limitations

As this voltmeter is meant for use with electronic circuits, it does not have the facility to allow

for AC voltage measurements. Although this is a feature that could be added without too

much difficulty using rectifier diodes to convert the AC input to DC before being measured.

This was actually in the original plan for the project, but dropped as it would have required

another 4mm socket on the front panel. There was also some concern about how accurate

the voltmeter would be able to measure the RMS of an AC voltage input.

As mentioned previously, the voltmeter can also act as a logic probe for digital circuits.

However this does require using another voltage as the reference (not the same as the logic

output voltage, e.g. +12V). This enables the voltmeter to distinguish between a high output

(usually 5V) and a low output (0V). So if the reference voltage is +12V, a high output should

measure at -7v (7v potential between +12V and the 5V logic), and a low output would

measure at either +12V, or 0V (depending whether or not the low output is isolated from

Gnd, which it usually would not be). Without this measuring method, the voltmeter would not

be able to distinguish between Gnd (0V) and a low output (see section 3.5).

3.5 Future Work

The ICL7107 used for the voltmeters (and ammeter) is a great all-in-one IC package ideal for

this kind of project. However they are quite costly (see section 7.1). If programmable AVRs

were used instead, the meters would be far cheaper to produce. Some initial research was

done into this, but with the time constraints, it was determined that it would take too long to

produce another set of AVR code. Plus the ICL7107 voltmeter circuit design used for this

project was taken from a previous design done by myself a few years before, so all of the

initial design work was already in-place (apart from the ammeter modification).

As mentioned in section 3.4, the voltmeter can only be used to measure DC voltages, but

this could be solved using rectifier diodes to convert the AC input to DC for measuring. The

problem here is that this would have involved using another 4mm socket on the front panel,

and there isn‟t enough room for one. However it is possible to use the existing +v input

socket (that is currently used for measuring DC) and have the voltage range switch also

switch over to the rectifier circuit (the rotary switch used is already double pole) to allow it to

also be used for AC. This could be done very easily using a double pole relay (like the ones

shown in section 4), but those are quite expensive, and there simply wasn‟t enough space

on the board to allow for it, so it was dropped.

The voltmeter uses a voltage range switch to determine what maximum input voltage you

wish to measure. However this can be a problem if you don‟t know what the voltage range

should be. In most cases the third position (20V) is acceptable as is can measure beyond

the maximum output voltage of the power supply. However if you were to use -12V as the

reference voltage instead of Gnd, and measure any voltage above +8v, the meter would be

unable to display the voltage as the maximum measuring voltage at this range is only 20V.

In this case the meter would display “Er” meaning error. However with some complex

circuitry it is possible to eliminate this problem by doing-away with the voltage range switch

altogether, and select the voltage range automatically using ICs. There was some initial

Page 16: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

12

research done into this, but it was determined that too many ICs would be required to make

it work, increasing the cost of the project significantly, so it was dropped.

Originally the display of the voltmeter was meant to be dual purpose. A voltmeter on setting

one (determined by the voltmeter switch shown in Figure 3; that currently switches off power

to the voltmeter circuit), and a logic probe used for digital circuits on setting two. This would

eliminate the problem mentioned in section 3.3 regarding how to detect low logic. This would

be done by first switching off the voltmeter (using the same switch as mentioned previously)

and switching over to a modified transistor based logic probe circuit instead. The four upper

segments and four lower segments of the quad 7-segment display used as the logic high

and logic low indicators.

The original logic probe feature would have provided for much faster logic testing than what

the voltmeter is capable of, making it possible to detect a pulsed “clock” input, and have

each clock cycle display at the speed it is being input (thanks to the high speed transistors

used to drive the common anode LEDs used in the quad 7-segment display). Unfortunately

this would have meant using a transistor for each LED segment used (otherwise it would

interfere with the voltmeter setting), meaning ten transistors in total (including those used for

the logic probe circuit) and there simply wasn‟t enough space left on the board to fit them

into the design, so it was dropped.

The ICL7107 can be adapted to measure capacitance [01], a very handy feature that even

most multi-meters don‟t have. This would be done by using a quad Schmitt trigger to change

the voltage potential between REF_LOW & REF_HIGH of the ICL7107. While its accuracy

would be limited somewhat, it would be able to measure very low capacitance values of

down to 2pf, and be modified to measure up to 2uf using a range switch like the one used to

change the voltage range. This feature was not added to the design due to time constraints,

and limited board space. There was also the issue of the rate the cost of this project was

increasing with every new additional feature, so this idea was dropped to save costs. If this

feature could be implemented cheap enough, it is defiantly worth adding.

It is also possible to use the ICL7107 to measure resistance [01]. However it would work by

displaying a ratio output rather than the actual value of the resistance being measured. This

would be done by using a Zener diode into REF_LO of the ICL7107, and placing a resistor

between REF_LO & REF_HIGH. This would change the reference voltage of the ICL7107

depending on the resistance being measured. A ratio of 1/1 would mean the resistance

being measured is equal to the value of the resistor between REF_LO & REF_HIGH, and

any other ratio displayed can be calculated relatively easily. This would be a nice feature to

have, but displaying the ratio isn‟t really very useful in terms of quick measurements. A ratio

based on a selected resistor would also mean we would have to allow for different ranges of

resistances using a range switch like the one used to change the voltage range. For these

reasons, this idea was dropped.

Page 17: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

13

4. Resistance / Capacitance Substitution

4.1 Introduction

The last feature, but far from the least significant, is the Resistance / Capacitance

Substitution unit built-in to the front panel of the project. This highly accurate substitution unit

allows the user to simulate resistances of up to 999,999Ω, down to 1Ω, in 1Ω steps, all to

within up to 0.1% tolerance, more accurate even than most similar products available today.

Simulate resistances from 1Ω to 999,999Ω in 1Ω steps

Up to 0.1% accuracy

Wide selection of common capacitor values to choose from

Unique Parallel Change-over switch allows easy creation of RC circuits

Compatible with standard 4mm insulated test leads

4.2 Research Method

Originally the idea for this addition to the project was based on the ability to measure

resistance with the Dedicated DC voltmeter circuit as mentioned in section 3.5. The original

plan was to be able to simulate a resistance using a range of linear control potentiometers,

and use the resistance meter to measure and display the resistance (see Figure 6.2).

However after realising the limitations of the resistance meter modification, particularly the

way it displays a ratio, rather than displaying the resistance value (see section 3.5), this idea

was dropped from the design. This created a problem for the resistance substitution unit, as

without a meter to display the resistance; the user would not be able to accurately set the

resistance value. A simple design change eliminates this problem. By using rotary switches

instead of control potentiometers; we are able to accurately set a resistance using six

decade switches.

Six 10-way rotary switches were required to provide the decade selection

(Figure 4), but after some quick research, we find that 12-way switches

(Figure 4.1) are far more widely available, and cheaper than the 10-way we

originally wanted. These 12-way switches have limiters built-in to them, to

allow them to be used for lower ranges, so these ones were chosen instead.

Figure 4

Figure 4.1

Page 18: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

14

It seemed a shame to waste the additional switch positions for the rotary switches. This is

how the idea to add a limited number of capacitor values to the substitution unit originated.

By selecting a range of commonly used capacitors, all rated at 25V (enough to be used for

the full voltage range of the power supply), we are able to simulate both capacitance and

resistance simultaneously, and with negligible increase in cost.

The final alteration to the design is the ability to switch the circuit to

parallel instead of the default series configuration (Figure 4.2). This

allows for a much wider range of capacitance values. Capacitors

when connected in parallel react in much the same way to resistors

when connected in series; the values are simply added together. This

makes it very easy to create special capacitance values using the

selection of switch positions available.

Switching to parallel in terms of resistance alone may not seem very useful, given that we

can simulate a full range of resistances in series accurately without the need to calculate the

total value. However this can actually double as an educational product for students learning

electronics. Students can use the parallel switch to understand the series / parallel

relationship. Here is the formula used to calculate the total resistance in parallel:

This same formula can also be used to calculate the total capacitance values when

connected in series. Simply substitute R for C.

4.3 Implementation

The majority of the design work for the Resistance / Capacitance Substitution was done

during the research stage, as this is quite a simple feature by design. The ability to switch

the circuit over to parallel however was not particularly easy. It had to be done in such a way

that the process of switching over the circuit did not alter the total resistance of the circuit,

while still proving enough throughput current to allow the unit to be used for a wide range of

applications. This eliminates the

cheapest method, of using transistors to

make the connections. Instead, three

low-power, low-profile DIL10 package

double pole micro changeover relays

were used. The AW5-K relays (Figure

4.4) are ideally suited to this project as

they are 5V powered, and can switch up

to 1A at 30V DC [13].

It is common practice to add a reverse bias protection diode across the input of relays to

prevent the collapsing magnetic field created when the relay is switched off from damaging

any part of the circuit. As our relays are all tied to the same voltage line, and in such close

proximity to each other, this was resolved with a single diode (D11).

Figure 4.3

Figure 4.2

Page 19: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

15

The relays used to switch to parallel mode must also disconnect the series connections to

give a true single parallel array. The design plan for this was implemented using a “half chain

link” method (Figure 4.5) for the default series configuration, using the relays to complete the

chain, and make the parallel connections. One of the output connections

had to also be swapped to the other side of the chain using the final relay

pole. This then forms a perfect parallel resistor network. The black lines

signify the default series configuration (relays switched off), while the

orange lines signify the parallel configuration (relays switched on). The

relay shown here (Figure 4.4) is the 12V version.

The final circuit diagram designed using Eagle CAD (see section 5) can be difficult to follow,

this is why a simplified diagram has been included (Figure 4.5). The complete diagram is

included in section 10.4. There is also a fuse tied to one of the outputs to prevent

overcurrent damage to the rotary switches (see section 4.4).

As the PCB is designed to be modular in terms of component selection, these relays can be

removed from the design, and supplemented for link wires if costs are an issue. This would

sacrifice the ability to switch to parallel, but would also remove the need for the additional

toggle switch on the front panel, reducing costs again. Much of the PCB layout is done in the

same way, to future proof the design (see section 5).

Figure 4.5

Figure 4.4

Page 20: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

16

4.4 Limitations

The rotary switches used to make the connections between the different resistance values

(Figure 4.1) have a limited throughput current of 350mA [06]. Unfortunately 350mA is a

rather unusual value, and so fuses are not readily available in that size. Oddly enough

however; 315mA fuses are widely available (see section 7.1); this is therefore the current

limit for the Resistance / Capacitance Substitution unit. The maximum voltage is determined

by the maximum rating of the capacitors used, which is currently 25V, enough to cover the

full voltage range of the power supply. If used for resistance substitution only, the maximum

voltage can be increased to 110V AC/DC, assuming the range setting is set before applying

the voltage (do not switch at this voltage) [06].

The percentage of accuracy is based upon the resistor tolerances used for the resistance

substitution. However the resistance values for each decade are determined by incrementing

resistors in series from the first selection (position 1) all the way up to position 9. Meaning if

you wanted a resistance value of 999,999Ω (maximum), you would actually be using a total

of 54 (9+9+9+9+9+9) resistors, each with a tolerance of 0.1%. This would reduce the overall

percentage of tolerance a little. While the actual tolerance would depend on the specific

resistors used, the minimum tolerance is still rated at 0.1% (set to 1Ω), and the maximum

tolerance is rated at 0.9% per decade, with a total maximum tolerance of 5.4% (set to

999,999Ω) still a very good tolerance level. The tolerance is determined by this formula:

( ) ( )

When using in parallel mode however, the tolerance is a little trickier to determine, as you

would be using groups of series resistors in parallel. Normally, resistors of the same

tolerance connected in parallel are simply the same tolerance of the resistors used. When

we introduce groups of series resistances, we need to take into account the tolerance of

each group of series resistors and use this to solve the overall tolerance. To simplify things

here, we will consider each decade as 0.9% tolerance (the maximum tolerance) giving a

total maximum tolerance of 1.11% in parallel mode, as determined by this formula:

So why is the parallel tolerance not just 0.9% as stated previously? This is because that rule

only applies to individual resistors in parallel; we are using a group of series resistors,

meaning the overall distribution of each series group in parallel is much higher than the

tolerance of a single resistor (say for example, half of the resistors are in the extreme high

tolerance range, and the other half in the extreme low tolerance range). These formulas can

be used to determine the exact resistor tolerances if using a range of positions on the

resistance substitution unit.

The capacitance values selected are general sizes that are commonly used in electronics,

allowing the user to create simple RC circuits easily (see section 4.5); there are a finite

number of capacitance values to choose from however.

Page 21: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

17

4.5 Future Work

While we can create basic RC circuits, the type of RC circuits we would be able to create

would have limited use. In-order to fully take advantage of the capabilities of the Resistance /

Capacitance Substitution unit, we need to be able to connect to the points in-between each

decade also (using additional sockets on the front panel). This is useful as we could use the

substitution unit to create more complex RC filter circuits. This was not included in the

design due to limited space on the board, and the front panel. It is also undesirable to have

too many complicated markings on the front panel. However this feature is defiantly worth

adding in future, cost permitting.

It is possible, by using either an additional socket on the front panel or additional relays, to

allow for a full decade range of capacitance values without the need for additional rotary

switches. The problem here is the limited space in-between the switches on the board.

Currently, that space is used for the resistors used to create the decades, and those are

already mounted vertically to allow for minimal pitch. For this reason, the only possible way

to fit the additional 48 capacitors would be by utilising the reverse side of the board, which

currently only the displays and switches are mounted on (see section 5). This problem can

be eliminated by using surface mount devices, rather than full sized components. In industry

this is common practice for PCBs that are mass produced, as the process can be almost

completely automated. This feature is worth adding in future if the design allows for it, and

cost permitting.

Page 22: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

18

5. The Prototype

5.1 Introduction

The prototype for a project like this would normally be built on prototyping board or similar,

unfortunately there are a lot of unusual component sizes used in this project, and so the only

viable option was to build it on a printed circuit board. These boards can be designed using

any PCB layout software, and manufactured by one of many PCB manufacturers.

5.2 PCB Design

The PCB layout was designed using Eagle CAD software [14]. This software has a built-in

schematic editor, which allows a user to re-create circuit diagrams in detail, and use them to

generate a PCB layout. Eagle CAD has thousands of components built-in; some of the more

unusual components had to be manually drawn into Eagle‟s parts library.

Eagle CAD has a parts library editor

that allows you to modify existing

part layouts or create new ones

from scratch. This is necessary, as

often components may need to be

mounted in a special way, or with

larger solder pads. These

modifications are done using the

library editor (Figure 5.1)

Figure 5

Figure 5.1

Page 23: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

19

Here you see one of the components (Figure 5.1) that had to be added to Eagle‟s parts

library, the common cathode multiplexed display for the function generator‟s frequency

counter (see section 2.6). Other components had to be added such as the CA56-11EWA

quad 7-segment LED displays used for the voltmeters / ammeter (section 3.1), and the BNC

connectors used for the function generator (section 3).

The PCB design has undergone many changes over the life of the project. The final version

is shown here (Figure 5.2) and included in appendices [apxD].

The PCB has been designed to ensure the build / soldering process goes as smoothly as

possible. The rotary switches for example have connections directly beneath them, making

them impossible to solder on the top-side of the PCB, so steps were taken to ensure the

PCB traces are positioned on the reverse side of the board to be soldered [apxC]. The quad

7-segment LED displays are mounted directly opposite the ICs that drive them, so as to

reduce wasted space on the PCB to a minimum. This means that certain components must

be mounted in sockets to allow for soldering on both sides of the board. The ICL7107s, and

7-segment LED display layouts are designed to be used with SIL sockets rather than the

usual DIL type, this is due to the limitations of the board. Some of the PCB traces used for

larger components had to be positioned on both sides of the board, meaning they have to be

soldered on both sides, DIL sockets would not allow for that.

Certain parts of the project require more current than others, or require the overall internal

resistance to be at an absolute minimum (such as the Resistance / Capacitance

Substitution). The voltage regulators require enough current not only for the ICs themselves

but their large output currents also. To ensure adequate current flow, these components

purposely have overly large PCB traces (section 1.4). Notice also, that the PCB traces for

the voltage regulators are positioned on top-side of the board as much as possible (the red

traces signify the top-side of the board), as the components are meant to be positioned on

the reverse side.

Figure 5.2

Page 24: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

20

The original plan at the start of this project was to get the PCB professionally printed.

However, in-order to produce the printed circuit board in an ordinate amount of time, the

decision was made about half way through the project to produce the board in-house. This

opened up more flexibility for the PCB layout design than what PCB manufacturers would

normally allow for, as most manufacturers produce their PCBs using CNC routing machines

with limited spatial tolerance. We obviously didn‟t have one of those handy, so this board

would have to be manually etched (see section 5.4).

There was just enough space on the PCB layout at the end of the design; to include the

component names in text. Normally this would be done using a silk-screen, but as we were

now manufacturing the board in-house, silk-screen was not available. Having the component

names printed on the board makes the build process much easier later-on.

5.3 Working with POV-Ray

Although not essential to the design process, the PCB layout was synthesised using POV-

Ray [15] to better represent how the board would look once complete. POV-Ray

(Persistence of Vision Raytracer) is a high quality, open source tool for creating 3D graphics

& models using nothing but written code. The first image (Figure 5) shows the reverse side

of the PCB rendered using POV-Ray with most of the components installed. As you can see

there is very little space left on the board.

Unfortunately, creating these high quality 3D renderings is quite challenging. Each

component requires its own section of code to specify size, layout, position, orientation,

scale, texture etc. Most of which is generated automatically using the POV-Ray add-on for

Eagle CAD [16]. However this add-on is by no-means official, so it does have a few bugs

that need to be worked out before rendering the final model.

As the quad 7-segment LED displays are a new custom part; not included in Eagle‟s library

(section 5.2), they are also not included in the Eagle3D add-on. Therefore they had to be

added before they could be rendered using POV-Ray. Fortunately due to the remarkable

capabilities of the Eagle3D add-on, there is a lot of supporting documentation available

online to aid in the process of modifying Eagle3D to create custom parts.

This screenshot (Figure 5.3) shows a completed section of the new code added to POV-Ray

to create the four quad 7-segment LED displays. As you can see it is quite complex.

Figure 5.3

Page 25: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

21

Once all of the necessary modifications to the POV-Ray code were finally complete, the final

model could be rendered in high resolution. POV-Ray uses a raytracer to create the

synthesised 3D model, this can be very CPU taxing, and take hours to complete, depending

on the quality & resolution of the final 3D rendition. Using a quality setting of 1440px × 1080p

(1080p 4:3) with anti-aliasing at its optimal setting, took over three days to complete on a six-

core workstation. The final renditions are shown here (Figures 5.4 – 5.7), larger renditions

are available in appendices [apxE].

Figure 5.4 Figure 5.5

Figure 5.6 Figure 5.7

Page 26: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

22

5.4 The Etching Process

There are various methods that can be used for PCB etching, some easier to do than others.

Many involve using specialised equipment that wasn‟t available at the time. However there

are products available that simplify the process. Press-N-Peel transfer film [17] allows the

PCB layout to be printed using a standard laser printer, and transferred directly to the

copper-clad board for etching (Figure 5.10).

Once the board layout was ready to be transferred to PCB, each side was printed separately

to scale; with the top layer (Figure 5.8) mirrored (the base layer is already mirrored) (Figure

5.9) directly from Eagle CAD using a laser printer with at-least 600 DPI support [17]. The

images must be printed in jet black, to ensure there is plenty of toner to transfer to the

copper-clad board during the ironing stage. After a quick check to make sure there are no

blotches, they are ready to be transferred to the copper-clad board.

The copper-clad board must be cleaned-up before starting the transfer process. Acetone

was used to remove any grime from the board and ensure full transfer of the printed design.

Care must be taken when handling such chemicals. Gloves & a mask were used during the

entire etching process.

This is where it gets a little tricky. This is a double sided PCB design, meaning the top &

bottom layers have to line-up perfectly (known as registering), if it is misaligned more than a

few hundred microns, the drill holes will not line-up on both sides of the PCB.

The common way of registering each layer, is to drill some of the holes (usually in the outer

corners of the board) and use the holes to ensure good registration. There is a slightly easier

way because we used A4 sized transfer paper. By stapling each sheet together around the

edges (with the toner facing each other), and sliding the board in-between the two, this

allows ironing of both sides of the copper-clad board in one go.

Once positioned properly, the copper-clad board was ironed for around 5-10mins on each

side, to ensure the toner had properly adhered to the board. The scaled versions of the final

PCB layout transfers are available in appendices [apxC].

Figure 5.8 Figure 5.9

Page 27: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

23

Figure 5.10

There were a few problems with the first few

transfers. The Press-N-Peel transfer film didn‟t

really do itself justice, considering they cost £2 per

sheet. The print resolution was poor, and a lot of

the toner did not adhere to the board during the

ironing stage (Figure 5.11). Although this isn‟t too

much of a problem as the copper-clad board can

simply be cleaned again, to re-attempt the

transfer. Several attempts were made using the

Press-N-Peel transfer film, each with similar

results, so this idea was scrapped, in-favour of

another method.

The Press-N-Peel transfer film didn‟t provide good

enough results, so in an attempt to improve the

transfer resolution; glossy photo paper was tried

instead. Using glossy photo paper allows for a full

resolution print, without loss of quality, although

transferring the image from photo paper is not

ideal, as unlike Press-N-Peel transfer film; the toner

from the laser printer adheres to the paper as-well

as the copper-clad board as seen in Figure 5.12.

Once the toner image was transferred to the

copper-clad board, the paper was removed by

soaking the board in water until the paper turned

to a pulp and could be rubbed off easily. Some of

the smaller areas had to be carefully removed with

a knife as any paper left on the copper-clad board

during etching would prevent the etchant from

reaching those areas.

Once the board was cleaned, any blotches were

repaired using a permanent marker (which also has

etch-resist properties). At this stage, the etching

acid was carefully mixed & prepared for the final

etching. Etching palates were the chosen etchant,

as they are one of the safer etchants, and are

relatively harmless until mixed with warm water.

Figure 5.11

Figure 5.12

Figure 5.13

Page 28: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

24

The copper-clad board was finally dipped in the

etching solution (Figure 5.14). The board was

agitated here to ensure good flow of etchant over

the entire board, and to wash the etched areas of

the board to see when it was complete. The board

took around 15 minutes to fully etch; you can see

here (Figure 5.14) where the etchant has already

eaten away the edges of the copper. Notice the

use of gloves while handling the etchant; you

wouldn‟t want to get this on your skin.

Once fully etched, the board was cleaned again

using acetone (Figure 5.15) and checked for any

blotches or areas missed by the etchant. Once

ready, the PCB was cut to the proper size, and

neatly filed to give a nice uniform shape. This was

done after etching to avoid any frayed edges from

preventing a proper toner transfer during ironing. It

was then ready for drilling; there were over 700

holes that needed to be drilled on the PCB, so this

did take some time (Figures 5.16 & 5.17).

The majority of the PCB was drilled using a 0.8mm drill bit, specially designed for drilling

epoxy glass PCBs. Some of the larger holes (Figure 5.17) were marked on the PCB layout

to ensure correct drilling position. This can be seen on the full scale version of the PCB

layout [apxC]. Once fully drilled, the PCB was sprayed with a coating of SK10, a two-in-one

spray that protects the copper from corrosion, and also acts as a flux coating to make the

soldering stage easier. Once the flux spray was dry, the PCB was ready for assembly.

Figure 5.14

Figure 5.15

Figure 5.16 Figure 5.17

Page 29: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

25

5.5 Assembly

With the PCB fully drilled out and the flux spray

dried, finally the prototype begins to take shape.

Figure 5.18 shows the PCB fully assembled, and

ready for testing. There were a few difficulties with

some of the hard to reach solder joints during the

assembly stage, although most of them simply

required a little patience to properly flow the solder

onto the connection. Lead-free / non-fluxed solder

was used throughout the assembly.

The potentiometers show here (Figure 5.19) are

mounted directly to the PCB; using fibre washers

for insulation. This kind of mounting style ensures

that the potentiometers are secure enough to

withstand the kind of abuse they are likely to

receive in the lab. All of the potentiometers & rotary

switches will be cut to equal length once they are

mounted into the enclosure.

Figure 5.20 shows the underside of the PCB with

the components installed. You can clearly see the

resemblance to the 3D rendered PCB design

detailed in section 5.3, and shown in appendices

[apxE]. The completed PCB is not too bulky, and

will fit into the enclosure (see section 6) with a

reasonable amount of space for unused cables

left-over from the ATX power supply used to power

the project.

Some last-minute changes were made while

assembling the PCB. The main voltage output

fuses were supplemented instead for equivalent

value miniature circuit breakers (Figure 5.21).

While this is not essential for the prototype, these

circuit breakers offer much better short-circuit

protection than conventional fuses, and also have

the added benefit of automatically resetting shortly

after being tripped, saving the user from the hassle

of changing the fuse every time.

Figure 5.18

Figure 5.19

Figure 5.20

Figure 5.21

Page 30: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

26

Figure 5.22

Originally the plan was to use standard DIL type

sockets for all of the ICs on the PCB (as shown in

the 3D renditions), however, soldering the top-side

of these into place proved too problematic, so they

were supplemented for turned-pin type DIL & SIL

sockets; that offer enough clearance to reach

under with a small tipped soldering iron. These

changes are not included in the overall costing of

the project as they are entirely optional and used

only to make fault-finding easier during the testing

stage. The ICs can simply be soldered directly to

the board to save costs.

5.6 Testing

Figure 5.23 shows the first test of the prototype up

& running. One display is not indicated here as the

Dedicated DC Voltmeter remains unpowered until

the power switch is installed. As you can see there

is still some calibration required to get the Ammeter

& Voltmeter to read correctly, however the LED

segments are working as they should.

The frequency counter worked perfectly. As per

the coding, the display first does a quick display

check, and displays a welcome message (Figure

5.24), while the counter determines the frequency

input, before displaying the frequency on the

display.

The link-wire used here (Figure 5.24) is used to

emulate the frequency counter switch for testing

purposes (see section 10.8.5).

The resistance / capacitance substitution unit

(Figure 5.25) does not require power unless used

in parallel mode. This image shows the resistance

at its lowest setting of 1Ω with a remarkable level

of accuracy; not even 0.1Ω error, quite impressive

considering the extent of the internal wiring. It was

expected that the internal resistance might cause a

slight error with the lower resistance values, but

this is not the case.

Figure 5.23

Figure 5.24

Figure 5.25

Page 31: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

27

Figure 5.26 shows the resistance substitution set to 500kΩ, still an impressive level of

accuracy. Figure 5.27 shows the resistance substitution set to its highest setting; 999,999Ω.

Figure 5.28 shows the tri-colour power indicator LED with the unit on standby (green) and

Figure 5.29 shows the power indicator LED with the power switched on (red). As mentioned

previously in section 1.3, this is used to allow the user to rearrange cables & connections in

a safe manor, without the need to cut power to the power supply itself.

Thus far most of the prototype build seemed to be working as well as expected. Of course

the circuit designs are already proven to work, it is obligatory to check for possible problems

due to dry solder joints, short-circuits, or even just problems due to bad design of the PCB

layout. This is essentially why the prototype was built; to evaluate the feasibility of the

design, and determine whether or not it is worth pursuing further development, to produce a

marketable product that can be produced on a large scale.

Unfortunately due to time constraints during the building stage, the function generator

doesn‟t actually work correctly, which subsequently means that the frequency counter (which

works perfectly) has no input signal to measure and display. The problem is likely due to a

minor fault somewhere underneath one of the IC sockets where it is difficult to see. However

this doesn‟t matter too much at this stage, as the original prototype function generator (as

shown in section 2.6) was proven to work correctly, thus proving that the fault is not down to

a circuit design issue. The fault is to be corrected at a later date.

Figure 5.26 Figure 5.27

Figure 5.28 Figure 5.29

Page 32: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

28

6. The Enclosure

6.1 Introduction

The enclosure was designed using Autodesk‟s AutoCAD Software [18]. AutoCAD is a 3D

design & modelling suite used by professional designers worldwide. Using this software we

are able to get a realistic looking 3D representation of how the final project will look, and

gives us a unique opportunity to smooth out any design problems before manufacturing.

Low cost two-part all steel durable construction

Conforms to BS7671 regulations

6.2 The Design

The original idea for this project started out life as a few rough sketches drawn on scrap

paper as shown here (Figures 6.2 & 6.3). As such, most of the enclosure design was

thought-out very early-on. The final design for the enclosure was actually finished before the

PCB layout, and later rendered using AutoCAD.

Figure 6 Figure 6.1

Figure 6.2 Figure 6.3

Page 33: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

29

The project is enclosed in a two-part painted steel chassis, similar to many existing bench

power supplies. This provides the strength required to withstand intensive usage in a

workshop environment, and also provides the necessary conductive earth bonding required

to conform to current IET, IEEE & BS7671 wiring regulations in the UK [19].

Steel is a relatively inexpensive material to use for the prototype, so this helps keep the

overall costs down (see section 7).

6.3 CAD Modelling

There is a selection of 3D modelling software available. Some experiments were done with

SolidWorks & Google Sketch-up before making the decision to switch to AutoCAD.

Autodesk have been the leading developers of 3D modelling software for over a decade,

with over 20 years of software releases and experience, it seems like the obvious choice.

Using AutoCAD however can be demanding at times, not only is difficult to learn how to use,

but is also a very CPU intensive application. Most of the sketch work was done in 2D first

(Figure 6.4), and then rendered in a 3D conceptual view (Figure 6.5).

Figure 6.5

Figure 6.4

Page 34: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

30

Every detail was drawn-in by hand; there are no generic parts available in AutoCAD like the

ones used for POV-Ray (section 5.3). You can see here (Figure 6.6) the level of intricacy

involved in the 3D model. This is necessary to give a true representation of how the project

will look once complete. Fortunately once an object has been created it can be duplicated to

be used again later.

Here is one of the completed 4mm binding posts in an exploded view (Figure 6.7).

The final renditions were done using Autodesk Showcase [18] rather than AutoCAD itself.

Autodesk Showcase is an application solely designd to render models created using

Autodesk software, and does a fantastic job compared to AutoCAD‟s built-in rederer.

Autodesk Showcase was also used to create a high resolution demonstration video of the

completed model.

Figure 6.6

Figure 6.7

Page 35: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

31

The 3D PCB image created using POV-Ray was later added to the internal PCB of the 3D

model, as shown here (Figures 6.8 & 6.9).

The front panel, base, and back panel of the project are made from a single piece of steel

(Figure 6.10). Both the main chassis and the lid are formed in a U shape, with the top lid

forming the complete box. This makes for a nice sturdy chassis, while only requiring a total

of eight screws to remove the lid for repairs or to clean out any dust created by the power

supply‟s built-in fan. Most ATX power supplies have a 120mm top fan, so the chassis allows

for that. The chassis is also compatible with the rear fan type thanks to the additional vent

the left side of the chassis (visable in Figure 6.4).

Figure 6.8

Figure 6.9

Page 36: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

32

The power supply is mounted using three of the four available mounting holes used on all

ATX power supplies (Figure 6.11). Silicone washers can be used here to avoid the vibrations

from the power supply‟s fan motor from creating noise. The mounting brackets used are

formed of the same material as the chassis, either spot-welded, or pop-rivited in place,

depending on equipment availability. There is also an additional bracket for tying-up the left-

over power supply cables, again made from the same material as the chassis (Figure 6.11),

important to ensure the loose cables do not touch the heatsink used for the voltage

regulators (visable in Figure 5.21).

Figure 6.10

Figure 6.11

Page 37: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

33

6.4 Mechanical Data

* The depth of the chassis F includes a 5mm overhang on the front and back of the chassis

as viewable in Figure 6. The chassis depth without the lid or installed components is 170mm.

** The total depth G is the depth of the chassis with the lid installed.

*** The maximum length of the ATX power supply is determined by H (internal) minus

required space for cables & cable tie points (approx. 35mm), allowing a maximum PSU

length of 180mm / 7 inches (approx.) Standard ATX power supply length is 140mm [09].

Physical Dimensions:

A = 7mm (approx.)

B = 200mm ± 2mm

C = 8mm (approx.)

D = 260mm ± 2mm

E = 216mm (approx.)

F = 180mm ± 2mm*

G = 195mm (approx.) **

H = 215mm ± 2mm***

Page 38: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

34

7. Bill of Materials

7.1 Parts for Prototype

Rapid Order Code Part Number Quantity Product Description Unit Price Line Total Notes

Oct-24 C45 1 47nf 100v 5mm Polyester Box Capacitor £0.07 £0.07

Oct-22 C44 1 22nf 100v 5mm Polyester Box Capacitor £0.04 £0.04

Oct-20 C43 1 10nf 100v 5mm Polyester Box Capacitor £0.07 £0.07

Oct-18 C42 1 4n7 100v 5mm Polyester Box Capacitor £0.07 £0.07

Oct-14 C41 1 2n2 100v 5mm Polyester Box Capacitor £0.04 £0.04

Oct-10 C40 1 1nf 100v 5mm Polyester Box Capacitor £0.04 £0.04

11-0670 C46 1 22uf 25v 5mm Tantalum Bead Capacitor £0.36 £0.36

11-0666 C24, C25, C47 3 10uf 25v 5mm Tantalum Bead Capacitor £0.17 £0.52

11-0682 C48 1

0.47uf 35v 5mm Tantalum Bead Capacitor £0.10 £0.10

11-0688 C26, C49 2 1uf 35v 5mm Tantalum Bead Capacitor £0.10 £0.21

11-1056 C51 1

0.1uf 35v 2.5mm Tantalum Bead Capacitor £0.11 £0.11

11-1058 C50 1

0.22uf 35v 2.5mm Tantalum Bead Capacitor £0.09 £0.09

11-1060 C53 1

0.33uF 35v 2.5mm Tantalum Bead Capacitor £0.08 £0.08

63-1000

R54, R55, R64, R65, R66, R67, R68, R69, R70 9

10r Mbb0207 0.4w Precision Resistor £0.21 £1.85

63-2689

R98, R99, R100, R101, R102, R103, R104, R105, R106 9

100k Mbb0207 25ppm Precision Resistor £0.15 £1.39

63-2614

R10, R89, R90, R91, R92, R93, R94, R95, R96, R97 10

10k Mbb0207 25ppm Precision Resistor £0.15 £1.54

63-2544

R80, R81, R82, R83, R84, R85, R86, R87, R88 9

1k Mbb0207 25ppm Precision Resistor £0.15 £1.39

Page 39: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

35

63-2506

R71, R72, R73, R74, R75, R76, R77, R78, R79 9

100r Mbb0207 25ppm Precision Resistor £0.15 £1.39

26-0165 FUSEHOLDER 6 Cfh02 20mm Straight Pin Fuse Holder £0.11 £0.68

62-1981

R56, R57, R58, R59, 60, R61, R62, R63, R114 9

1r 0.25w Metal Film Resistor £0.11 £0.99

79-0200

1S, 10S, 100S, 1KS, 10KS, 100KS 6

1 Pole 12 Way PCB Rotary Switch £0.76 £4.55

79-0225 VTEST_RANGE, RANGE 2

Rotary Switch Break B4 Make 2p 6w Pcb £0.95 £1.91

79-0210 FUNCTION 1 3 Pole 4 Way PCB Rotary Switch £0.39 £0.39

65-1410 FREQUENCY, OFFSET, IREG 3

100k Eco 16mm Linear Single Control £0.81 £2.43

68-1942 THD 1 500r Wr3296w 10% 3/8 Cermet Trimmer Pot £0.26 £0.26

68-1948 T1, T2 2 50k Wr3296w 10% 3/8 Cermet Trimmer Pot £0.26 £0.51

68-1947 P4 1 25k Wr3296w 10% 3/8 Cermet Trimmer Pot £0.26 £0.26 **

68-1946 P1 P2, P3 3 10k Wr3296w 10% 3/8 Cermet Trimmer Pot £0.26 £0.77

12-0430 C1, C8, C13 3 100pf Silvered Mica Capacitor £1.17 £3.51

83-0050 IC3 1 74HC14 Hex Schmitt Trigger (dil) £0.18 £0.18

82-0064 IC5, IC6 2 Tl082 Bi-fet Dual Op AMP (st) £0.51 £1.02

82-0272 IC7 1 Lm393 Dual Comparator £0.14 £0.14

82-0098 IC9 1 L200cv 2a Adjustable Reg (vert) £1.88 £1.88

82-0458 IC10 1 Lm741 Single Op AMP Dil-8 (nsc) £0.38 £0.38

47-3296 IC12 1 L7905cv -5v 1a Voltage Regulator (st) £0.37 £0.37

82-0742 IC13, IC14, IC15 3 Icl7107cpl 3.5 Dig A/d Converter Led £2.71 £8.13

22-1750 SIL SOCKETS 12 20 Way Turned Pin Sil Header £0.34 £4.08

60-4030 K1, K2, K3 3 A5-wk 5v 2a DPDT Micro Relay £1.64 £4.92

36-0314 KK1 1 To220 Compact High Power 5.6c/w £2.34 £2.34

90-0310 Q2 1 4.0mhz Hc-49/s L/p Crystal £0.23 £0.23

81-0010 Q1, Q3, Q4, Q5, Q6, Q7 6

Bc547 Npn General Purpose Transistor £0.15 £0.89

63-0635 RN1 1 330r 4116r 8 DIL Resistor Network £0.36 £0.36

Page 40: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

36

57-0258 SEG1, SEG2 2

Kingbright CA56-11EWA 4 Digit High Efficiency Red LED Display £1.54 £3.08

57-0262 SEG3 1

Kingbright CA56-11GWA 4 Digit Green LED Display £1.44 £1.44

57-0256 SEG4 1

Kingbright CC56-12GWA 4 Digit Green LED Display £2.28 £2.28

47-3850 D16 1 Bzx55c4v7 Zener Diode 0.5w Do35 4.7v £0.02 £0.02

47-3309

D1, D3, D4, D5, D6 ,D7 ,D8, D9, D10, D11, D12, D13, D14, D15, D17 15

1n4148 75V 200mA Signal Diode (Taped) £0.01 £0.15

47-3136 D2 1 1n4004 1a 400v Silicon Rectifier Diode £0.05 £0.05

65-1442 VREG, AMPLITUDE 2

10k Eco 16mm Linear Control £1.59 £3.18

Oct-24 C3, C10, C15 3 470nf 63v Mks2 Min Poly Capacitor Case D £0.09 £0.26

Oct-20 C4, C11, C16 3 220nf 63v Mks2 Min Poly Capacitor Case B £0.10 £0.31

Oct-72 C54 1 0.22uf 100v 10% Metal. Poly Capacitor £0.02 £0.02

11-1220

C6, C7, C20, C22, C23, C30, C31, C32, C33, C35, C36, C39, C52, C55, C56, C58, C59, C60, C61, C62, C63, C64 22

10u 35v 105deg Radial Electro Capacitor £0.03 £0.70

82-0788 IC1 1 Icl7660scpaz CMOS Voltage Convertor £0.99 £0.99

11-1553 C57 1 2.2uf 50v 105deg Nrsz Electro Capacitor £0.08 £0.08

12-0422 C18, C19 2 47pf Silvered Mica Capacitor £1.06 £2.12

08-0235 C34 1 100n 5mm Ceramic Disc Capacitor £0.02 £0.02

08-0232 C5, C12, C17 3 10n 2.5mm Ceramic Capacitor £0.02 £0.07

Nov-80 C66 1 0.33uF 63v Radial Elec £0.03 £0.03

Oct-40 C29 1 1nf 100v 5mm Polyester Box Capacitor £0.05 £0.05

Oct-50 C28 1 10nf 100v 5mm Polyester Box Capacitor £0.05 £0.05

Oct-60 C27 1 100nf 63v 5mm Polyester Box Capacitor £0.05 £0.05

11-1518 C37, C38 2 1uf 50v 5mm Micromin Electro Capacitor £0.06 £0.11

Page 41: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

37

63-1464 R107 1 12k Mbb0207 0.4w Precision Resistor £0.24 £0.24

63-1250 R5, R13, R16, R18, R20, R24, 6

1k2 Mbb0207 0.4w Precision Resistor £0.21 £1.26

62-0824

R32, R39, R44, R52, R53, R109, R111, R118, R119 9

1k 0.25w Metal Film Resistor £0.11 £0.99

62-0797 R110 1 470r 0.25w Metal Film Resistor £0.11 £0.11

62-0964 R42 1 100k 0.25w Metal Film Resistor £0.11 £0.11

62-0907 R4, R8, R12 3 15k 0.25w Metal Film Resistor £0.11 £0.33

62-0997 R2, R3, R9 3 470k 0.25w Metal Film Resistor £0.11 £0.33

62-0932 R33 1 30k 0.25w Metal Film Resistor £0.11 £0.11

62-0949 R120 1 62k 0.25w Metal Film Resistor £0.11 £0.11

62-0874 R30, R31 2 6k8 0.25w Metal Film Resistor £0.11 £0.22

62-0897 R29, R35, R36, R46 4

10k 0.25w Metal Film Resistor £0.11 £0.44

62-0922 C21 1 47uf 25v Radial Electrolytic Capacitor £0.05 £0.05

62-0737 R37, R45 2 47r 0.25w Metal Film Resistor £0.11 £0.22

62-0847 R40, R41 2 2k2 0.25w Metal Film Resistor £0.11 £0.22

62-0906 R43 1 13k 0.25w Metal Film Resistor £0.11 £0.11

62-0852 R50, R51 2 2k7 0.25w Metal Film Resistor £0.11 £0.22

62-0812 R19, R21 2 680r 0.25w Metal Film Resistor £0.11 £0.22

62-0782

R11, R23, R25, R26, R27, R28, R117, R113 8

240r 0.25w Metal Film Resistor £0.11 £0.88

62-0977 R1, R7, R22 3 180k 0.25w Metal Film Resistor £0.11 £0.33

62-0862 R17 1 4k7 0.25w Metal Film Resistor £0.11 £0.11

62-0887 R38 1 3k 0.25w Metal Film Resistor £0.11 £0.11

62-0924 R15 1 24k 0.25w Metal Film Resistor £0.11 £0.11

62-0210 R112 1 0r1 Knp 5% 3w Wirewound Resistor £0.19 £0.19

62-8351 R121 1

0r1 Knp 5% 6w Wirewound Power Resistor £0.35 £0.35

Page 42: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

38

63-1756 R6, R14, R47, R48 4

1m Mbb0207 0.4w Precision Resistor £0.24 £0.96

62-0914 R49 1 18k 0.25w Metal Film Resistor £0.11 £0.11

62-8296 R108 1 15r 5W power resistor £0.13 £0.13 **

62-8256 R116 1 10R 10W power resistor £0.15 £0.15 **

63-1674 R115 1 120k Mbb0207 0.4w Precision Resistor £0.25 £0.25

16-0081 AF, FM, OUT, TTL 4

Vertical Screened BNC Socket £1.48 £5.92

47-3296 IC12 1 L7905cv -5v 1a Voltage Regulator (st) £0.41 £0.41

22-1720 8WAY DIL SOCKET 5

8 Pin 0.3in Turned Pin Socket £0.17 £0.85

22-1721 14WAY DIL SOCKET 1

14 Pin 0.3in Turned Pin Socket £0.44 £0.44

22-1722 16WAY DIL SOCKET 1

16 Pin 0.3in Turned Pin Socket £0.48 £0.48

22-1726 28WAY DIL SOCKET 1

28 Pin 0.3in Turned Pin Socket £0.55 £0.55

10-0907 C2, C9, C14 3 100n 100v Mylar Film Capacitor Case E £0.05 £0.14

19-0500 JP2 1 10 Way Straight Boxed Header £0.37 £0.37

26-1096 F1, F2, F3 3 2A 20x5mm Quickblow Glass Fuse £0.09 £0.27

26-1012 F6 1 315ma 20x5mm Quickblow Glass Fuse £0.17 £0.17

26-1084 F4, F5 2 500ma 20x5mm Quickblow Glass Fuse £0.09 £0.18

34-0845 PCB 1 203 X 305 Ds Fibre Glass Board £3.40 £3.40

22-3782 5566-4 1 4way Molex socket £0.21 £0.21

55-0150 LED1, LED2, LED3 3 3mm red diffused LED £0.05 £0.15

55-0105 LED4 1 3mm green diffused LED £0.07 £0.07 **

22-0500 JP1, JP2 2 3way SIL header £0.03 £0.06

22-0690 JP1, JP2 2 Closed jumper link £0.07 £0.14

47-3280 IC11 1 78L12 100mA 12v regulator £0.30 £0.30

RS Order Code Part Number Quantity Product Description Unit Price Line Total Notes

686-6027 IC4 1 XR2206 £3.09 £3.09

715-3956 IC2 1 ATMEGA8 £2.22 £2.22

670-5805 MOLEX24 1 24way Molex socket £1.42 £1.42

670-4250 MOLEX4 1 4way Molex socket £0.06 £0.06

522-8124 IC8 1 AD817 £3.92 £3.92

Page 43: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

39

7.2 Parts for Enclosure

RS Order Code Part Number Quantity Product Description Unit Price Line Total Notes

588-724 N/A 1 220x130mm Red Display Filter £2.87 £2.87 *

Rapid Order Code Part Number Quantity Product Description Unit Price Line Total Notes

31-0555 N/A 4 19.0 X 8.0mm Black Cabinet Feet £0.08 £0.32

23-0100 N/A 1 4.8mm Iec Chassis Plug £0.41 £0.41

75-0180 N/A 3 Spst Standard Toggle Switch £0.49 £1.48

55-0265 N/A 1 Kingbright 5mm LED Recessed Bezel Clip £0.23 £0.23

17-2696 N/A 1 4mm Test Terminal Black £0.30 £0.30

17-2698 N/A 3 4mm Test Terminal Red £0.30 £0.89

17-1446 N/A 2 Grey 4mm Safety Socket 3270 Series £0.83 £1.66

17-1434 N/A 2 Green 4mm Safety Socket 3270 Series £0.83 £1.66

31-0880 N/A 1 Strap Handle with Insert Need 31-0882 £0.37 £0.37

31-0882 N/A 1 Metal Ends for 31-0880 (Pair) £0.50 £0.50

57-2264 N/A 1 220x130mm Green Display Filter £1.65 £1.65 *

32-0300 N/A 9 24mm (6.35mm) Matt Black Cont. Knob £0.41 £3.69

32-0280 N/A 5 24.0mm (6mm) Matt Black Cont. Knob £0.42 £2.10

55-0170 N/A 1

Kingbright L-59EGW 5mm Red /green LED Tri-colour LED £0.13 £0.13

75-0060 N/A 1 2 Spst On-Off rocker switch panel square £0.53 £0.53

Miscellaneous Part Number Quantity Product Description Unit Price Line Total Notes

N/A Steel Chassis 1

1000x1000mm x 1mm Mild Steel Sheet - www.themetalstore.co.uk £3.29 £3.29 *

N/A Steel Chassis Lid 1

1000x1000mm x 1mm Mild Steel Sheet - www.themetalstore.co.uk £2.20 £2.20 *

Gross Total £122.70

VAT @20% £24.54

NET Total £147.24

* Price per pre-cut piece

** Part not available, alternative used (see Order Code)

Page 44: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

40

8. Marketing & Proposed Retail Price

8.1 Market Comparison

The Multi-Function Bench Power Supply is four bench devices combined into one low cost

unit, the idea being make such devices accessible to students or people with a low budget

for bench equipment. To give an idea of the value of this prototype product, several similar

products are compared below.

Cost Each

(Inc. VAT)

Benefits Compared to

Prototype

Drawbacks Compared

to Prototype

Total Cost

(Inc. VAT)

Single Output

Bench PSU -

Rapid Order Code:

85-1808

£150.0 Supports up to 18V.

Only single voltage rail.

Very large size.

Heavy.

£368.75

UNI-T UTG9002C

2MHz Function

Generator -

Rapid Order Code:

85-4049

£131.63 Supports up to 2MHz.

Supports ramp/pulse.

Greater sine wave

distortion (see specs).

Very large size.

Heavy, weighs 3kg.

Digital Multimeter -

Rapid Order Code:

85-0719

£12.29 Cheap.

Small. Very unreliable.

Resistance

Substitution Box -

Rapid Order Code:

85-1502

£74.83 Small.

Less accurate.

Does not offer

capacitance

substitution.

Multi-Function

Bench Power

Supply

£180.0 + ATX power supply for £11.98 £191.98

At almost half the cost of current equipment on the market, and with some additional

benefits, it‟s clear why the Multi-Function Bench Power Supply was chosen as a project.

Although cost is not the only benefit of this prototype unit, the combined features of this

project could replace existing equipment, and require less space for storage.

The products listed above have been selected based on their similarities to the Multi-

Function Bench Power Supply. The power supply chosen has many similar features,

although it only has two voltage rails (dual supply), whereas the Multi-Function Bench Power

Supply has a total of five voltage rails, including one adjustable rail, with the possibility of

adding another +3.3V rail (see section 1.5).

Page 45: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

41

While there are some features that this project lacks compared to the products listed above,

this could be significantly improved with further development. The prototype is already a

versatile bench multi-tool, however with some of the improvements detailed previously in this

report, it has the potential to be a whole lot more, with negligible effect on the overall costing;

considering the market value of such a versatile product.

It‟s a no-brainer, how much would you pay for a device that does everything you need in

one? Okay, so it‟s a long way from competing with high-end bench equipment, but it does

offer what most products of this type don‟t; low build cost, meaning a low retail price,

meaning more sales.

8.2 Proposed Retail Price

As detailed previously (section 7.2) the gross total of the prototype came to £122.70

including the enclosure. At this price the product could be retailed for £150 + 20% VAT at

£30, giving a total retail price of £180. Bearing in-mind that this price is based on the cost of

a single unit, not bulk pricing. The proposed retail price of £150 (excl. VAT) - £122.70 (Gross

Cost) = £27.30 profit per unit.

The gross profit margin is determined by this formula:

This is a very good profit margin; well above average for commercial products of this type.

The proposed retail price demonstrates the great value for money based on the comparison

in section 8.1, although the gross cost could be significantly reduced if the units were to be

produced in a large enough quantity. The prices listed in section 7 are for individual parts,

bulk pricing would be cheaper by far. Bringing the gross costs down means the product can

be sold for even less, making it more popular, and encouraging more sales.

It is difficult at this stage to determine the exact bulk costing without finalising the design,

fixing all the bugs with the PCB layout, and further developing the product to be sold to the

mass market. However we can arbitrarily suggest a bulk costing.

Let‟s say for example that a retailer offers these same parts at 10% less than what is listed in

section 7; with the agreement of complete exclusivity with them. This would bring the gross

total down to £110.43, at the same retail price of £150 (excl. VAT); this would mean a gross

profit margin of 35.8% or £39.57 profit per unit, a significant increase. This kind of

arrangement with retailers is quite common, as it benefits both parties. Of course rather than

increasing the profit margin, the retail price could simply be reduced to represent the change

in build costs.

A retail price of £130 (£156 inc. VAT) with the 10% saving on build costs mentioned above

would bring the gross profit down to £19.57, with a gross profit margin of 17.7% for each unit

sold. This is a fairly good representation of the actual market value of the Multi-Function

Bench Power Supply (the current version anyway), if sold in bulk.

Page 46: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

42

9. Project Schedule

A project of this scale requires good organisation and time management. To help with this, a

schedule was created to ensure the project was kept on track during each stage (Figure 9).

This Gantt chart was changed periodically throughout the project to include additional details

and initially unforeseen delays with each stage of the project. An example of this is the

decision to manufacture the PCB in-house half way through the project (see section 5.2).

The majority of the project was kept on

schedule, with exception to prolonged

delays waiting for parts to arrive. The

PCB manufacturing stage took a little

longer than originally planned, causing

a shortage of time towards the final

stages of the build. For this reason

unfortunately there was not enough time

to manufacture the enclosure for the

project, although this is not too much an

issue as the key objective here was to

produce a working prototype of the

project and that has been achieved.

The enclosure will be completed at the

next opportunity to finish the project,

and make use of the prototype, rather

than letting it go to waste.

Larger versions of these charts are attached in appendices [apxA].

Figure 9

Figure 9.1

Page 47: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

43

10. Separated Schematics

10.1 Power Switch / LED

10.2 Adjustable Voltage / Current Power Supply

Page 48: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

44

10.3 Voltage Outputs / Fuses

10.4 Resistance / Capacitance Substitution

Page 49: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

45

10.5 Voltmeter for Adjustable Power Supply

Page 50: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

46

10.6 Ammeter for Power Supply

Application Note: This ammeter MUST be used to measure the „low-side‟ current, as IN_LO

is connected to Gnd via R121. This gives the added benefit of measuring all of the voltage

rails (referenced to Gnd) simultaneously, not just the +REG adjustable rail. The POL

(polarity) output is unused here to enable „low-side‟ current measurements.

Page 51: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

47

10.7 Dedicated DC Voltmeter

Page 52: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

48

10.8.1 Function Generator

10.8.2 Offset Control

Page 53: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

49

10.8.3 Final Amplifier

10.8.4 Clipping Detection

Page 54: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

50

10.8.5 Frequency Counter

Page 55: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

51

Discussion

There were many changes to the project throughout its life, most serve to provide better

features, reduced cost, and improved design layout. One key factor is the rather unusual

power supply used in the design. As with any bench equipment, domestic or industrial

appliance, there are regulations specifying the minimum safety requirements, and required

component selection to be used in products that are to be sold to a mass market. This is

particularly important for products to be sold internationally, as many countries have their

own set of regulations that must be adhered too before the product can be sold there. This

project utilises power from bought-in ATX power supplies used in desktop computers. This is

a huge advantage for the Multi-Function Bench Power Supply project, as those power

supplies are standard throughout the world, and are supplied as sealed units, with all of the

safety requirements already met.

With sealed ATX power supplies used for power, the project design is not liable to any of the

regulations related to AC mains safety (other than basic grounding of the steel chassis). As

far as the regulations are concerned, this product only ever uses low-voltage DC, which has

very few regulatory requirements compared to AC mains.

Much of the project involved using hardware based components, which are expensive, and

consume a lot of board space. With further development, most of the features of the project

could be implemented with programmable ICs, saving on cost, board space, and offering the

additional bonus of being able to update and improve the code at a later date. This also

opens up the door for improved graphical displays, such as LCDs (Liquid Crystal Displays),

as opposed to the basic LED segment displays used currently.

There are several opportunities for modifying the project design, without the need to re-

design the PCB. This is due to the fact that each part of the design is independent; meaning

any of the features can simply be left-out of the design. This can serve a dual purpose, not

only does it leave the door open to scrap any of the features in favour of reducing cost, but

also creates a unique opportunity to market the product with alternative versions. A cheaper

model for example might not have the function generator installed, saving a significant

amount of the build costs, allowing the product to be sold to a much wider market. This also

allows the customers to choose the right version for their needs, increasing sales potential.

Page 56: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

52

Conclusion

The Multi-Function Bench Power Supply project was a success. All of the primary aims and

objectives were met (although some parts of the final prototype didn‟t work), the circuit

designs are tested & proven, and the primary project goal (as laid out in the abstract) to

determine the feasibility as a marketable product design was demonstrated. During the life of

the project, many great ideas were thought-up that could significantly improve the product, in

terms of better features, and also reduced cost. While it is too late to include these

improvements in the prototype, there is clearly potential for further development in the future.

The primary objective of the project was to produce four fundamental bench devices

combined into a single, low cost, compact unit for use in laboratories; a working power

supply, function generator with frequency counter, DC voltmeter, and a resistance /

capacitance substitution unit. All of these primary objectives were met.

The secondary objective to build a prototype enclosure for the project was not reached due

to time constraints. However a completed design specification and technical drawings are

included, that will allow the enclosure to be manufactured at a later date.

Based on a market analysis, the prototype was compared to competing products. The

costing and marketing value proves to be quite promising. Not only is it cheaper than similar

products, but offers many unique features that even leading competitors do not. While there

are inherent operational limitations due to the rudimentary design of the project, the

implementation is cheap, and the parts used are widely available.

This is only a prototype; there is defiantly room for improvement. However, this project has

demonstrated that it is entirely feasible as a marketable product, and permits further

development.

Page 57: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

53

References

[01] Carl J. Bergquist (Nov. 1996) “Using the 7107” – Electronics Now, pp. 55-79.

[02] Intersil (2005) “

Digit LCD/LED Display, A/D Convertors” – Data sheet FN3082.8

[03] Exar (1997) “XR-2206 Monolithic Function Generator” – Data Sheet (Rev. 1.04)

[04] Exar (1997) “High-Quality Function Generator System with the XR-2206”

[05] Analogue Devices (1995) “AD817 High Speed Wide Supply Range Amplifier” – Data sheet

[06] RVFM “Rotary Switch” – Data Sheet

[07] Intel (2005) “ATX12V Power Supply Design Guide Rev 2.2”

[08] Intel (2007) “Power Supply Design Guide for Desktop Platform Form Factors”

[09] Intel (2008) “Power Supply Design Guide for Desktop Platform Form Factors Rev 1.2”

[10] www.desmith.net “ANSI PCB Trace Width Calculations” (accessed 15th March 2012)

[11] www.changpuak.ch “Homebrew Function Generator with XR-2206” (accessed 11th Nov 2011)

[12] www.jumperone.com – PSU Images Figure 1 & Figure 1.1 (accessed 15th March 2012)

[13] Fujitsu (2003) “Miniature Relay 2 Poles - 1 to 2A For Signal Switching” – Data sheet

[14] www.cadsoftusa.com – CadSoft Eagle Software

[15] www.povray.org – POV-Ray Software

[16] www.matwei.de – Eagle3D Add-on for Eagle CAD

[17] www.techniks.com – Press-N-Peel Blue Transfer Film

[18] www.autodesk.co.uk – Autodesk Software

[19] www.theiet.org, www.hse.gov.uk – 17th Edition Wiring Regulations UK

[20] TelCom Semiconductor, Inc. “

Digit A/D Converters” - Application Note

[21] Kontakt-chemie – Flux SK10 Spray

Page 58: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

54

Appendices

[apxA] Project Shedule Enlarged

Page 59: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

55

[apxB] Frequency Counter AVR Code

/***************************************************** Project : MULTI-FUNCTION BENCH POWER SUPPLY Version : 001 Date : 28.11.2011 Author : Daniel K. Jones Company : Bangor University UK This code was developed using CVAVR v2.03.4 Chip type : ATmega8 Program type : Application AVR Core Clock frequency: 4.000000 MHz Memory model : Small External RAM size : 0 Data Stack size : 256 *****************************************************/ #include <mega8.h> #include <delay.h> #include <stdio.h> #include <math.h> unsigned long int overrun; unsigned int loop; #define Hz PORTB.2 #define kHz PORTB.1 #define SEGMENT_A PORTC.5 #define SEGMENT_B PORTC.3 #define SEGMENT_C PORTC.1 #define SEGMENT_D PORTD.0 #define SEGMENT_E PORTD.1 #define SEGMENT_F PORTC.4 #define SEGMENT_G PORTC.2 #define SEGMENT_DP PORTC.0 #define NUM1 PORTB.0 #define NUM2 PORTD.7 #define NUM3 PORTD.6 #define NUM4 PORTD.5 unsigned char digit; // selects number of display 1,2,3,4 unsigned int time;

Page 60: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

56

unsigned char decimal; // position of decimal point 1,2,3,4 unsigned char number[5]; // holds the digits unsigned long int inpulse; unsigned long int frequency; float freq; unsigned char next; bit pwr_on = 1; // External Interrupt 0 service routine interrupt [EXT_INT0] void ext_int0_isr(void) // Leave clear // Timer 0 overflow interrupt service routine interrupt [TIM0_OVF] void timer0_ovf_isr(void) // INCREMENT COUNTER :-) overrun++; // Timer1 output compare A interrupt service routine interrupt [TIM1_COMPA] void timer1_compa_isr(void) // set next compare value ( 500 * 1/500kHz = 1 ms) OCR1A = OCR1A + 500; // proceed to next digit digit++; if (digit > 4) digit = 1;; // New measurement time ... after 400 x 1 ms = 400 ms time++; if (time >= 250) inpulse = 256 * overrun + TCNT0; TCNT0=0; frequency = 1 * inpulse;

Page 61: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

57

if ((frequency >= 1)&&(frequency < 10)) freq = frequency * 1000; decimal=1; Hz=1; kHz=0; ; if ((frequency >= 10)&&(frequency < 100)) freq = frequency * 100; decimal=2; Hz=1; kHz=0; ; if ((frequency >= 100)&&(frequency < 1000)) freq = frequency * 10; decimal=3; Hz=1; kHz=0; ; if ((frequency >= 1000)&&(frequency < 10000)) freq = frequency ; decimal=1; Hz=0; kHz=1; ; if ((frequency >= 10000)&&(frequency < 100000)) freq = frequency / 10; decimal=2; Hz=0; kHz=1; ; if (frequency >= 100000) freq = frequency / 100; decimal=3; Hz=0; kHz=1; ; number[1]=floor(freq/1000); freq=freq-1000*number[1]; number[2]=floor(freq/100); freq=freq-100*number[2]; number[3]=floor(freq/10); freq=freq-10*number[3]; number[4]=floor(freq); overrun = 0; time=0; ; // FUNCTIONS void welcome (void) SEGMENT_A=0;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=0;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=1; // H NUM4=0; NUM1=1; delay_ms(1); SEGMENT_A=1;SEGMENT_B=0;SEGMENT_C=0;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=1; // E NUM1=0; NUM2=1; delay_ms(1); SEGMENT_A=0;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=0;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=0; // ll NUM3=1;

Page 62: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

58

NUM2=0; delay_ms(1); SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=0; // O NUM4=1; NUM3=0; delay_ms(1); NUM4=0; ; void displaytest (void) SEGMENT_DP=1; Hz=1; kHz=1; SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=1; // 8 NUM4=0; NUM1=1; delay_ms(80); NUM1=0; NUM2=1; delay_ms(80); NUM3=1; NUM2=0; delay_ms(80); NUM4=1; NUM3=0; delay_ms(80); NUM4=0; Hz=0; kHz=0; SEGMENT_DP=0; ; void output (unsigned char DIGITNUM)

Page 63: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

59

if (DIGITNUM == 0 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=0; ; if (DIGITNUM == 1 ) SEGMENT_A=0;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=0;SEGMENT_E=0;SEGMENT_F=0;SEGMENT_G=0; ; if (DIGITNUM == 2 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=0;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=0;SEGMENT_G=1; ; if (DIGITNUM == 3 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=0;SEGMENT_F=0;SEGMENT_G=1; ; if (DIGITNUM == 4 ) SEGMENT_A=0;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=0;SEGMENT_E=0;SEGMENT_F=1;SEGMENT_G=1; ; if (DIGITNUM == 5 ) SEGMENT_A=1;SEGMENT_B=0;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=0;SEGMENT_F=1;SEGMENT_G=1; ; if (DIGITNUM == 6 ) SEGMENT_A=1;SEGMENT_B=0;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=1; ; if (DIGITNUM == 7 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=0;SEGMENT_E=0;SEGMENT_F=0;SEGMENT_G=0; ; if (DIGITNUM == 8 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=1;SEGMENT_F=1;SEGMENT_G=1; ; if (DIGITNUM == 9 ) SEGMENT_A=1;SEGMENT_B=1;SEGMENT_C=1;SEGMENT_D=1;SEGMENT_E=0;SEGMENT_F=1;SEGMENT_G=1; ; ; void on (unsigned char digit) if (digit == 1 ) NUM1=1;NUM2=0;NUM3=0;NUM4=0; ; if (digit == 2 ) NUM1=0;NUM2=1;NUM3=0;NUM4=0; ; if (digit == 3 ) NUM1=0;NUM2=0;NUM3=1;NUM4=0; ; if (digit == 4 ) NUM1=0;NUM2=0;NUM3=0;NUM4=1; ; ; void off (void) NUM1=0; NUM2=0; NUM3=0; NUM4=0; ;

Page 64: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

60

void main(void) // Input/Output Ports initialization // Port B initialization // Func7=In Func6=In Func5=In Func4=In Func3=In Func2=Out Func1=Out Func0=Out // State7=T State6=T State5=T State4=T State3=T State2=0 State1=0 State0=0 PORTB=0x00; DDRB=0x07; // Port C initialization // Func6=In Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State6=T State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTC=0x00; DDRC=0x3F; // Port D initialization // Func7=Out Func6=Out Func5=Out Func4=In Func3=In Func2=In Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=T State3=T State2=T State1=0 State0=0 PORTD=0x00; DDRD=0xE3; // Timer/Counter 0 initialization // Clock source: T0 pin Rising Edge TCCR0=0x07; TCNT0=0x00; // Timer/Counter 1 initialization // Clock source: System Clock // Clock value: 500.000 kHz // Mode: Normal top=FFFFh // OC1A output: Discon. // OC1B output: Discon. // Noise Canceler: Off // Input Capture on Falling Edge // Timer1 Overflow Interrupt: Off // Input Capture Interrupt: Off // Compare A Match Interrupt: On // Compare B Match Interrupt: Off TCCR1A=0x00; TCCR1B=0x02; TCNT1H=0x00; TCNT1L=0x00; ICR1H=0x00; ICR1L=0x00; OCR1AH=0x09; OCR1AL=0xC4; OCR1BH=0x00; OCR1BL=0x00; // Timer/Counter 2 initialization // Clock source: System Clock

Page 65: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

61

// Clock value: Timer2 Stopped // Mode: Normal top=FFh // OC2 output: Disconnected ASSR=0x00; TCCR2=0x00; TCNT2=0x00; OCR2=0x00; // External Interrupt(s) initialization // INT0: On // INT0 Mode: Rising Edge // INT1: Off // GICR|=0x40; // MCUCR=0x03; // GIFR=0x40; MCUCR=0x00; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x11; // Analog Comparator initialization // Analog Comparator: Off // Analog Comparator Input Capture by Timer/Counter 1: Off ACSR=0x80; SFIOR=0x00; // Global enable interrupts #asm("sei") // DISPLAYTEST loop=0; while (loop < 1) displaytest(); loop++; ; // HELLO loop=0; while (loop < 180) welcome(); loop++; ;

Page 66: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

62

delay_ms(50); // Final delay before starting frequency counter number[0]=0; number[1]=0; number[2]=0; number[3]=0; number[4]=0; while (pwr_on) // Start-up cycle output(number[digit]); on(digit); SEGMENT_DP=0; if (decimal == digit) SEGMENT_DP=1;; ;

[end apxB]

[apxC] PCB Transfer Images

These images (subsequent pages) can be photocopied and used to re-create the prototype

PCB. Note: these images must be mirrored (reversed) when printed.

Page 67: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

63

Page 68: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

64

Page 69: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

65

[apxD] PCB Layout Multi-Layered

[apxD

] P

CB

Layout

Multi-

Layere

d

Page 70: Multi-Function Bench Power Supply Files/Multi-Function... · replace a faulty power supply without the need to de-solder any wires or ... The example ATX power supply listed in section

MULTI-FUNCTION BENCH POWER SUPPLY

66

[apxE] PCB Renditions