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

Support Miniware MHP50? #1872

Open
SimGas opened this issue Jan 26, 2024 · 28 comments
Open

Support Miniware MHP50? #1872

SimGas opened this issue Jan 26, 2024 · 28 comments
Assignees
Labels
Enhancement New feature or additional function.

Comments

@SimGas
Copy link

SimGas commented Jan 26, 2024

Is your feature request related to a problem? Please describe.
Recently, the MHP50 Hotplate was released as a successor to the MHP30. It is available for about 110€ on Aliexpress and supports 100 or 150W heating, together with a new mode for reflow soldering. Little can be found on the web for this hotplate yet, but I actually expect it to get more popular than the MHP30 very soon (much larger solder plate (50x50mm instead of 30x30mm).

However, This plate is more complex (e.g. multicolor display) than its predecessor and I am not sure if it could be covered within this project. But I just wanted to ask if you guys see any possibility supporting this plate anytime in future.

A few things I've already noted:

  • It seems the MCU is connected to a SMD antenna, so maybe this thing theoretically has bluetooth (but currently not enabled in any part of the firmware)
  • The display seems to technically have a touch interface, but this is not connected.
  • The PCB says V0.7A, so I am not sure if the unit I've bought was actually designed for being sold. So maybe there could be changes in future versions.

The discussion is hereby opened :)

If anyone is curious what's inside, I've taken a few pictures:
IMG-20240126-WA0007
IMG-20240126-WA0008
IMG-20240126-WA0009
IMG-20240126-WA0010
IMG-20240126-WA0011
IMG-20240126-WA0012
IMG-20240126-WA0014

IMG-20240126-WA0005
IMG-20240126-WA0006
CONFIG.TXT

@SimGas SimGas added the Enhancement New feature or additional function. label Jan 26, 2024
@ius
Copy link

ius commented Jan 28, 2024

MCU marking reads CH32F208WBU6 - a STM32 clone by Nanjing Qinheng Microelectronics (WCH). Vendor website has CH32F208WBU6 which does have BLE.

I don't see any obvious debug headers (other than UART?) - so maybe it supports SWD via USB D+/D- like the MHP30?

@Ralim
Copy link
Owner

Ralim commented Jan 29, 2024

Honestly this looks like a better design than the MHP 30.
Makes me less inclined to finish my designs for a competitor.

Same rules would apply to this being supported as anything else really:

  1. Need to get Freertos running on it
  2. Need docs on how to connect a debugger
  3. Need a full pinout of the mcu

@orzel
Copy link

orzel commented Jan 31, 2024

For the record, there's a thread about it at eevblog: https://www.eevblog.com/forum/reviews/miniware-mhp50/

@TowerDefender007
Copy link

@SimGas Short question dio you also have the problem that the temperature isnt correctly displayed? So it should heat up to 300°C but only displays around 150°C? ALso did it run for longer and ever encountered the problem that the controler says "over temperature"?

@SimGas
Copy link
Author

SimGas commented Feb 16, 2024

@TowerDefender007 I have not yet observed any problems with my MHP50. I've used it in reflow mode around 5-10 times with temperatures up to 260 degrees. Everything was displayed properly. Right now, I tried heating in "heat" mode and this also seems to show the correct temperature.

Which power supply do you use? If you use one with a low voltage, that could maybe overheat it? I use a 65w lenovo laptop power supply right now.
17080704937221864055700349196409

I never had the over temperature error, but longest I used it was maybe 25 minutes or so.

@TowerDefender007
Copy link

@SimGas I am using an Anker PowerPort Speed 5 with USB-C with PD but I also tried using my Shargeek battery bank that is capable of outputting 100W on the USB-C (20V at 5A) also I can see that the MHP 50 is using around 82W from the powerbank. But the biggest problem isnt that the temperature isnt accurate (or at least it would take 10min to read the right temperature) because it turns off at some point and says that the controller overheated.
Does your fan turn on at some point or is he also never active?

@SimGas
Copy link
Author

SimGas commented Feb 16, 2024

Just tried it with 250 degrees for 8 minutes. Afterwards the fan speed was 4400r/min and mcu temperature was 41 degrees. Maybe your fan is not connected? Does it show anything in the info menu?
Uploading PXL_20240216_082142731.jpg…

@TowerDefender007
Copy link

@SimGas The info menu only says 0 r/min but the funny thing is after I let it heat up and the error occured I unplugged it and plugged it back in again the fan started for a short time and then turned off again. Do you know how I can open it up to take a look at the fan because I thing the fan is the problem here?

@TowerDefender007
Copy link

IMG_4065

@SimGas
Copy link
Author

SimGas commented Feb 16, 2024

