Weller Soldering Iron WES51 - Page 1
Forum section: electronics / repair

author: bostonman
author_rank: Super Contributor
timestamp: February 23, 2022, 01:47:47 am
content: I posted a question regarding the Triac in the attached circuit in another message, but that was regarding something else, this is regarding a repair (just want to keep myself honest so nobody thinks I'm double posting).My WES51 Weller Iron stopped working without warning - the LEDs didn't turn on nor did the iron heat. Yesterday I disassembled it and took some measurements. Fast forwarding to today (reference attached schematic) I confirmed the output of the transformer is 24VAC and 5V is coming out of the LM78.At first I thought (and still remain a bit confused over what I measured) that the thermocouple inside the iron itself opened, however, looking at the circuit, I realized I can unplug the iron and check if the op-amp is toggling when I pull down (or leave high) the bottom side of the 1M resistor (essentially pin 3 of the op-amp).Upon doing this, I managed to see that the op-amp was either 0V or 5V, and, I could see the green LED go off and on when I either pull up or pull down (I forget which one caused the LED to turn green). Unfortunately in neither state did the red LED illuminate.From looking at the circuit, I believe the iron can remain unplugged and not have an affect on the Triac section.Having said all this, the op-amp is toggling, I have 5V, 24V, and the Triac doesn't provide any feedback to the PIC to tell if the iron is actually heating thus allowing me to leave it unplugged (to rule out external anomalies).The one pin I'm uncertain of: pin 5 of the PIC is only 3VAC. My feeling is that's an RC circuit and it should be 24VAC, however, maybe the PIC has low impedance and loading down the voltage.The major issue that I see, and I'm praying it's not the PIC: when I toggle the op-amp, the base of BC547 isn't going high or low; it's only going to about 34mV.From all I measured, I've almost determined the PIC is bad, but hoping pin 5 should be at 24VAC and that maybe the capacitor is resistive (obviously I can remove it to determine this).On a side note, I have a junk backup iron, so I am limited on how much I experiment with removing components.

author: Ian.M
author_rank: Super Contributor
timestamp: February 23, 2022, 03:16:11 am
content: Pin 5 should be a line frequency near-squarewave, clamped by the chip's internal input protection diodes, with the bottom a bit below Vss and the top a bit above Vdd, but not by much as the 1Meg resistor only allows a peak current of about +30uA, -34uA (asymmetric as the Vdd and Vss rails aren't centered on AC 0V) through the protection diodes. Expect the 'squarewave' to be about 6V pk-pk, approx 0.5ms risetime and to have slightly humped top and bottom due to the increased protection diode Vf at peak clamping current.Try disconnecting R14, and see if the PIC output on pin 2 is any better when unloaded. Also check the pot can sweep the setpoint voltage on pin 6 from 0V to 5V.

author: bostonman
author_rank: Super Contributor
timestamp: February 23, 2022, 03:35:34 am
content: QuoteI didn't necessarily try sweeping the pot, but I manually set it to the middle (I had to remove the knob to work on it) and I'm measuring almost 2.5V at pin 6; but I'll sweep it.I'll place a scope probe on pin 5 and hope the PIC is fine. Due to bypassing the soldering iron thermistor, it seems a safe bet the iron isn't the (main) culprit.Good idea about removing the resistor. I should have checked the transistor, but thought at 47k, a shorted transistor probably wouldn't show near 0v on the PIC side.

author: pqass
author_rank: Super Contributor
timestamp: February 23, 2022, 04:47:26 am
content: To help you locate the fault, consider the following...a. K-type thermocouple produces 42µV/°C;therefore its output is: 8.4mV@200°C, 12.6mV@300°C, 14.7mV@350°C, 16.1mV@384°Cb. the opamp non-inverting configuration has a gain of about x310 (1+464k/1k5, but is likely lower due to 10R/14K divider);therefore its output is: 2.604V@200°C, 3.906V@300°C, 4.557V@350°C, 4.997V@384°CQ: why did I specify 4.997V@384°C?A: because that's probably what the ADC uses as a reference and can't be >Vcc.c. pin 5 of the MCU probably senses the zero-crossing of the 24VAC secondary.d. an unconnected thermocouple should cause the opamp to output +5V (or close too it) which is equivalent to "too much heat" and therefore the MCU should shutoff the triac.e. a shorted thermocouple should cause the opamp to output 0V (or close too it) which is equivalent to "too little heat" and therefore the MCU should turn on the triac.f. when transistor base is toggled, the 2.2µF cap on the triac gate will cause the triac to conduct for only a 1/2 (24VAC) cycle before needing to be retriggered again so just grounding the base of the BC547 won't be able to test that part of the circuit. The MCU is very likely sending a train of pulses and that's why you are measuring 34mV (avg) here.Q: why is there a cap anyway?A: probably a safety measure; just in case the triac gets stuck-on.Q: Where is the reed switch located? Given the station's design, It doesn't serve the usual purpose of putting the station in standby mode. So what's the purpose of it? Are you accidentally triggering it and therefore messing with your fault finding?I don't know the meaning of red/green LED but the pin can output either 5V (red on), 0V (green on), or hi-Z (set to input mode so that neither is lit).I would expect in a working station that if you were to place a resistor (say, 470R or 1K 1W) across the heater connector contacts then short the thermocouple contacts, you should should measure 24VAC across the resistor.The iron heater contacts should measure 10 ohms.P.S. I don't own a WES51 but I do own a PES51 (the iron) and have built a solder station of my own design around it.

