-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_specs.json
161 lines (159 loc) · 7.03 KB
/
app_specs.json
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"tab_data": {
"OPERATIONS" : {
"title": "ESC Values",
"boxes": [
{
"name": "params",
"buttons": [
[
{"name": "pwm_freq", "type": "singleText", "desc": "PWM frequency", "round": "1"},
{"name": "direction", "type": "singleText", "desc": "Motor direction", "round": "0"},
{"name": "fw_curr", "type": "singleText", "desc": "Max field weakenning current", "round": "1"},
{"name": "motor_pp", "type": "singleText", "desc": "Motor pole pairs", "round": "0"},
{"name": "pole_pairs","type": "singleText", "desc": "Motor pole pairs", "round": "0"}
]
]
},
{
"name": "max values",
"buttons": [
[
{"name": "curr_max", "type": "singleText", "desc": "Max motor current", "round": "1"},
{"name": "curr_min", "type": "singleText", "desc": "Min motor current", "round": "1"},
{"name": "rpm_max", "type": "singleText", "desc": "Max RPM", "round": "1"},
{"name": "p_max", "type": "singleText", "desc": "Max power", "round": "1"},
{"name": "v_max", "type": "singleText", "desc": "Max voltage", "round": "1"}
]
]
},
{
"name": "motor params",
"buttons": [
[
{"name": "flux", "type": "singleText", "desc": "Flux linkage"},
{"name": "r_phase", "type": "singleText", "desc": "Phase resistance"},
{"name": "lq_phase", "type": "singleText", "desc": "Phase inductance"},
{"name": "ld_phase", "type": "singleText", "desc": "Phase inductance"},
{"name": "motor_pp", "type": "singleText", "desc": "or variable pole_pairs?", "round": "0"}
]
]
},
{
"name": "sensors",
"buttons": [
[
{"name": "SL_sensor", "type": "comboBox", "desc": "Input types to control motor",
"list": {"0": "OL", "1": "Hall", "2": "PWMENC", "3": "HFI"}},
{"name": "hfi_type", "type": "comboBox", "desc": "HFI type [0=None, 1=45deg, 2=d axis]",
"list": {"0": "None", "1": "45deg", "2": "d_axis"}},
{"name": "park_curr", "type": "singleText", "desc": "max current for handbrake", "round": "1"},
{"name": "safe_count", "type": "singleText", "desc": "Live count before allowing throttle", "round": "1"},
{"name": "safe_start", "type": "singleText", "desc": "Countdown before allowing throttle", "round": "1"}
]
]
},
{
"name": "UART",
"buttons": [
[
{"name": "motor_sensor", "type": "comboBox", "desc": "0=SL, 1=Hall, 2=OL, 3=ABSENC, 4=INC_ENC, 5=HFI",
"list": {"0": "SL", "1": "Hall", "2": "OL", "3": "ABSENC", "4": "INC_ENC", "5": "HFI"}},
{"name": "ol_step", "type": "singleText", "desc": "Angle per PWM period openloop", "round": "1"},
{"name": "uart_dreq", "type": "singleText", "desc": "Uart input", "round": "1"},
{"name": "uart_req", "type": "singleText", "desc": "Uart input", "round": "1"}
]
]
},
{
"name": "input",
"buttons": [
[
{"name": "input_opt", "type": "comboBox", "desc": "Input from ADC, UART, PPM", "list":
{"1": "ADC1", "2": "ADC2", "4": "PPM", "8": "UART"}},
{"name": "SL_sensor", "type": "comboBox", "desc": "0=OL, 1=Hall, 2=PWMENC, 3=HFI", "list":
{"0": "Hall", "1": "PWMENC", "3": "HFI"}}
]
]
},
{
"name": "adc1",
"buttons": [
[
{"name": "adc1", "type": "singleText", "desc": "Raw ADC throttle", "round": "1"},
{"name": "adc1_pol", "type": "singleText", "desc": "ADC1 polarity"},
{"name": "adc1_max", "type": "singleText", "desc": "ADC1 max val", "round": "0"},
{"name": "adc1_min", "type": "singleText", "desc": "ADC1 min val", "round": "0"}
]
]
},
{
"name": "adc2",
"buttons": [
[
{"name": "adc2_pol", "type": "singleText", "desc": "ADC2 polarity", "round": "1"},
{"name": "adc2_max", "type": "singleText", "desc": "ADC2 max val"},
{"name": "adc2_min", "type": "singleText", "desc": "ADC2 min val"}
]
]
},
{
"name": "CAN",
"buttons": [
[
{"name": "can_adc", "type": "singleText", "desc": "can ADC ID"},
{"name": "node_id", "type": "singleText", "desc": "Node ID"}
]
]
}
]
}
},
"presets": [
{
"title": "Run in open loop",
"preface": "Running in open loop mode turns the motor with no feedback control.",
"first_column": {
"widgets": [
{"type": "checkbox", "name": "curr_max", "start": "40.0", "stop": "None", "desc": "(40 Amps, something safe)"},
{"type": "checkbox", "name": "input_opt", "start": "8", "stop": "1", "desc": "(8 = UART, meaning: receive control input from UART)"},
{"type": "checkbox", "name": "motor_sensor", "start": "2", "stop": "None", "desc": "(2 = open loop)"},
{"type": "checkbox", "name": "ol_step", "start": "20", "stop": "None", "desc": "(number of steps per pulse"},
{"type": "checkbox", "name": "uart_req", "start": "10", "stop": "0", "desc": "(requesting 10 Amps, uncheck to stop)"}
]
},
"second_column": {
},
"conclusion": "Selecting these click boxes should get your motor spinning. To stop, unselect the last checkbox. If the motor is attempting to spin or not spinning check your wiring and controller. If it's a large motor you may need to set curr_max to something > 40 Amps. If you stream data by selecting the \"Data\" button below you should see that 10 phase Amps are being used."
},
{
"title": "Throttle test",
"first_column": {
"widgets": [
{"type": "checkbox", "name": "curr_max", "start": "40.0", "stop": "None", "desc": "(40 Amps, something safe)"},
{"type": "checkbox", "name": "motor_sensor", "start": "0", "stop": "None", "desc": "(0 = SL, \"sensorless\")"},
{"type": "checkbox", "name": "input_opt", "start": "1", "stop": "8", "desc": "(checked sets to 1 = ADC1, unchecked sets 8 = UART )"},
{"type": "entrybox", "name": "adc1_min", "desc": "set minimum value for adc1 range"},
{"type": "entrybox", "name": "adc1_max", "desc": "set maximum value for adc1 range"}
]
},
"second_column": {
},
"conclusion": "Physically connect a potentiometer to the adc1 input of your mesc board. Select sensorless mode, and change the set input_opt value to 1 to send adc1 values to your controller. If you stream data by selecting the \"Data\" button below you should see the throttle widget update when you turn your potentiometer."
},
{
"title": "uart_req test",
"first_column": {
"widgets": [
{"type": "checkbox", "name": "curr_max", "start": "40.0", "stop": "None", "desc": "(40 Amps, something safe)"},
{"type": "checkbox", "name": "motor_sensor", "start": "0", "stop": "None", "desc": "(0 = SL, \"sensorless\")"},
{"type": "checkbox", "name": "input_opt", "start": "8", "stop": "1", "desc": "(8, input from UART)"},
{"type": "checkbox", "name": "uart_req", "start": "3", "stop": "0", "desc": "(ranges from 0 to 6)"}
]
},
"second_column": {
},
"conclusion": "uart_req spins at fixed levels ranging from 0 (nothing) to 6. click = 3, unclick = 0. Caution: this can really crank up the speed of the motor"
}
]
}