# Scale Designer

February 2019

In the era of digital scales it may look not to too interesting to create scales for classical measuring devices, potentiometers, tuning condensers... Answer depends, obviously, on design we are working on.

When finishing laboratory power supply it was necessary to solve following problems:

• modify uA-meter scale from 10-segments to 15-segments (15 V/1,5 A)
• create scale 0..1,5 A for maximum current potentiometer
• create scale 0..15 V for output voltage potentiometer

I decided to create scale designing program, print scale using laser printer and glue it on the front panel.

Program was created using Delphi/Lazarus and it is quite universal. Except of linear scales it allows to print also scales completely defined manually, which is applicable for nonlinear scales.

## Program

To understand what program is doing let's clarify a few things.

Scale:

• is a rectangle containing also core of the scale, in case it is required smaller scale unused parts are cut off
• has a centre - it is where axis of measuring device or potentiometer is
• has a radius - from centre to pointer of measuring device or potentiometer knob
• scale segments can be of different kinds - normal, main and small - and they differ in length and thickness
• "main" segments are first and last on the scale and optionally each Xth, for example 5
• can have an optional arch,
• arch can be optionally doubled
• it has left and right angle - angles are defined the classical way like in geometry - right side is 0°,left side is 180°, top is 90° and bottom is 270°, but in case of angle from 4th quadrant, for example 315° we take -45°
• doesn't contain descriptors - it is difficult to design - it has to be done manually using graphical editor
• is generated as BMP picture in 600 dpi, what means 600 pixels per inch, some dimensions are defined in pixels, another ones in mm. 600 dpi can be changed in the Ini file to 300 dpi, less is not suggested due to low quality of final picture.

## Main Screen

Main Screen consists of following parts:

Three frames in upper part:

• Dimensions - width and height of the scale in mm.
• Angles - left and right angle in degrees
• Centre - X and Y in mm. They must be inside of picture.

Frame in the middle - Scale:

• Number of segments - regarding "normal" and "main" (included)
• Segment length - in mm - "main" segment is two times longer and two times broader
• Radius - where segments start, in mm
• Main segment - each xth - if not required, set to "0"
• Doubled arch - if doubled arch is required
• Small half sized - if small segments are required also
• Frame - frame around the scale
• Flip horizontally - in case final scale has to be flipped horizontally
• Segment thickness - in pixels, not in mm - thickness of "normal" segment
• Arch thickness - also in pixels
• Line thickness - regarding frame, in pixels
• Core radius - radius of black circle in the centre, in mm.

Bottom row - three push buttons:

• Manual definition - it opens possibility to enter manually defined scale or load already prepared definition. If "No" will be selected in the popup dialog "Would you like to create new definition?" then dialog to open existing text file (*.txt) will popup, if "Yes" will be selected, then editor window will popup:
Angle is entered in degrees, type is entered according following key: "n" = normal, "m" = main, "s" = small (half sized). Definition file is standard text (in reality it is so called CSV data file in which items - angle and type - are separated by comma), this means, that it is not necessary to use program to create the definition, it can be created using any standard text editor, care must be taken to retain it in pure text format (ASCII).
• Save Scale - is opening standard picture saving dialog screen to save scale as BMP picture, it expect to enter file name.
• Close to end program.

## Scale examples

Example of change of linear potentiometer using additional resistor can be found here.

## Summary

This program allows to design practically any kind of scale. Missing part is descriptors, which was excluded by purpose, because of result quality. It should be done using standard graphical editor. Simple programs like MS Paint don't allow text rotation, but all better programs are doing it easily, so final scale can look exactly as required.