Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibrate CJC at next boot #1398

Merged
merged 95 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
6a6c9fd
preparation for tip CJC calibration at boot
discip Aug 29, 2022
9703033
Update settingsGUI.cpp
discip Aug 29, 2022
5d3b869
Update settingsGUI.cpp
discip Aug 29, 2022
401f9f3
Update settingsGUI.cpp
discip Aug 29, 2022
989a252
Update settingsGUI.cpp
discip Aug 29, 2022
cde9d65
Merge branch 'Ralim:dev' into calibrate_tip_CJC
discip Aug 30, 2022
860cfd1
Update GUIThread.cpp
discip Aug 31, 2022
624136c
Update GUIThread.cpp
discip Aug 31, 2022
2b72662
Update GUIThread.cpp
discip Aug 31, 2022
e627aa1
Update GUIThread.cpp
discip Aug 31, 2022
7cbef2d
Update settingsGUI.cpp
discip Aug 31, 2022
e59927a
Update GUIThread.cpp
discip Aug 31, 2022
2dae01e
Update settingsGUI.cpp
discip Aug 31, 2022
3d352f0
Update GUIThread.cpp
discip Aug 31, 2022
a28847c
Update GUIThread.cpp
discip Aug 31, 2022
63bfb49
Update GUIThread.cpp
discip Aug 31, 2022
d6f39ed
Update GUIThread.cpp
discip Aug 31, 2022
b15ae21
Update GUIThread.cpp
discip Aug 31, 2022
2733744
Update GUIThread.cpp
discip Aug 31, 2022
0f1895d
Update translation_EN.json
discip Aug 31, 2022
99dc4f5
Update source/Core/Threads/GUIThread.cpp
discip Sep 1, 2022
5e08bc7
Merge branch 'dev' into calibrate_tip_CJC
discip Sep 1, 2022
c4de907
Update translation_EN.json
discip Sep 1, 2022
65b81fb
Update settingsGUI.cpp
discip Sep 1, 2022
d252402
Update settingsGUI.cpp
discip Sep 1, 2022
97e9c18
Update settingsGUI.cpp
discip Sep 1, 2022
6277855
Update settingsGUI.cpp
discip Sep 1, 2022
7299d44
Update settingsGUI.cpp
discip Sep 1, 2022
26a572b
Update settingsGUI.cpp
discip Sep 1, 2022
87acb3a
Update settingsGUI.cpp
discip Sep 1, 2022
799ff21
Update Menu.md
discip Sep 1, 2022
7008b49
Update DebugMenu.md
discip Sep 1, 2022
82519fc
Update GUIThread.cpp
discip Sep 1, 2022
5805966
Update GUIThread.cpp
discip Sep 1, 2022
0cddf76
Update GUIThread.cpp
discip Sep 1, 2022
1f82ebf
Update GUIThread.cpp
discip Sep 1, 2022
2d6fecd
Update GUIThread.cpp
discip Sep 1, 2022
d736d8f
Update GUIThread.cpp
discip Sep 1, 2022
1340a81
Update GUIThread.cpp
discip Sep 1, 2022
ed4ae3e
Update GUIThread.cpp
discip Sep 1, 2022
11dc2a7
Update GUIThread.cpp
discip Sep 1, 2022
a6d7a22
Update GUIThread.cpp
discip Sep 1, 2022
3f41080
Update GUIThread.cpp
discip Sep 2, 2022
f2b624f
Update push.yml
discip Sep 2, 2022
00d2d0b
Update push.yml
discip Sep 2, 2022
a0f38d5
Update push.yml
discip Sep 2, 2022
4742c2e
Update GUIThread.cpp
discip Sep 2, 2022
a11d346
Update GUIThread.cpp
discip Sep 2, 2022
629f089
Update GUIThread.cpp
discip Sep 2, 2022
9a4a0f3
Update GUIThread.cpp
discip Sep 2, 2022
650f559
Update GUIThread.cpp
discip Sep 2, 2022
fbfa841
Update push.yml
discip Sep 2, 2022
151d448
Update GUIThread.cpp
discip Sep 2, 2022
576d21b
Update GUIThread.cpp
discip Sep 2, 2022
a9c6c13
Update push.yml
discip Sep 2, 2022
65534ba
Merge branch 'dev' into calibrate_tip_CJC
discip Sep 2, 2022
201700d
Update settingsGUI.cpp
discip Sep 2, 2022
e0f0e0e
Update Settings.cpp
discip Sep 2, 2022
bd08bb2
Update Settings.h
discip Sep 2, 2022
e3e6923
Update Menu.md
discip Sep 2, 2022
05cb5e6
Update DebugMenu.md
discip Sep 2, 2022
570c261
Update GUIThread.cpp
discip Sep 2, 2022
278925c
Update GUIThread.cpp
discip Sep 2, 2022
db3b721
Update GUIThread.cpp
discip Sep 2, 2022
e23ce6a
Update GUIThread.cpp
discip Sep 2, 2022
60419ef
Update GUIThread.cpp
discip Sep 2, 2022
ee0422b
Update GUIThread.cpp
discip Sep 2, 2022
72dfe0e
Update GUIThread.cpp
discip Sep 2, 2022
4ead5b0
Update GUIThread.cpp
discip Sep 2, 2022
d019763
Update GUIThread.cpp
discip Sep 2, 2022
a2a90df
Update GUIThread.cpp
discip Sep 2, 2022
c118a5f
Update DebugMenu.md
discip Sep 2, 2022
1538e02
Update DebugMenu.md
discip Sep 2, 2022
e6b1356
Update Troubleshooting.md
discip Sep 2, 2022
99f9376
Update README.md
discip Sep 2, 2022
664c5bc
Merge branch 'dev' into calibrate_tip_CJC
discip Sep 2, 2022
8504a76
Update GUIThread.cpp
discip Sep 2, 2022
190ab56
Update make_translation.py
discip Sep 2, 2022
f21eb9a
Update make_translation.py
discip Sep 3, 2022
c8eb5c0
Update GUIThread.cpp
discip Sep 3, 2022
a4e72f8
Update make_translation.py
discip Sep 3, 2022
7fadcc6
Update make_translation.py
discip Sep 3, 2022
4764638
Update GUIThread.cpp
discip Sep 3, 2022
c607006
Update make_translation.py
discip Sep 3, 2022
dd33c3b
Update make_translation.py
discip Sep 3, 2022
713b049
Update make_translation.py
discip Sep 3, 2022
f0e2e94
Update make_translation.py
discip Sep 3, 2022
9c15795
Update make_translation.py
discip Sep 3, 2022
e60ebf5
Update make_translation.py
discip Sep 3, 2022
752a3b0
Update GUIThread.cpp
discip Sep 3, 2022
258c10f
Update make_translation.py
discip Sep 3, 2022
5883fe1
Update DebugMenu.md
discip Sep 3, 2022
2e4978d
Update make_translation.py
discip Sep 3, 2022
4b34a43
Merge branch 'Ralim:dev' into calibrate_tip_CJC
discip Sep 7, 2022
482d4b3
Update GUIThread.cpp
discip Sep 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 36 additions & 32 deletions Documentation/DebugMenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
In this firmware there is extra debugging information in a hidden sub-menu.
This menu is meant to be simple, so it has no fancy GUI animations.