author: bostonman
author_rank: Super Contributor
timestamp: February 23, 2022, 03:13:05 pm
content: QuoteWow, thanks for the detailed math explanation. The reed switch (unless I'm wrong) is a silly way of locking the temperature. This iron has an optional 'pen' someone can purchase which is nothing more than a magnet. The manual states the steps to lock the temperature. I'm assuming if this were on a manufacturing floor, and parts couldn't be soldered any higher than 550 degrees F, then a manufacturing engineer could 'lock' the iron to that specific temp and moving the dial won't change it. The manual explains how to reset the reed switch so the temp can manually be set again, however, I don't know anything about PICs, so I'm uncertain if setting the temp (via the reed switch) actually commits this to memory or if the unit can be re-powered (without the magnet being close to the reed switch).I'll admit, initially I didn't know what the reed switch was. I thought it was a secondary fuse and it opened. After digging a bit deeper, I quickly got the answer, and, once referenced the manual, realized the switch is exactly where the magnet needs to be placed.The red/green LED is now a bit confusing since I never needed to commit the sequence to memory. Now that the unit doesn't work, I'm kicking myself for not remembering. I think it remains red as it's approaching temp, and blinks green when it has reached temp, but both off if temp is decreased. It's a two-in-one (?) LED with green and red in one package.When I measured the pins of the iron itself (unplugged from the base), the thermocouple was absolutely confusing me. It was several mega ohms and seemed to increase indicating the meter was causing a charge or whatever. I grabbed a hair dryer and heated the iron as I measured the thermcouple, it seemed to decrease, but then suddenly began climbing again. Needless to say, it was all over the place and I expected it to be 100k ohms instead of several mega ohms (and inconsistently moving around in resistance by a great amount).I decided to bypass the iron if possible and trigger the thermocouple pins on the base manually thinking I could tell the PIC the iron was calling for more/less heat. As mentioned, the op-amp is working fine, but, as you mentioned, if the PIC isn't detecting some cross point (such as some sort of feedback I assume?) then it's not 'pulsing' the gate.Maybe the station is good and the thermistor in the iron itself is bad? I have 100k thermistors I believe and can try connecting them to the station, however, I'm uncertain what the value in the iron really is.Thankfully this circuit doesn't have much to it, but unfortunately, if it's the PIC or the iron, I'm somewhat screwed.

author: pqass
author_rank: Super Contributor
timestamp: February 23, 2022, 05:27:27 pm
content: Divide and conquer.Always check power first; 5VDC and 24VAC at the correct points including the chip power pins. Although, I think you've confirmed that already.Connect the iron to the station, measure pin6 of the op amp (multimeter on DCV). Remove the tip from the iron to expose the thermocouple and use a hair dryer to heat the open end up. Pin6 should go from 0V (or close to it) to multiple volts (as per my calculations) depending on how much heat you apply. If you let the iron cool, it should go back to the starting point. Confirm that this same voltage is on pin7 of the MCU. If this is what you see, then you can conclude that the thermocouple, connections, opamp is all good. If not, work backwards.Typically, you won't be able to measure the thermocouple output directly with a hand-held 3 1/2 digit multimeter because its lowest range starts at 0.0 mV. My 5 1/2 digit bench meter can directly measure it as its lowest range starts at 0.0µV. But you may see some activity in the low mV but I don't think the hair dryer will inject much heat. And don't use a candle (too much soot and/or it might bake it).I too found it difficult to measure the resistance of the thermocouple; couldn't get a firm connection free-hand which is very imporant given the low voltages involved. Although, its definitely a K-type thermocouple and not a thermistor.If you want the test the station without the iron, execute the procedure in my last message.... short the thermocouple pins in the connector and measure the ACV across a 1K resistor connected to the heater pins. The green LED should be solid. If you have an oscope, there should be a train of pulses from pin2 of the MCU and you should also see pulses on pin5 of the MCU coming from the zero-crossing points in the AC wave of the transformer secondary. This should happen even on the lowest temp setting.The key here is that there will be a steady voltage from the opamp between 0V..5V into the MCU. To confirm that the MCU is working, you could go so far as to disconnect the leg of the 14k resistor (opamp output side), attach a spare 10K pot to 0V and +5V (end pins, respectively), and wiper pin attached to the loose 14k resistor leg. Then you can adjust this pot as a substitute for the temperature being sensed. ie. 2.6V on wiper corresponds to 200°C, 3.9V corresponds to 300°C, etc.If the iron is dead (bad heater or thermocouple) then a replacement is about $50.If the MCU is truely dead and if you're up to it, you could always substitute your own with your own programming.

author: floobydust
author_rank: Super Contributor
timestamp: February 23, 2022, 05:56:11 pm
content: First I would repair the wand. Inside is a thermocouple, it should not be shorted to anything (i.e. heater) nor open-circuit.Weller does have some fault checking in their firmware. If the handle is unplugged, it detects the open thermocouple and might go to lockout, where you have to cycle power to get the station running. So playing with getting the op-amp to output 0V and 5V might go to safety lockout.So I wouldn't blame the controller just yet, it is not turning on the heater because it thinks things are unsafe.You did replace the two electrolytic capacitors? The 33uF part is highly stressed and does not last.The WES51Deevblog user Emrtech reverse-engineered andposted schematic and scope waveforms,same basic hardware but a larger PIC and LED display.Weller did not code protect so you can read out the PIC firmware. WES206 controller board I think is obsolete.

author: bostonman
author_rank: Super Contributor
timestamp: February 24, 2022, 12:40:15 am
content: QuoteThis is usually how I approach things. Typically I try removing any items that can be removed without necessarily affecting the circuit. Upon looking at the circuit, and before disassembling the iron, I thought this would be a slam dunk repair. Once I saw a PIC, I sensed it could be trouble.Also, on a side note, I'm fully aware this is a thermocouple, however, after many, many years of working with thermistors, I constantly call them thermistors by accident; so bare with me.One of my temp meters (four channel) has K-type thermocouples that I figured could be used to trick the base. Upon powering it, the green LED illuminated, so I began scope probing pin 6 of the PIC, and suddenly the LED turned red. It almost seemed like each time I touched the probe to the pin, the LED would change colors, however, then it began doing so on its own. I wiggled the power wire from the transformer, and it seemed to consistently cause the LED to change so I used my (cheap) soldering iron to reflow the two power wires.After I connected the iron which still remained cold, and that's when I probed the resistor between the base and PIC. It had 250us wide pulses occurring approximately every 8ms. I asked myself how its getting pulses, yet the iron remains cold, so I touched the iron to double check, and burned my finger.Now things are still screwed up because if I apply power to a cold iron, the dial on minimum temp, the green LED is on (I think it should be red), and the green LED never seems to turn red or off.Not knowing the temperature of the soldering iron (which was enough to melt solder, and burn my finger), I connected one channel of my four channel temperature meter to the iron (obviously I didn't have the best thermal conduction, but it was enough for a rough idea) and saw the iron settled to about 500 degrees F.Regardless of where I placed the pot, the thing seemed to have a mind of its own. Sometimes it would eventually begin to cool (long after I turned down the pot), or other times it didn't begin heating immediately, but in both cases, it seems the LEDs weren't showing the correct state.I need to somewhat start my analysis over, and check the 33uF cap. Maybe it's causing lots of noise (or one of the other caps), but I measured pin 5 of the PIC had about a 6v peak 60Hz wave that looked fairly clean.My only other thought due to these strange occurrences: the PIC is flaky thus why it's not triggering the correct LED state and not getting correct thermocouple feedback.Edit: reading the manual (who reads manuals nowadays?) maybe the red LED was never on. From my interpretation (and wanted to edit this quickly before someone spends time trying to analyze why the red LED isn't on) it looks like red is only for 'locked' mode.A steady green is the temp ramping up, blinking means it has reached temp.

author: bostonman
author_rank: Super Contributor
timestamp: February 25, 2022, 03:40:43 am
content: Some good news and bad news, and also some technical feedback for anyone repairing their WES51.First thing I dug deeper in was checking the ripple on the input of the 5v regulator. With the scope on AC coupling, I saw 7V p-p which seems quite excessive and believe the 33uF cap is bad. Unfortunately, the 5V on the output only had a ripple of about 100mV p-p. I was hoping to see ripple on the 5V also indicating the circuit is too noisy.The bad news about this iron: it's now somewhat working.A more consistent observation: upon powering, the iron will not heat. If I touch the scope probe (which has the ground lead connected to the iron ground on the secondary of the transformer) to R14 (transistor base resistor), the iron begins heating. It seems to heat to approximately what I have the dial set to (minimum setting which is about 325 degrees F), and will somewhat settle. If I turn the knob to a higher temperature setting, the iron heats further and seems to settle. If I turn down the knob to a lower temperature setting, the iron cools.The issue: the green light stays on constantly. After reviewing the manual and actually seeing a somewhat working iron, my mind began remember the LED status: the red LED has never come on (although in my previous posts the red LED had been coming on which confused me - I don't know why it was turning on since it technically shouldn't - unless the PIC is going bonkers). The normal LED function: the green will stay on constantly while its heating and then blink when it reaches temperature. I think if I decrease the temperature, the green LED will turn off until it reaches the lower setting.I'm not seeing this now. The green light (as I stated above) isn't turning off and remains on in all states.I'm seeing about 1v on the output of the op-amp when the temperature is about 320 degrees F (160 degrees c), however, this is a sine wave that seems to jump around. R14 continues to have 250us pulses occurring every 8ms, but will stop pulsing if I decrease the temperature and the iron needs to cool in order to reach the lower setting.I accidentally touched pin three to pin four on the PIC, and this caused (what I believe) a lockout because the red LED came on. I managed to turn off the lockout by applying a magnet to the Reed switch, and the green LED came on. To see how the PIC reacted, I played with the lockout feature a few times. The red LED would come on, green would come on after unlocking it, etc...Trying to figure out if the iron is holding temperature, and the correct temperature, is hard. I have the tip sitting in a piece of copper tape with the thermocouple (that goes to a temperature meter) also taped to it. It's a small piece of copper tape, but there is lots of room for error due to air gaps.Sometimes when I recycle power, I have to touch the scope probe to R14 again in order for the iron to heat (but not always), but the green LED doesn't seem to change state (it's always on).From reading other posts about the other model, someone mentioned a bad ground. I'm wondering if one of the wires isn't grounded well causing the PIC to not set the correct state of the LED, or if the soldering iron temp is bouncing too much due to a bad connection and the PIC isn't ready to set the green LED to ready.

author: pqass
author_rank: Super Contributor
timestamp: February 26, 2022, 01:41:13 am
content: If the LED is solid green but heating doesn't occur until taping with the 'scope probe... hmmm...Isn't one leg of the transformer secondary (GND of LM78L05) bonded to the case/3rd prong of mains plug?Again, clip your multimeter (set to ACV) to the heater connector pins and try to reproduce. If you don't see 24VAC until you tap it with the 'scope probe, then it may be that the triac isn't getting enough current to trigger. Check for dry/cracked solder traces around the, transistor, triac, connector, or change the 2.2uF cap on the triac gate to same or 4.7uF, or change the triac.

author: floobydust
author_rank: Super Contributor
timestamp: February 26, 2022, 06:35:48 pm
content: I would look for a ground-fault because the scope is earth-grounded and so is the soldering iron wand (heater/tip). Connecting a scope probe should not have side effects, it's a 1MEG//xxpF load to earth-ground and should not trigger a triac? Is that 2.2uF cap good?Check continuity from the soldering station's third prong to the iron's tip, as well as the secondary-side/controller board. Any chance the tip touched some high energy circuit and a ground-fault melted a wire/pcb trace inside the station?If the heater shorts to the tube, I'd expect it to blow the fuse or roast the triac.If the thermocouple shorts to the tube there would be strange temperature readings.If the heater shorts to the thermocouple, the polyfuse would trip.

author: pqass
author_rank: Super Contributor
timestamp: February 26, 2022, 11:06:22 pm
content: Just a FYI, I measured my PES51 iron with a 6 1/2 digit bench meter...Given:- tip and shroud off (just to make sure it wasn't the tip that shorts thermocouple to metal body),- negative lead clipped to metal body threads just below the insulated handle,- meter on 2-wire mode with positive lead nulled to the threads next to the negative clip.Positive lead on the GND/Shield connector pin: 0.20 ohmPositive lead on the thermocouple negative connector pin: 1.10 ohmPositive lead on the thermocouple positive connector pin: 4.60 ohmNeither heater pin is connected with the metal body. However, there's 10 ohms between heater pins.It would seem pointless to have a fuse on the thermocouple negative pin to GND given the 0.9 ohm short to the GND/Shield pin.

author: bostonman
author_rank: Super Contributor
timestamp: February 27, 2022, 03:36:33 pm
content: Touching the base of the transistor resistor to get the iron to heat doesn't always seem to be necessary.Things just seem weird and confusion is occurring due to having a few unknowns: what the PIC is suppose to do and the actual iron temp (I can only assume I'm getting good thermal transfer between the copper tape the iron is touching and the theromocouple connected to my external meter).Anyway, as mentioned, the first thing I noticed was 7V p-p ripple on the input of the voltage regulator. While this seems excessive, and most likely the filter cap is bad, it should be enough margin because it's 24V AC down to 5V DC. What I noticed yesterday was very weird:The 5V DC periodically goes from a steady state ripple (think I had said 100mV p-p) to a sloppy looking sine wave while the iron is heating. Also, the output of the op-amp sporadically goes from DC to a 1V peak perfectly formed sine wave for short spurts. I removed the iron and measured voltage to ground at pin 3 of the op-amp. It was 4.6V DC which confused me because the op-amp should be high impedance and the thermocouple is not in the circuit. Thinking something is leaking to ground, I measured pin 3 to ground and saw 534k, the 1M was around 536k, and 5V to ground was about 359ohms.I thought maybe the 1M was damaged (I've actually seen a surface mount resistor change value - maybe the end cap was damaged and caused the resistance to change), but out-of-circuit it measured 1M. I also removed the capacitor from pin 3 to ground and that didn't change the voltage at pin 3.The 5V line to ground having 359 ohms somewhat makes sense because the other circuits are voltage dividers to ground, but not being able to measure 1M with the iron unplugged seems odd, and having 4.6V DC on pin 3 of the op-amp seems odd too.The PIC is definitely not changing the state of the green LED. The iron heats and seems to control (based on my temperature measurement setup) and the PIC doesn't tell the LED to blink (although I saw some random positive pulses here and there on the scope). If I increase turn the pot to increase heat, the iron heats further, and, when I turn down the knob, the LED remains on (I believe it's suppose to turn off until it cools to the new temp setting).It almost seems like the voltage regulator is bad due to periodically oscillating, the op-amp is bad because it has resistance to ground causing 4.6V DC on the input of pin 3, and the PIC is bad because it's not blinking the LED. Yet, the iron heats and regulates which tells me all these anomalies don't matter and the PIC is the culprit because it's not blinking the LED (yet, it's working because it controls the heat).

author: bostonman
author_rank: Super Contributor
timestamp: March 01, 2022, 12:42:16 am
content: I took some oscilloscope captures of various points (see attached zip file).The file names are self explanatory. The one labeled 5V glitch is some glitches I kept seeing on the 5V DC line that I can't explain. Also, I'm uncertain if the pulses should be going below ground (although my scope probe ground is on the secondary that is circuit ground).I can't tell if touching a point with the scope probe is what starts the heater or if it's coincidence. Yesterday it seemed once I connected the ground on the secondary of the transformer to the scope probe ground, I got heat. Tonight I tried touching ground to scope probe ground, and nothing happened. After a few minutes the iron began getting hot.It seems the PIC is bad since the light doesn't blink, but yet, it also heats the iron and seems to settle to the set temperature.

author: floobydust
author_rank: Super Contributor
timestamp: March 01, 2022, 10:49:03 am
content: The scope waveforms look fine to me. The 5V rail glitch is 150mV and 60nsec it's more likely an artifact from the scope and grounding. The last trace Top of Triac.pdf I can't make sense of.Did you check continuity with the station's ground and the control board, the third green wire, when there's no scope connected?The soldering station is acting like the thermocouple is open when cold and AC mains hum there gets it to start and once hot the thermocouple sort of works and is no longer an open circuit.Does the red LED+PIC work? It's red only for "unlocked mode" when the reed switch is activated. The green LED always on, slim chance could be one bad output pin on the PIC, I would put aside the notion the PIC is the problem. Maybe try another approach to troubleshooting this, like investigating what others have suggested.Analysis can only take troubleshooting so far.

author: bostonman
author_rank: Super Contributor
timestamp: March 02, 2022, 03:18:02 am
content: I'll read through this thread again, but have checked things others have recommended.Today it occurred to me I may have a spare iron (not base) and was going to try a backup iron, however, when I searched in the area it would be in, I didn't see it.Tomorrow I'm going to keep it powered for a few minutes to see if it starts without me touching anything. I had tried the red LED by locking the temperature using a magnetic next to the Reed switch and the red LED lit.On a side note, I was thinking of removing the PIC and downloading the code so I can post it for others; including having it for myself just in case I ever need it. Not sure if this is easy, but I have a programmer; unfortunately little experience with programming PICs.

author: bostonman
author_rank: Super Contributor
timestamp: March 02, 2022, 04:52:53 am
content: QuoteI accidentally didn't acknowledge this. That scope capture was taken at a point where it went haywire to show some of the stuff I believe is weird.The only part I didn't understand is why things were dipping below 0V DC. I know the ground is referenced to the secondary which is +/- 24V, but, as an example, the collector of the transistor is 0 to 5V. When the iron is connected, it looks like the same wave, however, shifted below 0V DC by 4V DC. If it was referenced to ground via the secondary, then wouldn't it dip much lower, and, why does it dip when the iron is connected?Also, I forgot to mention, to reduce ripple on the input of the regulator, I replaced the capacitor with a 100uF 25V - it's absolutely underrated voltage wise, but it's all I had. Figured I could try reducing the ripping to see if it made a difference, but plan to replace it. Since 100uF made such a big difference, I may look into keeping that value (obviously buying one with higher voltage).

author: floobydust
author_rank: Super Contributor
timestamp: March 02, 2022, 07:17:33 pm
content: I keep thinking there is a mechanical problem, which could be an open (when cold) thermocouple. A heater to thermocouple short would trip the polyfuse.The PIC output pin is fine if it can light the red LED. I didn't see anyone read out the WES206 firmware and post on the Internet.A triac needs gate current in both directions - so Weller is using the charge on the 2.2uF cap to supply negative gate current (when the drive transistor is on, until the cap discharges). With the heater disconnected, triacBTA12-600MT2 is not connected and that -ve gate current has no path I think.You can substitute a resistor or light bulb for the heating element, and a mV potentiometer spoofing a thermocouple to really test out operation without the handle, if you want to analyze more. But sometimes we can get fixated on the wrong problem and it's a lost repair where patience runs out. Treat it as learning more about electronics. These are very good soldering stations and new chinese crap terrible in comparison. Yuck.The 33uF filter cap does see very high ripple current and does not have a long life. Weller went a bit cheap there. Even the new WE1010NA uses47uF 50Vand is lower power (LCD, no LED's). I would upsize to 100uF or so.

author: bostonman
author_rank: Super Contributor
timestamp: March 03, 2022, 12:27:26 am
content: I only had a few spare minutes tonight, so I left the iron powered for about a good 5min without it turning on.Most likely I'll have more time Friday or over the weekend and plan to somewhat start from the basics and move on.QuoteYou're correct. I'll openly admit, I began this by separating things (i.e. measured the obvious 5V DC voltage) thinking it was the fuse, triac, or regulator. I dug too deep into the oddball signals I saw (5V glitches and a few other things).Tonight I also played around with magnetizing the Reed switch. When I held the magnet long enough, the red LED would blink. After I held it again and the green LED would blink. So the PIC is capable of blinking the LED and maybe you're correct and this is purely mechanical.Unfortunately a heater wire broke off the pin to the connector on the inside. I was able to solder it to make a connection, but, once I (hopefully) fix this, I'll need to get replacement pins (which hopefully I can figure out the part number and still be able to locate).

author: bostonman
author_rank: Super Contributor
timestamp: March 04, 2022, 03:21:24 am
content: QuoteSadly I think it's the thermocouple because with the iron plugged in, I'm measuring approximately 541k across the orange and yellow wires. I'm uncertain the layout inside the iron, but I removed the tip and measured from the small pipe inside (which I assume is the thermocouple) to the PCB. From orange to tip, it was a few ohms, from yellow to tip, it was 524k.What baffles me about the iron: if the inner tube which looks like it's copper is the thermocouple, once the tip is inserted, then it should be electrically shorted to Earth ground since the metal of the iron is Earth ground.As the previous statement read, I focused too much on why the LED wasn't blinking, touching points with the scope probe seems to start the heating, etc...I'm guessing the PIC has code that is sensing something is wrong, so it's not blinking, however, from taking temperature measurements, it seems the iron reaches the set point and the LED "should" blink.Initially I tried using a k type thermocouple from a meter to trick the iron, but, if I remember correctly, that didn't seem to work. I thought maybe the resistance was lower than the resistance in the iron and caused the op-amp to think the iron is too hot.Disassembling the iron doesn't seem possible, so all I can do is get a new iron.Does any "k type" iron work?Edit: looks like I can get the exact iron for $52 (model PES51)

author: pqass
author_rank: Super Contributor
timestamp: March 04, 2022, 05:13:20 am
content: Quote from: bostonman on March 04, 2022, 03:21:24 amThere should not be that much resistance between thermocouple pins (if that's what the orange and yellow wires are). Thermocouples are just two dissimilar metals welded together. It's the difference in temperature between the pointy-end and the connector-end that generates a tiny voltage (41 µV/°C) that the opamp amplifies; not its resistance.https://en.wikipedia.org/wiki/Thermocouple#Type_KThe bulk of the resistance (3.5 ohms) that I measured is probably just the thin wire from that center tube tucking inside the tip to the pins on the connector. That tube could just be a protective shell with the actual thermocouple wires suspended inside in some compound the same way heating elements are.I was surprised (even without the tip) that the negative thermocouple pin somewhere inside the iron still has a connection to GND/Shield pin (0.9 ohm). It makes the 200mA fuse pointless.QuoteFlaky connection maybe?QuoteI believe that not blinking (solid green) means the temperature is too low; ie. starting from a cold iron so the heater should be on full-time. Only when it senses over-temperature does it start blinking (cutting off power to the heater); ie. hunting around the set-point.QuoteAny k-type thermocouple will produce the same 41 µV/°C but just having it connected without it actually being warmed-up should just give a solid green LED. It's a feedback loop: cold TC ==> apply heater power ==> hot TC (past set-point) ==> cut power to heater (let tip cool) ==> still hot TC (but below set-point) ==> apply heater power ==> go to step 3.But not any iron will do. It will need a K-type thermocouple, 10 ohm heater, the correct connector and pinout.It shouldn't be too hard to find a replacement:https://www.google.ca/search?q=pes51+replacement+iron

author: bostonman
author_rank: Super Contributor
timestamp: March 04, 2022, 03:17:59 pm
content: QuoteYou're correct, solid green should be full heat turn on. From what I can tell, I am able to get the iron hot and it seems to come up to temperature (about 330 degrees F). At that point I increase the temperature and it's well over 500 degrees F, turn down the temperature, and the green LED remains on.This is why I've wondered if something else is also wrong and began chasing other stuff thus making the silly mistake of ignoring the high thermocouple resistance.

author: bostonman
author_rank: Super Contributor
timestamp: March 08, 2022, 02:59:02 am
content: I've been reluctant to pull the trigger and spend the money on a new iron until I can figure out if the PIC is good.Saturday I soldered a k-type thermocouple to the PCB and taped the temp end to a hot plate. I set the knob on the solder station to minimum and turned on the hot plate. The gate to the TRIAC was getting clocked, so it assumed it was heating a real iron.Once the hot plate came up to the temp set on the station, the light remained on (it should have been blinking). I increased the hot plate temp and turned up the dial on the station so it thinks it's heating the iron more. Once it came up to about 375, I turned down the knob on the station.Normally at this point (unless I'm wrong) the green LED will turn off until the iron cools to the new lower set temp. This didn't happen, the LED remained on.After some research, others have found the issue where the heater turns off after connecting scope probe ground to the PCB ground, however, I haven't found a solution. I'm wondering if this station has two problems (the thermocouple in the iron and something else).This is a weird problem. I'm going to try pulling the code off the PIC for the benefit of replacing it, but also so I can provide it to anyone else who wants it.I contacted Weller and they said the iron is discontinued and any code is no longer available.With this being said, I'm uncertain if my PIC is damaged (won't know until I try sometime this week), so thought to send the question in advance of whether anyone has the code, has an iron they don't care about and can pull the code, etc...

author: inse
author_rank: Super Contributor
timestamp: March 08, 2022, 04:31:51 am
content: I have repaired a couple of Weller sets myself, but only the analog controlled ones so far.Up to now, I had not a single problem with the station, except a damaged connector once.I have only encountered these three failures on the solder pens yet: broken cable (at the pen side), broken sensor or broken heating.Also intermittend sensor failure leading to premature functional assessment.

author: bostonman
author_rank: Super Contributor
timestamp: March 10, 2022, 04:25:16 am
content: Hopefully someone can benefit from my updates.Tonight, with a k-type thermocouple soldered onto the PCB and the iron plugged in, the iron immediately heated upon powering without the need to touch the ground scope lead to PCB ground.Others did say this sounds like an iron thermocouple issue from the beginning, and maybe they are correct. I can't figure out why connecting the iron causes some sort of ground connection when only five wires are used (two for the heater, two for the thermocouple, and one for Earth ground).My initial thought was that Earth ground is nothing more than the metal of the iron. When the TRIAC is not conducting, that portion of the circuit is open. Maybe the PIC is detecting an iron heater is attached, but I don't see how the PIC can detect whether the iron is connected or not; unless Earth ground has some high impedance to the iron heater so it causes a voltage divider on pin 5 of the PIC.In any case, I may gamble and order a new iron (unless someone looks at the code and think the PIC is corrupt - keep reading for an explanation on what I mean).To perform one last test before ordering an iron, I removed the PIC and 'read' the code. Since it was able to read, I'm assuming the PIC program isn't corrupt.I'm uploading the code in hopes others can benefit from this, however, I want to emphasize something AND ask a favor.The emphasis is: I can't guarantee this code isn't corrupt. All I've done is remove the PIC, stick it in the programmer, and 'read' it. Obviously it can't contain a bug or anything, but I just want to emphasize that I don't know what this code means, however, I didn't do anything than save the buffer to the attached text file.The favor: asking for a bit of assistance. I've never really 'read' PIC code, nor do I have experience with this programmer (I have used Xilinx to program FPGAs and other programmers to program pre-compiled HEX code for EPROMs. The software for this programmer only offered to save as a .txt file.Is this text file all I need to program a new/blank PIC (the ASCII code doesn't look the same when compared to the buffer in the programmer software and assume the characters can't be deciphered as they can in the software so I fear this text file isn't the only thing I need)?Also, can this code be interpreted into human readable words so we can figure out what is going on inside?

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2022, 09:17:21 am
content: No. Human readable formats like HEX dumps are rarely useful for programming MCUs.You'd need it in IntelHEX .hex file format, with either the CONFIG bits (aka: 'Fuses') address included in the file, or with notes on how CONFIG word was set. However I have typed a few lines of the hex dump manually into MPLAB 8 program memory window and it does look like PIC machine code and disassembles to something vaguely sane, so odds are your programmer is reading the PIC properly, and it isn't protected.N.B. The PIC12CE673 contains a 16 byte data EEPROM internally connected via an I2C bus to GPIO pads that aren't brought out of the package, and this data memory is only accessible to application code (firmware), not to an external programmer, so any copy of the chip *MAY* require a special procedure (possibly a full factory calibration in the station, possibly something else in some sort of test jig) to properly initialize that data memory.The IntelHex file could be reconstructed from the hex dump, but that's tedious and error prone compared to simply saving it from your programmer software. If it cant save IntelHEX (unlikely), what formats can it save?

author: bostonman
author_rank: Super Contributor
timestamp: March 10, 2022, 06:24:02 pm
content: This is disappointing.I thought extracting the data was enough and would be able to burn more along with contributing to others who need it.I’ll look at other formats when I get home, but I checked all the drop downs menus and only saw a way to save the buffer which was txt format.

author: bostonman
author_rank: Super Contributor
timestamp: March 11, 2022, 02:02:00 am
content: All I can find is the option to save the buffer and it automatically fills in .txt.Obviously I can stick in my own extension (and maybe that's what is required to save it as a different format), but I'm guessing without extracting it a specific way, saving it with such an extension will be useless.I apologize in advance, but although I understand your explanation, it also seems a possibility exist I can burn this buffer text dump to a blank PIC and it may work.Is this what you're saying, or is it basically a useless attempt?Does any way exist to extract everything from this PIC or did I waste my time removing it?

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2022, 03:20:45 am
content: What device programmer do you have, and what software are you using with it? We can probably figure out how to save a hex file, or at the minimum a binary file + tell you how to read and record the CONFIG word.I'd give reasonable odds that reading the PIC and writing a blank one will work. As I noted its not a certainty due to the inaccessible EEPROM, but that has to have been initialized somehow and as the PIC12CE673 is an OTP device*, (i.e. is not erasable) its highly probable the init code for it is present somewhere and just has to be triggered. How to do so can be figured out by disassembling the code, + some reverse engineering.* unless you've got the vanishingly rare, expensive and long obsolete PIC12CE673/JW windowed side brazed CERDIP package, which can be UV erased.

author: bostonman
author_rank: Super Contributor
timestamp: March 11, 2022, 03:33:41 am
content: To be respectable and not double post, I'll reference a thread I started regarding the programmer:https://www.eevblog.com/forum/projects/pic-programming-question/If trying to reverse engineer is time consuming, then it's probably not worth it. I question whether my PIC is working correctly, or if it's doing some checks that are preventing it from blinking the green LED due to trying to hack in a phantom iron.If it's damaged in the sense that maybe the program is fine, but the output driver pins are damaged, then I'd strive to get the program onto another PIC. If it's good, then trying to get the code isn't important (to me) but for the benefit of others, if this PIC code is good, I'd feel good knowing I contributed the code to everyone.Sooner or later I'll just pull the trigger and buy a new iron. I just question why the PIC isn't blinking the green LED and questioning whether I could have shorted two pins when taking measurements and blew a pin driver.

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2022, 03:55:15 am
content: Hmmm..... The manual, section '4.1.1.2 Save' says that when saving, its supposed to pop up a filetype dialog after you've entered the file name. Try entering a name with the extension .hex and see if it does.If the hex file can be saved, it can be loaded into MPLAB 8, disassembled and studied to determine what the LED is meant to do.

author: bostonman
author_rank: Super Contributor
timestamp: March 11, 2022, 04:27:24 am
content: I saw that.The software has two 'save' sections. One is in the top tool bar under 'buffer' (edit and save buffer are the two main options with encrypted table, e fuse, and vector table, grayed out), and then a 'save' icon.The 'save' icon seemed to do something different and why I didn't use it. The options it gives as a save type are: binary, Intel, Motorola, Tektronix, and Extend Tektronix.

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2022, 06:49:21 am
content: Well there you are. Intel - short for IntelHEX is the one you want.

author: bostonman
author_rank: Super Contributor
timestamp: March 11, 2022, 03:28:46 pm
content: I feel like an idiot.Why the heck do they have two different save features is beyond me. The 'buffer' drop down menu I thought was to save the buffer (the actual program extracted from the chip), and, when I saw the other, I thought it was something other than dealing with the downloaded PIC program.I"ll (hopefully) get the IntelHEX stuff saved later and repost what I got.

author: bostonman
author_rank: Super Contributor
timestamp: March 12, 2022, 02:55:22 pm
content: I just re-read the PIC.Although only Intel was needed, I saved them under every drop down type (named accordingly) possible just in case including saving the buffer text file.I'll have to dig deeper into understanding the saving options in this burner. When I initially saw the option to save as Motorola, Intel, Tektronix, etc... I thought it was a way to convert to different PIC manufactures and didn't have anything to do with the actual 'buffer'.Hopefully this extraction is enough to allow another PIC to be created and will benefit others as well.Edit: forgot to mention, don’t know if it matters, but the window showed: save data size 4010

author: Ian.M
author_rank: Super Contributor
timestamp: March 12, 2022, 03:55:00 pm
content: The IntelHEX format file, renamed with extension .hex and imported into MPLAB 8.92 looks OK, includes the CONFIG word, and you can inspect the program memory in symbolic disassembly mode.There are 810 lines of actual code, which make use of Timer 0, the 8 bit ADC and the internal I2C EEPROM (on internal I/O pads GP6 and GP7). Oddly enough there isn't a single RETURN or RETFIE instruction (it uses RETLW 00), so I suspect the code was (badly) ported from code for a PIC12F5xx 12 bit core device. If you want to dig further into its operation we'll probably have to do some serious work to generate a symbolic disassembly that's MPASM compatible for reassembly and builds a byte-identical image, that we can then go through naming variables and subroutines and annotate as we figure out the I2C and control routines. If we did that, porting to a newer PIC wouldn't be *MUCH* harder.At address 0x32E there's a copyright message: "C Cooper Ind. 08/02/2000 V7.5", with the upper part of each word zeroed, not null terminated.One key thing to note, is it appears your programmer may not preserve the factory OSCAL value, so for correct operation you must read the new PIC *before* attempting to program it and note the value at address 0x3FF, then after loading the saved firmware to the buffer, patch 0x3FF from 3488 (hex) to the value noted for the new PIC. The 34 bit will stay the same as 0x34nn is the RETLW opcode. You should then be good to burn the new PIC, but remember you only get one shot at it per new PIC as the PIC12CE673 is OTP, so not erasable.

author: bostonman
author_rank: Super Contributor
timestamp: March 13, 2022, 04:41:49 pm
content: QuoteOuch. This explains why I didn't see the number of burns in the datasheet. I thought all PICs were able to be reprogrammed until now.From what I understand, are you saying this code doesn't appear corrupt? I ask this not only for myself, but anyone else who will read this and/or need to burn a new PIC due to a broken iron (obviously the files are posted, so others will be downloading them).If this code isn't corrupt, then I don't understand why the LED isn't blinking (or turns off when I decrease the temperature knob after the iron gets quite hot) unless there is something that detects the iron plugged in. Personally I don't see how it can detect the iron is plugged in by the heating element (remember I have a k-type thermocouple soldered onto the board, so it thinks it has an iron). Unless it pulses the iron heater to get it up to minimum temp and reads the thermocouple. If it doesn't have some sort of precise feedback, then the PIC doesn't perform the same.The only other idea I have is that the PIC is healthy enough to have the code read, but the output drivers are damaged.Trying to get the thermocouple up to a specific temperature and measuring the heating plate I try mounting it to correctly is quite hard. I've taken the thermocouple that's soldered on the iron PCB, taped it with Kapton tape to a heating plate, mounted a second thermocouple to a temp meter, and tried tricking the soldering station to think it's really heating to 350 degrees. The issue is the tape doesn't stick and my thermocouple has melted insulation.Apparently you're experienced with reading PIC code because other than seeing the same thing you mentioned (C Cooper....), I don't know what any of the code means.Personally I think dissecting the code would be cool and beneficial for being able to burn different PIC models for the future needs of others, but clearly it's not worth the trouble.For my own curiosity, can you explain how you'd dissect a single line so maybe I can take a crack at digging into it?As for programming, you said to 'read' a blank PIC and note the address at 0x3FF. Ignoring for the moment that I'm not seeing a line of 0x3FF (it goes from 0x3F0 to 0x400), I assume the steps I need to take are:Insert the blank chip and read the information stored on it (I wasn't aware a blank PIC could be 'read')Scroll down to 0x3FF and note the address from where on that line? Maybe provide an example from the current code to clarify how to read an address?I'm sure this is unique to the programmer, but I've never programmed a chip that required any change to a starting address, it's always been take this HEX file and press burn (or similar steps when burning FPGAs). How do I tell the software to start burning at a specific address?Not knowing anything about PICs, I'm uncertain the need to start burning at a specific address or can visualize what it would mean to start a specific address. From the way it looks with the current program, it starts at address 0x0000, but I'm uncertain if this is just the line number or an address (or if I'm just mixing up the two).

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2022, 05:13:12 pm
content: I said "" ... note the value of address 0x3FF ...". To clarify, I mean " ... note thecontents ofthe address 0x3FF ...".That address holds a RETLW opcode with a data byte that holds the 'factory' oscillator calibration. It gets copied to the OSCCAL register by the firmware shortly after startup. If its corrupted, the PIC may run too fast or too slow, which could possibly result in unexpected behavior.Don't expect the adhesive on Kapton tape to stay stuck to a heated surface. You need fibreglass sleeving or close weave glassfibre ribbon or cloth to electrically insulate the thermocouple, saturated with non-conductive heatsink compound for reasonably good thermal transfer + some sort of resilient mechanical clamping arrangement, to maintain pressure without breaking the thermocouple. It may be easier to do it 3D printer hotend style in a drilled hole in a hot block with a tapped hole for a retaining screw to hold a washer clamping the sleeved leads right next to it.To understand PIC machine code, you need a thorough understanding of PIC assembly programming so you can sight- read the disassembly listing without having to continuously refer to the datasheet for every instruction. It comes with practice and plenty of hours working on projects in assembly language, and is not something that can be taught easily online.

author: bostonman
author_rank: Super Contributor
timestamp: March 13, 2022, 05:22:07 pm
content: This is all I see. Think I'm missing something.000003E0 27 02 03 18 41 2A 27 08-B7 00 37 08 A2 00 01 30000003F0 A1 00 08 20 A0 1F F5 29-41 2A B0 1F D2 29 41 2A00000400 AF 1B FD 29 BE 0A 04 30-3E 02 03 1D A3 29 AF 17

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2022, 05:40:01 pm
content: Midrange PICs use a 14 bit core i.e. every single word instruction is 14 bits long. 14 bits cant fit in a byte so every program memory word takes up two hex bytes (4 ASCII characters) in the hex file. Hex file addresses are thus double the actual PIC address. Your programmer software isn't smart enough to know about this address doubling, so you need to look at data buffer addresses 0x7FE and 0x7FF, which should be on the last line right at the end, which hold the RETLW in question, low byte first. 0x7FE is the one that will need patching, and 0x7FF should *ALWAYS* be 34 hex (for this PIC).

author: bostonman
author_rank: Super Contributor
timestamp: March 14, 2022, 04:45:17 am
content: I just realized you must have edited your message.When I read this yesterday, I don't remember seeing as much typing, and now I'm looking again and see it has a 'last edit'.Just wanted to clarify in case my response seemed as if I was asking the same question over.I may buy a few PIC chips to see if I can program them the way you're suggesting. I need to order some components, a new iron, and replacement pins for the soldering iron connector (one of the heater wires broke off the pin from moving around the PCB).

author: Ian.M
author_rank: Super Contributor
timestamp: March 14, 2022, 07:31:41 am
content: Quote from: bostonman on March 14, 2022, 04:45:17 amYes, from the timestamps, I was still working on the messages above. I tend to be a little 'trigger happy' with the  button.Trying to clone the PIC is worth it - it may resolve any issues due to damaged I/Os other than the ICSP pins (programming pins), and if it behaves the same, at least you then know you've got a spare for future use. Sorry to hear about the broken heater pin.FYI: I generally 'tag' my edits at the end of the post with:Quoteif I've made a technical or mathematical mistake I am correcting, and whenever possible, preserve the mistake but use strikeout and italics to make the correction if I've had any replies. However I edit freely to fix text typos, spelling or punctuation errors any time I see them without tagging, so if you see a 'last edit' timestamp on one of my posts more than an hour after the post's original timestamp, without an 'Edit:' tag, you can bet there is no substantial change worth rereading the post.Exception: When composing a long post I often post to save it and go back and add more content, as I've lost more than a few posts being composed to browser crashes and network issues. If the 'last edit's within an hour of the original post, please reread as I'm probably still adding content.I was a denizen of the USENET sci.electronics groups, and on USENET, there are no takebacks - what you post is immutable till the last server in the world archiving it dies of bit-rot. I *HATE* forum users who edit their posts to pretend they didn't say something they've been called out on.

author: bostonman
author_rank: Super Contributor
timestamp: March 15, 2022, 04:30:02 am
content: Not a problem at all with editing/updating a post.The part that concerned me: I started a thread about selecting thermocouple wire including how to mount it to a soldering iron and/or hot plate. After, I re-read your update and saw you addressed mounting the thermcouple.I became worried that I didn't fully read your message and began another message. In my opinion, that looks rude because it appears if I don't get an answer in one thread, then I'm going to start another. Also, I try to keep the thread on point without deviating too much; else it calls for starting a new thread.Nothing more annoying than searching for an answer, you come across a several page thread, the person who initiated the question vanishes from the thread (most likely because they solved the issue and didn't bother to update the post), and you're reading about nothing pertaining to the original question. In the end, you wasted time reading the thread.Sometimes if I start a new thread that may have some connection to another, I will make it a point to note that in my message. Again, so this way people don't think I'm double posting.Having said all this, tonight I purchased a new PES51 iron. I fully agree that having a backup programmed PIC will be good, however, for now, I want to change one thing at a time until the iron is fixed (and post what I find); and then I'll tweak things.Most likely I'll solder a socket on the board and stick the old PIC in, solder the wire onto the pin (it keeps breaking off), and try the new iron when it arrives. After I'll tinker with making a new PIC if the iron still doesn't work.Thankfully I have tools that are used for extracting pins. Tonight I was able to remove the broken pin and believe it's an Amphenol. I started a post about the pin type (https://www.eevblog.com/forum/projects/is-this-a-standard-amp-connector-pin/).I'll either buy new pins, or carefully remove the old broken wire from this and solder the wire directly to it, however, I'd rather replace all the pins if I can find a replacement.

author: bostonman
author_rank: Super Contributor
timestamp: March 17, 2022, 01:24:33 am
content: The new iron will be delivered tomorrow (unless Amazon changes the delivery date). I also ordered an IC socket kit which I'll install an eight-pin socket so I can install/remove the original PIC need be (unless height will be an issue which I hadn't initially considered).Hopefully either tomorrow or Friday I'll be able to test the iron and will update on the status for those who will need to repair one in the future.I have two questions and attached two pictures for reference.It was stated by Ian.M that I need an understanding of PIC assembly to understand the code in order to not keep referring to the datasheet. I took a snapshot of the HEX screen I see and was wondering if it was easy enough to explain one or two instructions. First state of confusion is the line numbers jump by 10 (i.e. 00000010, 00000020) and not 1 (i.e. 00000001, 00000002,..... 00000010). The other is you stated the PIC takes two HEX bytes (4 ASCII).If ASCI is eight bits, that means all of line number 00000000 are the two HEX bytes? If so, then how do I read that so I can reference the datasheet?The other is understanding the op-amp section of the circuit. Let's start with the non-inverting side first. The thermocouple produces 42µV/°C. If they produce a voltage based on temp, then what is the purpose of the 5V pull-up and 536k resistor and/or how do I calculate what should be on pin 3?As for the inverting section, this is tricky because I get confused when an op-amp feeds back to change the voltage such as (what I believe is) a voltage divider.Pin 7 is Vcc 5V (this got cut out of the snapshot). I assume 14k and 10ohms is a voltage divider, so 3.57mV and the 15k ohm resistor is a current limit of 238nA (3.57mV / 15k). Pin 2 would have 3.57mV at 238nA (this is using an ideal op-amp of course).Unless I'm wrong in my previous paragraph, now the confusion of the 464k resistor comes into play. Pin 6 (the output) can be anywhere between 0 and 5V (again, using an ideal op-amp).How do I calculate the voltage at pin 2? The 100nF capacitor is probably just for filtering, so I've ignored that in this discussion.I'm thinking I can use KVL to calculate the voltage on pin 2, but then I'd need to perform the math for every voltage between 0 and 5v.Even though the schematic is cut out, I'm assuming everyone remembers pin 6 goes through a 14k and into the PIC (since we are using an ideal op-amp, then it's safe to say the PIC is seeing the same voltage as the output of the op-amp and the current will be limited by the 14k (therefore Vout at pin 6 / 14k).

author: Ian.M
author_rank: Super Contributor
timestamp: March 17, 2022, 01:47:51 am
content: *NOBODY* in their right minds tries to sight read an IntelHex file. You can pick one apart by hand if you really have to but its very much last resort if all the tools you have are barfing on it, or if for any reason you cant trust your tools.In this case you need a tool that understands 8 bit PIC machine code, and the best one for the job is the old Microchip MPLAB 8 IDE.Download and installMPLAB 8.92.Run it and from the menu bar, do Configure: Select Device... and select PIC12CE673, then File: Import... <your_hexfile>, then View: Program Memory, and at the bottom of the Program Memory window, select Symbolic.You will get a disassembly listing of your hex file, showing you addresses, instructions, and operands with known register addresses replaced with their names.You can also do Configure: Configuration Bits... to view what CONFIG options the CONFIG word in your hex file decodes to.

author: Ian.M
author_rank: Super Contributor
timestamp: March 17, 2022, 02:09:49 am
content: The 5K36 resistor in series with +in is to protect the OPAMP if the heater shorts to the thermocouple. The 1M 5V pull-up is a failsafe - if the thermocouple is working it has negligible effect on the readout, but if it goes open circuit, it makes sure the PIC senses that as 'very very hot' so the heater will shut off. It probably has another failsafe in the code - if the temperature doesn't increase fairly soon after turning the heater on, either the thermistor is shorted or the heater's gone open and in either case its likely has code to shut it off.The pin 2 resistor network sets the gain (by feedback) and offset provided by the OPAMP. The easiest way to work out what is going on is to calculate the pin 2 (-in) voltage for two possible output voltages, then assume the OPAMP is linear for voltages in-between. The pin 3 (+in) voltage will be very very close to the pin 2 voltage due to the negative feedback driving pin 2 till they match. If you take outputs of 0V and 5V (which it probably can't actually reach) you can then plot a graph with input voltage against output voltage. Check the datasheet for the common mode input range, and the max. output swing, and draw a rectangular box on the graph for the region in which the relationship is valid.Edit: corrected description of +in resistors

author: bostonman
author_rank: Super Contributor
timestamp: March 17, 2022, 03:09:42 am
content: Wow, that looks much better in MPLAB. I don't understand much, but stuff like MOV makes it clear that these can be looked up on the datasheet to figure out what is going on.You stated at 0x32E is the C Cooper or whatever. I don't see the actual name in MPLAB (probably because it's HEX or ASCII). Looking at the ASCII table, looks like:0043 = C0020 = <space>0043 = C006F = o006F = oI won't bother typing the rest, but looks like it's going to spell Cooper. Not sure how the ASCII characters being in the opcode tells it to spell a name, but I'm sure it would be explained if I study the datasheet.You also stated it's 810 of actual code (because there are four empty spaces at the beginning - but goes down to 814) but what about lines 0x334, 0x339, and 0x3FF? Should that be 813 lines of code?I see what you mean about going crazy looking at the program and trying to interpret it via the datasheet. Without looking at the datasheet, looks like line 1 is a goto statement to line 0x55, but not sure what role the opcode (2855) plays (again, I'm sure the datasheet will explain it).As for your circuit explanation, that makes a bit of sense. I think you made an error; you stated 536k is a pull-up, but think you meant the 1M.In any case, I guess a linear assumption is an easy way, but the confusion of calculating actual voltages (based on an ideal op-amp) still remains.Also, your assumption about the code having some protection to sense if the temperature isn't increasing fairly soon, then it shuts off, makes sense. Maybe this is why it heats the iron and seems to regulate, but doesn't blink the LED. Hopefully soon I'll have my answer when I connect the new iron.

author: Ian.M
author_rank: Super Contributor
timestamp: March 17, 2022, 03:29:19 am
content: I corrected the pullup error. See above.If you select 'Opcode Hex' at the bottom of the program memory window you can see ASCII strings. Unfortunately it shows non-printable ASCII as . (control codes) or ?(other) so you still need to look up some characters from the hex. As the program memory word is only 14 bit, it cant store an ASCII character in the high bits of each word.QuoteThat's *JUST* a copyright message to people dumping the code - the PIC doesn't and cant access the data bytes of the string as 0x00 in the high bits isn't the RETLW opcode.A simpler way of figuring out the temperature/ADC voltage relationship is to model the circuit in a SPICE program. Here's a rough model using LTspice and its Level 2 UniversalOpamp model, as it *really* did not like T.I's LMC6061 PSPICE model.

author: bostonman
author_rank: Super Contributor
timestamp: March 17, 2022, 03:38:06 am
content: I'll need to download LTspice, however, I modeled it before and got my answer, but it gave me a fish, it didn't teach me how to fish

author: Ian.M
author_rank: Super Contributor
timestamp: March 18, 2022, 12:38:07 am
content: Well I've been disassembling the hex file and patching the result, and here's a MPASM assembler source file that builds an identical*binary. Its largely symbolic, but many bit positions are still numeric. However its a start towards understanding the code and possibly porting it to a newer PIC.Edit: increasing levels of cleanup: file replaced by one with many symbol names fixed* if you import and reexport the original HEX file to 'clean' it to MPLAB 8 format, and when you build the source, patch in the same factory OSCCAL value, and export the result to include all unused program memory

author: bostonman
author_rank: Super Contributor
timestamp: March 18, 2022, 02:13:04 am
content: oh wow.... looks like you're really diving into this.I think dissecting it to make the code readable to humans would be cool, but it really depends on how much time you care to devote to this. Most likely not many people care, but, for the sake of troubleshooting, it could come in handy.

author: Ian.M
author_rank: Super Contributor
timestamp: March 18, 2022, 09:14:59 am
content: It looks like the I2C EEPROM routines are based on an older version of the FL67XINC.ASM code as described in section 6.0 of the datasheet.The commented sourcecode can be found in:https://ww1.microchip.com/downloads/en/DeviceDoc/ce67xv11.zipwhich I got from the PIC's product page.I've updated disasm.asm with the I2C routine labels and named variables and done some cleanup on warnings. It still builds an identical binary.

author: Ian.M
author_rank: Super Contributor
timestamp: March 18, 2022, 02:14:16 pm
content: So I've managed to pull the I2C EEPROM library out of the main source file by patching FL67XINC.ASM slightly. This is great progress because the FL67XINC.ASM library is well commented and has a well-defined interface, so we no longer have to consider how to save/restore data to/from EEPROM, and can concentrate on figuring out *WHAT* is saved in the EEPROM and how (and when) it is used. It also brings porting it to a newer PIC with EEPROM on the same die within reach by writing an interface compatible 'wrapper' for that PIC's native EEPROM peripheral.I've also named pins etc. to slightly clean up the main program. As always, it still builds an identical binary.ToDo:Figure out and comment the ADC routines for reading bit temperature and setpoint knob.Investigate the TRIAC firing code+ a lot more work that will no doubt appear as we dive into it!

author: bostonman
author_rank: Super Contributor
timestamp: March 18, 2022, 11:33:59 pm
content: I'll check out the files after.With the exception of replacing the 33uF on the half wave rectifier circuit with a 100uF 25v (it's all I had and I know it's underrated - it's only temporary), and soldering a heater wire to the pin, the station is in its original configuration.I connected the new iron to it and unfortunately the LED didn't blink. The iron got hot enough to melt solder and I turned down the knob so the LED should have turned off while it was cooling to the new temp, but it didn't blink when ready nor turn off while cooling.Unfortunately I can't get an accurate temperature reading to determine if it's controlling, but, previous measurements using the junk tip indicated it controls.Odd that the PIC will turn on the green LED, turn on the red LED (when I 'lock' it using a magnet), tell the TRIAC to turn on the heater, possibly control the temperature at the set point, but won't blink the LED.At this point I guess the solution is to buy blank PICs and program them. Looks like I must have touched two pins while taking measurements and caused an output to get damaged (my only guess).I'm a bit upset at myself for diving too deep into this and not replacing the iron. It would have saved me from damaging the PIC, however, the upside is that I was able to provide the code to everyone.Ian.M,, although you are still in the process of doing a great job diving into the code, do you see anything that would indicate it's corrupt, or can I go ahead and order new PICs?Also, from the looks of the part number stamped on my chip, it's a 4MHz. The part number is:12CE673P04 <space> 35B0304The P seems to be in the wrong place from what I can tell on the datasheet.

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2022, 02:45:16 am
content: I've validated approx. 20% of the code so far as either identical to the Microchip EEPROM library code (I suspect an older version due to two lines not present in the disassembly and one wider bitmask), or as making sense in context. It is therefore 100% certain that the PICs internal ICSP support silicon is functional at least for readout, and that your programmer can read the PIC. However EPROM is not immune to 'bitrot' even though it usually takes several decades for it to degrade to the point one or a few bits start to be misread so there is still a vanishingly small possibility the code *may* be corrupt due to a single location bit flip. Your odds of winning a major lottery by finding a ticket on the street are higher!The PIC has to be a 4MHz one, as the only internal oscillator option is 4MHz, and unless forced to by supply chain issues I can't see Weller paying the premium for the 10MHz part then running it at 4MHz. Don't worry about the speed grade of the replacement, as all will do the job.Edit: 164 (of 810) instructions checked and either commented for algorithm or determined to be fully commented library code. So far, I've groked the line frequency check immediately after powerup:Code:; Find period of AC line (secondary drives LINESYNC pin (GP2/INT); with line frequency near-squarewave).;find_periodmovlw 0x02 ; set count for two passes of inner loopmovwf count_m26period_iloop ; do{clrf INTCON; disable interrupts, clear INTF flagwaitfalling0clrwdtbtfss INTCON, INTFgoto waitfalling0bcf INTCON, INTFclrf TMR0waitfalling1clrwdtbtfss INTCON, INTFgoto waitfalling1bcf INTCON, INTF; ome mains period latermovf TMR0, Wdecf count_m26, F;}btfsc STATUS, Z;} while (-- count_m26);goto skip_wf;}movwf period_m25goto period_iloopskip_wfxorwf period_m25, F ;btfss STATUS, Z ; if not the same, repeat find_periodgoto find_period ;movwf period_m25; got the mains period in units of 256us; Compare with various periods to reject line frequencies outside the; range 48.83 Hz - 62 Hz and split between 50 Hz and 60 Hz (at 54.25 Hz).;movlw 0x3f; if(period < 16.128 ms) goto find_periodsubwf period_m25, W;btfss STATUS, C;goto find_period;;movlw 0x48; if(period < 18.432 ms) goto do_60Hzsubwf period_m25, W;btfss STATUS, C;goto do_60Hz;;movlw 0x50; if(period < 20.480 ms) goto do_50Hzsubwf period_m25, W;btfss STATUS, C;goto do_50Hz;;goto find_period; else goto find_period; Set two values, one in mem3_f & mem_40, other in mem_34, mem_44 & mem_33; to consts by line freqency.do_60Hzmovlw 0x78movwf mem_3fmovwf mem_40movlw 0x0cgoto skip_lf;do_50Hzmovlw 0x64movwf mem_3fmovwf mem_40movlw 0x0a;skip_lfmovwf mem_34movwf mem_44movwf mem_33

author: bostonman
author_rank: Super Contributor
timestamp: March 20, 2022, 03:25:11 pm
content: QuoteI realized after typing this that it sounds as if I'm worried about the cost of a new PIC. They are only $3.xx and I'm not worried at all, however, because I removed and reinstalled a few chip components (resistors and a cap) because I thought the op-amp section wasn't measuring correctly, I'd like to replace these. Also, I need to replace the socket pins due to the wire breaking, and in the process with TE to figure out which part number to order.My plan is to overhaul the iron (one I get it to work correctly) with new socket pins, components that didn't see extreme heat due to unsoldering and soldering, order a few PICs, and have spare parts too of the one off stuff (poteniometer, regulator, etc...) just in case of future repairs.Edit: I don't know what Weller was thinking, I forgot to add that I physically measured the chip resistors and capacitors, they are: 0.06" x 0.125 with a height of approximately 0.02"; the capacitors are the same, but seem to have a height of approximately 0.03".I confirmed the chip resistors are bigger than the 0802 I have in my stock when compared them along side each other. Obviously trying to get an accurate measurement with solder on them isn't easy, but seems those are the dimensions.From what I can tell, these are uncommon and most likely will be difficult to order.

author: bostonman
author_rank: Super Contributor
timestamp: March 25, 2022, 04:33:50 pm
content: I haven’t gone cold, I just haven’t ordered components, however, I did last night and will plan to program a new PIC when they arrive.

author: bostonman
author_rank: Super Contributor
timestamp: April 03, 2022, 02:58:10 pm
content: I finally got my components order.Ian.M, per your steps, I've read the blank PIC (and 'verified' it's blank with a 'blank check'). From what I can tell, address 0x3FF has an OPCODE of 349C and RETLW 0x9C (whatever this means) - see attached Blank1.hex file.Will different blank PICs have different values?From what I've understood, when I attempt to write the HEX file that I saved from the original PIC, I need to enter a starting address, and enter 349C or 0x9C? Once I've done that, then I just write the code, verify it, and I should have a duplicate PIC (that hopefully now functions by blinking the LED)?I'll be honest, I don't know what all this means, so I'm only going by steps, however, I expect I'll learn more as I go along.

author: Ian.M
author_rank: Super Contributor
timestamp: April 03, 2022, 05:01:31 pm
content: Yes, different blank PICs (of this type) most probably have different value at 0x3FF. If they came from the same wafer they probably have the same value, otherwise its random chance whether they match. The RETLW opcode (34h) always stays the same, but the data byte varies.All official Microchip programmers and fully compatible ones preserve the factory OSCAL RETLW (or MOVLW) for PICs that have it, by excluding it from programming, and on FLASH PICs, reading it before any other programmer operation, and writing it back after any Erase. Unfortunately your third party programmer is generic and I suspect doesn't have the special OSCAL handling, so you must preserve it manually, by ensuring that the contents of the buffer for that location match the contents of the new chip, *before* actually programming.

author: bostonman
author_rank: Super Contributor
timestamp: April 03, 2022, 11:33:24 pm
content: A possibility exists that I'm down one PIC with two left to go.I expected to see a popup menu when I pressed 'PROGRAM', and think it just wrote the empty buffer back onto the PIC because it began programming.In any case, after this mistake. I figured out that I need to 'open' a file and then I get the following popup window (see attached).For file type, this seems obvious, I select Intel. For 'File Mode' I assume leaving it as normal. The other options (to list a few) are: even (1st of 2), odd (2nd of 2), 1st bye of 4, etc...The rest I'm uncertain about. Is 'Buffer Address' where the 349C or 0x9C would be entered (I'm uncertain which one I'd use, but think you answered it to be 9C). Also, from what you said, if I use another PIC, these addresses may be different.

author: Ian.M
author_rank: Super Contributor
timestamp: April 04, 2022, 01:33:23 am
content: Blank1.zip above appears to contain an image of an unprogrammed PIC with factory OSCCAL: RETLW 0x9cIf that is after your misadventure writing the blank buffer, I'd bet that PIC is still usable.Personally, as the programmer software doesn't offer second chances, I'd read the blank PIC to get the OSCCAL data and note it down, import the original WES51 hex file in MPLAB, patch the OSCCAL RETLW data at the end of the program memory, export the hex file (with a new name) for the full range of the program memory + the config, then check it imports back correctly after clearing the program memory, so I don't have to mess around in the programmer software. Do a dummy run with no PIC inserted and see if that workflow makes sense then try again with the PIC that you think you wrote the empty buffer to. At best it will succeed, at worst fail on verify. Finally, when you are certain its set up correctly to write the whole program memory + the CONFIG, repeat the whole process of getting the OSCAL data, patching and writing, with a fresh blank PIC.

author: bostonman
author_rank: Super Contributor
timestamp: April 04, 2022, 02:06:23 am
content: The blank1.hex file above is a read right out of the static bag. I hit 'program' afterwards, but it still checks as 'blank'.QuoteAs mentioned above, I think the OSCCAL data was read (at 0x3FF) and step one is complete (?). As for patching, I'm uncertain about these steps. Is just entering a starting address in one of the fields shown in the screen shot above too risky?

author: Ian.M
author_rank: Super Contributor
timestamp: April 04, 2022, 02:46:34 am
content: Buffer address and File address in the load dialog are nothing to do with patching the hex file. Instead they are for offsetting the hex file. Suppose you had an old 8 bit CPU that started execution in high memory (lets suppose the reset vector is 0xFFFE), and you wanted to program 8KB of ROM for it into two 2732 4Kx8 EPROMS.Your ROM code is assembled starting at 0xF000 (because it isn't relocatable) but the buffer for a 2732 only goes up to 0x7FF. Therefore for the first EROM you'd use a file address (offset) of F000 (hex) and it would load that 4K buffer size 'window' from the file. To program the second EPROM, you'd use file address F800 to load the upper half of the assembled ROM code.Similarly, 'Buffer address' can be used to offset code in the resulting EPROM, useful if you've got hardware paging switching the higher address lines to let one large EPROM chip hold several 'ROMs'.The 'file mode' option is for splitting a file between two EPROMs connected to the upper and lower bytes of the data bus for a 16 bit word CPU or four for a 32 bit word CPU.Both are irrelevant for 8 bit PICs, so leave file and buffer address offset set at zero and file mode at normal. Filetype must be set to IntelHEX.*IF* you were going to patch memory in your programmer software (not recommended), you'd do so in the buffer after successfully loading the buffer. Beware: buffer addresses do not match PIC program memory addresses as the buffer is bytes, but the PIC has 14 bit instruction words, as discussed previously.

author: bostonman
author_rank: Super Contributor
timestamp: April 04, 2022, 02:17:38 pm
content: That makes much more sense and a bit of PIC knowledge.I spent time trying to look for OSCCAL and RETLW last night in MPLAB, but basically spun my wheels (to use a corporate term). Is this easy and I overlooked something or not easy for a beginner?

author: Ian.M
author_rank: Super Contributor
timestamp: April 05, 2022, 01:04:56 am
content: MPLAB and/or MPASM help wont have anything about OSCCAL, as the MPLAB simulator doesn't support it (simulator clock is fixed 'frequency' set in a dialog), and the details of using it vary from device to device. Consult your PIC's datasheet for details.See section '4.2.2.7 OSCCAL REGISTER' for details of the register itself, and section '9.2.5 INTERNAL 4 MHz RC OSCILLATOR' for details of using the factory calibration data with it. You'll find details of the CALL and RETLW instructions in section'10.2 Instruction Descriptions'.

author: bostonman
author_rank: Super Contributor
timestamp: April 06, 2022, 03:04:42 am
content: I have to be honest, the more discussion about this, the more confused I get.Initially I thought having the PIC program and just entering a starting address to burn onto a new PIC was enough, and something somewhat simple.At this point, I'm baffled on how to go about this. Maybe it's not having any experience with PICs, but I've looked at the datasheet, and did some research, but not sure which steps need to be taken.QuoteWould I be better off just buying a programmer off Amazon per your statement or can you help provide the steps to make this work with my existing programmer?

author: Ian.M
author_rank: Super Contributor
timestamp: April 06, 2022, 03:55:07 am
content: All PIC12/16/18C... PICs (with the exception of PIC16C83/84) are EPROM PICs. All PICs with 'F' or 'LF' in the middle of the part number are FLASH PICs. Unfortunately none of the current Microchip development programmers (or their clones on Amazon etc.) support EPROM program memory PICs (which can draw up to 100mA Vpp current during programming), they are all for FLASH program memory PICs for which Vpp is only a bias voltage to enable the internal programming supply charge pump. I also cannot with a clear conscience recommend dropping the hundred bucks or so a second hand Picstart Plus (the last EPROM PIC capable development programmer) would cost you as it is unsupported in MPLAB X, has limited support for FLASH PICs and may need you to preserve a legacy PC to use it, and there is no reason to ever use EPROM PICs except when repairing legacy devices.I've got a workflow for you that should preserve the OSCCAL factory calibration RETLW without you needing to manually patch it.Insert blank PIC and read it into the bufferLoad the attached HEX file (from which I stripped the OSCCAL RETW using MPLAB Export), with the 'Buffer clear on data load' checkbox in the 'File Type' dialog unchecked (to preserve the OSCCAL RETLW just read from the PIC)Write the buffer to the PIC and VerifyLocation of 'Buffer clear' checkbox:

author: bostonman
author_rank: Super Contributor
timestamp: April 07, 2022, 01:47:42 am
content: I was unaware the programmers were that expensive; maybe I looked at knock offs before because I swear they were cheaper. As you pointed out, buying one would be a waste because I'd probably never use it again (and why I've pushed to use my existing).Either way, I appreciate you removing the stuff you mentioned and uploading a new HEX file. I followed your steps, and, just to reiterate, I'll list them:Inserted the PICRead the PIC (although I'm uncertain why I needed to read a 'blank' PIC)Loaded the HEX file you providedUnchecked the 'Buffer Clear On Data Load'Clicked 'Program'Clicked 'Verify' (which verified fine).A few added bonuses: After programming it, I checked to see if was blank (i.e. 'Blank Check') which returned an error (I assume this was informing me it wasn't blank).I also 'Read' the newly programmed PIC and attached the file (I'm not editing the extension and keeping it as it was saved just in case you need to do something other than just add an extension).Also, I loaded the original HEX file from the original PIC I 'Read', clicked 'Verify', and it verified good.I assume since it verified good when comparing it to the original HEX file from the original PIC, this means it wrote it to which ever location it needed to and the code hasn't been edited meaning you didn't accidentally change any of the functions.Now all I need to do is install it and keep my fingers crossed, correct?

author: Ian.M
author_rank: Super Contributor
timestamp: April 07, 2022, 04:20:40 am
content: You needed to read the new 'blank' PIC to get its factory OSCCAL calibration into the buffer, in case the programmer software isn't smart enough to lock out that location for writing. Step 2 then merged it with the 'deOSCCALed' hex file.I can confirm the *ONLY* difference between the read-back and your original hex file is the factory OSCCAL calibration data byte, which is as it should be.

author: bostonman
author_rank: Super Contributor
timestamp: April 07, 2022, 01:15:05 pm
content: QuoteIf I'm reading this correctly, you mean a difference exits, but the OSCCAL should be different?QuoteThis makes sense. I'm only guessing, but would imagine the buffer gets overwritten when a new file is loaded (or read), however, I didn't take any chances. When I executed your steps, I followed them as indicated, but, in the case of reading the newly burnt HEX file, I closed the programming software, opened it again, and then read the burnt HEX file off the new PIC.I'm uncertain if I'll have time today to remove the old (broken?) PIC and install this, but I should either tomorrow or this weekend. Obviously I'll update this thread when I do.

author: Ian.M
author_rank: Super Contributor
timestamp: April 07, 2022, 01:52:48 pm
content: Yep. The factory OSCAL calibration RETLW data byte difference is expected, intended and desirable.When you read a device the whole buffer is always overwritten with the device memory contents. When you load a hex file, what happens depends on the 'File Type' dialog settings + the address ranges of the data present in the hex file. If 'Buffer Clear On Data Load' is checked, then all buffer addresses not 'covered' by the hex file get cleared to the fill value in the dialog (default FFh), but if its unchecked they keep their old contents, allowing you to merge multiple hex files (+ existing data) in the buffer.

author: tooki
author_rank: Super Contributor
timestamp: April 07, 2022, 04:44:23 pm
content: Quote from: bostonman on March 20, 2022, 03:25:11 pmWhat are you talking about? 1206 is a standard size. Commonly used nowadays for power resistors, larger caps, and for SMD beginners. (For non-power parts, 0603 and 0402 are the most common these days. 0805 is arguably rarer still, since it’s only a bit bigger than 0603.)

author: bostonman
author_rank: Super Contributor
timestamp: April 08, 2022, 04:31:11 am
content: Maybe I overly worded my statement.All the stuff I've come across at jobs have been 0805 and some home projects 0603 (or maybe 0402), I've never come across 1206.From my brief experience and my opinion, the PCB is laid out like an amateur did it. The components are clumped together in certain areas, and then an extensive amount of space between the circuits. Etches go under components due to trying to clump circuits. It's a double sided board, yet, they stuck things like capacitors between the backside of the front panel and the PCB forcing them to use underrated voltage capacitors.Having said all this, after discovering the components are 1206 (I figured this out after I researched the dimensions I measured and after posting that statement in this thread), I feel the component size is overkill for the lower power circuits. They could have got away with 0805 - assuming these are cheaper than 1206.Since they were trying to save room for whatever reason on a board that's larger than needed, why waste time using 1206 size components?Also, they used a half-wave rectifier (not that noise is an issue), and used a 33uF 35V capacitor. Due to height limitations, I can't increase the capacitor and voltage.In any case, yes, maybe my statement was a bit too hasty, but much of this PCB doesn't make sense to me and probably overtook some of my thoughts.

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2022, 06:22:42 am
content: They needed to keep TRIAC MT1 at chassis ground due to their choice of drive circuit, and that meant they couldn't use full wave rectification for the controller. Whether or not the bulk decoupling cap is adequate depends on how much ripple is on it, which depends on the controller's load current. You could always fit 0.1uF ceramic to its pads and run wires to a larger higher voltage electrolytic mounted off-board.

author: tooki
author_rank: Super Contributor
timestamp: April 08, 2022, 04:47:34 pm
content: Quote from: Boston man on April 08, 2022, 04:31:11 amIf you’re as a much of a novice as you say you are, then what makes you think you think you’re in a position to judge whether they were the right choice, and whether the PCB layout is good or not? (Why don’t you post some pics of the boards? You have me curious.)Many factors come into play with component choice: power rating, component characteristics (especially with caps*), assembly method, etc.For example, if you want to glue and wave solder SMD parts, larger parts are easier to glue, and less likely to have shorts. Remember also that this station is very old. It’s eminently possible that at the time, smaller components cost more (even though they are cheaper nowadays). Larger components can also be pick-and-placed more quickly (because less precision is required), or with older equipment, freeing up modern machines for other jobs. (That’s why nowadays, you’ll generally pay more to have components smaller than 0402 placed.)Heck, it could be as simple as “we stocked up on these 1206s and need to use them up before they tarnish”. Or maybe it was a board originally designed even longer ago for a predecessor model.* with ceramic capacitors, the larger you can make it for a given capacitance, a) the higher the voltage rating can be, and more importantly b) the less capacitance loss there is with DC bias. (The high-capacitance dielectrics used for small, high-capacitance caps lose capacitance with voltage, and it can be very significant. Like 20-80% loss in capacitance. For example, a “10V” 0402 cap might lose 10% of its capacitance at 3V, but 60% at 9V! For power supply filtering, this can be very significant. And it causes distortion when used for AC signal applications.) This is effect is substantially reduced in physically larger caps.

author: bostonman
author_rank: Super Contributor
timestamp: April 09, 2022, 05:15:51 am
content: I'm trying (and try in general) to avoid deviating from the thread regarding this solder station and now PIC issue (I really, really appreciate the help Ian.M has been providing because he's not only provided help to me, but gone out of his way to decipher the code; and provide edited code to burn new PICs for anyone in the entire world to download), but want to comment on your message to avoid anyone having a negative opinion about me. From our last public exchange regarding connectors, you've certainly made a point to place emphasis about mistakes on my part.As with any public forum and social media site (which I'm not a part of), any comment can be taken out of context. Certainly I'm not at all taken offense, nor do I think you're angry towards my statements, but feel I should elaborate a bit because I don't want anyone thinking I think I'm above them.I've never stated I'm a novice. I feel this forum was created with the intent of sharing knowledge between beginners and well advanced individuals without the need to categorize; and I feel you're categorizing me.If not for this site, my last few in depth repairs probably would never have happened. I think it's absolutely great that someone in one part of the world repaired something and can answer questions to someone with the same issue in another part of the world. Also the fact that people take time out of their lives to help someone they've never met, will never meet, nor may not repay the favor.I'm sure you drive a car. When someone makes an illegal move which results in cutting you off, do you roll down your window and ask if they are okay and swerved because they have a health issue, or if they cut you off for a reason? Most likely you yell "you're a horrible driver". Does that mean you're a "novice" driver? I'm sure you've made similar errors too, however, you feel the need to think you're the more dominate/advanced driver by judging their driving skills without asking why they made a dumb move. Similarly, you've placed me in the category of accusing me of thinking I'm a "novice" with PCB design.My point is: you're absolutely correct. Maybe Weller had millions of extra 1206 components and wanted to use them, maybe it was cheaper for the pick and place machine, etc... I made a judgement call on what I feel is a poorly laid out PCB much like you've yelled at some idiot cutting you off. I feel the PCB is laid out by an amateur because I've made many (more) mistakes in the few PCBs I've laid out. The difference is: Weller is (probably) a multi-million dollar company making (what I feel) are amateur mistakes and I'm an average guy who sees these issues. Some technical gurus would group together and laugh, not try to shun them from the conversation.In some cases the Weller PCB designer had plenty of PCB space to run etches differently but chose to run them under components. In other cases they didn't have enough room, but could have made the room by spacing out components. They chose a 33uF, 35V, capacitor and could have gone with a higher voltage but didn't have the space. Should they have placed the capacitor on the other site of the board, they could have gone larger.For respect of keeping the thread on topic and those who reference this topic in the future to repair their Weller, I think we should keep personal opinions to ourselves, and this goes for me as well. Maybe I stepped out of line by offering my opinion about the PCB layout and component selection. For that, I'll admit, I was wrong to deviate the topic by providing an opinion.