Well, there are four screws under the rubber pads on the underside. Losen those and wiggle the plate slightly. When it comes off you should be left with what you can see in photo 7.
However, if the fan comes on eventually, I think it is not broken.

@TowerDefender007
Copy link

I opened it and the fan is working but there is something odd happening after rebulding it the MHP 50 turns on the fan at the start and says there is no fan connected. Then I dissambled it again and rebuild it again and now it works again.

@SimGas
Copy link
Author

SimGas commented Feb 16, 2024

Maybe the pin for reading back the fan speed has a slack joint?

@TowerDefender007
Copy link

I didnt checked that. I only checked the cable because it looked a little bit crushed.

@ius
Copy link

ius commented Feb 16, 2024

Just adding a note to document that I've tested SWD via the USB C connector on MHP50, but it doesn't work for me.

  • I used a Raspberry Pi Pico with CMSIS-DAP debugger firmware and butchered a USB A <-> C cable
  • MHP50 powers on just fine on 5V from the Pico, but SWD fails (at least, DPIDR read fails). Even tried booting into DFU (by holding down one of the buttons when powering on).

I'm fairly confident about the electrical part and am familiar with OpenOCD (although not with Pico).

So either this particular device doesn't do SWD via USB C (seems ubiquitous on Miniware products though) or I've messed up.

Anyone else feel like giving it a go? Or perhaps someone who has torn down the device is able to tell whether the SWD pins are in fact connected to USB D+/D- on this device?

EDIT: This in fact worked on a second attempt, not sure why it failed initially.

@orzel
Copy link

orzel commented Feb 18, 2024

Honestly this looks like a better design than the MHP 30. Makes me less inclined to finish my designs for a competitor.

Exactly my thoughts.... And i'm (or I was?) also designing something.

@StevenSeifried
Copy link
Contributor

Hey there,
any news about IronOS support for the MHP50? Mine has arrived today, maybe I can help

@ius
Copy link

ius commented Apr 2, 2024

EDIT: This comment contained a question about whether 28V DC input is supported on the barrel jack (rated 19-24V) while we wait for Miniware to release their firmware supporting the PD3.1 28V profile via usb. In the meantime I've received an answer from Miniware support: yes it does!

.. which is another thing IronOS on MHP50 would be great for (28V PD support) - but it seems we lack traction. Other than my (failed) SWD experiment I'm not to keen on tearing it down as the rubber feet seem glued on...

@MurdoMcLeod
Copy link

Hi Folks,
I'm new here so forgive me in case I sin against the Git-Gods.

I got one of these MHP50-B5 hot plates a few days ago, and tried it on Friday. I spent 2 hours trying to get it to work properly. I could not get it to go above ~80'c no matter what I tweaked in the menus, and no matter the different power supplies I used (USB-C PD and DC-5255 at 24V/10A).

It turns out (after much wrangling with customer support) that Miniware have a batch of these things with trapped (or easily trapped) fan cables. Mine was one of them. See attached pictures. Turns out that any shorting from the fan wires causes the hot plate to not heat up properly.
IMG_4884
IMG_4885
IMG_4886
IMG_4887
After I un-trapped the wires and repaired them with insulating tape, and reassembled it to make sure nothing was trapped, the unit worked properly.

Like night and day - the heating with 24V input was blisteringly fast. It melted all the SMD components off a small DCDC board in 1 minute.

Hope it helps - if you have one and it is playing up, dismantle and free/repair the fan wires.
Murdo.

PS Yes the feet are well stuck down but if you're careful you can re-attach the sticky feet afterwards. Just be gentle.

@danielkurek
Copy link

I have traced some connections on the PCB. I have noticed that USB-C does have only one pair of D+ and D- connected that could be the reason why first attempt of connecting SWD by @ius failed. Also D+ and D- are not directly connected to other MCU pins apart from SWD communication, they could be through some resistors or some other IC for USB communication.

Here is what i have traced so far:

  • SWDIO is connected to USB D+ (PA13)
  • SWCLK is connected to USB D- (PA14)
  • LED is possibly some type of addressable RGB - one pin is connected to PB15
  • BOOT0 and BOOT1 are connected to GND (through 2k resistors)
  • Left button -> PC8
  • Right button -> PC9
  • 6-pin connector to hotplate is as follows (from left (closest to power input)):
    • 1-2 is power input to heater element
    • 3-4 is GND for heater element
    • 5 is GND
    • 6 is possibly some sense pin - connected through 1k resistor to PB12 with 1k pullup
  • 4 pin connector to hotplate is as follows (from top left (closest to power input)):
    • 1is GND
    • 2 is PTC thermocouple - 2R around 22C (MCU pin ??)
    • 3 unknown
    • 4 (bottom right) is connected to PA3 (100k to GND on AL50 plate, possibly identification)

