Ralim / IronOS

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

[TS80P] Automatic display orientation the "wrong way up" #1021

Closed sigwinch28 closed 2 years ago

sigwinch28 commented 3 years ago

Describe the bug When the "display orientation" is set to "A", the display is always "upside down" when I hold it in my hand, even after a reboot.

To Reproduce Steps to reproduce the behavior:

  1. Set the "Display Orientation" to A
  2. Hold the iron in the left hand. The display will be "upside down".
  3. Hold the iron in the right hand. The display will be "upside down".
  4. Reboot the device. The error still occurs.

Expected behavior I expected the display to be the "right way up" for the orientation I am holding it in when the "Display Orientation" setting is "A". For example, if I am holding in my left hand, then I expect the display to be the right way up

Details on your device:

Additional context

sigwinch28 commented 3 years ago

Actually, the tip started glowing red hot so I suspect there might be something wrong with this iron.

iLLiac4 commented 3 years ago

Burned mosfet.

sigwinch28 commented 3 years ago

Burned mosfet.

Straight out of the box? Oh :hankey:

iLLiac4 commented 3 years ago

From the pictures: https://www.flickr.com/photos/eevblog/50111080862/in/photostream/ The mosfet for T80P version is 7409. Search for https://es.aliexpress.com/item/4000199115526.html To replace it you will need a heatgun. Also make sure that the tip is ok since a shorted tip can kill the mosfet.

sigwinch28 commented 3 years ago

I changed the tip and everything appears okay now (except for the display orientation). The new tip ramps up to 320C quickly and then the power draw drops to ~3W to keep the temp stable. Good stuff!

Ralim commented 3 years ago

Display orientation being flipped is odd We already flip and rotate the accelerometer for the TS80P compared to the TS80.

Just to be sure, you did flash the right firmware?

sigwinch28 commented 3 years ago

I think so. Please double-check me: IMG_3874 Large

sigwinch28 commented 3 years ago

Here is a video of the behaviour: https://user-images.githubusercontent.com/214649/126769553-d4140f90-2163-4c90-b115-eb547dc5cec7.mov

discip commented 3 years ago

@sigwinch28 Try this: TS80P_EN.hex.txt !rename first!

sigwinch28 commented 3 years ago

@sigwinch28 Try this: TS80P_EN.hex.txt !rename first!

Thanks. I tried this, but it doesn't seem to make any difference. I will retry again later to make sure I didn't make a mistake.

discip commented 3 years ago

Did you extract the hex file before transferring it to the iron, or did you drag and drop it directly from the zip file?

sigwinch28 commented 3 years ago

Steps I followed:

  1. Downloaded the TS80P_EN.hex.txt from your comment.
  2. Renamed the .hex.txt to .hex.
  3. Put TS80P in DFU mode
  4. Dragged .hex onto USB drive.
  5. Waited for the USB drive to come back with a .RDY extension.
  6. Unplugged the TS80P.
  7. Plugged back in.
  8. Reset to factory settings.
  9. Enabled "automatic" display orientation.

It's still upside down.

discip commented 3 years ago

Good evening @sigwinch28, you did everything as expected.

Are you able to open the device? Here is a recommendation of how to achieve this: https://github.com/Ralim/IronOS/issues/630#issuecomment-809748658 Look for the version of the board and in the best case post a picture of the PCB.

Does it look like this? or like this?

regards

sigwinch28 commented 3 years ago

I looked at the PCB and it looks like the bottom picture. The silk screen says TS80P V1.2. image

discip commented 2 years ago

@sigwinch28 Good morning, is this issue still present with the latest build?

Shadowcrit commented 2 years ago

I just wanted to add that I downloaded and flashed the TS80P artifact from https://github.com/Ralim/IronOS/actions/runs/1742279297 and the screen shows in the correct orientation.

https://user-images.githubusercontent.com/31373528/152269385-93f427c1-b9fd-42b5-a422-f101a9e13955.mp4

GrigoriOH commented 2 years ago

I just wanted to add that I downloaded and flashed the TS80P artifact from https://github.com/Ralim/IronOS/actions/runs/1742279297 and the screen shows in the correct orientation.

