Ralim / IronOS

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

Alternative bootloader? #25

Closed perillamint closed 2 years ago

perillamint commented 7 years ago

Quite out of scope of this project, but as all we know, default DFU bootloader is quite unstable. It does not work "well" on Mac or Linux.

I think alternative bootloader which supports standard DFU protocol can help firmware development in Linux or other non-Windows systems.

Could we build alternative bootloader which supports DFU protocol other then default buggy USB-MSD DFU?

vifino commented 6 years ago

Very nice, @perillamint! I look forward to progress there!

Poke me if/when you need a tester. I would like an above-50/50 chance of success, however! ;)

perillamint commented 6 years ago

@vifino I just finished BL flasher! :)

However, I think I could polish bootloader "Little bit more": Utilize OLED to display it is active or not.

After that, I think I could do some kind of "beta testing". :)

perillamint commented 6 years ago

Bad news: DAPBoot uses old version of libopencm3, so my driver port is incompatible. I think it takes awhile to make DAPBoot utilize OLED screen.

BTW, I think my bootloader port is "functional", so I think I could release it.

perillamint commented 6 years ago

https://github.com/perillamint/ts100-bl-flasher/releases/tag/1.0.0

I released bootloader flasher with two payload.rom variants: Stock and DAPBoot.

I tested it with my iron

vifino commented 6 years ago

I'll flash it after I cleaned up my mess here. Will be in a couple hours at max.

vifino commented 6 years ago

@perillamint Oops, forgot to report back.

It flashed successfully, DAPBoot loads. Now to flash back Ralim's firmware.

Edit: Tried to flash a Hex, while dfu-util is expecting a binary. Oops.

Ralim commented 6 years ago

@vifino Just for the sake of it, have you tried the web-based flashing tool?

https://devanlai.github.io/webdfu/dfu-util/

vifino commented 6 years ago

@Ralim No, but I know what I am doing wrong. I was feeding dfu-util a .hex, not a binary.

Ralim commented 6 years ago

Ah okay, yeah I don't currently push up .bin files to avoid confusion to users. There are converters around or I can provide some .bin files, later on, today if you need them.

vifino commented 6 years ago

If you could poke me with a .bin, it'd be much appreciated, @Ralim. Currently, I am stuck with a windows machine, so there isn't much I can do.

Ralim commented 6 years ago

TS100.zip This is the V2.x release currently, so not perfect and may have some bugs but will let you get back to a working system hopefully and also let you test the bootloader. Ill get some .bins for the latest 1.x release up tonight

perillamint commented 6 years ago

I just woke up. @vifino Did it work well?

perillamint commented 6 years ago

BTW, we have 3 repos for this project. After we got ES120 screwdriver, It will become 4.

How about migrating this repo and my two repos to GitHub group? @Ralim

Ralim commented 6 years ago

@perillamint Yes, I will make an organisation shortly, any idea what the best name is? Currently not sure if eDesignOpenSource or something is worth it or? (Since don't want to use TS100 as it's not the only product really)

perillamint commented 6 years ago

@Ralim Their company name is MiniDSO and they use MIN as their logo, so I suggest OpenMIN as our org name. I don't have any better idea about this. Out of naming creativity :'(

Ralim commented 6 years ago

E-design is the parent to miniware aka minidso. They use E-design for the es128, but miniware on the ts100 oddly.

So really not sure where to go :P

perillamint commented 6 years ago

Maybe eDesignOSFW? or eDesignMod?

I got this two in my head now

Ralim commented 6 years ago

eDesignOSS?

perillamint commented 6 years ago

eDesignOSS. That looks good.

perillamint commented 6 years ago

OK. I transfered my two repo into eDesignOSS org.

Ralim commented 6 years ago

I'll transfer this one as soon, just need to set aside time to clean up some stuff first :)

vifino commented 6 years ago

@Ralim It worked, thank you!

I do have a few issues with it, however. It seems very, very slow. Having to hold the buttons to get them to register (~0.5-1s at least), OLED visibly redrawing in settings. Other than that, it looks quite cool.

vifino commented 6 years ago

@perillamint It did! Even my stupidity with trying to flash an intel hex encoded file instead of a binary didn't break it! Thank you so much for your work! Made things much easier for me. Note to self: Don't DFU at 4 am.

perillamint commented 6 years ago

@vifino BTW, You could use http://hex2bin.sourceforge.net/ to convert hex to DFU-able bin. I converted recent 1.17.1 HEX into BIN. If you want a stable version, here is the file which I converted using hex2bin. https://www.dropbox.com/s/8p8i21az24q72zo/ts100.bin?dl=0

vifino commented 6 years ago

@perillamint Thank you! I tried to do it using srecord, resulted in a huge binary, which obviously didn't work. I really appreciate you handing me the bin, and of course your work. :)

Ralim commented 6 years ago

@vifino Yeah sorry that bin file I uploaded was broken :/ oops. I'm uploading .bin files of the newer firmware as I go as well, so feel free to try them :)

vifino commented 6 years ago

@Ralim I'll surely do so. Probably not now though. It's 7 am and I've been up all night learning Lojban. ^_^

vifino commented 6 years ago

@Ralim I've just tried it again, muuuuch better! I like it a lot sofar. I am not sure if I imagine this, but could it heat just a tiny bit faster? It doesn't overshoot but reaches the temperature perfectly quite quickly. (On 24V) The first half-second it gets confused, however, it displayed temperature way past 500 degrees celsius, but then it comes back to ~40 degrees and everything works fine again. I've ran a tip calibration before that.

I've also noticed that the help string for the calibration is cut off when it loops around. Buffersize too small? You could determine the appropriate buffersize by using macros on all translation help strings, perhaps.

When there is a temperature warning, it seems to not be centered.

This 2.0 is quite an upgrade. One thing I did not find was the power source voltage calibration. Luckily my iron is quite accurate by default. I like the new idle screen. Having the advanced display not be used in the actual soldering mode is a bit unfortunate, because I'd like more information while soldering, not while in idle.

That's all the issues I could find in what limited testing I've done. Keep up the great work!

Ralim commented 6 years ago

Hi @vifino, Ah, okay looks like the PID has a little bit of wind up somewhere, I'll look into that.

Also, another thing to note is that there is a rolling average filter on what is displayed on the screen, so when the screen is showing that it's at temp it has probably been at temp for around 1 second at the temperature sensor. This is done because the temp sensor is a little bit away from the tip itself, so the idea is that by the time that filter is showing it at temp, the tip should have equalized to that same temperature. The filter is set to around 0.8 seconds as this seems to be about the equalization time at a guess from asking some other people :smile:

It shouldn't be showing way past 500 C normally unless the tip is unplugged. I'll try and re-create this locally as well.

Oops, thats probably a lack of padding in the wraparound :/. All the strings are using macros for string lengths etc. I use strlen atm

The centering of the temperature warning page is dependant on the length of the text used for the warning (language dependent). As currently all text is drawn left to right.

The 2.x firmware is still in alpha and voltage calibration is still on the todo list :smile:

What would you like to see in the advanced soldering screen? More than happy to add one, just wasn't sure what should be there?

thanks4opensource commented 6 years ago

@Ralim: Continuing to move off-subject for this issue, and you weren't asking me, anyway ;) ...

The 2.0 alpha's PID behavior subjectively seems a little laggy compared to 1.7. Nothing I can prove, and maybe I'm imagining it. In terms of display, at least in "ADVDSP F" it seems like the power bar graph (which replaced the squiggly heater lines which always looked like bacon to me) used to briefly spike to full coming out of sleep mode, like I'd expect it to, but doesn't anymore. Don't know if that's the PID changes, display hysteresis, or something else.

As far as tip vs sensor temperature deltas go, I've been thinking that the very end of the tip, at least with the small ones like the "I" and "ILS", is cooler than the more massive body. Makes sense, assuming the heating element is farther away and the small end has more surface area vs volume to radiate from. I have no experience with other high-end soldering irons, but I'm wondering if there's a plating quality issue with the TS100 tips. I'm trying to learn fine-pitch SMD soldering and common advice is to put a tiny blob of solder on the very end of the tip and then touch that to a well-fluxed chip lead and PC board pad.

Problem with at least my "I" and "ILS" tips is when I try to do that the solder "wicks" up to the larger (hotter?) main body of the tip and none of it sticks to the very end. Apologies for this long rant, but bringing it back to firmware and PID algorithms, could there be any way to track the observed sensor time-vs-temp response curve and adaptively tweak the PID constants in real time to try to adjust for different tip's thermal behavior (and environmental conditions)?

vifino commented 6 years ago

@Ralim No, I mean, it heats a bit faster, I believe. :)

