Ralim / IronOS

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

Add support for Solder Ninja Pen #1989

Open nschurando opened 3 weeks ago

nschurando commented 3 weeks ago

Hi,

I'm the inventor of the Solder Ninja Pen and would love to provide backers of the project with the ability to use IronOS instead of the default firmware.

2024-04-19 15 29 15 2024-04-21 17 02 53

Below is a schematic of the board.

image

It is running on a RP2040, relies on a FUSB302 and PI3USB9281 ICs for power negotiation, has an SSD1306 96 x 16 px OLED display, an adjustable buck converter, and a thermocouple sensor IC.

I'm happy to provide additional information and contribute some code but I'd appreciate some pointers as to where to start.

Regards,

Nicolas

Ralim commented 3 weeks ago

Hello 👋🏼

I'd love to see this unit be supported, I have seen it online a few times and it looks like a great design.

I don't see any real blockers with getting this device supported. Hardest part will be getting the RP2040 drivers building with make I suspect.

My general process for getting a new device supported is:

  1. Make a folder in the BSP folder for your device
  2. Extend the Makefile to have an entry for the device
  3. Also update build.sh to have the entry name
  4. In your BSP folder, will need to include the configuration.h file that contains a bunch of build time settings and toggles (just copy and update one from a similar device)
  5. Once you can run a build, you will find that basically all the functions from the BSP*.h files need to be implemented
  6. Tune the tip reading, cold junction offset (if required), OLED setup etc.

I would suggest for (4); copy and paste files from another device and then empty our all the function implementations to get a scaffold. I'd also suggest to bring in the vendor drives as a git submodule if reasonably easy to do so (just so future updates are easier).

At a quick review of the schematics; I think this should be a fairly straight forward port; especially as it looks like you went higher end hardware to make software easier (i.e hardware cold junction offset removal). You also wont need the time-sliced heat and measure cycle that 2 contact soldering tips required, so a lot of that code isn't required either.

I'm absolutely happy to help with this; though I don't have time to do the port myself at the moment. I already have a device I'm meant to be doing that I haven't had time to look at for weeks.

If you get get to a state where steps 1-4 are super roughed out and the device "boots" (using debugger to check I guess) but peripherals/drivers/config isn't working that's where I'm probably the most helpful as I know that side of things well.

I haven't programmed the RP2040 in C/C++ (only in rust) so not sure what the go is with the drivers there. Hopefully you have some experience there.

Out of the box getting the main stuff going should be fairly easy. Drivers/support exists (or trivially can be updated to support) the FUSB302/PD,LIS2DH,MMH253,OLED,QC2/3,tip driving & temperature regulation (two control modules, I'd say PID may be better option here).

Things that will need a bit of work

  1. I2C EEPROM (I assume? you use this for setting storage)
  2. The USB Muxing
  3. PI3USB9281
  4. TPS621 voltage regulation
  5. INA219 will need a bit of a hook in to over-ride the default current estimator to use the real readings