Ralim / IronOS

Open Source Soldering Iron firmware
https://ralim.github.io/IronOS/
GNU General Public License v3.0
7.28k stars 723 forks source link

TS80 [TS200] Support #349

Closed Ralim closed 1 year ago

Ralim commented 6 years ago

The TS80 runs very similar hardware to the TS100 iron. The firmware does not need many changes to support this.

Changes To do / Progress

cnnblike commented 6 years ago

Hi, I'm thinking about porting the STM32 USB-PD (Power Delivery) to ts80, but I'm not quite sure about the hardware of TS80. I mean, will the hardware of TS80 support 20V 2A?

Ralim commented 6 years ago

Hi @cnnblike , Sadly the TS80 does not support 20V (will die around 16V). AND The connections are not made for the USB-PD pins (No CC Pins). There is only wiring to the D+ and D- pins.

I have already poked around to try and see about PD since I have more PD than QC chargers, but nothing can be done on this hardware sadly :(

cnnblike commented 6 years ago

Oh, thank you for your reply @Ralim That's a pity. Thought this may work.

Ralim commented 6 years ago

Yeah :( I can dream of everything being neat like this. I'll keep on the manufacturers case to try and push for a USB-PD model, but I feel that it might be a ways off.

Though, a really nice product if your up for it, that is on my to-build list but buried too far deep would be to make a small USB-c inline adapater that converts between USB-PD and Quick Charge 3.0.

If you have interest in making that ^ hit me up via email and i'm happy to have a yarn about it.

cnnblike commented 6 years ago

Maybe sometime when I had more free time :D But think about it, maybe building a TS12 tips compatible, 3d-printable, USB-PD/QC3.0 compatible iron will get much more attention and be more attractive for the most hobbyists.

willumpie82 commented 6 years ago

something like this? https://hackaday.io/project/18899-rt-soldering-pen

Ralim commented 6 years ago

@cnnblike I agree, I would love a TS80 shell that can take even TS100 tips with USB PD. Maybe we will get it soon if they like us all lol

Ralim commented 6 years ago

Progress is happening on this FYI to anyone reading, I just edit the top comment to track progress. Getting towards a releasable build soon.

ge0rg commented 6 years ago

Would it be possible to use this with a regular 12V/9V supply instead of QC, e.g. by detecting a higher voltage on the input?

Ralim commented 6 years ago

Yep, already supported. Note that going much above 9v will pull more than 18W and I haven't tested how the tip and tip connector will last.

JohnEdwa commented 6 years ago

The Weller WRMP pushes 40W through a similar 3.5mm connector, so the ~30% overclock from running the TS80 at 24W from a 12V supply shouldn't be a problem, though I do understand it's what's inside the plug that actually matters. If it is though, implementing a power limit by calculating the maximum PWM duty cycle to keep it under 20W shouldn't be that complicated I'd reckon?

Ralim commented 6 years ago

The changes over at #275 will come into play here nicely.

My biggest concern is just peak current rating and if the connector starts to heat, since if it heats it becomes a more significant drift in the temperature measurement.

I'm going to keep the QC code negotiating for 18W as thats the max for most adapaters (all?). However I wont stop you feeding in more. Note that some of the circuitry is only rated to ~16V though.

12V should be a nice point though. Also interested to look into the options for taking the voltage up higher anyway and just having a more stable PID.

JohnEdwa commented 6 years ago

I thought I remembered it right, the stock firmware has the power setting from 16W to 24W, even though QC3 only supports up to 18W. But it would indicate the iron can handle 12V no problem.

Ralim commented 6 years ago

Nice catch, I never had the original firmware work well on my unit so I haven't been through it thoroughly yet. I have also had confirmation that 12V 2A is supported by the unit which is really good.

Though negotiating for 12V may come later on in my firmware since I want to do the tip calibration and then push out a beta version.

joric commented 6 years ago

Will it accept firmware update from TS100? Will it turn into a brick afterwards? Are there any TS80 bootloader-compatible firmware updates in the wild?

Ralim commented 6 years ago

@joric if you flash the ts100 firmware it will not die, but the pinouts are only similar on the OLED. Nothing else will work.

Not that I know of yet.

If you want I can upload a build of my TS80 fork here for you, its only really waiting on time to tune in the tip temperature calibration.

joric commented 6 years ago

Yeah, I guess, not only for me though. Could be useful for all ts80 owners if something goes wrong.

Ralim commented 6 years ago

Yeah, its currently just an issue where the temp cal is fairly far whacked out atm (like 30 C).

Cant do much else atm though, no time for development.

joric commented 6 years ago

Haven't tried your firmware yet, just got an iron today. Apparently it's QC only and doesn't even power on with Xiaomi 65W QC/PD Laptop PSU (CDQ07ZM). Any ideas why? That's pretty bad, I thought I wouldn't need another Type-C cable on the table. Also that 3.5 mm jack isn't too sturdy and wobbles, aluminum sleeve doesn't help very much, maybe it's worth to get carbon one. My TS80 unboxing video: https://youtu.be/xc-yIq0m54o

Ralim commented 6 years ago

It is a QC3 device, it won't work with PD! QC is a proprietary protocol that is not compatible with the USB-PD standard.

The 3.5mm Jack shouldn't take the strain at all and the mental housing takes the force. The only TS80's I have seen have all been fairly snug with justa little bit of wiggle which is normal.

In my firmware I'm allowing 5V operation as a fallback which works with some PD chargers that don't follow the spec completely.

Also their charger does the higher 24W support which is good.

EDIT: that charger looks to be PD only from what I can see.

andersvos commented 6 years ago

This would be perfect for using the TS80 in the field https://www.indiegogo.com/projects/omni-ultimate-a-new-generation-of-power/x/4042493#/updates/all

joric commented 6 years ago

@andersvos $16 Xiaomi 10000mAh Mi Power Bank Pro works just fine, TS80 only supports 18W (12V * 1.5A) max, I have one of those https://www.aliexpress.com/item//32826648959.html Funny that Xiaomi 65W PD Laptop charger (CDQ07ZM) charges this powerbank but doesn't power up the iron directly. May be used as intermediary device.

Upd: sorry wrong link, I have one of those, it's rather $25 than $16. Correct link: https://www.aliexpress.com/item/Xiaomi-Mi-Powerbank-PRO-10000mAh-Power-Bank-External-Battery-Type-C-Portable-Bateria-Externa-Portable/32802457619.html

It's rated 12V*1.5A (18W) Max. Supports "double way Quick Charge" whatever this is, but charges just fine from my PD charger (TS80 doesn't work with the PD charger but works with the power bank).

Doesn't look like the $16 power bank (PLM01ZM) is much different from that $25 one (PLM03ZM). I guess the difference is Type-C that AFAIK is input only (at least it doesn't charge my phone from Type-C).