@ius
Copy link

ius commented May 27, 2024

@danielkurek Thanks for chiming in!

In the meantime I did get SWD to work, dumped the firmware and performed some cursory reverse engineering to patch the arbitrary limits Miniware put in place for the reflow temperature/time. In the process I also identified parts of the pinout.

mhp50_ch32f

It's a bit rough (because I only did a first pass mapping all pins I've seen referenced in code) - but I have quite some functions labeled in IDA - identifying peripherals isn't too difficult based on the configuration settings/menus.

For my current use case the (patched) Miniware firmware works quite well, but if someone is willing to invest time in actually writing code to port IronOS (@Ralim?) I might be able to spend some more time on reversing.

Display is ST7735 based by the way. External flash is just used for configuration settings.

Miniware have released v1.01 as a downloadable firmware upgrade, just in case anyone wants to take a look at the firmware without having to wire up SWD.

@danielkurek
Copy link

danielkurek commented Jun 7, 2024

Here is updated list of the MCU pinout. The main thing missing is controlling of the mosfets for the heating element. They are controlled by TPS51601A but unfortunately the main pins are connected through unknown IC.

  • pins yet to be determined (pins have traces from them but the routing is on inner layers):
    • PD3
  • pins that seem to be not connected (someone could check if they are referenced in code somewhere, @ius?):
    • PC4, PB9, PB5, PB3, PD2, PC12, PC11, PA15
  • all other pins are mentioned in the text below

EDIT: Updated pins
EDIT2: added functions of PD4 and PB8
EDIT3: details about controlling mosfet driver


  • PB15 - LED (probably addresable)
  • BOOT0 & PB2/BOOT1 - 2k to GND
  • PC0 - connected to 2233 (WQFN16 IC)
    • only GND and 1 GPIO pin connected to it
    • most probably 1-wire EEPROM (for storing PCB version number/configuration?)
    • this chip is also on PCB on the hotplate
  • PA9 - unpopulated LED + resistor
  • PC1 - connected to IC with markings LDFQB (SOT23-5?, transistor pair?)
    • perhaps something for power or temperature measurement?
  • PC2 - connected to IC with markings C5C26 (SOT23-5?, transistor?)
    • perhaps something for power or temperature measurement?
  • PC10 - debug UART TX?
  • PB8 - buzzer

Accelerometer?

  • KK CM marking on the IC
  • LGA-12 or similar (2x2mm)
  • found similar chips and most of them have similar pinout
  • PB11 - I2C SDA?
  • PB10 - I2C SCL?
  • PA10 - interrupt?

Power input

  • PC6 - connected to IC 72K (SOT23-6?) - something to do with power input P- channel mosfets
  • PC7 - connected to IC 72K (SOT23-6?) - something to do with power input P- channel mosfets
  • PC3 - ADC for barrel jack (18k to center pin)
  • PA2 - also ADC for power input (not sure about its purpose)

Buttons

  • PC8 - BTN left
  • PC9 - BTN right

USB-C

  • PA13/SWDIO - USB D+ (only one side of C-C cable)
  • PA14/SWCLK - USB D- (only one side of C-C cable)
  • D+ -> PA12
  • D- -> PA11
  • USB PD controller - ET7301 (compatible clone of FUSB302)
    • SDA -> PB7
    • SCL -> PB6
    • INT_N -> PB4

Hotplate

Mosfet driver

  • TPS51601A - mosfet driver
  • RS0101YH6 (0101 marking) - logic level shifter
  • PB1 - PWM of the heating element (mosfet driver through the shifter)
  • PB13 - shifter enable pin
  • PD4 needs to have software PWM to enable power to mosfet driver and logic level shifter

6-pin connector

  • pin 1 is closest to power input
  • pins 5,6 - 1-wire interface for EEPROM on hotplate (most probably)
    • 1k to PB12 with 1k pullup
    • connected to chip 2233 (this chip is also on main board)
  • 1,2 - VDD for heating element
  • 3,4 - ground for heating element
  • heater is 4.1R

4-pin connector

  • 4pin - 1,2/3,4 (from top right - closest to power input)
  • 1 -> G
  • 2 - connected to 1 side of a wire on hotplate (other to GND on hotplate - 2R)
    • 1.2k to opamp INB+
  • 3 -> NC ?
  • 4 -> PA3 NTC temp (100k at 20C to GND on AL50 hotplate)

Fan

  • 1 black gnd (furthest from power input)
  • 2 red VCC
  • 3 yellow pin PA0
  • 4 blue pin PA1 (closest to power input)