author: bostonman
author_rank: Super Contributor
timestamp: April 10, 2022, 06:10:54 pm
content: I soldered in the new PIC and unfortunately the LED still doesn’t blink.The iron temp was set to just above minimum, it got hot enough to melt solder, I waited a while, and the LED remained green. I also increased the temp knob and then decreased it which should turn off the LED until it reaches the cooler set point, and still the same results.

author: bostonman
author_rank: Super Contributor
timestamp: April 12, 2022, 01:28:34 am
content: Ian.M,I was curious whether you saw anything in the code that shows what it takes to make the LED to blink.At this point, the iron is new which eliminates a thermocouple issue, and the PIC is new. Due to not knowing what the PIC is doing, the only last shot in the dark is wondering whether the 220pF on pin 5 of the PIC has become resistive causing low amplitude thus not clocking the PIC.I'm uncertain if the PIC needs this to perform basic functions. If so, then obviously this isn't an issue because the PIC is somewhat working, but, if maybe it only needs the 60Hz to blink the LED (obviously dividing the frequency first), then maybe this is the culprit.Other than that shot in the dark, I don't know what else could cause this issue.

author: bostonman
author_rank: Super Contributor
timestamp: April 17, 2022, 03:04:29 pm
content: Just for reference, here are two examples of what I consider poorly run etches.The two wires are the 24V AC input and the other picture shows an etch going underneath a fuse (the green part).I know this is low frequency and doesn't matter if they are under components, but the designer had plenty of PCB space and my point was: it looked like the design was to consolidate space, however, numerous amounts of empty space exists; the need to run etches under components seems like someone just ran things haphazardly. The board also doesn't have any silscreen which was probably done to save money.