Here's comparison of those two models: https://www.hardwarezone.com.sg/tech-news-do-you-know-there-are-2-versions-xiaomi-mi-power-bank-pro-we-tell-you-differences and yeah USB-C port is only for input

The PLM01ZM and PLM03ZM are the same for the most part. However, the newer PLM03ZM’s fast charge controller also supports Qualcomm’s Quick Charge 3.0 (PLM01ZM only Quick Charge 2.0). So there will be some gains if you pair it with a QC3.0 charger (to charge the power bank) or use it to charge a QC3.0 device.

I really don't know if QC2.0 is compatible with this iron, maybe someone here can tell.

andersvos commented 6 years ago

@joric

The Omni has QC 3.0 too, and has more than double the capacity.

gbraad commented 6 years ago

@Ralim would you have a test version of the firmware available?

JohnEdwa commented 6 years ago

@andersvos Oh boy! Has the same features and double the capacity of the $16 power bank! So, quick math, 16*2 = 32, how much is the Omni again?

120VAC $299 USD + Shipping $599 (50% Off) 230VAC $325 USD + Shipping $599 (45% Off)

Oh. So you can buy 20 Xiaomi power banks right now, or donate money through kickstarter for one Omni you might get somewhere in the next two years, if you are lucky.

There's absolutely no reason to buy the Omni unless you have a real need for the AC inverter output, and even then I'd buy something that actually exists, and not donate through kickstarter.

joric commented 6 years ago

@Ralim looks like we got stock 1.06 firmware hex from minidso (no sources yet but it could be helpful to restore TS80 to factory state). Direct link to file: TS80.V1.06.hex (from this forum post). I just've flashed using stock DFU bootloader it and I confirm it works and temperatures seem to be accurate.

Ralim commented 6 years ago