I downloaded the main, as well a this firmware and got the mismatched display orientation like OP in both cases. Just to be sure, I also tried the _EN and _DE version.

Thought it mitght have to do with either of those

Fixing auto rotation bug in the LIS accelerometer in the TS80/TS80P Adds support for two new accelerometers -- SC7A20 (Future Pinecil batch) https://github.com/Ralim/IronOS/pull/786 -- MSA301 (Newer TS80P) https://github.com/Ralim/IronOS/pull/761

so I tried different versions with the following results:

I'd happily use 2.13, if it weren't for an issue with my power supply, resulting in a wierd boot loop of the TS80P with 2.13.

https://user-images.githubusercontent.com/61632555/152551034-2f88f9cb-1aa9-4a9a-b47d-f66d475d19da.mp4

Edit: Board version is 1.2.

discip commented 2 years ago

@sigwinch28 @Shadowcrit @GrigoriOH Would be helpful, if you would provide the model of your ACC using the debug menu. To achieve that you need to hold down the button closest to the display [button B] and after the version number has popped up, push the button closest to the tip [button A] repeatedly until ACC . . . is displayed.)

Ralim commented 2 years ago

I'm wondering if one model of accel has been flipped the other way up at some point in miniware's manufacturing.

If you could post your accelerometer version as well as roughly when you bought you iron we could try and narrow down whats going on

Shadowcrit commented 2 years ago

Running v2.16.6054928 ACC MSA301

I bought the Iron at most 1 year a go.

Ralim commented 2 years ago

Do we think this is the MSA301 being mounted backwards to others; or do we suspect MSA301 comes mounted two ways around?

Ralim commented 2 years ago

@discip what accel do you have and is it correct?

GrigoriOH commented 2 years ago

@discip The ACC is shown as LIS2DH12 on version v2.16.72E0C17 - bought it on friday. Pictures of the board will follow.

Full front: WIN_20220206_12_10_44_Pro

Zoom differences front: WIN_20220206_12_05_44_Pro


Full back: WIN_20220206_12_09_23_Pro

Zoomed right back: WIN_20220206_12_07_59_Pro

Zoomed right centre back: WIN_20220206_12_08_11_Pro

Zoomed left centre back: WIN_20220206_12_08_32_Pro

discip commented 2 years ago

@Ralim

what accel do you have and is it correct?

1. LIS2DH12 (board version is 1.1)

2. It's correct.

@GrigoriOH Very interesting. At some point (https://github.com/Ralim/IronOS/issues/749#issuecomment-753469655) miniware changed the ACC to MSA301 and increased the version to 1.2. Now your picture shows a 1.2 board and you say the ACC is LIS2DH12. 🤷‍♂️😵

Ralim commented 2 years ago

Ah damn, I'm guessing there is a way their firmware is detecting the newer board rev and flipping it. Not sure if its worth tracing every track to find differences or if we add a flip option to the menu 😰

Would you be ok with just having an "invert orientation" toggle in advanced settings ?

discip commented 2 years ago

If you ask me, it would be nice and clean if we could keep the extra entries as low as possible by detecting the boards version (If that is possible.).

Ralim commented 2 years ago

Aha my question to Miniware was answered 🙏🏼

Looks like they have started using the SC7 as well as the LIS. SC7 wasn't enabled in Miniware builds until now so we were using the LIS driver. ... So

Could you please test this build : https://github.com/Ralim/IronOS/actions/runs/1811536243

And then report back what model your accelerometer shows up as ? Also if orientation is still backwards or not :)

discip commented 2 years ago
iron Firmware Version ACC correct orientation
TS80P   https://github.com/Ralim/IronOS/commit/641fc76e4980b0e4ec61f1e095bc0aa0120f3c7a LIS2DH12    
GrigoriOH commented 2 years ago

I was finally able to try the new version - unfortunately, the display is still upside down. Accelerometer is also still shown as LIS2DH12 on v2.16.FCE7DA6.

Anything more I can do for you?

Ralim commented 2 years ago

Damn, was hoping that one was the model. Could you give this action build a check and see what model shows up? https://github.com/Ralim/IronOS/actions/runs/1817624613 If its still the LIS, might write some code to dump out the common id registers to let us sanity check.