author: tooki
author_rank: Super Contributor
timestamp: April 18, 2022, 05:04:48 pm
content: Quote from: bostonman on April 17, 2022, 03:04:29 pmThanks for providing those examples. I agree with you that those seem like very sloppy layout.P.S. They’re called “traces”, not “etches”.

author: bostonman
author_rank: Super Contributor
timestamp: April 19, 2022, 03:07:58 am
content: QuoteHmmm is this opinion? I've heard both over the years and you sparked my interest. I've also heard various names for raw PCBs and populated. The owner of my last job insisted an un-populated PCB is a 'printed wire board'.Trace seems more like a small segment of an entire etch. A printed wire board seems like some 60s term (ironically the owner was mid 80s and probably using an outdated term).For me, I didn't work in manufacturing, so my terminology is usually raw PCB for an un-populated board, PCB for populated, assembly for a unit comprised of PCBs, and etches for 'traces'.Anyway, yesterday I took (more) measurements on the solder station and there is something I don't understand. With the new iron plugged in (and heating), pin 7 of the PIC seems to act weird. If I set pin 6 (temperature set poteniometer) to 1V DC, pin 7 has a 0.5v p-p 60Hz sine wave with a DC offset that climbs until it reached 1.5V DC and then it's just a DC voltage. As the iron cools (or so I believe), the DC voltage drops slightly and then the sine wave reappears until it climbs to 1.5V DC again.Setting pin 6 to 2V DC, pin 7 acts the same way (60Hz sine wave 1.5v p-p) until it settles to 3V DC. Once the iron cools a bit, same thing, the sine wave reappears, DC offset climbs, and settles to a DC voltage at 3V.Setting pin 6 to 4V DC, pin 7 acts the same way and settles to about 4V.What I don't get is why a sine wave keeps appearing. I thought maybe it was the 100nF capacitor on pin 2 of the op-amp causing some time constant, but I've simulated it setting pin 3 of the op-amp to a slow rising 0 to 7.34mV which is approximately 180 degrees C (approximately 360 degrees F) and the output (as I expected) is just a DC ramp.I'm wondering if something is going on at the op-amp end causing the PIC not to begin blinking the LED.Edit:7.34mV is approximately 180 degrees for a type k thermocouple

