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

Pinecil V2 #1341

Merged
merged 141 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
0c5e748
Add SDK
Ralim Apr 2, 2022
60fee1a
fork
Ralim Apr 2, 2022
8bd6e09
massaging makefile
Ralim Apr 2, 2022
f004fab
Drop git module
Ralim Apr 2, 2022
03a7cb4
Bring in sdk as its broken
Ralim Apr 2, 2022
66a4e05
Remove bl706
Ralim Apr 2, 2022
131386f
rf_para_flash_t is missing defs
Ralim Apr 2, 2022
2f11c8f
Remove crapton of junk
Ralim Apr 2, 2022
4cacc06
Remove yet more
Ralim Apr 2, 2022
bf4e57f
Poking I2C
Ralim Apr 2, 2022
da311d9
Update peripheral_config.h
Ralim Apr 12, 2022
17600b1
Update pinmux_config.h
Ralim Apr 12, 2022
a8f9b41
Update preRTOS.cpp
Ralim Apr 12, 2022
81a36eb
Update main.hpp
Ralim Apr 12, 2022
fbdbe4f
Setup template
Ralim Apr 12, 2022
2b65833
Verbose boot
Ralim Apr 12, 2022
0ab56da
I2C ish
Ralim Apr 12, 2022
e83b722
Update I2C_Wrapper.cpp
Ralim Apr 13, 2022
6469d41
Update main.cpp
Ralim Apr 13, 2022
dda595a
Turn off I2C reading for now
Ralim Apr 13, 2022
d4e27a5
Display running
Ralim Apr 13, 2022
8ec723a
Roughing out scheduling timer0
Ralim Apr 13, 2022
1d9b4d8
Starting ADC setup
Ralim Apr 13, 2022
fc1f28f
Working scheduling of ADC :tada:
Ralim Apr 18, 2022
0c13aae
Format adc headers
Ralim Apr 18, 2022
24c424c
Update IRQ.cpp
Ralim Apr 18, 2022
5edd735
Buttons working
Ralim Apr 18, 2022
c56772a
Slow down I2C
Ralim Apr 18, 2022
e53c657
Poking IRQ
Ralim Apr 18, 2022
483a1a9
Larger stack required
Ralim Apr 18, 2022
ecf36b9
Accel on
Ralim Apr 18, 2022
bb28bb4
Trying to chase down why __libc_init_array isnt working yet
Ralim Apr 18, 2022
c3b88dc
Working c++
Ralim Apr 18, 2022
9df9f59
Cleanup
Ralim Apr 18, 2022
68a540b
Bump stacks
Ralim Apr 18, 2022
5853261
I2C wake part workaround
Ralim Apr 19, 2022
2ab5c83
Cleanup
Ralim Apr 19, 2022
8531d22
Working PWM init
Ralim Apr 19, 2022
7e93e19
qc draft
Ralim Apr 19, 2022
f397e49
Hookup PWM
Ralim Apr 19, 2022
25283e4
Stable enough ADC
Ralim Apr 19, 2022
3a82210
ADC timing faster + timer without HAL
Ralim Apr 20, 2022
92f4e20
Silence
Ralim Apr 20, 2022
82a8eb5
Remove boot banner
Ralim Apr 20, 2022
8ea1edf
Tuning in ADC
Ralim Apr 21, 2022
1c4dfd8
Wake PID after ADC
Ralim Apr 21, 2022
8488630
Remove unused hal
Ralim Apr 22, 2022
49be70c
Draft flash settings
Ralim Apr 22, 2022
289f770
Working settings save & restore
Ralim Apr 22, 2022
2f54bc5
Update to prod model
Ralim May 23, 2022
8e0d2d4
Cleanup
Ralim May 23, 2022
4e95cb4
NTC thermistor
Ralim May 23, 2022
226750d
Correct adc gain
Ralim May 23, 2022
75b3f09
Rough tip resistance progress
Ralim May 23, 2022
9decdcc
Scratch out resistance awareness of the tip
Ralim May 23, 2022
ad6d90d
better adc settings
Ralim May 24, 2022
2f117ca
Tweaking ADC
Ralim May 24, 2022
7c6534a
ADC tweaking
Ralim May 24, 2022
9fd1d36
Make adc range scalable
Ralim May 24, 2022
7bab4df
Update Dockerfile
Ralim May 24, 2022
273f279
Update configuration.h
Ralim May 24, 2022
df1c7c4
Can read same ADC twice in a row
Ralim May 30, 2022
74b74c3
ADC Setup
Ralim Jun 16, 2022
e233b3e
Update PIDThread.cpp
Ralim Jun 16, 2022
8c9f7d7
Lesser adc backoff
Ralim Jun 16, 2022
3efc7a0
Merge remote-tracking branch 'origin/dev' into magic
Ralim Jun 16, 2022
ca0f35c
Merge branch 'dev' of https://github.com/Ralim/IronOS into magic
Ralim Jun 16, 2022
edaa75c
Update USBPD.h
Ralim Jun 16, 2022
af430ea
Add device ID
Ralim Jun 16, 2022
14750c4
Update BSP_Power.h
Ralim Jun 16, 2022
222c251
Update BSP.cpp
Ralim Jun 16, 2022
21811b7
DrawHex dynamicLength
Ralim Jun 16, 2022
5de5dd4
Shorter ID padding
Ralim Jun 16, 2022
60f9931
Show validation code
Ralim Jun 16, 2022
6e062bf
tip measurement
Ralim Jun 20, 2022
994f6d8
Create access for w0w1
Ralim Jun 21, 2022
b29bcb7
Expose w0 w1
Ralim Jun 21, 2022
9fb063b
Enable debug
Ralim Jun 21, 2022
51ad2f7
crc32
Ralim Jun 21, 2022
85f30f2
Device validation
Ralim Jun 21, 2022
0690340
wip starting epr
Ralim Jun 21, 2022
0177ba1
Logic refactor
Ralim Jun 21, 2022
c4973a0
Safer PWM Init
Ralim Jun 23, 2022
f7078da
PD cleanups
Ralim Jun 23, 2022
ec25561
Update bl702_pwm.c
Ralim Jun 23, 2022
72fc02e
Update power.cpp
Ralim Jun 23, 2022
86d6715
Update usb-pd
Ralim Jun 23, 2022
8c7cfcd
io
Ralim Jun 24, 2022
92eaadc
EPR decode
Ralim Jun 24, 2022
be02d60
Better gui for showing pd specs
Ralim Jun 24, 2022
5136d44
Rough handler for capabilities
Ralim Jun 24, 2022
19acd7a
EPR
Ralim Jun 24, 2022
c7dbaea
Fix > 25V input
Ralim Jun 24, 2022
62db8af
Perform pow step after PPS
Ralim Jun 24, 2022
e174dba
Update BSP.cpp
Ralim Jun 27, 2022
7614a5b
Fix timer output
Ralim Jul 1, 2022
39b7fe1
QC3
Ralim Jul 1, 2022
1b43f71
Add tip resistance view
Ralim Jul 1, 2022
0d248a6
Hold PD negotiation until detection is done for tip res
Ralim Jul 1, 2022
41dee44
Get Thermal mass
Ralim Jul 7, 2022
a24d0ff
Tip res =0 protection
Ralim Jul 7, 2022
f558cb1
Update PIDThread.cpp
Ralim Jul 7, 2022
3279cfa
Update GUIThread.cpp
Ralim Jul 7, 2022
0d8ba1d
Rewrite tip resistance measurement
Ralim Jul 8, 2022
9acebee
Update GUIThread.cpp
Ralim Jul 8, 2022
a93a477
Fix fallback
Ralim Jul 10, 2022
9b22c27
Far better tip resistance measurement
Ralim Jul 10, 2022
7b30d04
Fix QC 0.6V D-
Ralim Jul 10, 2022
c23a29a
Convert the interpolator to int32
Ralim Jul 13, 2022
8198882
Correct the NTC lookup
Ralim Jul 13, 2022
a1a569a
Update BSP.cpp
Ralim Jul 13, 2022
a687793
Update Setup.cpp
Ralim Jul 18, 2022
bab66ac
Merge remote-tracking branch 'upstream/dev' into magic
Ralim Jul 25, 2022
e0ec44c
.
Ralim Jul 25, 2022
67d10e7
Update usb-pd
Ralim Jul 25, 2022
5cac47e
More missed updates
Ralim Jul 25, 2022
763e586
Refactor BSP
Ralim Jul 30, 2022
b25c845
Add Pinecilv2 to CI
Ralim Jul 30, 2022
58edcd8
Pinecil v2 multi-lang
Ralim Jul 30, 2022
2ea434a
Update HallSensor.md
Ralim Jul 31, 2022
59a542e
Update README.md
Ralim Jul 31, 2022
694ef23
Fix wrong prestartcheck default
Ralim Aug 3, 2022
fd49487
Fix logo mapping
Ralim Aug 3, 2022
79d9774
Merge branch 'dev' into Pinecil-v2
Ralim Aug 3, 2022
b658aa4
Update Makefile
Ralim Aug 3, 2022
3a30c18
Remove unused font block
Ralim Aug 3, 2022
6cc9b29
Style
Ralim Aug 3, 2022
47c1792
Style
Ralim Aug 3, 2022
0c693a8
Remove unused timer funcs
Ralim Aug 3, 2022
2078b89
More culling TS80P
Ralim Aug 3, 2022
af22263
Merge branch 'dev' into Pinecil-v2
Ralim Aug 3, 2022
511b9cb
Merge branch 'dev' into Pinecil-v2
Ralim Aug 14, 2022
9d5758b
Revert "More culling TS80P"
Ralim Aug 14, 2022
b79bb0c
Revert "Remove unused timer funcs"
Ralim Aug 14, 2022
ace956a
Make VBus check maskable
Ralim Aug 14, 2022
512ddc8
Remove DMA half transfer
Ralim Aug 14, 2022
334fe82
Drop using brightness and invert icons and go back to text
Ralim Aug 14, 2022
d173215
Refactor settings UI drawing descriptions
Ralim Aug 14, 2022
4cbb4e8
Shorten setting function names
Ralim Aug 14, 2022
5699a60
Store bin file assets
Ralim Aug 16, 2022
0901a09
Fix MHP prestart
Ralim Aug 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
image: alpine:3.16
strategy:
matrix:
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30"]
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2"]
fail-fast: true