GrigoriOH commented 2 years ago

Sure, I'll do whatever you need ;) It still lists the ACC as LIS2DH12.

I am supposed to download the TS80P build unter artifacts, am I? Just to be sure I don't do anything wrong, delivering faulty information.

Ralim commented 2 years ago

Hmm damn.

Yep that's right, and your version you commented last time proved you did it right :)

Not sure then what's the go, talking to miniware they haven't added a new one I don't think but will go ask again to check what the go is.

Apologies on the delay, trying to rule out what I can before the worst case solution (manual invert in the menu)

Ralim commented 2 years ago

TS80.zip

Hia, If you get a chance could you flash this and try it. Its a super minimal firmware that jumps some numbers to the screen. It should show one number per line of the screen, and then when you press a button show another set and so on, until the screen goes blank.

If you could record out those numbers here it would be great. Afterwards, just flash back to a normal software release for iron functionality.

For example you might get

084
128

Then you press the button and get

096
123

This code is just dumping out exactly what ID's on the I2C bus are there, and reading one of the registers from them to let us try to match up with datasheets 🤞🏼

GrigoriOH commented 2 years ago

Hey Ralim, no need for any apologies, I am sorry for creating trouble on the dev front ;)

Here are the addresses you asked for:

025
017
---
060
003
Ralim commented 2 years ago

Okay cool, we do have an imposter. It looks like we have a SC7A20 that is programmed to use the LIS2DH12 address. Working on a possible fix

Ralim commented 2 years ago

@GrigoriOH Could you try the release from here : https://github.com/Ralim/IronOS/actions/runs/1832151266

And check (A) which it ID's your iron as and (b) if orientation is flipped for you still :)

GrigoriOH commented 2 years ago

Okay, just installed v2.16.90431CD and got the SC7A20 to show up 🎉 Unfortunately, the display is still flipped upside down.

Ralim commented 2 years ago

Yay thank you ❤️ Okay I've (hopefully) Flipped the SC7 in this run https://github.com/Ralim/IronOS/actions/runs/1832194294

Wanted to check before I flipped just in case :D

GrigoriOH commented 2 years ago

Yay 🎉 It works like a charm now! Thanks again!

Firebie commented 2 years ago

Sorry, but latest master on pinecil gives 'No accelerometer detected'.

Ralim commented 2 years ago

What accelerometer does your firmware have on previous releases?

Firebie commented 2 years ago

on stock 2.16: BMA223

Ralim commented 2 years ago

My BMA223 two units here are working fine hrmm. Do you see the accelerometer model show up in the debug menu? Was your Pinecil bought from the Pine64 store?

This code does not touch the BMA223 driver at all, so unsure how you got into this state. Might be worth making a new issue to track this.

Firebie commented 2 years ago

I bought it from official Pine64 store 2.17 shows no accell 2.16 shows BMA223

Firebie commented 2 years ago

If I comment #define ACCEL_SC7 in pinecil config, BMA233 is back again

Ralim commented 2 years ago

Looks like the BMA isn't liking the probe of register 0x0F sigh. Workaround is simple enough to rebuild with order flipped for probing. Interesting doesnt show for me. Can you test this build Pinecil_EN.dfu.zip

Firebie commented 2 years ago

Can I upload .dfu using "GD32 MCU Dfu Tool.exe"? I used only to upload .hex with it.

Ralim commented 2 years ago

Pinecil_EN.zip

Firebie commented 2 years ago

Yes, your latest works

wormyrocks commented 2 years ago

Actually, the tip started glowing red hot so I suspect there might be something wrong with this iron.

Hi, I have a new TS80P It's also damaged two tips since getting it about a month ago and flashing 2.16 (and I didn't do anything crazy with the temperature settings) - so perhaps there's more different about this board rev that's causing issues. Need to open it up and check the MOSFET. Also reporting the "sleep mode activates" bug, but the display orientation is correct since 2.17. If this helps: HW G 196 HW M 188 HW P 228 Move 00 RTip 1549 CTip 25 CHan 320 ACC SC7A20 PWR PD No VBus Max 485