OpenWare

MHP50 mini hot plate: inside

The MHP50 is a 50 × 50 mm heating plate on a small controller. The plate itself is a replaceable head; the controller takes power from a DC jack or from USB-C with USB PD. This page is what the openware-mhp50 firmware knows about the hardware it drives.

Nobody on this project has traced the board. Everything below comes from what the stock firmware does, from dumps of the flash, from measurements on the author's plate, and from what others found in the IronOS discussion of the MHP50. So read it as how the plate works by the behaviour of its firmware, not as a schematic. Each fact says where it comes from:

measured checked on the author's plate with this firmware, dumps or a bench supply
stock code seen in the disassembled stock firmware (APP V3.02), not confirmed on the hardware
IronOS thread found by others in the IronOS discussion, not checked by us
guess our explanation, with nothing above to prove it

Photos of the board

Miniware has no FCC filing for the MHP50, so there are no lab photos of its insides. The photos that exist are in the first post of the IronOS discussion by SimGas: the opened controller and both sides of its board, revision V0.7A. In the same thread danielkurek traced most of the microcontroller's pins.

Block diagram

MHP50 block diagram: the CH32F208 microcontroller in the middle; the display, flash, sensors and actuators above it on labelled buses; the power inputs with their switches, the PD chip and the logic supply on the left; the heater drive and the replaceable head on the right

Pins and buses as the firmware drives them. The heater, its thermocouple, a thermistor and an identification chip all sit in the replaceable head.

Microcontroller

A WCH CH32F208WBU6: a Cortex-M3 with a Bluetooth LE radio on the same chip, in a QFN68 package, with 480 KB of flash and 64 KB of RAM stock code IronOS thread. A 32 MHz crystal and the PLL run the core at 96 MHz; the low-speed crystal is off, and the clock and the radio timer run from the internal RC oscillator stock code.

How it boots

MHP50 boot diagram: after a reset the Miniware loader checks button A, the authenticity chip and the stack word, then jumps to the OpenWare loader, which starts the OpenWare app or stays; the app and the loader write each other over USB, the Miniware USB disk writes once and on the way back; on the right the flash map with sizes and the RAM area that survives a reset; below, the stock chain

Two loaders and the application. After every reset the Miniware loader runs first: button A held opens its USB disk MHP50_DFU; otherwise it checks the authenticity chip and jumps to 0x08010000 if the first word there, the only one it checks, looks like a stack pointer stock code. That is the OpenWare loader. It stays when the application asked for it, after a watchdog reset or when the application is not valid, and starts the application otherwise.

Power

Two inputs, each with its own switch; only one is ever on.

Each input's voltage is read ahead of its own switch: the firmware compares PC3 and PA2 before it opens either, and the two channels change apart, 3286 and 672 with the bench supply on, 597 and 671 with it off stock code measured. The logic supply also runs from the inputs ahead of the switches: after a reset both switches are off while the loader and the firmware already run, and with the DC supply off the plate keeps running from USB-C with the DC switch closed stock code measured. How the two inputs are joined for it is not known.

The firmware compares the two inputs and opens one switch. The stock firmware picks the input once at power-up, so a supply plugged in later goes unnoticed; OpenWare picks again every second outside a run, checked both ways on the bench measured.

The DC voltage scale was taken against a bench supply at two points, 24.0 V and 12.0 V: 7.2954 mV per ADC count plus 65 mV. The plate now reads 23 993 mV where the supply shows 23 990; the stock firmware showed 26.3 V at a real 24.0 measured. The divider is said to be 18 kΩ / 2 kΩ IronOS thread.

Heating needs 8 V or more: from the DC jack, or a PD contract of 8 V and up; a plain 500 mA USB port is not enough, and the plate says so. The power limit from the DC jack is a setting, 90 W by default (at 90 the bench supply measures 87.7–89.0 W measured); from USB PD it is the power of the contract, which a setting can cap lower. In the thread, PC1 and PC2 probably charge a 15 F supercapacitor that can run the microcontroller with no input at all IronOS thread; the stock firmware raises PC1 on a power failure and in a crash stock code.

Heating

Sensors

WhatPinHow
Plate temperaturePC5The head's thermocouple through an amplifier, about 9 mV/°C at the ADC; a linear scale per head type plus the cold junction. The ADC runs out at 338 °C (BS50) to 372 °C (AL50_1) stock code. That it is a type K thermocouple with a gain of about 220 is guess
Head body, cold junctionPA3A 100 kΩ NTC in the head, a 311-point table from −30 to 125 °C; 26.8 °C at room temperature measured
Heater resistancePB0Current amplifier, see Heating measured
Input voltagePC3, PA2DC jack and USB-C, see Power measured
TiltI²C PB10/PB11SC7A20 accelerometer; heating stops when the plate tips over 30°, checked by tilting it live measured
Fan speedPA0Tachometer pulses; how many per turn is guess
Which headPB12, PA3Plates by the name in the head's 1-Wire EEPROM (AL50, BS50, AL50_1, BS50_1, CP50), encrypted with a key from the chip's ROM number and checked by CRC32; the author's BS50_1 reads right measured. Iron adapters by the voltage on PA3
Chip temperatureinternalFor information only, no protection uses it

Every ADC channel is the average of 5 samples, with no other filtering.

Interface and storage

Pin map

PinWhat is on it
PA0fan tachometer stock code
PA1fan PWM stock code
PA2ADC: USB-C input voltage measured
PA3ADC: head thermistor; iron adapter identification measured
PA4screen CS stock code
PA5, PA6, PA7SPI1: screen and flash stock code
PA8screen backlight PWM stock code
PA9, PA10unused; an unpopulated LED and the accelerometer interrupt IronOS thread
PA11, PA12USB D−, D+ measured
PA13, PA14SWDIO, SWCLK IronOS thread
PB0ADC: heater resistance measured
PB1heater PWM stock code IronOS thread
PB4USB-C PD chip interrupt measured
PB6, PB7software I²C to the USB-C PD chip measured
PB8buzzer stock code
PB10, PB11software I²C to the accelerometer stock code
PB121-Wire EEPROM in the head, read only measured
PB13heater driver enable stock code IronOS thread
PB14flash CS stock code
PB15RGB LED stock code
PC01-Wire authenticity chip, checked by the Miniware loader at every start; never write it stock code
PC1raised by the stock firmware on a power failure; supercapacitor IronOS thread
PC2a short pulse in the stock firmware, purpose unknown guess
PC3ADC: DC input voltage measured
PC5ADC: plate thermocouple measured
PC6, PC7input switches: DC, USB-C measured
PC8, PC9buttons A, B measured
PC10UART4 TX at 1 Mbaud, the stock firmware's debug output; unused here stock code
PD4heater driver enable, toggled every 10 ms stock code IronOS thread
PD5, PD6screen D/C, reset stock code

How the firmware drives it

The screen

A reflow profile running: 215 °C, the plan dotted and the measurement over it The home list: heating by hand and the profiles on the disk

Drawn by the firmware's own drawing code on a computer, so they are what the glass shows. The whole interface runs in the emulator; how it is built is on its own page.