- Access by pressing the rear (``-/B``) button on the iron while it is on the home screen.
- To scroll through the menu, use the front (``+/A``) button.
- To exit, use the rear (``-/B``) button again.
- Access it by pressing the rear button (`-/B`) on the iron while it is on the home screen.
- Use the front button (`+/A`) to scroll through the menu.
- To exit, use the rear button (`-/B`) again.

## Menu items

Expand All @@ -15,15 +15,6 @@ Items are shown in the menu on a single line, so they use short codes and appear
- This is used by Irons that have an ID and serial number to help check if the iron is authentic. All Pinecil V1 show the same ID number as this is the number programmed into the MCU.
- The new Pinecil V2 released Aug. 2, 2022 now uses MCU BL706, which enables generating a unique ID/Serial number to every iron. This can be used to verify your [Pinecil authenticity here](https://pinecil.pine64.org/).

### Time

This is just uptime; it shows how many deciseconds the unit has been powered for (600 ds = 1 minute).

### Move

This is the last timestamp of movement. When the iron is moved, this should update to match the Time field (previous menu item).
This can be used for checking performance of the movement detection code.

### ACC

This indicates the accelerometer that is fitted inside the unit.
Expand All @@ -33,47 +24,60 @@ This indicates the accelerometer that is fitted inside the unit.
- BMA223
- MSA301
- SC7A20
- None detected -> running in fallback without movement detection
- None -> running in fallback without movement detection
- Scanning -> Still searching I2C for one

### Tip Res
### PWR

This indicates the tip resistance that the device is currently using. For devices with multiple possible values to choose from (Pinecil V2), the appropriate value is automatically detected at every boot-up. Tip should be installed before boot-up or reading can not be done.
This indicates the current power source for the iron.
This may change during power up as the sources are negotiated in turn.

- **DC** input (dumb)
- **QC** input (We used QC2/3 negotiation for current supply)
- **PD W. VBus** input (PD subsystem is used to negotiate for current supply); and VBus is connected to your input power source
- **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then [PD No VBus] displays on-screen ([see details and PD Debug section below](/Documentation/DebugMenu.md#pd-debug-menu)).

### RTip
### Vin

This is the raw tip reading in μV. Tip must be installed or reading will be high/inaccurate. At cool, the range of 700-1000 is normal for larger tips and ~1500 for smaller tips (TS80). This is used to evaluate the calibration routines.
The input voltage as read by the internal ADC. Can be used to sanity check it is being read correctly.

### CTip
### Tip C

This is the tip temperature in degrees Celsius.
This is the tip temperature in °C.
This can be used with RTip for assessing temperature processing performance.

### CHan
### Han C

This is the handle temperature or more accurately the reading of the Cold Junction Compensation (CJC) temperature sensor. This is expressed in °C x 10 (29.0 °C ambient should read as 290). Range of 200-400 (20-40 °C) is normal depending on how hot/cold the room is and how long power has been plugged in which warms the PCB further.
This is the handle temperature or more accurately the reading of the Cold Junction Compensation (CJC) temperature sensor. This is expressed in °C. Range of 20-40 °C is normal depending on how hot/cold the room is and how long power has been plugged in which warms the PCB further.
This is used for CJC of the tip temperature.
> If CHan is extremely high, this indicates the temperature sensor isn't reading correctly ([see Troubleshooting](/Documentation/Troubleshooting.md))


### CMax
### Max C

This indicates the max temperature in °Celsius that the system estimates it can measure the tip reliably to.
This indicates the max temperature in °C that the system estimates it can measure the tip reliably to.
This is dependent on a few factors including the handle temperature so it can move around during use. As you use the iron, the Max increases to a point.

### Vin
### UpTime

The input voltage as read by the internal ADC. Can be used to sanity check it is being read correctly.
This shows how many deciseconds the unit has been powered for (600 ds = 1 minute).

### PWR
### Move

This indicates the current power source for the iron.
This may change during power up as the sources are negotiated in turn.
This is the last timestamp of movement. When the iron is moved, this should update to match the Time field (previous menu item).
This can be used for checking performance of the movement detection code.

- **DC** input (dumb)
- **QC** input (We used QC2/3 negotiation for current supply)
- **PD W. VBus** input (PD subsystem is used to negotiate for current supply); and VBus is connected to your input power source
- **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then [PD No VBus] displays on-screen ([see details and PD Debug section below](/Documentation/DebugMenu.md#pd-debug-menu)).
### Tip Res

This indicates the tip resistance that the device is currently using. For devices with multiple possible values to choose from (Pinecil V2), the appropriate value is automatically detected at every boot-up. Tip should be installed before boot-up or reading can not be done.

### Tip R

This is the raw tip reading in μV. Tip must be installed or reading will be high/inaccurate. At cool, the range of 700-1000 is normal for larger tips and ~1500 for smaller tips (TS80). This is used to evaluate the calibration routines.

### Tip O

This is the offset resulting from the *'Cold Junction Compensation Calibration'*.

### HW G

Expand Down
19 changes: 10 additions & 9 deletions Documentation/Menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ What this is for: some tips have an offset on their readings which causes issues

Caution: if the method below is not followed, the iron could be worse than before calibration. If you need to repeat the method, first unplug and let the handle/PCB cool down to room temperature.

1. Connect power to your iron (tip should be installed).
2. **Critical: make sure the tip & handle is at room temperature** (wait a good while after using the iron before calibration)
3. Using (`-/B`) scroll down to Advanced settings > press (`+/A`) to select > then (`-/B`) to scroll to Calibrate temperature? > press (`+/A`)
4. Important warning message is shown: *Confirm the tip & device are at room temperature before starting!*
5. Press the (`+/A`) button to confirm (tip/handle are at ambient temperature).
6. Display shows **`....`** for a short time as the unit measures and compares the tip and handle temperatures.
7. The display then goes back to *TMP CAL* and displays your *Offset number*. You generally don't need this offset unless debugging issues.
8. After you see an Offset number, calibration is done, just exit the settings menu normally, use (`-/B`).
9. You're done, enjoy your iron!
1. Connect power to your device.
2. Go to **`Advanced Settings`** using (`-/B`) and press (`+/A`) to select it. Use (`-/B`) to scroll to **`Calibrate CJC at next boot`** and confirm with (`+/A`).
3. Accept the *'warning text'* with (`+/A`).
3. Exit the settings menu as usual by pressing and holding (`-/B`).
4. Unplug you device.
5. **Critical: Make sure a tip is attached & wait until the tip & handle are at room temperature.** (Wait a reasonable amount of time after having used the device.)
6. Power the device and ideally keep it out of your hands (You know it might get warm.).
7. The display shows **`....`** for a short time while the device measures and compares the tip and handle voltages.
8. As a result the new *Offset value* is displayed. This value can later be viewed in the **`Debug menu`**.
9. Calibration is done and the device proceeds booting.

Note: offsets are dependant on your tip, temperature sensor, and the MCU. It's the culmination of tolerances at rest. Typical values are 700-1000 range. This is only designed to be used at boot while cold (ambient room temperature), as temperatures drift apart as soon as power is connected. Doing this reading repeatedly could result in wide varience of the offset number and/or incorrect calibration.

Expand Down
11 changes: 8 additions & 3 deletions Documentation/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,18 @@ On device help text:

Flash temperature reading at idle if tip is hot

### Setting: Calibrate tip CJC
### Setting: Calibrate CJC at next boot

Used to calibrate the ADC+Op-amp offsets for the tip. This calibration must be performed when the tip temperature and the handle temperature are equal. Generally not required unless your device is reading more than 5°C off target.
Note:
If the difference between the target temperature and the measured temperature is less than 5°C, **calibration is NOT required at all**.

This is used to calibrate the offset between ADC and Op-amp of the tip at next boot (Idealy it has to be done at boot, before internal components get warm.). But this setting is ***not permanent!*** It resetes after the calibration is completed (At next boot the checkbox will be unchecked!). If you need to repeat the calibration however, you have to set the checkbox *again*, unplug your device and let it cool down to room/ambient temperature & power it up, idealy while it sits on the desk.

Hence, never repeat the calibration in quick succession!

On device help text:

Tip-temperature Cold Junction Compensation (not needed if Tip is +/- 5°C of display)
Calibrate tip Cold Junction Compensation at the next boot (not required if Delta T is < 5°C)

### Setting: Restore default settings

Expand Down
4 changes: 2 additions & 2 deletions Documentation/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ If `CHan` is reading low:
- Check the power pin connection on the TMP36
- Check pullup resistor on the NTC thermistor
- Check no bridged pins or weak shorts on the signal to nearby pins on MCU or temperature sensor
- Reflow/resolder the the aforementioned components
- Reflow/resolder the aforementioned components

If `CHan` is reading higher

- Check ground connections on the sensors
- Check no bridged pins or weak shorts on the signal to nearby pins on MCU or temperature sensor
- Reflow/resolder the the aforementioned components
- Reflow/resolder the aforementioned components

## No display OR dots on the display

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ I highly recommend reading the installation guide fully when installing on your
For soldering irons that are designed to be powered by 'smart' power sources (PD and QC), the firmware supports settings around the negotiated power and voltage.
For soldering irons that are designed to be powered by batteries (TS100 & Pinecil), settings for a cutoff voltage for battery protection are supported.

There are 30 languages currently supported. When downloading the firmware for your soldering iron, take note of the language code in the file name.
Currently **31** languages are supported. When downloading the firmware for your soldering iron, take note of the language code in the file name.

This project is considered feature complete for use as a soldering iron, _so please suggest any feature improvements you would like!_

Expand Down
25 changes: 13 additions & 12 deletions Translations/make_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,21 @@ def get_debug_menu() -> List[str]:
return [
datetime.today().strftime("%d-%m-%y"),
"ID ",
"ACC ",
"PWR ",
"Vin ",
"Tip C ",
"Han C ",
"Max C ",
"UpTime ",
"Move ",
"ACC ",
"Move ",
"Tip Res",
"RTip ",
"CTip ",
"CHan ",
"CMax ",
"Vin ",
"PWR ",
"HW G ",
"HW M ",
"HW P ",
"Hall ",
"Tip R ",
"Tip O ",
"HW G ",
"HW M ",
"HW P ",
"Hall ",
]


Expand Down
2 changes: 1 addition & 1 deletion Translations/translation_BE.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
],
"desc": "Міргаць тэмпературай на экране астуджэння, пакуль джала яшчэ гарачае"
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Каліброўка",
"тэмпературы"
Expand Down
2 changes: 1 addition & 1 deletion Translations/translation_BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
],
"desc": "След изключване от работен режим, индикатора за температура да мига докато човката на поялника все още е топла"
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Калибриране",
"температура?"
Expand Down
2 changes: 1 addition & 1 deletion Translations/translation_CS.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
],
"desc": "Blikat teplotou při chladnutí dokud je hrot horký"
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Kalibrovat",
"teplotu?"
Expand Down
2 changes: 1 addition & 1 deletion Translations/translation_DA.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
],
"desc": "Blink temperaturen på skærmen, mens spidsen stadig er varm."
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Calibrate",
"temperature?"
Expand Down
6 changes: 3 additions & 3 deletions Translations/translation_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"tempUnitFahrenheit": false,
"messages": {
"SettingsCalibrationWarning": "Nur Fortfahren wenn Lötspitze & Gerät Raumtemperatur haben!",
"SettingsCalibrationWarning": "Nur Kalibrieren wenn Lötspitze & Gerät Raumtemperatur haben!",
"SettingsResetWarning": "Sicher, dass alle Werte zurückgesetzt werden sollen?",
"UVLOWarningString": "V niedr.",
"UndervoltageString": "Unterspannung",
Expand Down Expand Up @@ -175,12 +175,12 @@
],
"desc": "Temperaturanzeige blinkt beim Abkühlen, solange Spitze heiß ist"
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Temperatur",
"kalibrieren?"
],
"desc": "Kalibrierung der Kaltstellenkompensation (nicht nötig wenn Delta T < 5°C)"
"desc": "Kalibrierung der Kaltstellenkompensation beim nächsten Start (nicht nötig wenn Delta T < 5°C)"
},
"SettingsReset": {
"text2": [
Expand Down
2 changes: 1 addition & 1 deletion Translations/translation_EL.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
],
"desc": "Αναβοσβήσιμο της ενδειξης θερμοκρασίας κατά την παύση θέρμανσης όταν η μύτη είναι ακόμα καυτή"
},
"TemperatureCalibration": {
"CalibrateCJC": {
"text2": [
"Βαθμονόμηση",
"θερμοκρασίας;"
Expand Down
Loading