CURRENT ISSUE

Contests

bottom corner

Feature Article



Issue #206 September 2007
Smart Power
An Intelligent Power Supply for Embedded Systems
by Alexander Popov & Jordan Popov

Start | Hardware | Software | Calibration | Voltage Presets | Slowly Rising Voltage | Slowly Falling Voltage | Short Time Test | Periodcal Linear Voltage | Periodical Voltage Drops | Future Development | Sources & PDF

CALIBRATION

The power supply needs to be calibrated to be as accurate and useful as a test device. Calibration involves hardware and software, and it requires a few cycles of recompiling and reprogramming the Butterfly. This is needed only once after assembly. The voltage reference is stable enough in both temperature and time, and no drift is expected.

Don’t connect the Butterfly before checking if everything is properly wired and behaving normally in the rest of the circuit. The first step after checking the circuit is to power it on and measure the voltages VPLUS (12 V), VMINUS (–5 V), VCC (3.3 V), VREF (1.28 V), and VM256 (–2.56 V). The values may be somewhere near these. There is no need to be exact. Next, measure the reference voltage VREF and adjust it to exactly 1.28 V with the trimmer R19. After turning off the power, connect the Butterfly with the three connectors to the other part of the schematic. Then turn on the power.

Next, you must set the default values in the corresponding files for a few constants. In the file DAC.h :

#define V2CODECONST (200.0)

In the file ADC.h :

#define CODE2CURCONST (2.5e-3)
/* current in amperes */
#define CURCODEOFFSET 0           

After compiling the code and flashing the Butterfly, the output voltage should be set to zero via the menu system. With the trimmer R20, the output voltage should be adjusted to 0 V.

To calculate V2CODECONST (the code value for VOUT = 1 V), enter some voltage VSET (e.g., 4 V). Measure VOUT and calculate the real constant:

[1]

With an open circuit for the output (zero-current consumption), let the device display the current and write it down (I0DISP). Calculate the CURCODE OFFSET as follows:

[2]

The next step is to program the Butterfly with the new constants. To calculate the CODE2CURCONST value, set a predefined voltage VSET (e.g., 5 V) and connect a known accurate resistor RLOAD with enough power and with a value of about 47 W (to sink about 100 mA of current). Check the displayed value on the LCD (IDISP). The constant can be calculated as follows:

[3]

Change this constant in the ADC.h file and recompile the program, then flash the AVR. The calibration is done!

Previous | Next


bottom corner