Based loosely on the Soldering pen project by @banjohat (https://hackaday.io/project/10140-soldering-pen), this was going to be built using some parts I already have on hand, but at some point it became more about making it actually work. The eventual "features" of this project include: relatively small size, somewhat easy to hand-assemble, pretty solid temperature control (even without using PID) and several project logs chronicling my misadventures.
Weller RT 1
Soldering iron tip
Arduino Nano or compatible
WCMCU-8495 (AD8495-based K-type thermocouple amplifier)
Amplifier and Linear ICs / Operational Amplifiers
Made a quick stand for me iron tonight, out of part of an old microwave's case. It's ugly and pretty terrible, but it gets the job done. Pretty much just cut a strip out of the sheet metal and drilled a 5/16" hole.
So, I managed to get everything working well, and even managed to tin the tip! However, the thermocouple in my RT-1 seems to be rather inaccurate. (also, the readings vary quite a bit... not sure what to do about that yet)
Temperature control is working now! Haven't checked with my thermocouple to see if it's accurate, but it gets to the target temperature pretty quickly, and hovers within around ±2°C, even though I haven't implemented PID control or anything yet; right now it's just setting the PWM pulse width to either 254 (for heating) or 8 (for cooling).
Once I verify that the detected temperature is decently accurate, I'll raise the maximum temperature and try soldering something!
Also, you may notice that I switched back to the Nano. I still haven't been able to program the WAVGAT Pro Mini boards, so I switched back to one I know will work, and after fixing a couple of bugs in the code, it's doing great! (especially considering I'm still only heating the tip with 5V, not 12V like most of the other designs)
Earlier today, I made what I think are the necessary changes to the code. I should be able to test everything out now, but I have yet to be able to actually program the Pro Mini. I've tried using the USBTinyISP (which worked fine on the Pro Micro) and the FTDI adapter, but avrdude always fails. I've even pulled the Pro Mini out of the circuit entirely in order to program it, and it still won't work. Probably serves me right for buying cheap knock-off parts from AliExpress.
At any rate, my latest code is pushed to the GitLab repo, so feel free to check it out.
Edit: Apparently, the WAVGAT chips don't work correctly with ISP-style programming (SPI interface) but they do work when you program them via serial using the bootloader. On the other hand, the bootloader doesn't seem to allow you to read the flash, so it can't verify whether or not the write succeeded. I'll be testing it out tomorrow to see if the flash actually took.
Edit 2: Nope. Even though avrdude claimed it succeeded in programming the chip, it doesn't seem to actually do anything when put back in the circuit. I asked the seller on AliExpress about it, and after he shared the same instructions with me that were in the item description, he said he'd refund the $2.82 it cost me for 2 of these. That still means I have 2 of these sitting around, apparently unusable.
Edit 3: I've even tried using LGT's LarduinoISP to program it, clamping directly onto the chip's SWC and SWD pins since they're not exposed on the board... and still, no dice. More discussion can be found at https://hackaday.io/page/6452-wavgat-avga328p
So, since the last project log, (actually, since Monday) I've actually switched microcontrollers twice: first, from the Nano to the Pro Mini, and then to the Pro Micro. (the Pro Mini doesn't have enough code space to fit the library for the OLED screen I'm using and still have room for anything else) Oh yeah... I also added an OLED screen!
So, I had a realization earlier... the USB interface on the Nano DCCduino is actually on a separate chip. On a hunch, I plugged it into the breadboard to see if it would light up if I powered it externally...
Well, then. That makes things easier.
So, in light of this... I'll be switching back to using the Nano for this project. (more pins makes a lot of things easier, and I won't need to worry about weird DigiSpark-specific library ports) I just need to solder the ICSP pins on and hook up my BusPirate, and I'll be back in business.
Now that I've switched to the Digispark for the brain of this project, I've updated the code to support it (using a preprocessor define so we can switch between that and the Nano) and added in a software-based serial port for communication. (I couldn't get the Digispark's software serial-over-USB to work, and it doesn't have a hardware serial port apparently)
The weirdest thing here is that I got no output on the serial port TX line at all for quite a while... until I unplugged the heat sensor amp circuit from the Digispark. The heater control circuit is apparently fine, but something about the OPA4228PA's output was apparently killing the Digispark - when it was plugged in, I couldn't even get lights to blink!
I'm really kinda stumped on this one... I don't understand why connecting the output of an op-amp to an input pin would cause the whole microcontroller to freeze. I've pushed my latest changes to the GitLab project, if anyone reading this would like to take a look and maybe fill me in on what I'm doing wrong. (the Fritzing file for the Digistump version of the circuit is available here)
So, after I started troubleshooting why it was behaving as if the Mode button was always pressed, I found out that that actually was the case; the button I was using was broken, and was always a closed circuit. Once I removed it, suddenly the Nano shut off, and since then I haven't been able to get any response out of it; not even the power light comes on, and it doesn't show up in dmesg.
Rest in peace, Nano. The last couple of days were brief, but enjoyable.
Since the only Nano I have has now passed on, I needed to find something else to drive this whole project. I could have pulled out another of the PICs I have in store, but honestly... they're more of a pain than I want to deal with right now. So instead, I dug up this tiny one:
It's apparently a Digispark clone, and it was given to me a couple of years ago by the same friend who donated the Nano. (thanks, Rusty! I couldn't have done this project without you :D)
Turns out, if I'm not tied to driving an LED display, I can do everything on 4 I/O pins, and still have a serial connection for doing stuff like display, if I get creative. (maybe I'll make a companion app for my Raspberry Pi Zero or something) Sadly, it can't do the serial monitor over USB like the Arduinos can, but there's other ways to get output.
If all else fails, I have an MSP430 (also given to me by the same friend), and I also still have a new "Pro Mini" Arduino clone coming... which is basically a Nano without USB.