author: bostonman
author_rank: Super Contributor
timestamp: April 26, 2022, 04:23:34 am
content: So far I feel all the circuits have been tested and confirm to work with the exception of not figuring out why I'm getting a 60Hz sine wave out of the op-amp when the iron is heating. Not sure if this could be a reason the LED isn't blinking when the iron reaches temperature, but seems odd to see the 60Hz. It tells me I have a bad ground but it's not like this solder station has many grounds; just one ground and Earth ground which both seem to be connected (I measured from the iron to the ground prong on the AC plug and the circuit wouldn't work if I was missing common ground).Yesterday I took some scope measurements on the op-amp along with voltage measurements. Both inputs seem to measure correctly when the iron is set to approximately 350 degrees F and the output measures correctly compared to a simulation circuit I created; except it has a sine wave when heating.I took a scope measurement on both, the output of the transformer and the output of the op-amp (see attached scope picture). Whenever the 60Hz occurs on the output of the op-amp, the output of the transformer drops in amplitude a bit and has some funky little noise near the zero crossing.I don't know if this is something that contributes to the LED not blinking, but figured I'd mention it because I'm out of ideas.

author: floobydust
author_rank: Super Contributor
timestamp: April 26, 2022, 09:58:35 pm
content: I think you've had a hard time figuring out what is going on with this soldering station. To me it keeps looking like some problem with TC(-) either open wire (fuse too) or shorted to the heater. I believe PE ground only connects to the shield, not to anything on the 24VAC secondary side. Unless there is a ground fault. If there is a short to PE GND, your scope readings would be wrong as well and small chance you damage the scope by passing large current through its ground. There should not be so much AC hum. Get out your ohmmeter.Next what I would do is roll back and make a thermocouple simulator, just a voltage source like a 1.5V battery and a resistor voltage divider or Wheatstone bridge I use, to get 0-20mV inject that and see what the controller is doing based on dialed in temperature it sees.

author: bostonman
author_rank: Super Contributor
timestamp: April 27, 2022, 03:34:56 am
content: QuoteIronically, this is exactly what I plan to do.QuoteWhat is PE?At one point I tried shorting the fuse just in case it went resistive (if it's possible with these types - but figured what do I have to lose?).I agree, I shouldn't have 60Hz, but the circuit seems simple enough that I feel I've covered everything. Your idea (and what I've wanted to do) seems like a good approach because I'm no longer battling a soldering iron heating and cooling constantly.

author: tooki
author_rank: Super Contributor
timestamp: April 27, 2022, 05:27:27 am
content: PE = “protective earth”, as in the true ground connected to the Earth for safety (as opposed to “ground” in the sense of the fundamentally arbitrary 0V reference of a circuit).

author: floobydust
author_rank: Super Contributor
timestamp: April 27, 2022, 05:52:51 am
content: Quote from: bostonman on April 27, 2022, 03:34:56 amThe fuse protects the wiring and PCB traces from melting when a fault occurs (heater to thermocouple short). It might have already happened with your soldering station. You'd have to do continuity checks to make sure they are intact.

author: bostonman
author_rank: Super Contributor
timestamp: April 27, 2022, 11:16:33 pm
content: Not sure if you overlooked a previous posting, or suggesting I re-measure (which I plan to do), but this is a new soldering iron. I do, however, like that my idea to use a battery to produce a small voltage in place of the iron was suggested by you; it provided some reassurance my idea wasn't crazy.Also, this morning over breakfast your posting popped in my head and I said 'PE' is the soldering iron part number (Weller PES51 Solder Iron) and said this is the reference in the posting. Afterwards I read your updated post and discovered my breakfast wasn't strong enough to start my brain and that PE is Positive Earth.

author: bostonman
author_rank: Super Contributor
timestamp: May 12, 2022, 02:30:00 am
content: QuoteI have been flat out busy with some stuff, but this is my next step. I'm wondering if injecting a voltage from an external source may cause a ground loop issue. Should I connect the battery ground to the soldering iron ground?My other thought was to tap into the 5v regulator on the iron, go through an op-amp, etc... and then everything will be referenced to the same ground.BTW, just to update: I did ohm everything and can't seem to find any open ground connections that would explain why I see 60Hz on the output of the op-amp that is fed from the thermocouple. The PCB itself only has two leads from the transformer, and, if the return was open, the whole circuit wouldn't work. Earth ground from the (new) soldering iron to the plug also measure correctly.

author: Andy Watson
author_rank: Super Contributor
timestamp: May 12, 2022, 12:06:04 pm
content: Out of pure curiosity, I've been having a nose around the code presented previously and found the following:As Ian.M has noted previously, the EEPROM is only 16 bytes in size and is essentially "bolted on" via a general purpose I/O port. The take-away that I get from this is that the EEPROM cannot be pre-programmed with data. Therefore the "initialisation" of the EEPROM data must be part of the permanent code. I.e. once programmed, the PIC must know how to initialise its own data from a "virgin" state. So there should be no problem in installing a fresh chip programmed with the existing code.On power-up, there are three steps to the initialisation:1. Initialise the internal data (mostly set the RAM to zero) and define the I/O.2. Determine the mains frequency using Timer 0. This happens every power-up cycle so the heating control constants can be baked-in to the code for eeither 50 or 60Hz operation.3. Read the non-volatile parameters from the EEPROM.What does the EEPROM store?There are only five bytes of the data stored in the EEPROM; six if we count the magic number. The first operation of step 3 is to read the first EEPROM location. If this does not return the magic number of 0xF0, the EEPROM is (re-) initialised to default values.The EEPROM data is read as:Location 0 : The magic number that indicates the EEPROM contains valid data.Location 1 : Tip offset temperature. One byte that saves the tip-offset temperature in 2Cs Fahrenheit.Location 2 : Non-volatile flags. Only two flags appear to be used. One to indicate temperature locked or unlocked. One to enable flashing of the LED.Location 3 : High byte of set point temperature when the station is locked.Location 4 : Low byte of set point lock temperature (in Fahrenheit.)Location 5 : Dial calibration offset.The default "virgin" reset values are:Tip-offset = 0. Flags=0, i.e. unlocked and LED flash enabled. Dial calibration = 0 offset. The set point operating temperature does not default since the station will be unlocked and the temperature will be determined by the dial.The default "factory" reset values are:Tip-offset = 0. Dial offset = 600 - Dial setting (see later). Flags are not reset and the temperature lock is not affected.There are two modes of using the magic pencil (i.e. the magnetically triggeredreed-switch.)During normal operation or as part of the power-up sequence.During normal operation:As per manual. If the pencil is used for 0 to 2.5 seconds, indicated by a red flashing LED, the temperature lock is toggled. If the pencil is used for more than 2.5 seconds, indicated by the LED turning green, the dial can be tweaked to offset the tip-temperature of the iron. When the pencil is removed the offset, if within range, is stored as the new tip-offset temperature. Note, this "calibration" takes into account the present tip-offset temperature and adjusts the new offset accordingly. There is no way to force the tip-offset temperature to zero except via the "factory reset".During power-up:AKA Factory Reset: As the manual suggests, this resets the "tip offset" temperature to zero, but that's not all.What the manual does not say.The manual requires that the temperature dial is set to 600F. If, in the factory reset phase, the dial reading is within 75 degrees of 600, this is taken as a calibration point of the dial. I.e. It assumes that the user has set the dial to 600 and whatever the difference is, is used as an offset to calibrate knob and potentiometer readings. This offset is stored in non-volatile memory.If the reading does not fall within the 75 degree window the follow happens:Less than 400 A non-volatile flag is cleared.More than 800. The non-volatile flag is set.As far as I can tell the only effect of setting this non-volatile flag is to prevent the LED from blinking during normal operation.

author: bostonman
author_rank: Super Contributor
timestamp: May 13, 2022, 02:43:11 am
content: Wow, that is certainly a deep explanation of the code.Some of your explanation gets a bit confusing, probably because you have fresh knowledge since you've been studying it; and I'm not a code guy. Still, it was a good explanation and shed some light on things.In any case, you stated the PIC detects line frequency. Maybe this explains the purpose of pin 5? I believe the PIC has an internal oscillator, so the blinking rate of the LED may be a divided frequency of the oscillator; or maybe it's divided from the 60Hz and pin 5 serves more than just initially detecting frequency.Also, on page 3 of the manual, it states setting the dial to 600 degrees F for a factory reset. At least once with the old PIC I did a "factory reset", however, I didn't put the face plate on to see where the dial is, but know the middle point of the poteniometer is 600 degrees F.In any case, if I'm understanding your breakdown of the code, does a possibility exist that I've held the "pencil" (i.e. a magnet I had on the side of my tool box) too long and caused the PIC to think some tip offset exists?Although, now that I think of it, when I installed the new PIC, I just turned on the iron and waited without seeing the LED blink. From what I believe you've stated, a new PIC wouldn't have values from the original PIC, so the new PIC should have set flags and blinked the LED (unless I misinterpreted your explanation).QuoteWhat is 2Cs?

author: Andy Watson
author_rank: Super Contributor
timestamp: May 14, 2022, 12:07:20 am
content: Quote from: bostonman on May 13, 2022, 02:43:11 amYes, no, the latter. The purpose of pin 5 is to detect the mains cycle - specifically when the mainis cycle crosses close to zero. This event is used in the initialisation to determine the mains frequency. The period of the mains cycle is measured against the PIC's initernal oscillator (whihc is assumed to be about 4 MHz.) The PIC will remain in this initialisation until it obtains a measurement of the mains frequency that lies in the range 48 to 54 Hz, or 54 to 62 Hz.Now that the PIC knows the mains frequency to be either 50 or 60 Hz, it defines a tenth of second count as either 10 or 12 - this is the number of half-cycles of mains in a tenth of a second.From here on, the PIC sits in a loop that is synchronised (via pin 5) to the main half-cycles. It must be! It needs to know when to fire the triac.So we have a loop of code that runs every half-cycle of the mains. We can use the value(s) determined in the initialisation to increment a tenths of a second timer. And the tenth of second counter can be used to determine seconds, and the seconds to minutes. The reason for the tenths of second counter (rather than going directly to seconds), is that the heating of the iron occurs in tenth-second bursts. The length of each burst can be divided into either 10 or 12 units, which gives a semi-proportional heat control. In normal operation the LED flashes (if enabled) with the heating of the iron; in other situations the LED flashes at the rate set by the least significant bit of the tenths counter.All the timing and synchronisation is inherently linked to the mains cycles via pn 5. The actual frequency of the PIC's oscillator is secondary (although it must be "close-enough" to get through the initialisation stage).Conclusion: Pin 5 must "wobble" at the mains frequency or the PIC don't go!QuoteOk, let me clarify what I meant. The manual is not wrong, but it does not tell lthe whole story. If you power-up with the magic pencil in place, one of four things happen:1. Dial at minimum ( less than 400F), the LED flash enable flag is cleared (i.e. the LED will flash when the iron is heating).2. Dial at maximum (greater than 800F), the LED flash enable flag is set - the LED does not flash during normal operation.3. Dial (as read by the PIC) is between 525 and 675F. Set tip-offset temperature to zero. Assume the operator has set the knob to 600F and take difference as an offset to the dial reading, i.e. calibrate the dial.4.If none of the above - do nothing.QuoteYes. I think you have the gist of what I was saying/thinking. All the "information" to create a fully working soldering station is baked-in to the firmware of the PIC.QuoteTwo's compliment. I.e. the values in the one byte are assumed to range from -128 to 127.