strlen does not sound like macros... But it doesn't matter, those are micro optimizations for things that don't really matter, the chip in the ts100 is more than capable.

Regarding the temperature display jump in the first few fractions of a second, I believe it could indeed be just a little disconnect for a few milliseconds. I tried to reproduce it again, but it worked fine now.

Interestingly, my issue regarding text overwriting also disappeared... Now it's just starting over like it should.

Not sure if it is my iron acting up, the firmware having bugs in it or a faulty supply/flickers...

Seems kinda unlikely for that stuff to happen, might just be imagining things, so take my input with a grain of salt.

vifino commented 6 years ago

Oh, and regarding the advanced display for the soldering mode: Similar to what you have now in the main screen, voltage, temperature, set temperature, heating output in percentage, stuff like that.

I also figured out the weird 500 degree celsius issue by enabling the advanced display: It was a bad calibration. Might have done the initial calibration on USB power only. Could explain some things. Now it's all good. Just the description text remains a mystery to me.

Ralim commented 6 years ago

@thanks4opensource

The PID should be faster, but the whole system is different style (it's now uncoupled and different non-syncronized timing). So not really sure how to compare that honestly :smile: The not showing the heat icon is most likely down to a bit of PID tuning (The PID is currently tuned for good stability at the cost of a slight increase in response time). Should still be damn quick from my testing, but if its an issue let me know and I can spend another night tuning :grin:

I don't think its a plating quality issue, I use the C1 (ILS's twin) for all of my SMD and I have found the slight slant on the tip helps, but really what we need for soldering SMD is a J tip rather than the fine ones. I would advise looking at the "tack a pin, flood, solder wick" style where possible :smile: I can say that the C1 tip is a lot nicer than most of the Weller tips I have on my WESD51 on the other bench that's for sure. One trick I use is to have the blob on the side of the tip and bring the tip down parallel to the pin from above sometimes works well, oh, and flood with flux :grin:

Basically, yes but its hard and I don't have the time to spend on that to gain ~0.5 seconds of faster heating on an iron that already beats a lot of them. The payoff usually seems too small for me to put the time into an autotuner that doesn't get in the way.

Currently, I tune for the larger tips but I check on my C1 tipped iron before I ship it (as I use that iron more, but the development iron has a B2 tip in it).

@vifino Thanks, that's what I was hoping to achieve in 2.x

strlen is not a macro but its a tiny cost for being a lazy programmer :stuck_out_tongue:

If you chuck your ideas for an advanced soldering display into its own issue Ill add it in the next 2.x alpha if I can :)

USB power shouldn't affect the calibration, but It does need the tip to be equal to the handle temp, so if you have been holding the handle for ages, for example, its a bit out of whack (though ~5 C is nothing really on the temps you normally solder at, but accuracy is nice to have).

I will be spending more time on the calibration stuff, and so as more users use the feature I will look to see how it goes.

500C is odd, since the way the electronics are set up we can only measure up to ~465C (Thus the 450C hard limit). Normally if the unit sees > 450C for more than ~ 1 second it should trigger disconnected tip so not sure how that happened :s

vifino commented 6 years ago

@Ralim I don't know either, but a recalibration fixed it, so that's all I care about. :)

While I would always love faster/better/fancier things and features, v2 definitly satisfies most if not all my needs and wishes. I do look forward to what you can come up with, definitly including the advanced solder mode, as I believe it to be much more useful than the regular one, voltage sag would be nice to notice, or a lipo's voltage. :) Please do make it seperate from the ADVDISP thing, as I do not really like it most of the time, since it does not give me information I need pre-soldering.

Of course, if you find a way to magically make it even faster/accurate at holding temperature/learning from reaction of the tip, it'd be insanely awesome, but really, it's definitly not required as it is already very good.

I usually use the standard or the ILS tip, as I am doing work ranging from small (building quadcopters and fixing simpler things) to tiny (SMD soldering and such, mostly fixing). Definitly works fine!

Keep up the great work! I might contribute in the future, but so far, I don't see anything I consider to be important to be fixed right away. (That's a very good thing!)

discip commented 2 years ago

@perillamint Please close this Issue, since this is finally done IronOS-dfu. 😊

thanks