@joric QC2 should work on their firmware from my reading. QC 2.0 is implemented on my firmware, but I have nothing I can test with over here :(

Here is a rough build, will feel very similar. Still needs temp cal. Would love feedback on if QC works for you. TS80.zip

gbraad commented 6 years ago

@Ralim I tried the firmware, but the first time it started the OLED stayed black, but it would draw power when I pressed the button. After unplugging and replugging it showed v1.06 and it felt like it started the old firmware?

Ralim commented 6 years ago

How did you try and do the upgrade ? Did you make sure to do it twice if it threw an error etc ?

gbraad commented 6 years ago

I retried it 3 times, and eventually it worked and showed the .RDY file.. it didn't feel like it rebooted, but dismounted and shows the disk drive (not able to open)... I disconnected and reconnected and it works. It even heats on 5V from the laptop.

the flipping of the display seemed to fault at first, but it works... will come back with more info after some testing.

joric commented 6 years ago

@gbraad if you've used stock silicone cable it's pretty bad for data (losses, etc.), try another one.

@Ralim worked for me right away. Temperatures seem about accurate.

Video

Buttons pictures seem messed up (left button picture should be heating up and right button picture should be settings) and auto orientation is mad (had to set fixed orientation) but otherwise it's OK.

Also the whole screen assembly was shifted a couple millimeters to the right I had to disassemble the iron and center the screen (it's on the flex cable glued with a little bit of adhesive). I guess all TS80 screens are slightly off-center.

Had a few troubles building it. Master branch builds fine but TS80 branch was somehow messed up.

./src/Setup.c: In function 'MX_ADC2_Init':
./src/Setup.c:194:20: error: 'TIP_TEMP_ADC2_CHANNEL' undeclared (first use in this function)
  sConfig.Channel = TIP_TEMP_ADC2_CHANNEL;

Figured out it should've been either make -j16 lang=EN model=TS80 or model:=TS80 in the Makefile then it builds (with a few warnings, same warnings as with the master branch):

./src/hardware.c: In function 'seekQC':
./src/hardware.c:197:4: warning: implicit declaration of function 'vTaskDelay' [-Wimplicit-function-declaration]
    vTaskDelay(3);
    ^
./src/stm32f1xx_it.c: In function 'UsageFault_Handler':
./CMSIS/core/core_cm3.h:1616:22: warning: inlining failed in call to 'NVIC_SystemReset': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void NVIC_SystemReset(void)
                      ^
./src/stm32f1xx_it.c:35:2: warning: called from here [-Winline]
  NVIC_SystemReset();
  ^

Also languages are not up to date, apparently, building make lang=CS_CZ model=TS80 shows:

./src/Translation.cpp:200:36: error: conflicting declaration 'const char* SettingsDescriptions [17]'
 const char* SettingsDescriptions[17] = {
In file included from ./src/Translation.cpp:7:0:
./inc/Translation.h:21:20: note: previous declaration as 'const char* SettingsDescriptions [20]'
 extern const char* SettingsDescriptions[20];

But otherwise it builds and works just fine (I've successfully uploaded and tested it on the iron). Custom logos also work (just uploaded logo.hex the same way as fimware and it worked). I'm using Windows 10 WSL with Ubuntu 16.04, arm-none-eabi-gcc 4.9.3.

Ralim commented 6 years ago

@joric whats the stock cable like ? (In my sample I didnt get the nice cable)

Glad to hear it flashed ok :)

Yeah the accelerometer is mounted in a different orientation in the TS80, need to figure out which way round the rollover should be :)

I'm not sure about the screen, its centered on my unit but mines pre-production :| Would love to hear others feedback on this.

I'm planning to merge the TS80 fork into mainline so that translations can be updated, haven't finished work on the firmware but want to get something somewhat out there :)

joric commented 6 years ago

@Ralim it's 1m Type-A/Type-C heat-resistant black silicone cable, very soft but I couldn't copy large files from my phone to USB 3.0 (I have no USB 2.0 ports) with it, everything freezes and stops midway.

Zyzto commented 6 years ago

Did anyone try to combine this https://www.aliexpress.com/item/DC-DC-Power-Buck-Module-6V-32V12V24V-To-QC3-0-Fast-Charging-Single-USB-Charging-Converter/32864270116.html?spm=a2g0s.8937460.0.0.46132e0e584p43

with this https://www.aliexpress.com/item/-/32856814801.html?spm=a2g0s.8937460.0.0.46132e0e584p43

to get type c pd to qc3 for about 15$ I would assume some efficiency loss but worth it

joric commented 6 years ago

@Zyzto I use PD-chargeable power bank for that (CDQ07ZM), roughly about the same :) There is X-CUBE-USB-PD stack, part of the STM32Cube software-development ecosystem, that can be downloaded, free of charge, from https://www.st.com/en/embedded-software/x-cube-usb-pd.html not sure if it's possible to add PD support with firmware-only mod though. There are several examples on github how to setup the USB for 12V 6A and it seems to be fairly simple.