author: bostonman
author_rank: Super Contributor
timestamp: May 15, 2022, 03:07:09 pm
content: Initially you stated you had a "nose around" in this. You've done more than just (what I initially assumed) dabbled in the code, you've basically dug far deep.I'm uncertain how much of this code is necessary for a soldering iron and seems it's much longer than needed.One thing I dislike about pin 5: the amplitude going in is extremely high and (I believe) maintained to safe voltage levels via the input protection diodes.I need to re-re-read your last posting to make sure I understand the steps, however, from my interpretation, it seems the LED isn't blinking for possibly two or three reasons:1: If my mains frequency isn't 54Hz - 62Hz. I find this hard to believe, but will remeasure. Other than my house not being 60Hz (which I'm sure it is), then maybe the transformer or capacitor (220pF) is doing something funky to the frequency.2: The new PIC got its program from the original PIC causing the firmware to lock out the blinking mode. But you've clearly stated the PIC initializes flags on its own and doesn't matter what it had for flags.3: I set the temperature knob greater than 800 degrees F, held a magnet near the Reed switch, and powered the iron. This probably isn't the case since I installed a newly programmed PIC and turned on the iron without doing anything; but anything is possible. I can try setting the dial again to 600 (which would be 2.5V at pin 6, hold a magnet to the switch, and power the unit thus resetting the iron.2 and 3 above seem like they can't the issue since I explained the reasons leaving just 1 above (bad transformer, mains frequency, or capacitor).Have I missed anything in your explanation that conflicts with my three assumptions on what could be the issue?

author: bostonman
author_rank: Super Contributor
timestamp: May 25, 2022, 01:11:45 am
content: I took some scope measurements of pin 5 of the PIC to see how the 60Hz looks.When I measured pin 5 alone, it looked like the phase kept jumping 180 degrees. I checked the triggering on the scope, and, no matter what I did, the phase kept jumping; hence why I named the files phase 1 and phase 2.When I measured pin 5 and the secondary of the transformer together, it seemed both channels would flop back and forth in phase by 180 degrees, but, when I changed the trigger to pin 5, the phase seemed to stay the same.I'm uncertain whether the phase hoping is causing the PIC not to see the correct line frequency, or if it's just poor triggering on the scope (it's a higher end digital 600MHz scope).If I had to guess, I'd agree with someone who said a ground issue, but, I can't figure out where a bad ground would be. Earth ground from the prong all the way to the iron measures low resistance, and, all the grounds on the board measure low ohms back to the secondary of the transformer return.The primary of the transformer measures 22 ohms and the secondary measures 71 ohms if this means anything.

author: bostonman
author_rank: Super Contributor
timestamp: July 10, 2022, 02:51:27 pm
content: I'm digging up my old thread because I finally got some time to build a dummy thermocouple circuit which I can adjust.Since I wasn't sure how to calculate the gain of the thermocouple op-amp circuit, I simulated it. My dummy circuit basically requires I remove the 1M resistor between the 5V and input of the + thermocouple, take that 5V, goes through four diodes (to drop the voltage), and two pots in series. Initially I wanted to use a resistor, but, since I wasn't sure how much the diodes would drop, I figured using two pots would make things easier.Turns out, it seems I accidentally made it so one pot acts as sort of a course adjust and the other acts as a fine tune.In any case, comparing the simulation circuit to my measurements, I set the virtual thermocouple to various voltages including 12.8mV (315 degrees C or 600 degrees F) and the output of the op-amp seems to match quite closely with the simulation values.I also tried simulating a somewhat cold iron by turning down the voltage, recycling power, and slowly bringing up the voltage until it reached 600 degrees F (which is what I had the dial set to) and the green LED still didn't blink.From what I can tell, the gate to the TRIAC controls. When I increase the thermocoupe voltage to within 600 degrees F, the pulses to the TRIAC seem to change so the left half of the pulses are 0V DC with the right half remaining the same (I assume the frequency has changed but I didn't bother changing the scale). As I increase the voltage, the waveform turns off. Decrease the voltage below 600 degrees F, and the waveform returns.Technically I guess using the iron in this state wouldn't hurt anything, but it doesn't really assure me the iron has reached its set point without the blinking green LED.Unfortunately I don't have a conclusion. The board has power coming in, the 5V regulator is putting out a clean 5V DC, the TRIAC does heat the iron (when the iron is plugged in), the op-amp seems to have the correct gain, and, from Andy Watson posted, the PIC doesn't rely on any external factors that would cause the code to mess up.I've done factory resets without seeing any changes. The dial needs to be set to 600 degrees F at turn on, so that's the mid point. I usually set the voltage on pin 6 to 2.5V which is the mid point, pull pin 4 to ground, power the unit, and remove ground from pin 4.The only thing left is assuming something funky is going on with the transformer causing the frequency to deviate enough to cause the PIC to mess up, the 220pF on pin 5 is bad, or the thing is just hopeless (which I refuse to believe since the circuit isn't complicated); unless someone has a better theory.

author: bostonman
author_rank: Super Contributor
timestamp: August 05, 2022, 02:38:10 pm
content: I wanted to reach out one last time about this thread.Unfortunately I think a decision needs to be made at my end on whether to junk this solder station, or toss it on the shelf to never address it again.The only odd measurement I got was measuring from the gate of the TRIAC to MT1 having only 75 ohms - I posted my question in another thread and referenced this thread, but someone stated that seems normal.The voltages all measure correctly throughout the circuits. I injected my own voltage into the op-amp to simulate a thermocouple and the output op-amp voltages matched the circuit simulator. The soldering iron is getting hot indicating the TRIAC circuit is working (I was hoping that 75 ohms was an indication that maybe the iron was fluctuating too much and that's why the 'ready' LED wasn't blinking).At this point, everything points to the PIC as the culprit, however, the code was evaluated by Ian.m and Andy Watson to be solid. Plus I bought a new PIC and burnt the code to it (the modified code that allowed the flags or whatever it was to work on a blank PIC).If anyone has some last minute ideas, I'd appreciate hearing them as I've been grasping at straws for the last several times I've tinkered with this iron.

author: Ian.M
author_rank: Super Contributor
timestamp: August 05, 2022, 03:20:10 pm
content: Unless its in *VERY* poor physical condition, I wouldn't junk it. Worst case, if you don't have the space to keep it, someone will want it for spares, though personally I'd chuck it on the shelf till I could get around to either replacing the whole temperature controller board, or writing my own temperature controller code in C to run on an upgraded but pinout-compatible PIC12F (reprogrammable) chip, or if you are feeling lazy, on an Arduino Pro Micro or similar mounted on 3M VHB tape and patch-wired over to the PIC footprint.

author: bostonman
author_rank: Super Contributor
timestamp: August 05, 2022, 10:49:24 pm
content: I don't disagree with you. Maybe my choice of words were a bit excessive, however, I dislike keeping stuff on my shelf that doesn't work, but, also, periodically it would force me to address the issue again.This is eating away at me because the circuits are quite basic and straight forward (ignoring the deeper workings of the TRIAC circuit). My go to is the PIC being the culprit, but the code has been checked.As for programming my own PIC, I don't know anything about code, and will need my iron soon. So far I've got away with a cheap Radio Shack, but I need a better one.Thinking out loud, the whole top of the schematic isn't in question because it's producing 5V DC. The bottom left isn't in question because the op-amp seems to be producing the correct voltages for the corresponding input voltages. The TRIAC seems to be getting the proper signals and it's turning on indicating the whole top right of the circuit is good. The bottom right circuit is straight forward, and the LEDs work (they just don't blink ready).I did question the RC coming from the secondary to the PIC (I don't have availability of the schematic at the moment). I posted a picture of the waveform earlier.Otherwise, the only thing I can point fingers to is something funky going on in the TRIAC circuit causing the PIC to think the temp isn't stable enough to blink ready, or something in the code has been overlooked and got corrupt.

author: Ian.M
author_rank: Super Contributor
timestamp: August 06, 2022, 07:13:02 am
content: As I said *way* up-thread, there is a small but real possibility that the original PIC's OTP program EPROM is corrupt. All it would take would be one bit loosing charge (i.e. going from 0 to 1) to change an instruction to a different one, and if the bit-flip changes the destination of a branch or the 'sense' of a test or compare, so closely studying the code*doesn't show an obvious nonsensical instruction sequence, it would be near impossible to determine the program is corrupt, without a known good 'clean' program dump to compare with.At this point, it would be very helpful if anyone else with a WES51 in full working order, and a programmer that can handle PIC12CE673 chips could dump their station's PIC and post the resulting IntelHEX file. Unfortunately Microchip's ICSP programming tools for modern FLASH PICs cant handle their old PIC12/16/18Cparts, so unless you've got a legacy Microchip programmer for their old EPROM PICs or a universal programmer that supports the above part, you wont be able to help.* Previously, I studied approx. 20% of the code to the level of detail required.

author: bostonman
author_rank: Super Contributor
timestamp: August 06, 2022, 01:35:26 pm
content: You're correct, you did say this.Hard to believe that the PIC could get corrupt so minor that it affects one tiny portion of its function.I'm not saying you're wrong, I'm just stating the irony of it.Somewhere above I posted a picture of the secondary sine wave and the pulse on the RC that goes into the PIC. I questioned why the pulse is higher in voltage than the sine wave wondering if that could be some indication of a problem.Personally I feel the only things it could be: the RC is an issue (which I doubt) as I mentioned in the previous paragraph, the TRIAC measuring 75 ohms from gate to MT1 (although someone in the other thread claims to have measured 75 ohms confirming mine is good), or the PIC.As for keeping this board as parts, it's somewhat hacked due to using a junk iron. I know what needs to be fixed, so for me it's an easy repair, but the diode at the TRIAC gate is removed, capacitor at the gate, and the TRIAC itself, along with other stuff that can be touched up.

author: bostonman
author_rank: Super Contributor
timestamp: August 13, 2022, 01:28:05 pm
content: Although not cost effective, I bit the bullet and purchased a used and (hopefully) working WES51 according to the description for $50 including shipping.My plan is to remove the PIC and extract the code so I can not only hopefully repair mine, but also provide the code to everyone else. I believe Ian.M fixed the code on my original so it can be burned to a blank PIC, so can you perform the same magic when I upload the new code?I don't plan to do anything fancy with this PIC until the code is extracted and safe to burn to a blank PIC, so I'm not going to measure anything, compare the original code to the code on the PIC, just get the code extracted first.Unfortunately I'm into this solder station for probably more than I should. The new iron was around $50, plus the cost of a replacement station, and a few components that I replaced and will replace. I'm hoping in the end I fix mine, and have a spare solder station too.

author: austfox
author_rank: Regular Contributor
timestamp: August 15, 2022, 07:39:49 pm
content: I own a couple of the Weller WES51D units (digital display) so have been occasionally reading this thread. I figured your PIC code would be different from units with LED displays, so didn't contribute.However, I was searching for something earlier this morning and stumbled across a WES50 unit that I purchased many years ago, possibly as 'not working'. I powered it on but got no response from the LED. I'll check the fuse later today to see if I can get it working.Anyhow, do you know if there is any difference between the WES50 and the WES51? This one is marked as Made in Australia.Does your board look similar to mine?

author: bostonman
author_rank: Super Contributor
timestamp: August 16, 2022, 02:07:05 am
content: Your board looks slightly different.Looks like your board is missing the 5V DC regular (maybe it's on the other side?), and a fuse.My advice is to extract the code from the PIC on both your solder stations if you can to have in case of a future repair since you have the resources on here. This forum is absolutely wonderful and like how people contribute their knowledge. Although I'm in this solder station repair for more than it's worth, I'm not only interested in repairing mine due to being stubborn, but, since I've had so much help, I feel it's the only way I can give back by uploading the code from a (hopefully) good one (I'll see once the one I purchased arrives).UPDATE: I just got a notification that the solder station has shipped and should arrive by Thursday which means I should be able to remove the PIC over the weekend

author: austfox
author_rank: Regular Contributor
timestamp: August 16, 2022, 02:52:28 am
content: Regulator is bottom left, pico fuse is on the other side of the board.I'll have a go at reading the code and post it here. It will be interesting to see if it varies much, if at all.I checked the fuse, and it is open, so I am suspecting a failure in the heating element (which also occured on one of my WES51D units some time ago).

author: bostonman
author_rank: Super Contributor
timestamp: August 16, 2022, 03:12:01 am
content: I missed the regulator. The board is very similar.Have you tried searching for the schematics?

author: austfox
author_rank: Regular Contributor
timestamp: August 16, 2022, 04:08:32 am
content: Haven't searched for the schematics for the WES50, but I just had a look on one of my drives and did find some schematics for the WES51D. The WES50, 51 and 51D all seem to share similar circuitry.

author: austfox
author_rank: Regular Contributor
timestamp: August 16, 2022, 11:17:20 am
content: I replaced the pico fuse and all seems well with my WES50. Iron heats, melts solder, and cycles off and on. One thing I did notice, which seemed to concern you from your earlier posts, is that the green LED remains constant once power is applied.From what I have read (at least for the WES50 model) is that a constant green LED allows use of the dial to set the temperature, and constant red is the locked in temperature, set with use of the lockout pencil (magnet). I do not believe the LED should be cycling on and off in relation to the iron heating or not.You can also use the lockout pencil to recalibrate the tip temperature, which I assume is stored in the PIC's internal eeprom, and also reset it back to the factory setting, which I also assume is held in the eeprom.I've socketed the PIC on my WES50, just need to get my PICSTARTER programmer working to dump the contents.

author: bostonman
author_rank: Super Contributor
timestamp: August 16, 2022, 01:08:54 pm
content: Unless I'm wrong and my mind has reconstructed how my Weller works, the green LED should blink once temperature has been reached.It should be solid green until temp is reached, blink once it's reached, turn off should the dial be decreased until the new lower temperature is reached, and then blink when the new lower temperature is reached.If it doesn't blink, there wouldn't be a way to detect if temperature has been established unless you just assume.

author: austfox
author_rank: Regular Contributor
timestamp: August 16, 2022, 01:24:56 pm
content: Maybe the WES50 is slightly different, but there is no mention of a blinking LED for normal operation, only to wait 30 seconds after turning on until you start soldering.Edit: Looks like they might function differently, the WES51 manual does state the LED should be off when it has reached the set temperature.

author: bostonman
author_rank: Super Contributor
timestamp: August 17, 2022, 03:11:02 pm
content: QuoteI forgot to mention that if your station is mechanically the same as mine, I believe the board will not fit with the PIC in the socket.FYI, the hopefully working Weller is set to arrive Thursday. Unfortunately I may not get to removing the PIC until Sunday, but I'll try sooner. I also have to dig out the programmer, etc.. but this is somewhat of a priority for me because I've been without an iron for quite some time.Also, if this one I purchased actually works, I'll have a real iron to properly solder the components I removed for troubleshooting on my broken iron (assuming the PIC solves the blinking LED issue).

author: bostonman
author_rank: Super Contributor
timestamp: August 19, 2022, 10:38:42 pm
content: As stated, the Weller arrived yesterday. Today I set aside time to remove the PIC from the "good" iron.Upon testing the solder station with the iron that came with it, the station wasn't working correctly and thought I got scammed. I tried my new iron and it worked exactly as expected.The green LED remained on until it reached (I assume) the correct temperature, then began blinking. If I increased the knob (i.e. temp), the green LED remained on until the new correct temperature was reached. I decreased the knob and the green LED remained off until the new temperature was reached and it began blinking steady again.I am attaching the original "bad" PIC file along with the new "good" PIC files.I didn't want to screw with verifying or comparing, and hopefully Ian.M doesn't mind looking into comparing for me. Unfortunately the file sizes are identical and I'm hoping this isn't an indication that the PIC code is identical too.

author: Ian.M
author_rank: Super Contributor
timestamp: August 19, 2022, 11:31:46 pm
content: The so-called 'good' files don't contain any valid PIC code. The CONFIG word does match the suspect one I was working on for you (0x3F6C), so we can be reasonably certain the good PIC isn't code protected (and the program memory area of the HEX file is blank (0x3FFF), not the scrambled values characteristic of PIC12/16Cera code protection), so I suspect your programmer had problems reading the PIC, namely it failed to enter programming mode on the first pass. Possible intermittent contact with the socket?

author: bostonman
author_rank: Super Contributor
timestamp: August 20, 2022, 12:27:42 am
content: Thanks for looking at this so quickly. Next time I’ll check the buffer.I went through you know what and back to remove this PIC. It had solder on the IC side of the board, up to the body (the assembler must have used a roll of solder to install this). I couldn’t remove the solder after a few attempts and resorted to cutting the leads before any more heat damaged it. i soldered fly leads into a socket, cut them shorter, quickly applied heat to each fly lead to the PIC lead, and then the programmer kept popping out the socket. I had to put that socket into a larger one - obviously aligning the pins.Due to the headache, the moment I saw it finished reading, I let out a sigh of relief and didn’t think to check the buffer.I apologize for wasting your time with a blank file. I’ll try again tomorrow or Sunday - this time checking the buffer.

author: bostonman
author_rank: Super Contributor
timestamp: August 20, 2022, 01:44:51 pm
content: Out of curiosity, can one (or more) pins not making a connection cause the code to be blank or does a possibility exist the PIC got damaged due to heat?I assumed the programmer would have told me if it's not making a proper connection on a pin or pins, however, maybe it's more thorough on a write cycle than reading.

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2022, 01:57:29 pm
content: Its a baseline PIC, so doesn't have a chip ID so no the programmer wouldn't tell you it failed to read. If the PIC doesn't enter programming mode for whatever reason, it fails to clock out the program memory word contents when requested, and the programmer 'sees' whatever level the ICSPDAT pin is at as the memory contents, in this case it was floating high or pulled up so read back as all '1' i.e 0x3FF a blank memory location (rather than all '0' i.e. 0x000 NOP).

author: bostonman
author_rank: Super Contributor
timestamp: August 21, 2022, 04:16:53 am
content: In the previous "good" PIC code I failed to save the buffer (text file), so I'm uncertain if comparing this buffer to that buffer would prove I was able to 'read' the PIC correctly.I'm uncertain what to look for to prove I got a valid read off the PIC this time, so I apologize if this new code (see attached) is also empty.Hopefully it read correctly because I made sure to get a solid connection. If it failed to read this time, I will fear the PIC got damaged due to excessive heat while unsoldering because I got a much better connection in the programmer socket.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 07:33:00 am
content: That looks like a good read. It differs by one bit from the bad one at word address 0x98:movlw 0x50 ;badmovlw 0x54 ;goodThat's in the mains frequency detection and selection code, where its checking the frequency range for 50Hz.Its also got a different OSCAL data word, but that's expected.Unfortunately its a '0' to '1' bit change and EPROM programming without erase only goes the other way so you can't patch that bit in-situ in your bad PIC.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 21, 2022, 01:32:46 pm
content: That lowers the detection frequency from 48.8 to 46.5 Hz - which makes sense. However, I don't think that is the show stopper, esepcially since we're talking about detecting 60 Hz (I assume). Perhaps the OSCVAL is too far out ?Since it's already broke would there be any harm in patching-out the frequency detection and fixing it to 60Hz? I believe this could be achieved with a few well-placed NOPs (all zero ?) instructions.

author: bostonman
author_rank: Super Contributor
timestamp: August 21, 2022, 01:59:08 pm
content: QuoteIs there a need to fix the bad one? I'd rather burn this code to a blank PIC, however, I believe you needed to do something to it first.I still have two, or maybe one, blank PICs, so if this 'good' code can be patched to burn to a blank, that will hopefully solve the issues with my iron; providing I can replace the components and any broken wires that were tinkered with during the troubleshooting. Also, anyone who needs the PIC code will have it for this needs in the future.Plus, the PCB is relatively simple, so people can build their own solder station if they desire.EDIT:I also need to burn a new PIC because I had to cut the legs on the 'good' one (not to say I can't just solder it to the board using fly leads. In any case, even if I didn't have any blank PICs (which I do), I plan to buy more anyway once I have the ability to burn good code onto them and confirm it works.QuoteI am dealing with 60Hz.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 02:20:16 pm
content: I've stripped the OSCCAL so you can now use it to program a blank PIC following the workflow I gave inreply #66.I suggest you try the newly programmed PIC in the working station to confirm its good before further experimentation with the bad station. If all is well program another one for the bad station.

author: bostonman
author_rank: Super Contributor
timestamp: August 21, 2022, 02:35:35 pm
content: Great, thanks!I have a bunch of stuff to do today, however, I'll try getting to this as soon as possible. If not today, hopefully tomorrow.

author: bostonman
author_rank: Super Contributor
timestamp: August 21, 2022, 09:17:36 pm
content: I referenced your previous post. Before I program a new one, I wanted to confirm something.The steps you gave show to use Motorola as file type. I thought this was an Intel file type?

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 09:21:05 pm
content: The image was only to show which dialog and what checkbox.Yes, select IntelHEX, andclearthe checkbox!

author: bostonman
author_rank: Super Contributor
timestamp: August 21, 2022, 11:25:10 pm
content: You're not going to believe this.I placed the blank PIC into the programmer, did a blank check (checked "OK!"), performed a 'read', selected the HEX file you provided, selected Intel, the blank check box was already checked, and programmed.It programmed in 01:70.For laughs I did a blank check and it showed: chip address 00000000, chip data 2855, buffer address 00000000, buffer data 2855, and showed 'error' for the blank check (as I assumed since it's now programmed).I also 'verified' and that check "OK"!.Soldered it onto the board, turned on power, the green LED came on, the soldering iron heated, and the green LED never turned off. I touched solder to the tip and it melted indicating it's at least 360 degrees F, turned the knob to minimum, and the green LED remained solid green. Increased the knob, let it heat more, turned knob to minimum, and the LED remained solid green.Thankfully before turning off the programmer I saved the buffer and info that was read back from the newly programmed PIC (see attached) should you decide to look at it.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 11:53:17 pm
content: That's *TWICE*. I now suspect that there is some process that must be run after programming possibly in a test jig to initialize the PIC's 16 byte I2C EEPROM die.Try:Quote from: WES51 User Guide@Andy Watson: You've dug into the EEPROM code further than I have. If the above doesn't help, any Ideas?

author: bostonman
author_rank: Super Contributor
timestamp: August 22, 2022, 03:54:29 am
content: I've been hesitant to respond because I don't want your request for Andy Watson to provide his input to get buried, but I've been giving thought to this.First off, I did consider doing a 'factory reset', but I didn't want to perform any additional steps to avoid throwing anomalies into the work you've put into helping me.Thinking out loud about this from a production point of view, each PIC needs to be programmed at the factory individually before installing. Rhetorically asking, what additional step would the manufacturing team need to take that would be acceptable since it's going to add time to production?* Removing the PIC from the programmer and sticking into something else to run an additional step could be a possibility, but adds an additional step and time. I'm almost ruling out this based on additional production time.* Installing a temporary jumper or some sort of physical step on the PCB in order to activate the PIC also seems unlikely since that is time consuming.* Assembling the whole unit and testing it before packaging for shipping seems more logical. At this point it seems more likely a step could be easily implemented to do a factory reset (although why bother if they can add that to the code); or the additional step could be a particular temp setting with a magnet that tells it to read and set the line frequency.Initializing the PIC somehow seems logical because it's ironic it seems to work correctly but doesn't blink. When you compared the old "bad" code to the new "good" code, the detection frequency was lower. If Weller builds these for 120 and 240 (60Hz and 50Hz respectively), maybe it needs to be "told" which frequency to look for. The transformer in my unit is strictly for 120, but the 4000-02 is 240 with the same 24V secondary. Weller could build the same solder station that works off the same DC voltage and they'd only need to swap transformers. Now the problem is how does the PIC know to clock off 50Hz or 60Hz; and maybe this is the missing piece of the puzzle.Also keep in mind, my iron had an open thermocouple (didn't know this initially and started off measuring the circuit thinking it was the TRIAC, capacitor, or 5V regulator) and believe the station was working correctly, but the LED stopped blinking because I may have shorted two pins while taking measurements (although I can't say for sure this is what caused the LED to not blink). Maybe I got the PIC into the raw factory mode where it doesn't know whether to clock at 50Hz or 60Hz.

author: austfox
author_rank: Regular Contributor
timestamp: August 22, 2022, 06:20:42 am
content: My WES50 has two pads extending from Pin 6 and 7 of the PIC.After the unit has been assembled at the factory, and the temerature dial calibrated, possibly these 2 pads are bridged to force the PIC to write the factory temp offset into memory, along with the other data Andy noted?Does the WES51 boards also have these pads?

author: bostonman
author_rank: Super Contributor
timestamp: August 22, 2022, 11:18:01 pm
content: Both mine have three pads; pins 4, 6, and 7. The PIC is already soldered in, so I can't check, however, I believe these are vias to the top side of the board.Also, I looked at them under the microscope and I didn't see any pits where someone would have poked it with something indicating they've never been touched.Regardless, assuming these three pads are used for something. Pin 4 is the Reed switch, so nothing would need to be done there since it's either open or closed and someone can do this with the 'pencil'. Pin 6 is the temp knob (0-5V) so this can be changed via the temp knob (more on this below), and pin 7 is just the 0-5V (?) from the OP-amp that's fed from the thermocouple (I imagine someone could just connect a virtual thermocouple to the front connector much like the half fast one I made).In any case, per my previous email, thinking more about this, I'd say any additional stuff for the PIC to initiate it would be done at power on using the magnetic pencil thus utilizing the Reed switch. Using the magnetic pencil while the station is powered will only lock the current temperature ruling out any tweaking of the PIC with power on.Per the other suggestion from Ian.M, maybe an additional step is taken after the PIC is programmed prior to it being soldered - which is a good possibility.What has had me baffled for months is the 'factory reset'. I had thought about this long ago wondering why it may at some point need to be reset to factory settings (and what is a factory setting). I thought maybe they inject some offset based off of the soldering iron temp variation due to variations between irons, but this didn't make sense to me.I don't believe the manual states that swapping irons will result in needing to send the unit for calibration, so why have an offset temperature?. The other possibility is someone locked the temperature and you can unlock it by doing a factory reset, however, if you're knowledgeable enough (and have the 'pencil') to do a factory reset, you should be able to unlock the locked temp setting.Now what may make sense is regarding pin 6. Maybe due to variations in resistor and poteniometer tolerances is reason to do a "calibration". i.e. some sort of offset voltage to compensate for tolerances. At production, the knob is turned to a specific temperature (let's just say 300 degrees F). At this point, pin 6 should have (let's assume for purposes of discussion) 3V DC (although again, I didn't see any pits on the pad to indicate someone pushed on it with a probe). The technician (without touching the knob) therefore turns off power, applies the pencil, turns on power, and the PIC knows that the knob is set to 300 degrees F per code programmed into it, but the voltage on pin 6 needs to have an offset voltage applied to represent 3V DC. Now the PIC knows the dial is set to 300 degrees F, but the voltage has to be X voltage, so it records this voltage, and does a linear calculation to heat the iron to match the front panel temp setting.So the only two three things I can think of is: agreeing with Ian.M that an additional step is implemented after programming the PIC, the PIC needs to know if it's working with 50Hz or 60Hz, or as I mentioned above, it needs to program an offset voltage to represent a specific temperature and use that to do a linear calculation.Edit: Actually I looked at the manual again and there is a tip offset calibration setting, but don't know if this is what would be done at the factory to get the PIC initialized.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 23, 2022, 12:28:54 pm
content: Quote from: Ian.M on August 21, 2022, 11:53:17 pmThe setting of the temperature knob is important when you perform the factory reset. Note - we're talking about the "Factory Reset" as described in the manual - this is not a reset to virgin state!As the manual describes: You set the dial to 600, put the magic pencil in place and swtich-on. If the PIC reads the dial as being within 75 degrees of 600, it will save the difference as an offset to the dial reading - i.e. it calibrates the dial. Also, the "tip offset temperature" will be set to zero.What the manual does not deescribe is what happens if the dial is not within 75 degrees of 600 - specifically, what happens if the dial is at minimum or maximum:Set the dial to less than 400, put the magic pencil in place and switch-on. A non-volatile flag is cleared -allowingdisable blinking of the LED during normal operation.Set the dial to more than 800, put the magic pencil in place and swithc-on. A non-volatile flag is set -disablingenable the blinking of the LED.There are only 5 bytes of information stored in non-volatile memory. The factory reset only affects the dial-calibration and the tip offset temperature. Or, as described above, a non-volatile flag allowing LED blinking is set/cleared. The other bytes, which concern the "locked" temperature" are not changed.Edit: Corrected LED enable/disable status.

author: bostonman
author_rank: Super Contributor
timestamp: August 23, 2022, 12:40:54 pm
content: I don't have access to the manual at the moment, but it seems a few "knob tricks" are being used.Factory resetTip cal offsetSet the blinking LEDDisable the blinking LEDI could be wrong, but believe I attempted everything but tip cal offset with the old "bad" PIC. Tonight I will try decreasing the knob to <400 and holding a magnet next to the Reed switch at power on.If this enables the blinking LED, I'll be happy.Andy, you don't believe anything is in the code to set the PIC for 50 or 60Hz?

author: Ian.M
author_rank: Super Contributor
timestamp: August 23, 2022, 12:47:09 pm
content: https://www.scu.edu/media/school-of-engineering/pdfs/maker-lab-resources/Manual_WellerSolderStation.pdfI'd go with:Factory resetEnable blinkingin that order, then if you don't have a tip temperature thermometer, check the melting point of a known eutectic solder alloy, with a blob of it pre-loaded on a freshly clean tip, stirring it with a fluxed wooden cocktail stick, and if you do, check at a suitable working temperature for your normal usage, and finally recalibrate tip temperature offset if required.

author: bostonman
author_rank: Super Contributor
timestamp: August 23, 2022, 12:50:52 pm
content: Thanks.I have the manual, but not home to access it is what I meant, but good to be able to reference it at the present time.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 23, 2022, 01:07:52 pm
content: This :Quote from: bostonman on August 22, 2022, 03:54:29 amMr Weller will want to assemble these things as quickly as possible - he will not want to spend time tweaking and configuring each unit. I.e. all the infomation for making a fully functional soldering stations is baked-in to the PIC code. I would guess that the PICs are programmed and soldered into the PCBs. The first time they are power-up with appropriate stimulus on pin 5, they will detect that they are "virgins" and write/format their non-volatile memory with the approriate parameters. Then when the units have been assmebled into their cases, Mr Weller does the factory reset procedure and checks that the units function.QuoteThe frequency detection is performed each time the unit it powered-up. It has to be!

author: bostonman
author_rank: Super Contributor
timestamp: August 23, 2022, 01:16:36 pm
content: QuoteI plan to buy something to measure/calibrate the tip. I'm uncertain how far off the tip can be, but for the few bucks, I'll look into either the K111 or something similar.QuoteI'll do my best to try tonight or hopefully find time some night soon. As I think we all are, I'm anxious to close the chapter on the PIC.

author: bostonman
author_rank: Super Contributor
timestamp: August 24, 2022, 01:48:00 am
content: I have good news.Tonight I set the knob to 600, applied a magnet, and turned on power. The LED didn't do anything to acknowledge it has been reset; I don't remember if it blinked on the "bad" PIC, but I'll assume it fully reset. After I decreased the knob to minimum (<400), applied a magnet, turned on power, waited, and the LED remained green after waiting a minute or so for the iron to heat (it melted solder, but the dial was set to <400 and the LED didn't blink).I repeated these steps about six times including manually shorting the Reed switch with clip leads to be sure I was closing the switch. Each time the same results indicating the issue wasn't resolved.Out of curiosity to see what would happen, I tried the same reset process, but afterwards tried turning the knob above 800 (probably fully CW), applying a magnet, turned on power, and bang, the LED started blinking.I decreased the temp, the LED turned off until the soldering iron cooled to the new temp, and then the LED began blinking. I increased the temp, the LED remained solid green, and began blinking.Looks like maybe Andy Watson accidentally reversed the interpretation of the flag settings since it seems to work when the dial is >800.Although the LED began blinking, I can't confirm the following at the present time:* The station fully reset (because I didn't see any acknowledgement from the LED when I applied the magnet at turn on) - I'll try testing this later by maybe locking the temperature and seeing if I can reset it at power on* The iron is reaching the correct temp (more on this below)* Locking the temperature (i.e. the LED turning red and the iron remaining constant regardless of knob setting) - I'll test this later* Ability to calibrate the iron - not certain I want to mess with this unless I can reverse it by simply doing a factory reset - or worst case I just program a new PICAs for determining whether the iron is at the correct temperature (or reasonably close), I've ordered a K111 test thing (the item referenced in the manual) from eBay for $12 plus S&H, so I'll hopefully be able to get a more accurate idea of what the iron temperature is.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 24, 2022, 07:09:26 am
content: Quote from: bostonman on August 24, 2022, 01:48:00 amCould well be!At least it's a happy ending

author: bostonman
author_rank: Super Contributor
timestamp: August 24, 2022, 12:34:38 pm
content: QuoteYou and Ian.M have been a huge help and this thing would have been in the garbage if not for the assistance provided. If after all this the only PIC code error I have to deal with is a misinterpretation of the flag setting, I'll take it. I'm just glad I thought to try the upper limit and wonder if maybe I should have tried this on the other PIC that has the "bad" code.Between buying a new iron to replace my old, and the $50 eBay purchase for a working station (which also seems to have a flaky iron) so I could extract "good" PIC code, I could have just bought a brand new replacement, however, I think having the code for anyone who needs it, and knowing I didn't allow Weller to force this into a landfill, is more rewarding. Within reason, I'd almost rather spend more money repairing something than buying new as I have in the past.My plan is to keep this new (used) solder station as is rather than replacing any caps; at least for now. I'll reassemble it, perform some tests per the bullet items I listed in my previous post, and hopefully have a good backup station. After I'll fix the many hacks I made on my old station, replace the PIC with the most recent HEX code, and hopefully have my original back up and running. I'd also like to test the auto turn off, but at 99min, it's quite a bit to keep the iron powered - I think Weller should have made this much less for safety.During troubleshooting, I removed the surface mount diode on the gate of the TRIAC (and also believe a leg broke on the TRIAC). I may just buy a new diode and replacement TRIAC (quick research shows the TRIAC is no longer made).Any suggestions on a reobust diode and/or TRIAC?Also, just to confirm something on the 'factory' reset. Once I perform a factory reset, that will erase any tip offset. So if I accidentally do something crazy like set the offset temp by 50 degrees, and realize I've messed up things, I can just turn the dial to 600, turn off power, hold the magnet, turn on power, and I'm back in business?

author: austfox
author_rank: Regular Contributor
timestamp: August 24, 2022, 12:57:51 pm
content: My WES50 must have similar code. I turned my dial to more than 800 (I'm working with celsius, so greater than about 425) and with the pen in place and I turned on, I managed to get it flash. The LED stays red whilst heating, switches to green once heated, and flashes between red and green as the temperature hovers around the set temp.I tried to read the code from the PIC in my WES50, but my Microchip PICStart programmer needs an update to it's firmware to read PIC12CE673 chips. The irony is that I need to use the same programmer to program the PIC17 chip inside! I'll add a spare PIC17 to my next Mouser order.Thanks Andy for that nice bit of info on changing LED modes on these Weller irons.

author: bostonman
author_rank: Super Contributor
timestamp: August 24, 2022, 01:07:17 pm
content: Nice to see we are all benefiting.

author: bostonman
author_rank: Super Contributor
timestamp: August 28, 2022, 01:52:00 pm
content: Austfox, I'm curious, have you tried a factory reset on your model?I powered mine (the second one I bought to extract the PIC code from - still have to piece my original back together) after reassembling it, it heated, blinked, etc...After I turned off power, set the dial to 600, applied a magnet, turned on power, removed the magnet, and it acted just as it would if I recycled power without the magnet. Due to the iron still being hot, the LED began blinking soon (I would think a factory reset would have reset the flag forcing me to set it again).Also, I don't exactly remember, but believe I locked the temp (LED turned red), did a factory reset, and it remained locked.I received the tip measuring device, so I should be able to get a more accurate tip measurement and check whether the offset does get reset, but the 'factory reset' doesn't seem to much of anything.

author: austfox
author_rank: Regular Contributor
timestamp: August 31, 2022, 02:49:05 am
content: I've done the reset at 600 (315 celsius) and it does not alter how the unit controls the LED. I'm guessing it just resets to the factory calibrated offset for the dial-tip temperature.

author: bostonman
author_rank: Super Contributor
timestamp: August 31, 2022, 02:56:30 am
content: QuoteI got the K111 calibrator or whatever it's called, however, I've had a soldering project and don't want to mess with the offset. Most likely by this weekend I'll be able to tinker with the calibration. My plan is to dial in some larger offset that's quite obvious, do a power restart, check to see if it still has an offset, do a factory reset, and check the offset again.Amazing a 'factory reset' doesn't change the LED status or the temp lock.On a side note, I went to do some soldering and began dreading the long wait for the iron to heat, the horrible tip, and realized, I'm not using my junk backup soldering iron anymore. Using the Weller was such a sigh of relief and the PIC help in this thread was the game changer.

author: bostonman
author_rank: Super Contributor
timestamp: September 02, 2022, 03:33:17 am
content: Earlier I was using the new (used) solder station I bought off Ebay and has the replaced PIC (i.e. the one I stole the PIC from in order to get working code) along with the brand new iron I bought months ago.I touched up a solder joint, gently placed the iron in the holder, and the LED turned off. Thinking it accidentally went over the set temp, I waited, waited, and the LED never turned on again. Turned the dial to maximum and the LED came on. Turned it off a few minutes, back on, still no LED unless I crank the dial.Needless to say, the stupid thing is now broken.Now I have my original with missing components that need to be resoldered in hopes that gets back to a working condition. This back up is now broken, and I'm heartbroken.

author: austfox
author_rank: Regular Contributor
timestamp: September 02, 2022, 04:58:00 am
content: Has the pico fuse opened, and what is the ohm reading of the heater in the iron? I think it should be around 2.5 ohm.

author: bostonman
author_rank: Super Contributor
timestamp: September 02, 2022, 01:26:39 pm
content: I'll look into it this weekend. The minor solder job I was using this for is on a board to repair a car.Thankfully the solder station died just after completing the job. It's almost as if it knew to die the second I finished the job, so I can't complain.Only when the dial on the station is turned up to maximum does the LED turn on, and it seems that's the only time the iron heats (again though, I didn't put much effort into analyzing the issue due to trying to get my car up and running again).I'm guessing the thermocouple in the iron opened - but this is a new iron I bought months ago and probably only used a total of 20min off and on.

author: floobydust
author_rank: Super Contributor
timestamp: September 02, 2022, 07:23:35 pm
content: I wonder if its EEPROM cal got corrupted? Not reading the entire thread, it seems to be a one point cal that is done at 600F.I would check the 5V reg input cap, it's known to fail low value which would make 5V power noisy. 33uF is way too small in the first place.

author: bostonman
author_rank: Super Contributor
timestamp: September 03, 2022, 02:12:04 pm
content: QuoteThanks for the feedback. The entire thread, or at least what I remember it to have started as, focuses on the PIC and extracting the code.I will look into this issue within the next few days, but, again, if you read through the thread, we now have the PIC code extracted making repairing these models much easier.

author: Andy Watson
author_rank: Super Contributor
timestamp: September 03, 2022, 02:45:56 pm
content: If the code has become corrupted again, something must be causing it.Quote from: bostonman on September 03, 2022, 02:12:04 pmWay back in this thread you posted some pictures of the waveforms at various points (I can't find the pictures now! - Probably my kack-handedness). Superimposed on all the waveforms were smaller spikes - were those spikes genuinely there or was it some artefact of the measurement method? If they were there, where are they coming from? As Flobbydust suggests, it might be worth scoping the power-supply.

author: bostonman
author_rank: Super Contributor
timestamp: September 04, 2022, 05:49:16 pm
content: I think the brand new iron died. I stuck a thermocouple in the base socket, the LED turned on, and I got 115mV drop across the heater pins.Measured the pins on the iron plug (all in ohms):Heater 11Thermo 2.2Thermo side A to heater side A 13Thermo side A to heater side B 2.4Thermo side B to heater side A 12.2Thermo side B to heater side B 1.6Earth ground to heater side A 11.5Earth ground to heater side B 1Earth ground to thermo side A 2Earth ground to thermo side B 1

author: bostonman
author_rank: Super Contributor
timestamp: September 04, 2022, 07:39:32 pm
content: After sending that message, I tried using a heat gun on the thermocouple wire and the LED blinked shortly indicating it reached set point, turned off indicating it exceeded the set point, and then turned on indicating it needed to heat when I removed the heat.

author: austfox
author_rank: Regular Contributor
timestamp: September 05, 2022, 02:31:04 am
content: Quote from: bostonman on September 04, 2022, 05:49:16 pmI have 2 PES51 handpieces, and around 11 ohms across the heating element seems ok. However, there shouldn't be any continuity between the heater and earth, are you sure these readings are correct?

author: bostonman
author_rank: Super Contributor
timestamp: September 05, 2022, 02:51:33 pm
content: I'll remeasure, and this time I'll connect one lead directly to the iron rather than the pin.FYI, these measurements were taken without a tip in the iron and not plugged into the base.

author: bostonman
author_rank: Super Contributor
timestamp: September 05, 2022, 05:09:10 pm
content: Just checked again using the iron metal shaft and all the pins measure the same, with obviously Earth ground to the iron shaft being 0 ohms.

author: bostonman
author_rank: Super Contributor
timestamp: September 05, 2022, 11:27:30 pm
content: This has me a bit concerned for the quality of the irons.My original iron (which was used) has lasted years, maybe about a decade, with several hours of usage, and who knows how long prior. The new iron (a Weller PES51) broke in maybe about 20min of total use, however, it's about six-months old leaving me without the option of returning it.The used iron I bought to steal the PIC out of also has a bad iron.

author: floobydust
author_rank: Super Contributor
timestamp: September 05, 2022, 11:59:06 pm
content: To me that looks like a ground-fault occuring in the heaters. It could be a quality or counterfeit problem in the heater/thermocouple cement.Weller being bought out by Cooper Tool,Apex Tool Groupevil Danaher, now Bain Capital investment firm means the quality has been through the wringer. Mexico seemed to be doing OK but the quest for maximum profit may have taken the brand to a new low?

author: bostonman
author_rank: Super Contributor
timestamp: September 06, 2022, 12:48:38 am
content: I agree about the ground-fault issue.Since I don't have a working iron, I can only assume that the heater and thermocouple shouldn't have continuity between the two, correct?I assume the heater should be the typical 11 ohms, the thermocouple should be very low (I would have expected even lower than 2.2 ohms), but the two should be isolated from each other.All I can conclude: the thermocouple wire insulation has melted and one side is touching both the heater and metal shell of the iron. This would be why the heater has continuity to the metal shell. i.e. it's going through the thermocouple to the metal shell.I'm going to purchase two more irons. If these two die, then I'm probably done with Weller at this point. Maybe I'll send an email to them regarding this iron, but no way can I purchase anymore should two more die on me; especially after only 20min of use. It's one thing if they last years and many hours of use, but if I get stuck with two dead irons in a short time, then maybe it's off to Pace.I'm even very careful with the irons. If I don't plan to use them for a few minutes, I turn off the base rather than let the thing remain hot for no reason, when I set it down (or in the spring holder) I am gentle so I don't vibrate the heating element thus possibly cracking it, etc...Before I would set the temp to minimum before turning on the station to avoid a high inrush of current, however, now that I'm more familiar with the circuit, it seems it doesn't matter if the knob is set to 100 degrees F or 1000 degrees F because the TRIAC turns on just as hard.

author: bostonman
author_rank: Super Contributor
timestamp: September 09, 2022, 02:26:26 am
content: I don't know whether I have good news or bad news.The other day I sent an email to Apex telling them about the new soldering iron that worked for a total of twenty-minutes. Today they sent a reply stating they'll be sending a replacement, but they won't be available for several weeks (I think six).Later I received the two new ones I ordered from Amazon. Before doing anything, I took resistance measurements on the pins: heater was 10.5ohms, thermistor 2.4ohms, side A thermistor to iron shaft (Earth ground) 2.2 ohms, side B thermistor to iron shaft (Earth ground) 1.2ohms.From what I could tell, no resistance between heater and thermistor (as expected).I plugged the iron into the base and sure enough, the base worked as expected along with the iron heating. At this point, I began experimenting with verifying the PIC. First I placed the K111 calibration thing onto the iron and did a factory reset (although it was unnecessary), set the knob to 600 degrees F, iron settled around there. I tried the temp lock feature which also worked. Next was the tip calibration, so I got the iron to 600 and did a calibration offset of about 50 degrees F. Sure enough, the temperature was off by 50 degrees F. The factory reset worked, and the tip offset was back to normal.Next I wanted to check the tip temperature at various settings, from what I could tell, at 550 the tip was 560, 600 the tip was 600, 650 the tip was 645, 700 the tip............ died.Yup, sure enough, the station turned off and the iron began cooling. Removed the iron, measured the pins, and the heater was 11.1 ohms and 1.1 ohms (each side of the heater) to the thermocouple.I plugged the other new iron into the station, and the station worked fine.Clearly the iron didn't overheat because I was measuring the temperature (and I never raised it above 700 degrees F). Having become familiar with the base circuitry, I can't think of anything that would kill the iron. If the TRIAC was bad, it would just be dumping 28VAC into the heater which is what normally goes into it.The only thing I can think of is that the TRIAC isn't clocking correctly and the heater needs to have pulses in order to reduce inrush current.I find it hard to believe Weller is making irons so cheap now that they last 20min, but anything is possible.The conclusion is, with the exception of testing the 99min auto turn off (which I may try this weekend by plugging in a thermocouple into the base socket and tricking it into thinking it's heating an iron), it seems the PIC is solid. The factory reset works, it holds the iron at temperature well, the temp lock works, temp unlock works, and the LED blinks. Also, from what I witnessed, when the temp is locked, the red LED will stay solid until the temp is reached (regardless of what the knob is set to), and then blink; which matches the green LED state.Anyone who wants/needs the PIC code, the one I extracted in message #114 is good, but the OSCCAL fix in message #118 is the one that allows you to program to a blank PIC and is what I ran the above tests to.As for the iron breaking within 15 - 20min, even if the TRIAC was shorted (ignoring the fact the temperature wouldn't stabilize), the iron shouldn't break as a result. The only conclusion is the iron is junk which means I may have wasted all this time and money trying to keep Weller alive.Edit: although the iron died when it reached 700 degrees F, that wasn't the first time it went that high. So I don't believe 700 degrees F is what killed it (although it could have stressed it); but it should be able to handle more than 700.

author: Ian.M
author_rank: Super Contributor
timestamp: September 09, 2022, 03:34:59 am
content: A temperature controlled Weller iron should be capable of running at 700 deg F all day, every day, for several years, so I doubt its anything you did.Back in the day, Weller TCP series irons (with the Magnastat temperature control thermostat built into the iron itself, temperature set by the Curie point of a slug of alloy on the back of the bit), came with a PTAA7 bit as standard, which set the Magnastat to 700 deg F. They were popular with repair shops and on production lines, and it was typical to run them all day, day after day. There were also options for 800 and even 900 deg F bits, but they tended to become severely oxidized if you didn't turn them off after use. Later production replacement Magnastat thermoswitches had a poor reputation for reliability compared to the originals, and the bits seemed to have less durable plating.Therefore, as even 25 years ago, Weller had spare parts quality problems, it wouldn't surprise me at all that the situation has got worse!

author: bostonman
author_rank: Super Contributor
timestamp: September 09, 2022, 02:20:51 pm
content: Interesting piece of history. It always amazes me how people have such knowledge regarding the history of a product and how much knowledge is on here.I didn't think turning the temperature to 700 degrees F could damage it. In fact, usually I solder at 700 due to either myself or someone telling me to use that temp, and just continuing with it, however, I should maybe use a lower temperature like 650. When it comes to ground plans, I've had the iron up to 800 I believe.In any case, assuming the base station broke the iron (just thinking out loud), the only methods I can think of would be: the transformer is damaged dumping higher voltage into the TRIAC therefore stressing the heater element or the TRIAC isn't pulsing and pumping constant current into the heater element.If the transformer was damaged and dumping large voltage into the iron, I'd assume the temperature would have come up very quickly; not to mention probably blowing up the iron immediately. If the TRIAC wasn't pulsing, then the temperature wouldn't have settled.If the TRIAC isn't getting the correct pulses, say it was getting pulsed too fast, could constant current/voltage cause the heating element to get damaged or can it stand a straight DC voltage (although it's really getting AC no matter what since the TRIAC is being fed AC voltage).Most likely neither of the two above occurred leaving the only answer to be the irons are junk.Someone on eBay had a non-working Weller priced very cheap which I purchased last week. I hacked my original somewhat bad enough that I'd either spend a few bucks on replacement components, or just swap the whole board. This iron actually seemed to work (I connected a thermistor to the connector and it turned on), so for a few bucks, it was worth getting a non-hacked board (most of my hacking was due to using a junk iron along with wires breaking from moving the board around).What I'll probably do is use my old junk iron to swap boards (put this board into my original) and then use the second new iron I just bought on that station. If this new iron breaks, it will have happened on another station thus pointing fingers to the irons themselves.

author: bostonman
author_rank: Super Contributor
timestamp: September 11, 2022, 02:34:24 pm
content: As mentioned, instead of repairing all the hacks to the board in my original station (that I've owned for many years), I just swapped boards with the one I got cheap off eBay. Turns out the station from eBay wasn't broken and works just fine (the owner must have had a broken iron and thought the station was bad - or thought not having an LED without an iron plugged in meant it was bad), but it had worn numbers on the face which is why I swapped boards into my good unit.After using the K111 to measure the tip temperature, my opinion is to not bother with calibration offset unless it's for a specific temperature and accuracy is needed. I'm seeing offsets of 10 degrees F (although maybe I need to let things settle for much longer). Setting the dial to 600 degrees F seems to be the sweet spot where the iron temp is almost exact, then the temperature isn't as accurate the further away from 600.Currently I have two working base stations, my original one with the new (used) board which means it has the original PIC, and the second one I bought to steal the PIC from to upload it here. This second one is all original except it has a new programmed PIC from in message #118 because I had to cut the legs from the original (i.e. sacrifice it) to upload the code for everyone to have.Thanks to the OSCCAL file in message #118 and the station having just about all the components that can easily be replaced, I think it's safe to say anyone reading this thread can repair their station; and now know how to set the LED to blink or remain constant.The big issue is the cheap soldering irons. I've bought three (one several months ago but only used it a total of about 20min) and two out of three failed; and I'm holding my breath on this third one.The company is supposedly sending a replacement for the first one, and I plan to return the broken one I just bought to Amazon, but maybe the quality is so bad that the irons are just junk and dumping Weller is the best option. It won't make sense to continue buying irons in the future if they keep breaking after only 20min.Yesterday I used my original base station to power the new iron (which was 2of2 I just bought of Amazon) and it seemed to work just fine for about a full ten to fifteen minutes. Wondering if maybe the other base station can be damaging the irons, I tried that station again and the iron remained working.I previously asked and wondering, does a possibility exist that the station is damaging the iron? I can only think of two situations where the station could do this: the transformer would have be putting out greater than 28V AC (I doubt this could happen and the iron would be heating at a rapid pace), or the TRIAC is sending a constant current into the heater (again though, I don't see this as a possibility since I'm assuming the heating element can just take straight DC without getting damaged - assuming the temp is monitored and the voltage removed to avoid burning out the heating element).I plan to burn a few PICs to have as spares, but I need to buy more blank ones. Due to questioning the quality of the irons, I may hold off rather than wasting my money. If these irons continue breaking, then I don't see a reason to waste time with Weller stuff.

author: bostonman
author_rank: Super Contributor
timestamp: September 12, 2022, 02:19:14 am
content: Tonight I dismantled a broken old iron. On a new iron, I measured (all in ohms):Across the heater: 10.5Across the thermistor: 2.4Heater A and B side to thermistor: openHeater to Earth: openThermistor side A to Earth: 2Thermistor side B to Earth: 1On a bad iron, I measure (all in ohms), note that side A and B may have mistakenly been interchanged at some point:Across the heater: 10.5 (same as new iron)Across the thermistor: 2.4 (same as new iron)Heater side A to thermistor side A: 13 (different)Heater side B to thermistor side A: 2.4 (different)Heater side A to thermistor side B: 12.2 (different)Heater side B to thermistor side B: 1.6 (different)Heater side A to Earth: 11.5 (different)Heater side A to Earth: 1 (different)Thermistor side A to Earth: 2 (same as new iron)Thermistor side B to Earth: 1 (same as new iron)When I dismantled the broken unit tonight, starting with the easiest thing to explain, the inside tube which is metal had Earth ground (bare metal wire) going down the side of the inner part, what looked like epoxy, and the two thermistor leads down the center. This seems like the thermistor should be isolated from Earth ground, but isn't due to my measurements above; and I'm baffled by this.Now the more confusing part is the outer part of the tube has the heater wire wrapped around what seems like a section of non-conductive material sprayed onto the metal tube. Keeping in mind I had to apply some force to remove this and probably some things got jolted, I can't figure out a few things.The heater wire is bare (or maybe all burned off). If the wire wraps around the shaft on the non-conductive part, how is it not shorting on the windings and reducing the resistance? I tried winding the wire so the windings didn't short together and for the life of me couldn't use up all the wire without turns touching.Also, one manufacturing mistake and it seems like the wire can touch the metal shaft shorting the heater to Earth ground.I expected the heating element to be some sort of resistor and never expected it to be a straight piece of wire (unwound it measures 11ohms).In any case, from what I can tell, the insulation on the heating wire (i.e. element) is burning off and touching the metal Earth ground, but things are so tight in there that I can't figure out how the iron is made with enough room for error during manufacturing. The other possibility is that the inner tube is getting misaligned at some point and touching causing the heating wire to touch the case.

author: floobydust
author_rank: Super Contributor
timestamp: September 12, 2022, 03:22:16 am
content: If you consider the station's schematic, you can see 24VAC power has one common leg earth-grounded, and the triac and the thermocouple as well.If the thermocouple shorts to the heater, this would normally cause a meltdown due to the heater always being energized, so Weller has the PTC fuse on thermocouple (-) to prevent this from happening. But the TC amplifier would see wild AC voltage. This is my take on the connector:Pin 1 - N/CPin 2 - Heater red J1, 24VAC powerPin 3 - Thermocouple(+) orangePin 4 - Thermocouple(-) yellowPin 5 - Earth-ground, tipPin 6 - Heater red, triacWES51 manual:"1.1 Check heater resistance from pin 2 to pin 6 of the connector, should measure 9-11 ohms.""1.2 Check sensor resistance from pin 3 to pin 4 of the tool connector, should measure 1-2 ohms.""1.2.3 Check resistance from pin 3 to pins 2 and 6 of the tool connector, should measure 1 megohm minimum."{I think typo- should be to GND pin 5}

author: bostonman
author_rank: Super Contributor
timestamp: September 12, 2022, 03:38:03 am
content: Am I missing something? Earth ground is only on the primary side of the transformer which is what the soldering iron tip is connected to (once the iron is plugged into the station).If the iron isn't plugged in, then the tip shouldn't be connected to anything. Once plugged into the station, then one side of the heater should be common to ground through the resistance of the secondary of the transformer and one side of the thermistor should be common to ground.

author: floobydust
author_rank: Super Contributor
timestamp: September 12, 2022, 04:23:00 am
content: Sorry I must be wrong about the 24VAC secondary being earth-grounded, there's not a decent schematic for the station to be found.In this pic I see the line cord green connecting to the transformer core and to the wand connector, but there's another green wire going somewhere, it's not the PC board though. It might be a double-ground to the transformer core. So the secondary must be floating.https://www.eevblog.com/forum/reviews/is-the-weller-wes51-(120v-60hz-60w)-safe-to-use/msg2232633/#msg2232633

author: bostonman
author_rank: Super Contributor
timestamp: September 12, 2022, 12:19:21 pm
content: It's okay, you just had me second guessing myself.The green wire from the AC plug screws directly to one screw of the transformer (which is screwed into the plastic case). A short green wire is also on the same screw and the other end is screwed down on another corner of the transformer. The green wire from the iron socket has its own lug and screws onto either one of the transformer screws.I'm not a fan of how this is done because the wires become loose due to the plastic not being a solid screw mount. if things work out with these irons, I may solder the soldering iron Earth ground directly to the AC line green wire while keeping it all screwed on the transformer.This way the soldering iron can't have a loose Earth ground connection. I'm uncertain if screwing Earth ground to the transformer does anything such as removing any build up of voltage or if it's a place holder for the wires.In any case, the thermistors being connected to the soldering iron case (i.e. Earth ground) on a good iron even with the iron not plugged in is a bit baffling.

author: Ian.M
author_rank: Super Contributor
timestamp: September 12, 2022, 01:42:57 pm
content: Yes, that's sh!tty grounding, and Weller knew it as evidenced by the short green bodge-wire to the other transformer screw. The transformer core grounding slightly increases safety, as if the primary burns up, it may short to the core, and grounding the core improves the chances of tripping a breaker before total melt-down!I'd suggest adding a short two hole plate cut from brass strip, so you can through bolt the three separate ground wire ring terminals together securely, with a star washer and lock nuts or a nyloc nut.It may well be that the thermocouple is formed by spot-welding two thermocouple wires together to the back wall of the well in the end of the heater core that holds the bit. It would certainly be cheaper and more robust than fitting an insulated thermocouple in a well in the back wall. That's only viable if the whole thermocouple circuit is only grounded at that point.

author: bostonman
author_rank: Super Contributor
timestamp: September 12, 2022, 02:05:19 pm
content: QuoteI'm not exactly sure what you mean, however, I was stuck on the notion that the screws need to be tight in the plastic. I can technically cut off one standoff to gain room for a nut underneath and use a screw through the transformer to Earth ground it; and then solder the soldering iron Earth ground wire to the AC plug Earth ground.Apex is sending a replacement iron for the one I bought months ago and failed after a total of about twenty-minutes use. I just replied to their email informing them about the new iron that also broke within twenty-minutes (one of two I bought off Amazon) and that I'd be returning it to Amazon. Also, I offered to work with their engineering team on the measurements I took in hopes they want to improve their quality.I don't do daily soldering, so testing these irons for long periods will take place over time leaving me with the possibility the heater will once again short leaving me not only stranded, but them being out of warranty.On a side note, I had one blank PIC left that I programmed yesterday to have as a spare. I noticed that the box labeled 'buffer clear on data load with FF' was checked. Seeing it checked implies that's the state it was in during a previous program, and believe this should have been unchecked. Just to confirm, I unchecked it, closed the program, reloaded, and it was still unchecked; so the default doesn't seem to be having it checked.If I indeed accidentally left this checked during a previous program, would that do anything to the PIC? Since the PIC seems to work just fine, I'm sure it was either unchecked or doesn't matter, but thought to ask.

author: Ian.M
author_rank: Super Contributor
timestamp: September 12, 2022, 02:14:36 pm
content: My suggestion is to put one end of the new plate under the head of one of the transformer core mounting screws, leaving the hole in the other end sticking out to through bolt the grounds to. It avoids giving up one of the mounts to through-bolt through the core.

author: floobydust
author_rank: Super Contributor
timestamp: September 12, 2022, 08:25:53 pm
content: There's three elements to the wand - heater, thermocouple, shell. The thermocouple is isolated from the heater but we don't know if the thermocouple is spot welded to the shell, there's no mention in the Weller manual.That would mean the secondary-side ends up getting earth-grounded by the thermocouple, no biggie it doesn't really matter much.But the reason I'm mentioning it is connecting an oscilloscope or PIC programmer+PC when there is a short from heater-TC would cause a ground-fault through the scope's earth-ground if the (defective) wand was plugged in. It depends where the scope GND was connected. You might have gotten some oddball waveforms.Weller has always had trouble with their electrical safety - having a primary fuse they flip-flop around that, some stations have it some don't, and the double-ground on the power transformer core is another silly example of somebody wrongly interpreting a safety standard. I've seen it happen with amateur certification agencies, they'll insist on something stupid like that in order to meet a clause in a safety standard "double bonded", despite it actually being wrong. It's in a plastic case with no locknuts, and a melted transformer bobbin would short primary to secondary and here we have no coverage for that.

author: bostonman
author_rank: Super Contributor
timestamp: September 13, 2022, 02:58:40 am
content: Ironically, at some point today I thought to myself that maybe the thermocouple is welded to the shell. If this is the case, maybe it's done for better thermal transfer so the iron maintains temperature better.Either the manual or another write up (I found a write up on dismantling the iron, and believe another one on something else) mentioned something about removing Earth ground can affect temperature stability. So maybe a correlation exists between the two, but it's obvious the thermocouple is low resistance to Earth ground.As previously mentioned, first of all, the heater wire needs to be perfectly wound around the non-conductive section of the tube. If the windings touch each other, then resistance is lowered, and, If the windings touch metal, the heater shorts to Earth ground.I'm uncertain about grounding codes and what is right/wrong. Personally I wouldn't get involved with designing grounds for safety unless I knew what I was doing rather than risk injuring someone.From my limited experience, usually transformer plates are coated. Seeing Earth ground screwed into the transformer had me wondering if this actually does anything. Prior to reading the feedback in this thread on the setup, my guess would have been a transformer would short and blow the input fuse (or breaker for the outlet).At some point I should research grounding methods, practices, codes. A few years ago I designed a basic power supply and the transformer was encapsulated in plastic without an Earth ground terminal. Not sure why this would be safe should a short occur versus the one in the Weller (unless the open concept is considered more of a fire risk than one encapsulated in plastic).On a side note, my email to Apex was forwarded to a Product Support specialist. I'm sure they'll tell me these iron issues are not common and apologize.

author: bostonman
author_rank: Super Contributor
timestamp: September 18, 2022, 02:13:57 pm
content: I took a few minutes to piece together what I think are all the LED status indicators and settings for the WES51 station (see attached).Although some are in the manual, I figured having one complete document may benefit others; especially since things like setting the blinking LED isn't in the manual.Apex hasn't got back to me about the first bad iron (I even sent a follow up email), and I returned the other to Amazon requesting an exchange.Eventually I should have three good irons, but doubt I'll be using them for any extensive amount of time to test them fully. If they are pieces of junk and will also break in approximately 20min total use, then I sense I'll eventually have three broken irons all out of warranty.Can I test the new iron(s) by leaving it powered at 600-700 degrees F for 20-30min without damaging anything? I'll use a tip I don't really care about and apply some solder, but I don't know if it's practical to just leave in the holder without exercising it by soldering.

author: Ian.M
author_rank: Super Contributor
timestamp: September 18, 2022, 06:27:02 pm
content: Thoroughly tin the bit, let cool and wrap tightly in aluminum foil to exclude as much oxygen as possible, and I would expect you can run each iron for many hours as a soak test, without damage other than due to pre-existing defects. 24H, eight hours a day over three days wouldn't be unreasonable, checking, re-tinning and re-wrapping the bit each day, as that's fairly typical of commercial use in a busy workshop. If they can't stand up to that, best to find out now.