2 * Hardware settings for the digital dc power supply
3 * http://www.tuxgraphics.org/electronics/
5 * In this file you can:
6 * - calibrate the ampere and voltmeter
7 * - choose your hardware type: 22V 2.5A or 30V 2.0A
9 * The ADC has a resolution of 11 bit = values from 0-2047
15 /* ================= uncomment this section for the model 22V 2.5A */
20 // internal adc ref voltage (should be 2.56V, can vary from uC to uC)
23 // the divider R3/R4 [(R3+R4)/R4] (calibrate the voltmeter, lower value=higher output)
24 #define U_DIVIDER 10.75
26 // the shunt for current measurement, you can calibrate here the
29 #define I_RESISTOR 0.79
30 // short circuit protection limit (do not change unless you know what you do):
31 // 850=2.85A= (2.85A * 1023 * 0.75 / 2.56 )
32 #define SH_CIR_PROT 850
34 /* ================= uncomment this section for the model 30V 2.0A */
40 // internal adc ref voltage (should be 2.56V, can vary from uC to uC)
41 //#define ADC_REF 2.56
43 // the divider R3/R4 [(R3+R4)/R4], you can calibrate here the voltmeter:
44 //#define U_DIVIDER 13.24
46 // the shunt for current measurement, you can calibrate here the
49 //#define I_RESISTOR 0.78
51 // short circuit protection limit (do not change unless you know what you do):
52 // 690=2.30A= (2.30A * 1023 * 0.75 / 2.56 )
53 //#define SH_CIR_PROT 690