Ralim commented 6 years ago

@Zyzto Havent tried but should work, and if it doesnt happy to try and figure out why :)

@joric Please see the first comments in this thread. PD support cannot be added as the frontend required is missing (and there is no connections at all to the CC pins).

joric commented 6 years ago

@Ralim but here they are! If they're not connected that would mean hardware mod, I don't like those. D+ pins are definitely connected through vias. Can't really check CC vias, there's OLED soldered on top.

gbraad commented 6 years ago

@Zyzto interesting. I'll have a look on Taobao (/me lives in China [expat]).

joric commented 6 years ago

Miniware has published official TS80 firmware source code (currently 1.06):

Ralim commented 6 years ago

@joric Yeah hardware mods are what I'm trying to avoid.

Honestly not worried about trying to get PD in the unit, but rather would inline an adapter :)

@gbraad Let us know what you find, lucky to live over there :)

Houseman74 commented 6 years ago

Hi to all. Cannot understand why my TS80 can't be powered from a Blitzwolf 15000mA power bank that claims to have Qualcomm QC3.0 certified. Every time I plug the iron in the dedicated QC3.0 USB port of the Powerbank the Iron goes off and displays Low Vot. It seems the power bank cannot deliver more than 5V output, but plugged into a powermeter and a phone it recharges it in QC2.0 mode.. Any hints? Best regards

Ralim commented 6 years ago

Hi, I cant really provide support for the official firmware, but is your power bank QC3 or QC2.0 ? Both should work but some units are more fussy than others. Not all "QC" banks actually follow the standard :(

Do you have an inline usb power meter that can show you the voltages on the D+ and D- pins?

Houseman74 commented 6 years ago

Hi Ralim Thank you a lot for your quick reply. My power bank is following: BlitzWolf BW-P5 bought at: https://it.aliexpress.com/item/BlitzWolf-BW-P5-15600mAh-Quick-Charge-QC3-0-Dual-USB-Power-Bank-Universal-Fast-Charging-For/32783530009.html Everywhere it shows a full QC3.0 support.

Power meter shows D+ 1,66V D- 1,65V when connected to the powerbank QC3.0 port.

I saw one hour ago that mindso posted at this link: http://www.minidso.com/forum.php?mod=viewthread&tid=3225&extra=page%3D1

an unofficial fork, but apparently supported by them in which it claims: "On the basis of 1.06 firmware issued by the government , a firmware was made to solve the problem that TS80 solder pen can not be used under the mobile power supply. It was named 1.06s. The solution is as follows."

The firmware.hex file is 80kB and the fact is that I cannot load it into the ST32 Mass storage device since there is only 8kB in disk. Am I doing something wrong?? Is the disk E: one that displays once inserted the TS-80 in the USB port of a PC right? Best regards. Steve

Ralim commented 6 years ago

Looks like that power supply supports QC, but those voltages are fairly out (typically 3-3.3V is used).

That fork is to stop power banks going to sleep, it probably wont help your bank not working.

If you check the main page of this repo or the booklet that came with your iron, you need to hold the front button while connecting to the computer to boot up into the bootloader mode to let you update the firmware (It will say DFU on the screen). Then you can drag and drop the file onto it to flash it.

If you get the hang of flashing the firmware OK, you could try the experimental build of this repo that i posted up above instead, as I have a different implimentation for the QC etc so it may behave better / worse.

Houseman74 commented 6 years ago

Yes You are right. Sorry of course I have to start in DFU mode (as all the MINIDSO units).. And Yes you are right, the upgrade does not fix the problem. Low-Vot displayed also. What does it mean. The power bank is not fully QC3.0 certified or is the TS-80 tight? Regards

Ralim commented 6 years ago

All good :)

Not quite sure whats going on, can you try my firmware and check against it as well ?

Houseman74 commented 6 years ago

of course I will. I let you know. Thanks

Houseman74 commented 6 years ago

Sorry where can I find the TS-80 FW? I see all TS-100 FW.. Regards

Ralim commented 6 years ago

https://github.com/Ralim/ts100/files/2409546/TS80.zip

Further up this thread :)

Houseman74 commented 6 years ago

Genius!!!! It works!!! Man, you made my day!!! Thanks a lot!!