Op-amp

  • PB0 - OUTA of opamp (from some voltage regulator? - from chip with inductor)
  • PC5 - OUTB of opamp
  • INB+ - pin 2 from 4-pin (NTC thermocouple - around 100k at ~21C)
  • INB- - 200R to GND and through some resistor and capacitor to OUTB

Display

  • 0.96"
  • 80*160
  • controller: ST7735S/GC9107
  • link to aliexpress
  • pins (pin 13 on left from bottom - closer to BT antenna)
    • 1 TP0
    • 2 TP1
    • 3 SDA - PA7
    • 4 SCL - PA5
    • 5 RS - PD5
    • 6 RES - PD6
    • 7 CS - PA4
    • 8 GND
    • 9 NC
    • 10 VCC
    • 11 LEDK - PA8 (through transistor)
    • 12 LEDA
    • 13 GND

External flash

  • W25Q64JVSIQ
  • SPI shared with LCD display
  • 1 /CS -> PB14
  • 2 DO -> PA6
  • 3 /WP-> NC?
  • 4 GND -> GND
  • 5 DI -> PA7
  • 6 CLK -> PA5
  • 7 /HOLD or /RESET -> VDD
  • 8 VCC -> VDD

@danielkurek
Copy link

The pinout of the MCU is almost complete. The main pins were traced. Pins PC1 and PC2 are probably used for charging a supercapacitor (15F, 3.8V) and powering the MCU. During testing I found out that the MCU can be run entirely from the supercap even if no power input is connected (I was really confused that the display was still working even after disconnecting the power when the MCU was halted 😄).

I have managed to get FreeRTOS working using examples from MCU manufacturer. The example project was converted to GCC so that it can be easily compiled. You can find the project in repository CH32F208WB-FreeRTOS-GCC (beware currently the project overrides the original bootloader). Additionally, I have fixed a fork of OpenOCD that enables flashing firmware to the MCU (fixed version). I will start working on porting IronOS in the next few weeks.

@StevenSeifried
Copy link
Contributor

The pinout of the MCU is almost complete. The main pins were traced. Pins PC1 and PC2 are probably used for charging a supercapacitor (15F, 3.8V) and powering the MCU. During testing I found out that the MCU can be run entirely from the supercap even if no power input is connected (I was really confused that the display was still working even after disconnecting the power when the MCU was halted 😄).

I have managed to get FreeRTOS working using examples from MCU manufacturer. The example project was converted to GCC so that it can be easily compiled. You can find the project in repository CH32F208WB-FreeRTOS-GCC (beware currently the project overrides the original bootloader). Additionally, I have fixed a fork of OpenOCD that enables flashing firmware to the MCU (fixed version). I will start working on porting IronOS in the next few weeks.

Hi @danielkurek
maybe it's a bit too early for that, but I wanted to ask kindly about the porting progress

@danielkurek
Copy link

I did not have much time to work on it but i started to work on controlling the heating element. (Also, I have updated the above pinout with my current findings). I have not found datasheet to the IC (with markings 0101 A317A) that is between mosfet driver and some MCU pins so I am currently in progress of guessing how to drive the MCU pins to control the heating element. After that, I think that it should not be hard to get the first alpha version of IronOS working on it (with minimal functions - display, buttons, heating).

I do not have much experience in reverse engineering hardware so the progress is quite slow with my limited time. However, if someone has more time to work on this, I would be happy to help and provide all my notes on reverse engineering/development. Otherwise I will be slowly working on it in my free time.

@danielkurek
Copy link

I have an update. I have managed to get the heater control working. There is a failsafe mechanism that ensures that the heater will not work if the MCU fails. Pin D4 needs to have a constant software PWM (no hw timer support) which enables power to the mosfet driver IC and logic level shifter (which shifts control PWM to 5v).

I will start working on porting IronOS to the MHP50.

@agilum
Copy link

agilum commented Sep 20, 2024

Hey danielkurek,

is there hope to have ironOS with freely selectable reflow max temp available on mhp50 (similar to mhp30)?

@danielkurek
Copy link

@agilum I will start with a very basic firmware with only buttons, screens and constant temperature mode working. Once that is working, I will try to match the features of the MHP30 that are in IronOS. So, yes reflow temps should be freely selectable (the hardware does not limit this behaviour).

@Ralim
Copy link
Owner

Ralim commented Sep 20, 2024

@danielkurek
If you get stuck on anything IronOS side let me know and I can try and help or guestimate out things.

Both the ST7735 and the CH32F208WBU6 will likely need driver work put in that I can do a rough pass on (dont have hardware to test).

I don't have hardware but I'm happy to try and help with the messier parts of IronOS itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or additional function.
Projects
None yet
Development

No branches or pull requests

9 participants