tweak voltage divider for my config
[digitaldcpower] / hardware_settings.h-22V
1 /*
2  * Hardware settings for the digital dc power supply
3  * http://www.tuxgraphics.org/electronics/
4  *
5  * In this file you can:
6  * - calibrate the ampere and voltmeter
7  * - choose your hardware type: 22V 2.5A or 30V 2.0A
8  *
9  *   The ADC has a resolution of 11 bit = values from 0-2047
10  */
11 #ifndef CAL_HW_H
12 #define CAL_HW_H
13
14
15 /* ================= uncomment this section for the model 22V 2.5A */
16
17 #define U_MAX 220
18 #define I_MAX 250
19
20 // internal adc ref voltage (should be 2.56V, can vary from uC to uC)
21 #define ADC_REF 2.56
22
23 // the divider R3/R4 [(R3+R4)/R4] (calibrate the voltmeter, lower value=higher output)
24 #define U_DIVIDER 10.75
25
26 // the shunt for current measurement, you can calibrate here the 
27 // amperemeter.
28 // 2*1.5Ohm 3W=0.75:
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
33
34 /* ================= uncomment this section for the model 30V 2.0A */
35
36
37 //#define U_MAX 300
38 //#define I_MAX 200
39
40 // internal adc ref voltage (should be 2.56V, can vary from uC to uC)
41 //#define ADC_REF 2.56
42
43 // the divider R3/R4 [(R3+R4)/R4], you can calibrate here the voltmeter:
44 //#define U_DIVIDER 13.24
45
46 // the shunt for current measurement, you can calibrate here the 
47 // amperemeter.
48 // 2*1.5Ohm 3W=0.75:
49 //#define I_RESISTOR 0.78
50
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
54
55 #endif //CAL_HW_H
56