So, after deciding that I would update a Ninja SP101 oven / air fryer to act as a reflow oven, the first step was to reverse engineer the PCB. I needed to know what pine I had to toggle to turn on the elements and what I had to read to get a temperature reading.
The components I needed to interface to were as follows:
- Three upper heating elements that can be separately controlled
- On set of three lower elements that are all switched at once
- A main fan for the fan oven bit
- A light inside the oven
- A PCB fan for cooling the triacs
- A thermistor for taking oven temperature readings
- A thermistor for taking temperature readings from the triacs
- A front panel which use a TM1629D to manage the LED display and buttons
- A rotary encoder for the main button
- Unknown to me at first, but there's also an accelerometer to tell if the oven's upright
The PCB was luckily a fairly simple single-sided affair with a few jumped links. It was simple enough although the SMT components were tightly packed and it could be tricky to see if some pads were connected or just close together. This is a section of the board.

I started off on the main bit - controlling the elements. Tracing the high voltage control circuitry back to the relevant PCB pin wasn't too tricky. It just involved peering at traces under the microscope, using a continuity tester, and a bit of common sense. I could see 3 triacs for the upper elements. Each one had an optoisolator. Nearby was a transistor and resistor. These led back to 3 pins on the STM32 microcontroller. Not too tricky.
Similarly there were two relays. One seemed to be the first thing in the path of the mains power. The second seemed to connect to the lower elements. I guessed that the first isolated everything for safety reasons and the second was for the lower elements. The path back gto the microcontroller for the lower elements was the usual flyback diode, transistor, resistors, etc. The main power one seemed a little more complicated but did eventually go back to a pin.
After guessing the pins the first thing I did was some basic code to switch the elements. I had some success. One of the relays (for the lower elements) clicked in a very satisfying way, but the main one refused to engage. I suspect the triacs were working but with the primary mains power cut off it was hard to tell.
From the slightly more complicated circuitry between the pin and the relay, I suspected that something more than just a digital output was needed. It would be terrible if something went wrong and things were stuck on. My money was on a pulse train, but I suppose an anaolg output in a specific range was a possiblility too. I decided that spending a bit on a spare board from eBay would be useful. It woudl mean I could revert things if it went wrong and also could probe how things should work. In the end it turned out that a 5kHz square wave was needed. A bit of modified code later and I could control all the elements and also the main fan and light via the SPM32's GPIO.
Whilst doing this I decided it would be safest to use a logic analyser and a laptop running on battery power. A handheld oscilloscope that I got from Element14 also came in useful. It seems that however the 3.3V DC (also 12V and 5V) is generated, the ground floats at about 80V above earth. Good job I didn't use a mains powered oscilloscope before checking!
After working out the mains powered side of things, I found a good point to power the board via 5V so could work on the logic level side of things in a bit more comfort. It's not nice typing on a laptop knowing any metal parts might feel a little spicy!