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

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

Closed
sigwinch28 opened this issue Jul 21, 2021 · 51 comments · Fixed by #1225
Closed

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

sigwinch28 opened this issue Jul 21, 2021 · 51 comments · Fixed by #1225
Assignees
Milestone

Comments

@sigwinch28
Copy link

sigwinch28 commented Jul 21, 2021

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:

  • Device: TS80P. PCB 2.
  • Release: v2.15.40087E6.
  • Power adapter being used: Apple Macbook USB-PD brick

Additional context

@sigwinch28
Copy link
Author

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

@iLLiac4
Copy link

iLLiac4 commented Jul 21, 2021

Burned mosfet.

@sigwinch28
Copy link
Author

Burned mosfet.

Straight out of the box? Oh 💩

@iLLiac4
Copy link

iLLiac4 commented Jul 22, 2021

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
Copy link
Author

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
Copy link
Owner

Ralim commented Jul 23, 2021

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
Copy link
Author

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

@sigwinch28
Copy link
Author

@discip
Copy link
Collaborator

discip commented Jul 26, 2021

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

@sigwinch28
Copy link
Author

@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
Copy link
Collaborator

discip commented Jul 30, 2021

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
Copy link
Author

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
Copy link
Collaborator

discip commented Jul 31, 2021

Good evening @sigwinch28,
you did everything as expected.

Are you able to open the device?
Here is a recommendation of how to achieve this: #630 (comment)
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
Copy link
Author

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

@discip
Copy link
Collaborator

discip commented Sep 22, 2021

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

@Shadowcrit
Copy link

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.

20220202.174224.mp4

@GrigoriOH
Copy link

GrigoriOH commented Feb 4, 2022

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) #786
-- MSA301 (Newer TS80P) #761

so I tried different versions with the following results:

  • works fine on 2.13
  • goes upside-down from 2.14.1 onwards

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.

orientation-mismatch.mp4

Edit: Board version is 1.2.

@discip
Copy link
Collaborator

discip commented Feb 4, 2022

@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
Copy link
Owner

Ralim commented Feb 4, 2022

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

@Ralim Ralim added this to the 2.17 milestone Feb 4, 2022
@Shadowcrit
Copy link

Running v2.16.6054928
ACC MSA301

I bought the Iron at most 1 year a go.

@Ralim
Copy link
Owner

Ralim commented Feb 6, 2022

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

@Ralim
Copy link
Owner

Ralim commented Feb 6, 2022

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

@GrigoriOH
Copy link

GrigoriOH commented Feb 6, 2022

@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
Copy link
Collaborator

discip commented Feb 6, 2022

@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 (#749 (comment)) 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
Copy link
Owner

Ralim commented Feb 6, 2022

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
Copy link
Collaborator

discip commented Feb 6, 2022

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
Copy link
Owner

Ralim commented Feb 8, 2022

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
Copy link
Collaborator

discip commented Feb 8, 2022

iron Firmware Version ACC correct orientation
TS80P   641fc76 LIS2DH12    

@GrigoriOH
Copy link

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
Copy link
Owner

Ralim commented Feb 9, 2022

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
Copy link

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
Copy link
Owner

Ralim commented Feb 9, 2022

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
Copy link
Owner

Ralim commented Feb 11, 2022

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
Copy link

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
Copy link
Owner

Ralim commented Feb 12, 2022

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
Copy link
Owner

Ralim commented Feb 12, 2022

@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
Copy link

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

@Ralim
Copy link
Owner

Ralim commented Feb 12, 2022

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
Copy link

GrigoriOH commented Feb 12, 2022

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

@Ralim Ralim closed this as completed Feb 12, 2022
@Firebie
Copy link

Firebie commented Feb 12, 2022

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

@Ralim
Copy link
Owner

Ralim commented Feb 12, 2022

What accelerometer does your firmware have on previous releases?

@Firebie
Copy link

Firebie commented Feb 12, 2022

on stock 2.16: BMA223

@Ralim
Copy link
Owner

Ralim commented Feb 12, 2022

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
Copy link

Firebie commented Feb 12, 2022

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

@Firebie
Copy link

Firebie commented Feb 12, 2022

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

@Ralim
Copy link
Owner

Ralim commented Feb 12, 2022

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
Copy link

Firebie commented Feb 12, 2022

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

@Ralim
Copy link
Owner

Ralim commented Feb 12, 2022

Pinecil_EN.zip

@Firebie
Copy link

Firebie commented Feb 12, 2022

Yes, your latest works

@wormyrocks
Copy link

wormyrocks commented Feb 17, 2022

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

@GrigoriOH
Copy link

Hi,
sorry to use the shovel on this old topic, but I might have to dig it up.
Just updated my TS80P with the latest version of IronOS and the "upside-down" bug is back. Unfortunately I am not able to roll back to the test build you referenced above, so I wanted to ask for some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants