-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReflowWizard.h
More file actions
77 lines (62 loc) · 4.6 KB
/
Copy pathReflowWizard.h
File metadata and controls
77 lines (62 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Include file for the Reflow Wizard
#ifndef REFLOW_WIZARD_H
#define REFLOW_WIZARD_H
// Main menu modes
#define MODE_TESTING 0
#define MODE_CONFIG 1
#define MODE_REFLOW 2
#define NO_OF_MODES 3
#define NEXT_MODE false
// Output type
#define TYPE_UNUSED 0
#define TYPE_TOP_ELEMENT 1
#define TYPE_BOTTOM_ELEMENT 2
#define TYPE_BOOST_ELEMENT 3
#define TYPE_CONVECTION_FAN 4
#define NO_OF_TYPES 5
const char *outputDescription[NO_OF_TYPES] = {"Unused", "Top", "Bottom", "Boost", "Fan"};
// Phases of reflow
#define PHASE_INIT 0 // Variable initialization
#define PHASE_PRESOAK 1 // Pre-soak rapidly gets the oven to around 150C
#define PHASE_SOAK 2 // Soak brings the PCB and components to the same (high) temperature
#define PHASE_REFLOW 3 // Reflow melts the solder
#define PHASE_WAITING 4 // After reaching max temperature, wait a bit for heat to permeate and start cooling
#define PHASE_COOLING_BOARDS_IN 5 // The oven door should be open and the boards remain in until components definitely won't move
#define PHASE_COOLING_BOARDS_OUT 6 // Boards can be removed. Remain in this state until another reflow can be started at 50C
#define PHASE_ABORT_REFLOW 7 // The reflow was aborted or completed.
const char *phaseDescription[] = {"", "Presoak", "Soak", "Reflow", "Waiting", "Cooling", "Cool - open door", "Abort"};
// Tunes used to indication various actions or status
#define TUNE_STARTUP 0
#define TUNE_TOP_BUTTON_PRESS 1
#define TUNE_BOTTOM_BUTTON_PRESS 2
#define TUNE_REFLOW_DONE 3
#define TUNE_REMOVE_BOARDS 4
#define MAX_TUNES 5
// EEPROM settings
// Remember that EEPROM initializes to 0xFF after flashing the bootloader
#define SETTING_EEPROM_NEEDS_INIT 0 // EEPROM will be initialized to 0 at first run
#define SETTING_D4_TYPE 1 // Element type controlled by D4 (or fan, unused)
#define SETTING_D5_TYPE 2 // Element type controlled by D5 (or fan, unused)
#define SETTING_D6_TYPE 3 // Element type controlled by D6 (or fan, unused)
#define SETTING_D7_TYPE 4 // Element type controlled by D7 (or fan, unused)
#define SETTING_MAX_TEMPERATURE 5 // Maximum oven temperature. Relow curve will be based on this (stored temp is offset by 150 degrees)
#define SETTING_SETTINGS_CHANGED 6 // Settings have changed. Relearn duty cycles
// Learned settings
#define SETTING_LEARNING_MODE 10 // ControLeo is learning oven response and will make adjustments
#define SETTING_PRESOAK_D4_DUTY_CYCLE 11 // Duty cycle (0-100) that D4 must be used during presoak
#define SETTING_PRESOAK_D5_DUTY_CYCLE 12 // Duty cycle (0-100) that D5 must be used during presoak
#define SETTING_PRESOAK_D6_DUTY_CYCLE 13 // Duty cycle (0-100) that D6 must be used during presoak
#define SETTING_PRESOAK_D7_DUTY_CYCLE 14 // Duty cycle (0-100) that D7 must be used during presoak
#define SETTING_SOAK_D4_DUTY_CYCLE 15 // Duty cycle (0-100) that D4 must be used during soak
#define SETTING_SOAK_D5_DUTY_CYCLE 16 // Duty cycle (0-100) that D5 must be used during soak
#define SETTING_SOAK_D6_DUTY_CYCLE 17 // Duty cycle (0-100) that D6 must be used during soak
#define SETTING_SOAK_D7_DUTY_CYCLE 18 // Duty cycle (0-100) that D7 must be used during soak
#define SETTING_REFLOW_D4_DUTY_CYCLE 19 // Duty cycle (0-100) that D4 must be used during reflow
#define SETTING_REFLOW_D5_DUTY_CYCLE 20 // Duty cycle (0-100) that D4 must be used during reflow
#define SETTING_REFLOW_D6_DUTY_CYCLE 21 // Duty cycle (0-100) that D4 must be used during reflow
#define SETTING_REFLOW_D7_DUTY_CYCLE 22 // Duty cycle (0-100) that D4 must be used during reflow
#define SETTING_LAST 22 // The last setting
#define SETTING_TEMPERATURE_OFFSET 150 // To allow temperature to be saved in 8-bits (0-255)
// Thermocouple
#define THERMOCOUPLE_FAULT(x) (x == FAULT_OPEN || x == FAULT_SHORT_GND || x == FAULT_SHORT_VCC)
#endif // REFLOW_WIZARD_H