steps:
Expand Down Expand Up @@ -41,6 +41,7 @@ jobs:
path: |
source/Hexfile/${{ matrix.model }}_*.hex
source/Hexfile/${{ matrix.model }}_*.dfu
source/Hexfile/${{ matrix.model }}_*.bin
source/Hexfile/LICENSE
source/Hexfile/LICENSE_RELEASE.md
if-no-files-found: error
Expand All @@ -60,12 +61,12 @@ jobs:
image: alpine:3.16
strategy:
matrix:
model: ["Pinecil"]
model: ["Pinecil", "Pinecilv2"]
fail-fast: true

steps:
- name: Install dependencies (apk)
run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash musl-dev
run: apk add --no-cache gcc-riscv-none-elf newlib-riscv-none-elf findutils python3 py3-pip make git bash musl-dev
- name: Install dependencies (python)
run: python3 -m pip install bdflib

Expand All @@ -91,18 +92,19 @@ jobs:
path: |
source/Hexfile/${{ matrix.model }}_*.hex
source/Hexfile/${{ matrix.model }}_*.dfu
source/Hexfile/${{ matrix.model }}_*.bin
source/Hexfile/LICENSE
source/Hexfile/LICENSE_RELEASE.md
if-no-files-found: error

- name: Generate json index file
run: cd source && python3 metadata.py Pinecil_multi-lang.json
run: cd source && python3 metadata.py ${{ matrix.model }}_multi-lang.json

- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
with:
name: metadata
path: source/Hexfile/Pinecil_multi-lang.json
path: source/Hexfile/${{ matrix.model }}_multi-lang.json

tests:
runs-on: ubuntu-20.04
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,5 @@ fabric.properties

CoreCompileInputs.cache
.vscode/settings.json
source/compile_commands.json
source/compile_commands.json
.idea/
18 changes: 9 additions & 9 deletions Documentation/HallSensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ In Sleep mode, the temperature of the iron automatically lowers to 150 °C (defa

Simply moving the iron will wake it back up into soldering mode. You can also press any button and this will also wake-up the iron.

### Optional Hall Effect Feature (Pinecil only):
### Optional Hall Effect Feature (Pinecil v1/v2 only):

Inside the Sleep Menu is an additional type of sleep setting. Pinecil has an unpopulated footprint (U14) for a hall effect sensor (Si7210). It is possible with the hall sensor to trigger Pinecil to go to sleep after it enters the stand, and Zzzz will appear on the screen. After installing the hall sensor, a magnet is positioned on the stand close enough to the sensor to activate one of ten user selectable settings.
- 0=off, 1=1000, 2=750, 3=500, 4=250, 5=150, 6=100, 7=75, 8=50, 9=25 (9 has the highest sensitivity to magnets)
- Setting of 1 might be used if you solder on PCBs with magnets and do not wish Pinecil to auto-sleep constantly. A very strong/large magnet would be required on the stand to activate the sleep mode if you use setting 1.
- Setting of 9 would be useful if you only had a small magnet and are not concerned about Pinecil falsely triggering sleep mode near magnetized items/tools.
- Neodymium magnets are recommended. If using small magnets, 2-3 may be required, but too many can also be detrimental.
- Actively watch the hall number change (in [debug menu](/Documentation/DebugMenu.md)) while you slowly move the magnet around to seek the best locations & whether you have too many or too few magnets. Positioning the magnet where you have the highest hall number will ensure consistent sleep mode when you place the iron in the stand. This requires some experimenting.
- Sensor is physically located near the copper contacts for the tip at the front of the handle. Reference [Schematics U14](https://files.pine64.org/doc/Pinecil/Pinecil_schematic_v1.0a_20201120.pdf).
- Positioning/type/quantity of magnets is important for best results. Sometimes too many magnets breaks the effect by distorting the magnetic field as seen [here](https://www.youtube.com/shorts/afkqKwCX00I). Video shows magnets at the top of the stand, and the pinecil goes correctly into Zzzz with only those magnets. Adding more magnets at the side, the Pinecil did not go to sleep, see PDF below for details on magnetic fields.
- Orientation of North and South faces of magnets is important to increase reaction of the hall sensor [SI7210-B-00-IV](https://www.silabs.com/documents/public/application-notes/an1018-si72xx-sensors.pdf).

- 0=off, 1=1000, 2=750, 3=500, 4=250, 5=150, 6=100, 7=75, 8=50, 9=25 (9 has the highest sensitivity to magnets)
- Setting of 1 might be used if you solder on PCBs with magnets and do not wish Pinecil to auto-sleep constantly. And a very strong/large magnet would be required on the stand to activate the sensor sleep mode.
- Setting of 9 would be useful if you only had a small magnet and are not concerned about Pinecil falsely triggering sleep mode near magnetized items/tools.
- Neodymium magnets are recommended. If using small magnets, 2-3 may be required, but too many can also be detrimental.
- Actively watch the hall number change (in [debug menu](/Documentation/DebugMenu.md)) while you slowly move the magnet around to seek the best locations & whether you have too many or too few magnets. Positioning the magnet where you have the highest hall number will ensure consistent sleep mode when you place the iron in the stand. This requires some experimenting.
- Sensor is physically located near the copper contacts for the tip at the front of the handle. Reference [Schematics U14](https://files.pine64.org/doc/Pinecil/Pinecil_schematic_v1.0a_20201120.pdf).
- Positioning/type/quantity of magnets is important for best results. Sometimes [too many magnets](https://www.youtube.com/shorts/afkqKwCX00I) breaks the effect by distorting the magnetic field.
- Orientation of North and South faces of magnets is important to increase reaction of the hall sensor [SI7210-B-00-IV](https://www.silabs.com/documents/public/application-notes/an1018-si72xx-sensors.pdf).
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,17 @@ This project is considered feature complete for use as a soldering iron, _so ple

_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited using the tool or python script and uploaded in DFU mode._



| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
|----------:|:--:|:--:|:--:|:---:|:---:|:-------:|:-----------:|
| MHP30 |❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ |
| Pinecil |✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
| Pinecil 2 |✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| TS100 |✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌ |
| TS80 |❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌ |
| TS80P |❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |


| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
| --------: | :-: | :-: | :-: | :-: | :-: | :-----: | :---------: |
| MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ |
| Pinecil | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
| Pinecil 2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌ |
| TS80 | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌ |
| TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |

Please note that Miniware started shipping TS100's using cloned STM32 Chips. While these do work with IronOS, their DFU bootloader works terribly, and it is hard to get it to successfully flash larger firmware images like IronOS without timing out. This is the main reason why the TS100 is _no longer recommended_.


## Getting Started

To get started with IronOS firmware, please jump to [Getting Started Guide](Documentation/GettingStarted.md).
Expand All @@ -56,6 +51,7 @@ For notes on installation for your device, please refer to the [Flashing Guide](
- (TS80) Set 18 W or 24 W settings for your power bank
- (TS80P) Automatically negotiates appropriate PD and falls back to QC mode like TS80
- (Pinecil) Supports all 3 power modes (PD, QC, DC In).
- (Pinecilv2) Supports USB-PD EPR for 28V operation.
- Improved readability Fonts, supporting multiple languages
- Use hardware features to improve reliability
- Can disable movement detection if desired
Expand All @@ -70,17 +66,17 @@ For notes on installation for your device, please refer to the [Flashing Guide](
This new firmware uses a new menu system to allow access to the settings on the device.
When on the main screen and having the tip plugged in, the unit shows a pair of prompts for the two most common operations.

- Pressing the button near the tip enters the *soldering mode*
- Pressing the button near the USB end enters the *settings menu*
- When not in *soldering mode*, holding down the button near the tip will enter *soldering temperature adjust mode* (This is the same as the one in the *soldering mode*, but allows to adjust the temperature before heating up), in *soldering mode* however this will activate *boost mode* as long as you hold down the button.
- Holding down the button near the USB end will show the *[debug menu](Documentation/DebugMenu.md).* In *soldering mode* this ends the heating.
- Pressing the button near the tip enters the _soldering mode_
- Pressing the button near the USB end enters the _settings menu_
- When not in _soldering mode_, holding down the button near the tip will enter _soldering temperature adjust mode_ (This is the same as the one in the _soldering mode_, but allows to adjust the temperature before heating up), in _soldering mode_ however this will activate _boost mode_ as long as you hold down the button.
- Holding down the button near the USB end will show the _[debug menu](Documentation/DebugMenu.md)._ In _soldering mode_ this ends the heating.

Operation details are over in the [Menu information.](Documentation/Menu.md)

## Thanks

If you love this firmware and want to continue my caffeine addiction, you can do so [here](https://paypal.me/RalimTek) (or email me for other options).
I also want to give a shout out to all of the [Fantastic Contributors](https://github.com/Ralim/ts100/graphs/contributors).
I also want to give a shout out to all of the [Fantastic Contributors](https://github.com/Ralim/IronOS/graphs/contributors).

Especially to the following users, who have helped in various ways that are massively appreciated:

Expand Down
3 changes: 2 additions & 1 deletion Translations/make_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def get_debug_menu() -> List[str]:
"Vin ",
"ACC ",
"PWR ",
"ID ",
"ID ",
"Max ",
"Tip Res",
"HW G ",
"HW M ",
"HW P ",
Expand Down
Loading