Monday, October 12, 2020

CNC3018 Woodpecker Grbl Firmware Notes


The Woodpecker boards shares the USB 5VDC line with the power input. I use a non-powered USB hub between my computer and the CNC machine. Honestly I'm not sure if it actually does anything to isolate or perhaps I'm just lucky. (probably the latter) TODO: find and buy a good isolated USB, such as the Adafruit USB Isolator - 100mA Isolated Low/Full Speed USB.

For reference, my current firmware version is Grbl 1.1f, or more specifically $I result:

[VER:1.1f.20170801:]
[OPT:V,15,128]

The Woodpecker board has a CH340 serial chip and is accessible via the usual putty 8N1/115200:

"Help" $$ is simply this one line:

[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x]

That's not very helpful, but according to the documentation, newer versions will apparently provide more details:

$$ (view Grbl settings)
$# (view # parameters)
$G (view parser state)
$I (view build info)
$N (view startup blocks)
$x=value (save Grbl setting)
$Nx=line (save startup block)
$C (check gcode mode)
$X (kill alarm lock)
$H (run homing cycle)
~ (cycle start)
! (feed hold)
? (current status)
ctrl-x (reset Grbl)

My settings via $$ (always a good idea to save these BEFORE upgrading firmware):

$0=10                                                           
$1=25
$2=0
$3=5
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=0
$22=0
$23=0
$24=25.000
$25=500.000
$26=250
$27=1.000
$30=1000
$31=0
$32=0
$100=800.000
$101=800.000
$102=800.000
$110=800.000
$111=800.000
$112=600.000
$120=10.000
$121=10.000
$122=10.000
$130=200.000
$131=200.000
$132=200.000
The Grbl Default Settings:
$0=10 (step pulse, usec)                                          
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=6 (dir port invert mask:00000110)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=0 (homing cycle, bool)
$23=1 (homing dir invert mask:00000001)
$24=50.000 (homing feed, mm/min)
$25=635.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=314.961 (x, step/mm)
$101=314.961 (y, step/mm)
$102=314.961 (z, step/mm)
$110=635.000 (x max rate, mm/min)
$111=635.000 (y max rate, mm/min)
$112=635.000 (z max rate, mm/min)
$120=50.000 (x accel, mm/sec^2)
$121=50.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=225.000 (x max travel, mm)
$131=125.000 (y max travel, mm)
$132=170.000 (z max travel, mm)


My $# result:
[G54:0.000,0.000,0.000]                                          
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]


Whistling sound? Thanks chamnit:

The PWM frequency changed from 7.8 kHz to 1kHz in Grbl v1.1. To change back, edit the cpu_map.h file and look for the SPINDLE_TCCRB_INIT_MASK macros. There are several commented, including the one for 1kHz. Just swap them and recompile


If for some reason I ever need to replace the controller board, I'll probably try the SAINSMART Controller Board for Genmtisu CNC Router 3018, 3018-PRO, 1810-RP and the Offline Controller Module (although need to determine if there's anything hardware specific to their Genmtisu)


Resources, Inspiration, Credits, and Other Links:




CNC 3018 Limit Switch End Stop Mounts (3DPrinted)

This is a continuation of my prior blog: The road to CNC3018 Limit Switches. 

Update: I've migrated my blog to GitHub pages, here and posted the STL files here.

These parts that I custom designed are for the CNC3018 (specifically the CNC3-3018Pro) Desktop CNC Engraving Router such as the one I purchased from Twowin Tools on AliExpress. Some of these mounts may be applicable to other CNC Routers as well. ymmv.


All of the designs here are for the relatively common Makerbot limit switch available on Amazon, eBay, AliExpress, etc...

There are certainly less complex implementations of limit switches.

WARNING: CNC Machining, even on a small desktop unit is inherently DANGEROUS.

I'm a software engineer at the Day Job, with relatively minimal mechanical engineering experience. This project is also my first experience with Fusion360. Although I've gone through (an embarrassingly large number of) iterations trying to take into account a surprising number of factors - there are probably still problems. DO NOT RELY ON THESE MOUNTS FOR PERSONAL SAFETY. There is no guarantee of proper operation or reliability. 

WEAR EYE PROTECTION AT ALL TIMES.

For installation, I wanted to minimize any additional machine tooling: no drilling, cutting, or other modifications are needed to mount these switches.

Parts Needed:

  • 6x Switches: a pair for each axis end limit: X, Y, Z.
  • M3 x 8mm screws.

Optional:
  • Assembly tools such as a quite handy 2.5 MM Ball-Hex (allen) driver. The ball-end is just too cool for screwing in M3 nuts from an angle.

  • Opto-isolator, such as the CNC Optical Limit Switch Isolator - GRBL on Tindie. Note that TWO of these boards may be needed to cover both end limits for some machines. This is clearly illustrated in the schematic that I should have studied more closely (but who would want a limit in only one direction?). As it turns out, I was "lucky" in that both ends of each axis are tied together on the PCB anyhow. So one board should work just fine for my desktop CNC:

 

Axis Designation

The notation in Fusion360 XYZ, Red Green Blue is followed:




These parts are all printed with Prusament PLA (silver) on a Prusa I3 MK3S kit with the Double-sided Textured PEI Powder-coated Spring Steel Sheet using mostly default settings for 0.15mm Quality, 15% infill and the "brim" checkbox in the PrusaSlicer with the exception that I increase the bed temperature to 65C for the first layer: 

X-Axis (red)

The X-Axis on the CNC3018 is the left-right worm gear holding the engraver motor. Thus the motor moves in the X and Z directions.

My final design for the X-Axis end-stops uses the black Bakelite sides as the stop for the actuator.

The switches are mounted on a pair of symmetric clip-on brackets. One is as shown: 

X-Axis Switch Mount

  1. The wrap-around clip that holds the bracket in place.

  2. Holes for 5.5mm nuts. The fit is a bit tight to make assembly easier. It may be useful to first thread a screw to pull the nut into the hole.

  3. Wire routing channel.

  4. Alignment holes for the "chimney" portion of the wire routing channel extension.



  5. Continued wire routing channel.

  6. Cutout for wire exit.

  7. Nubs to snap into pre-existing hold in the side of the motor mount.


Here's the as-seen, design view of one of the mounting clips with the chimney:

With an additional X-Axis Clip-on Bracket, the actual assembly looks like this:


Y-Axis (green)

The Y-Axis end-stops are located underneath the plan of the the moving table. Two assemblies are used: one on each side of the router table. The design is such that the switch is positioned underneath the table to minimize debris dropping into what could have otherwise been considered a bucket in earlier designs. This was one of the many things not considered during design, but abundantly obvious once viewed in place.

There are a total 7 parts for each of the Y-Axis mounts. Although one could certainly buy mounting hardware, 4 of the printed parts are the pair of nuts and bolts:


Printing nuts and bolts is a learning opportunity (including paying attention to left or right-hand threading). The fit is not super great as-printed. I used this as an excuse to buy a metric tap and die set. These specific ones are designed as M8X1.25

Other than the 4 parts for nuts and bolts, the remaining 3 parts for the Y-Axis are the actual switch mount, lid and limit stop. The stop is a vertical thin tab designed to be break-away in case of mishap, instead of destroying the bracket housing the Y-Axis electronics:

The vertical tab stop is not only thin, but it is also printed parallel to the print bed, making it even more weak. It should only be strong enough to trigger the switch.

The body of the Y-Axis switch mount Body is considerably more complex:


  1. Through-holes for mounting the PCB for the switch.
    (2x) 10mm M3 screw and (2x) 5.5mm nuts.

  2. Posts with a snap-in nub for the other 2 holes in the switch PCB.

  3. Bumps to help catch and hold the lid from the sides.

  4. Another bump to hold the lid in place.

  5. Opening for wire exit.

  6. Narrow channel for wire routing.

  7. Mounting holes to mount to side rail. 
    (2x) 8mm M3 screw and (2x) T-Slot nuts.


    The final part of the Y-Axis end-stop is the Lid:


  8. Catch for the bumps on the base, (#3) above.
    s
  9. Rear catch for #4 bump from above.

  10. Wire hold-downs.

  11. Window for switch trigger arm.
The complete, rendered Y-Axis mount Body and Lid:


A complete set of the above Y-Axis parts is used both on the left and right sides for min / max limits.

(TODO: which is which?)

It's probably best to mount the PCB inside the switch housing and install the lid before mounting to the side rail with (2x) 8mm M3 screw and (2x) 5.5mm nuts.





Z-Axis (blue)

There are 4 main components for the Z-Axis: an upper and lower end limit clip, and a 2-part switch mount. All attach to the motor mount with snap-on, press-fit.

The first part is this lower limit clip:



  1. The sides extend back fairly far. They are thin here to minimize any wasted travel distance range in the X direction (the motor mount otherwise travels right up flush with the Bakelite sides.

  2. Little round nubs catch in pre-existing holes on the motor mount.

  3. An extension is providing to distance the clip from the actual switch lever.

    The next part is the upper clip used for the vertical limit:


  4. Mounting brackets to snap onto the vertical Z-Axis motor spacers.

  5. Spare cutting bit holder. (beware the bits are extremely sharp: the protective cover for them typically protects the bit, not your fingers. Yes, I learned this the hard way. Twice. The first time, I didn't even know how I cut my finger!)  TODO: design a cover.

  6. Not visible in this photo is a little bump that hits the upper Z-Axis switch.

    Switches are mounted with this two part assembly. The first part snaps onto the motor mount:



  7. Mounting Holes to attach the second part that has switches mounted. (see below)

  8. Clearance for the upper clip.

  9. Clearance for the lower clip.

  10. Upper nub to latch housing onto motor mount.

  11. Part of housing "wraps around" front of motor mount here.

  12. Unnecessary material removed.





  13. Posts with a snap-in nub for the other 2 holes in the switch PCB. (upper limit)

  14. Posts with a snap-in nub for the other 2 holes in the switch PCB.(lower limit)

  15. Through-holes for mounting the PCB for the switch. Aligns with holes in first part, the inner housing described above. This is for the lower limit switch.
    (2x) 10mm M3 screw and (2x) 5.5mm nuts.

  16. Through-holes for mounting the PCB for the switch. Aligns with holes in first part, the inner housing described above. This is for the upper limit switch.
    (2x) 10mm M3 screw and (2x) 5.5mm nuts.

  17. Unnecessary material removed.

  18. Ridge to hold snap-on cover (TODO: design Z-Axis switch cover)

Both Z-Housing Mounts, rendered together as a single assembly:



And so I guess in the end, yes: this is a rather overly complex design for something as (seemingly) simple as CNC limit switches. Alas this is 2020 and I have plenty of time at home to learn all these things that I've wanted for so long. For a software guy like me - it is really quite amazing to draw something and have it actually end up as a physical thing, all from the comfort of my home.



If you've read along this far (hey! thank you, I'm glad someone is interested) ... and if you have a CNC machine like the one described above but do not have a 3D printer, I have a bunch of initial prototype parts that with a bit of TLC (read: they don't fully work; time needed to sand, cut, or otherwise modify and adjust) ... that could probably be adapted to function. I'm willing to ship them anywhere in the USA for free, and perhaps anywhere in the world, depending on actual destination and cost. It's a shame to throw them away and I don't know what I would do with them otherwise. So if the prototypes can go to a good home, let me know. My blog name at gmail works.

See my next blog post on CNC 3018 Makerbot Limit Switch Wiring.

As always: I am not specifically recommending or endorsing any of the product links in this blog. None are ads, or "affiliate" links. These links are included from my personal experience, "notes to self" and for reader convenience only. If you, too, are ridiculously tired of excessive ads, check out The pi-hole.



CNC 3018 Makerbot Limit Switch Wiring

This is a continuation of my prior blog on limit switch mounting hardware design for the CNC3018.

There are plenty of resources on various limit switch wiring. As with most information on the internet: some is good, some not so good. One place to start for the desktop CNC is the gnea/grbl wiki: Wiring Limit Switches.

One of the first things to note is the Woodpecker board is designed such the the default switches are expected to be NO (Normally Open, High); The limit is triggered by pulling the signal low (short to ground).  This is unfortunate, as switches will typically fail in the open position. Worse: Perhaps they even become disconnected and stay apparently open during a limit-exceeded condition.

I ordered these switches from ebay. There are similar ones on Amazon. Here's a switch installed in the Y-Axis mount that I designed in Fusion360:


Although there's a wiki link on the board schematic, it has long since disappeared from the internet. Fortunately I was able to recover some key files from the wayback machine, and copied them here for reference (next 5 images credit: Makerbot):


Interface description:



The PCB layout:


Bill of materials:

PCB Render; "The Mechanical Endstop v1.2 is Open Source Hardware and is licensed under the GNU GPLv3":


I needed to measure and create my own mechanical drawing with dimensions:
The PCB supports are 5mm in diameter extrusions, 2.1mm high; The 2 holes are 3.1mm diameter (snug fit). The little nubs on the posts at the end near the connector are an addition 1mm high, 2.9mm diameter. 

I also ordered this Eccentric Work shop CNC optical limit switch isolator. Keep in mind that optical isolation does only that: isolate. This is not a switch debouncer. But then, we'll never need to debounce: the first limit trigger will freeze the controller board. All future signals, limit, G-Code, serial or otherwise will be ignored until the board is reset. 

See the EccentricWorkShop schematic:

At one point, I thought I might need two of these isolator boards, as there is a connection for only 1 wire for each axis. However when looking at the schematic, it appears the limit switch detection is also tied together on the PCB:

And sure enough:




So it appears that when limits are detected, there's no way for the software to determine which limit switch was triggered for a given axis. Although the software would of course know which direction it last send a g-code, so perhaps it could be inferred. Still, if there was a malfunction, it might be nice to know which switch actually triggered.


2* Limit-X-Axis
2* Limit-Y-Axis
2* Limit-Z-Axis
A5 = Probe
A4 =
A3 = Coolant Enable
A2 = Cycle Start/Resume
A1 = Feed Hold
A0 = Reset/About
A7 =
A6 =
D13 = Spindle Direction
RST
5V

And from electrokean:

X = D9 = PB1 = pin 13 via R20
Y = D10 = PB2 = pin 14 via R21
Z = D12 = PB4 = pin 16 via R22

My first test drive was rather disappointing. After all that design work for the limit switch mounts, when using the stand-alone controller, nothing happened when running the sample G-Code and the limit switches were manually pressed. I would have hoped the woodpecker board would be interrupt-driven to detect the switch closures regardless of how the g-code arrived. There's a GitHub discussion where rseijo claimed "Zen, Yen & Xen had no connection points to the Atmega328" (confirmed to not be the case for me) and posted this useful header diagram:



As it turns out, the switches are not enabled by default! Thanks Anyzy for this useful tidbit:


Reading the fine print in the text block, we see that hard limits are enabled with $21=1 (of course they are). My $21 was found to be set to zero. Manually setting this to a value of 1 and tada! Upon pressing the limit switch while even manually moving the axis with the external controller, and the motion immediately stopped! See also the grbl documentation wiki.

Of course, there's probably a reason for having the feature disabled by default. Once triggered, all bets are off and the machine can only continue by pressing reset. Any work in progress is lost. Thus if any sort of stray noise or interference triggers the signal, well - that would certainly fall into the "undesired features" category; for example:
The machine stop working randomly with the spindle still running
And sure enough, if you see the settings posted, the $21 is already set on! So stray noise triggering these limit switches is definitely undesired.

I sure wish I had first found the Hackaday article that referred to an informative blog by Shahada Abubakar. One of the things I learned there: the reset switch is only one option to restart after a limit switch has been triggered. The other option:
 "This can be done by sending Control-X followed by $X"
There are additional tips on GRBL setting there, too.


Resources, Inspiration, Credits, and Other Links:

 


















The road to CNC3018 Limit Switches

Almost two years to the day! It was way back in 2018 that I bought my first (and still only) CNC machine to learn more about G-Code and CNC in general. I bought one of the Twowin Tool CNC 3018 Pro machines from on AliExpress. The kit arrived in good shape, having been well packed. Assembly was quite fun and fairly straightforward. In the end I was frustrated that there was no good mounting solution for the limit switches. 



The folks over at LinkSprite have a pretty informative Wiki for desktop CNC.

One of my first CNC projects was this op-amp circuit etched into a bar of soap. (turns out soap is pretty forgiving, and a great way to learn to use a CNC machine). After a couple of sample runs, and my limited free time, it ended up mostly sitting idle in a box. So many cool projects, so little time.


It was about a year later during the summer of 2019 that I ordered the original Prusa i3 mk3s kit. This, too was quite a fun assembly project - although considerably more challenging than the CNC machine. I spent pretty much an entire weekend putting this together. It was really quite rewarding. The assembly instructions are very clear. The process is however quite time consuming. Plus, now I have a new appreciation for gummy bears. 

After assembly and a download or two from ThingVerse, my interest (and free time) waned somewhat. I had poked around a bit with various CAD programs, but nothing really sparked my interest. in printing designs from someone else. The printer then sat idle, too.

So here we are in 2020. I have SO MUCH more free time. Although I put in more hours for the Day Job from home, we don't travel or do much else these days. This leaves plenty of time to explore all these things I've wanted to learn!

It was a couple of months ago that I bought my next item on my list of "always wanted to have, but not sure what I will actually do with it": A reflow oven! I had a lot of fun retrofitting this as described in my prior blog. (it's no fun just to buy something, right?) 


Oddly, this was also the project to bring everything together. I thought it would be cool to etch my own Mylar solder stencil to try out my first SMD PCB: a reason to use the CNC machine! Oh, but the CNC machine needs those limit switches. I can print my own limit switch hardware! Oh, but I had pretty limited experience with mechanical CAD design. I need to learn Fusion360. Good thing that I have plenty of free time at home; chasing another bunny...

Printed books are great for reference, but not the best way to learn something hands-on like CAD software. Yes, there are a lot of YouTube videos, but most seem to be people showing off what can be done, instead of actually teaching the complete newbie, like me. Solution? This Designing for 3D Printing with Fusion 360 on Udemy This is absolutely an awesome class that got me kickstarted in Fusion 360. If you have little or no skills with Fusion 360, I highly recommend this class. Vladimir Mariano is clear, concise, articulate, and a real joy to learn from in this class.

Being able to design parts and print them at home turns out to be quite addicting, particularly if you happen to be a borderline perfectionist. There's somewhat of a chronology in my learning and skills here:


There's apparently a Grbl plug-in for OctoPrint; I'll need to take that for a test drive.

Enough of the background... on to the mounting hardware design...


Resources, Inspiration, Credits, and Other Links:

Sunday, September 27, 2020

Notes on CNC for PCB Milling and SMD Solder Masks

Some time ago I bought a personal CNC machine, as I had always wanted to learn more about gcode and in general what could be done with a home CNC machine. I also used the excuse that I would be able to make prototype PCB quickly. Nearly 2 years later, I have not yet etched a single PCB with it. So many fun projects, so little time! 

The CNC arrived in kit form and required (relatively straightforward) assembly, which was really enjoyable. I ordered this TwoWin Pro 3018 from Aliexpress. It's definitely a low-end CNC machine, but for the price I am quite happy with it. While it is certainly not going to be machining a new engine block - it is completely capable of light-duty PCB etching and similar work.

As noted in my prior blog, I purchased (and "upgraded") a T962A Reflow Oven. There too - the upgrade rework was a lot of fun! In looking at practice SMD boards - I realized that none of them had any sort of stencil. How to make one? Well, I'm thinking of something in Adobe Illustrator that will output a DXF file and convert that to g-code, perhaps with dxf2gcode. (it is a shame the sourceforge site continues to be so riddled with ad-spam but pi-hole really helps block much of the crap), See also grauonline blog: "CNC Milling: From DXF Files to g-code using free software. Note the google drive download link there is a bit dated. 

I ordered some 3 mil Blank Stencil Mylar Sheets that should be here next weekend. From what I could tell from a variety of google searches, the thinner 3 mil mylar should have less of a tendency to have the solder paste stick when removed from the PCB. We'll see.

There's definitely a learning curve for any CNC machine. I somewhat lost interest out of frustration in converting file formats from various editors to g-code. I spent a bit of time learning Fusion 360. It is great for drawing, but getting the data out to actually machine something is another story. Note that Fusion 360 is a cloud product, and the files are stored primarily in the cloud.

Here's a guy that says "It is possible to do PCBs on this sort of set up but it is not easy to get good results."

View Gerber files online for free at gerblook.org.

More recently, I found this pcb2gcode that will taker gerber files directly from KiCAD and generate g-code (the commandline parameters are somewhat extensive, so the pcb2gcodeGUI is recommended).

Install of pcb2gcode and pcb2gcodeGUI was fairly straighforward on WSL:
cd /mnt/c/workspace
sudo apt-get update
sudo apt-get install git build-essential automake autoconf autoconf-archive 
sudo apt-get install libtool librsvg2-dev
sudo apt-get install libboost-program-options-dev libgtkmm-2.4-dev gerbv 
git clone https://github.com/pcb2gcode/pcb2gcode.git
cd pcb2gcode

autoreconf -fvi
./configure
make
sudo make install

cd /mnt/c/workspace
sudo apt-get install build-essential git qt5-default libqt5svg5-dev
git clone https://github.com/pcb2gcode/pcb2gcodeGUI.git
cd pcb2gcodeGUI/
qmake
make
sudo make install
Of course to actually run on WSL, an X-Windows server is needed, such as VcXsrv. It can be either run from C:\Program Files\VcXsrv\ or launched directly from WSL:

"/mnt/c/Program Files/VcXsrv/vcxsrv.exe" & pcb2gcodeGUI & 
    
Note that both the Windows vcxsrv.exe and the pcb2gcodeGUI are blocking apps. So instead of having 2 additional, blocked WSL windows, the ampersands allow the commands to be launched in parallel. The trailing " & " allows for return to current terminal bash prompt (just press enter).
There are some comments about disabling OpenGL. I did have an odd problem with sigrok pulseview not sizing properly. Note to self to revisit the thread on discord to see if the OpenGL settings have any effect (in particular the iua for iCEBreaker).

There's the option of export LIBGL_ALWAYS_INDIRECT=0 or the passing the -wgl to vcxsrv. Note also the export LIBGL_ALWAYS_SOFTWARE=1 mentioned in the comments of my RISC-V on tinyFPGA-BX via WSL blog.

Note that most of the inexpensive CNC machines doe not have limit switches pre-installed. I bought some of the markerbot-style boards. 

There's a comment on GitHub about "endstop PCBs connect the NC switch terminal directly to +5 V, in addition to having a pullup resistor on the C terminal" so care should be taken on the wiring. This is easily solved by snipping off the NC pin as show on the MPCNC: Makerbot-style Endstop Switch Modification blog.

Saturday, August 22, 2020

Notes on Upgrading T962A Reflow Oven

I bought my first-ever reflow oven! 

I've been wanting to learn to solder SMD devices in a reflow oven for a long time. I've had my eyes on that toaster oven conversion for quite a while - to the point of having the target oven in my "save for later" cart at Amazon. In the end, I chose to buy a real oven.

There are tons of them for sale from a variety of vendors with probably an equal variety of reputations. I bought this one from the sm18595638214-4 seller on ebay for no particular reason other than 97%+ reputation and over 60 units sold. Despite the profile saying "Based in China", reading the small print it actually ships from USA. My oven was shipped from Southern California and arrived in only a few days via FedEx (shipping included in price!) The manufacturer is Tai'an Puhui Electric Technology Co., Ltd (see also their T-962 product page with quite a few PCBA machines for sale). 



What's the first thing to do? Open it up and modify it, of course! I mean, seriously: how could this invitation be refused:


I received the Jilles stamp of approval:



All joking aside:

DANGER: there is high voltage, potentially lethal inside! Do not attempt modifications unless you have proper training. Ensure the power is always completely removed from the oven (not just turned off) when touching anything inside. 

There are actually a variety of different methods for upgrading a T-962. These are my notes as I follow along the 1bitsquared Upgrading a T962a Reflow Oven blog. My notes here are somewhat of a supplement and note-to-future-self as his documentation is quite good. Still, I had my own questions and challenges.

I'd like to extend a special thanks to @esden for giving me a heads up when he had one of his Improved Thermocouple Interface boards for sale. He's a really great guy that I had the pleasure of  meeting at the Hackaday Supercon. I highly recommend supporting him by shopping at 1bitsquared. Be sure to check out his twitch stream and discord (invite).

Thanks also to Unified Eningeering for the open source design on the Better Thermocouple Interface.

Here's a picture of my board made by Piotr: 


It is tiny! Actually, I think it should really be a bit bigger. There's plenty of space in the oven, and I had a difficult time inserting the thermocouples (with relatively large connectors) into the green header. Note there are 4 channels available for thermocouples. The oven comes equipped with only two.

Essentials:
Optional Items:

Things to review in advance:

My unit had some sharp edges on the drawer. Some fine sandpaper is wise to round them a bit so fingers are not cut.

I powered up the unit to make sure it was at least operational. The first thing I noticed is that the little  fan is indeed rather loud. Unless the oven is used a lot, I later learned that this fan is only used to attempt to keep the cold junction as a reasonable temperature- so it could probably be removed altogether. Probably just as well to replace it.

I had a difficult time removing the drawer. The instructions where to "lift the black latch". On my unit, the one on the left is released by pushing up. However the latch on the right is released by pushing down. I of course started on the right. Perhaps no big deal - but keep in mind the rails are also sticky with lubricant.

Push the black lever up on the left:


Push the black lever down on the right:



The first modification is probably the most important. Although my unit did have continuity from case to ground plug connection, there was pretty limited contact surface with the anodized case:



Although my unit was apparently assembled just last year, in September of 2019, the was a ton of the masking tape, just as described in other blogs. I had hoped the manufacturer would have changed this as there are so many comments on the bad smell of the heated masking tape once the oven is in use. 


Be careful pulling it off to ensure the aluminium foil does not tear:


One roll of kapton tape was more than enough to replace the masking tape to insulate the electronics from the aluminum foil. I use a bit extra as additional strain relief on the thermocouple wires:



Regarding the fan install, I suggest doing this first. Mine was so obnoxiously load I ended up cutting the wires just to silent it. (There's no fan check circuitry) Oh, and this specific fan needs to have the hole drilled out with a 1/8" bit. Perhaps the existing screws could be force-tapped into the plastic, but I didn't want to break it.

Piotr mentions disconnecting the solid state relay connection, but does say why. Putting my board into bootloader mode immediately shows why this is a good idea: mine turned on! I'm glad the SSR was disconnected. It was a bit startling, as I had never heard the large fan running. Other than the power-up test, I proceeded directly to modification.

Perhaps you've noticed this in the better thermocouple interface page: 



That's the cold-junction sensor down in the lower right. But notice the yellow circle. It sure looks like the Vdd and GND pins are tied together to ground. Sure enough, this is consistent with the schematic in that both DS18B20 pins are grounded. This is a clever idea, as from the datasheet (see page 7), this device has a parasite mode:


Still, it may not be clear as to why this cold junction sensor is on the main board, at the old junction, and not on the new mod board. It is a leftover from a prior upgrade, as there's a note "the cold-junction sensor is still present on my board, but not used when the external TC IF is detected".


Ok, so on to the upgrade!

Key to the firmware upgrade is the ISP connector:


Although a variety of hardware programmers are possible, I used a simple USB to TTL device and manually fiddled with the ISP and Reset lines. 

Fortunately the manufacturer kindly installed a header. Here's a picture of it on the board:


As usual, the connections are "crossover": Connect Tx (Transmit) of the USB device to the Rx (Receive) on the board, and Rx to Tx.

WARNING: Is is never a good idea to attempt to communicate or flash a device that is not already powered up.

From the factory, the new firmware is programmed with FlashMagic by: 
  • Connect ISP to ground
  • Momentarily connect RESET to ground
  • Release ISP from ground
The the new firmware, the unit should be able to go into bootloader mode by holding down the F1 when turning on the oven.


After the new firmware is in place, run it by again bringing the RESET line momentarily low (to ground).  To see the bootup messages, run Putty at 115200 8N1. The FlashMagic software may need to be shutdown if it still has the USB device in use.

Here's my setup:


Not shown: I used another USB device (the SPIDriver) that has a couple of header pins exposed for ground connections.

My first attempt was to see if the FlashMagic could see my device. I was initially concerned that my software only showed half the number of communication parameters. Perhaps they only show up if you have a hardware programmer plugged in? In any case, I had no opportunity to select an interface or oscillator frequency as shown in the Flashing the LPC21xx controller section of the UnifiedEngineering T-962-improvements wiki. Note the device selected is the LPC2134:


Next, "just in case" something went wrong (or you never know, you might need that someday), I saved the original firmware. Twice. Click on ISP - Read, and then click on the Export Memory tab:


The next step could be a point of no return. Hey, we're here to void warranties, right?

For my first attempt, I used known good file (version 0.5.2) from the assets on the releases page, last built in 2018.

If instead you want to build the firmware from scratch (here shown for WSL):
// over a gig of disk space is needed iss you don't have gcc-arm-none-eabi already installed
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install binutils-arm-none-eabi
sudo apt-get install gcc-arm-none-eabi 

cd /mnt/c/workspace/
cd T-962-improvements
make
// see file: ./build/T-962-controller.hex 
The compiled current code in GitHub did *not* match the releases file for me.

Somewhat surprisingly, the upload of firmware went really quite smoothly, despite my software missing half of the available parameters:


When the FlashMagic app is sized relatively small - note the "Start" button to begin upload is in the lower right may not be immediately obvious.

I had initially upgraded the firmware before installing the 1bitsquared Improved Thermocouple Interface upgrade module. As everything seems to work well, I proceeded with that modification.

The 3 connections of interest are power, ground, and data:



Another seeming invitation to modification was the convenient 3 square pads, shown with my wires already connected:



Connection of the board was pretty straightforward. Here's the an initial working modification:


Edit: I didn't really like the tape method shown above for the new thermocouple interface, as the tape does not stick as well to the cabinet as one might like. So I added these tie wraps:


Note the main strain relief (1) for the fairly rigid thermocouple wires. There's another tie-wrap (2) in the empty PCB hole - positioned to keep the next tie wrap (3) on the thermocouple wires away from the main PCB. This tie wrap has the respective tail taped down as an extra measure of stability. In addition to the kapton tape underneath, there's a small piece of card stock under the tape (part of the fan packaging was used here) for additional electrical insulation. By far the (1) tie-wrap does most of the work to keep the new interface board in a stable position. 

A better solution would be to drill a couple of mounting holes instead of the (2) and (3) tie wraps. I will probably do that when my other 2 K-Type thermocouples arrive. Alternatively, cable management clips might work (depending the strength of the adhesive)

Back to the project blog from that initially working state...

However this is where things took a turn for the worse. I powered on the unit. The display was blank! Oh no! How could that be? I took a short break to think about it. Was this the end? $400 down the toilet?

I refused to give up. I'm not new at this. Prior to being only a software engineer, I spent nearly a decade at a small industrial manufacturing company, building and repairing all sorts of crazy things big and small. I didn't do anything wrong here. No magic smoke, no mishaps. What went wrong?

So ok, let's backtrack. What's different? Well the Thermocouple board is connected, but duh, how could that affect this display. It shouldn't... but let's go back to a known working state. I removed the board. Nothing. Still a blank display at power up. No fun if it is too easy, right? Could it have damaged the display? No way.

Perhaps the firmware got corrupted and crashed? I hooked up the computer again, flashed fresh firmware. Success! Ok, cool, that was odd, but let's proceed. 

I reconnected thee thermocouple board. The display was blank again! Are you kidding me? So let's repeat the routine: remove thermocouple board, fresh firmware, it works! Ok, fool me once...

Clearly something else going on here. So instead of flashing firmware, I hooked up that serial port to see what sort of messages are displayed at startup time. It's completely happy! No indication of problem, erm - other than the blank display.


How can that be? Well, since I had everything hooked up again, it was easier to restart by bringing the RESET pin low, instead of reaching for the power switch. Success! Yes, after a reset - the display works just fine. This was never about the external board or the firmware. It was always about the after-powerup reset.That certainly falls into the undesired feature category.

How can this be a problem? The factory firmware certainly did not have this issue. The Microcontoller does indeed have reset startup circuity built in. Is this is a software issue or a hardware issue?

There's a mystery mod that I have not been able to identify:



I remember seeing these resistors when reading about the mod before ordering my oven. Note not only the radial-lead resistors tacked on o the chip, but there's also a small SMD (probably a pullup) on the thermocouple board connection. I wonder what they do? Surely resistors alone will not resolve the new-found reset problem.

I'm not the first person to encounter this issue, however @tnt completed this process in January with no problems (but he also built from the git repo).

Ok, so I needed find a solution for the reset problem. Perhaps some sort of RC delay? That seems too hackish. It may be temperature related, as upon fresh power up later in the day, I didn't the reset problem at all. The display is working fine. Even waiting only a couple of second after power down and turning on the oven - the display is working fine. Then few hours later, the display problem had returned! This time it may have been in bootloader mode as the big fan came on while the display was blank and the heater came on!! I thought that the problem may be related to my franken-ribbon cable on the ISP (see below) - but no, removing that completely and random startup problem remained.

Reminder: The display is supposed to be blank in bootloader mode. But the unit should never boot into bootloader mode when simply powering up.

Ok, so if we take another look at the reset circuitry (above)... well, there is none. ~RESET on pin 57 appears to just go straight to the header. 

Two of the most common solutions to the worlds problems are (1) decoupling capacitors and (2) pullup resistors. Pullup it is! As it turned out, there's a large through-hole nearby that has 3v3 available:




I crimped a 10K resistor to the header connector on the reset line. Here is is with the heat-shrink insulation not yet in place:


Voila! So far, so good! I've not yet seen the blank display problem return!

As the header access is buried inside, I wanted something a bit more accessible. I started this portion of the project early on - long before I know about the reset problem. 

I spent a relatively large percentage of the upgrade time manually assembling the header cable and assembly:


If there was ever something to void my warranty, I'm pretty sure the holes drilled in the front panel did it:


In the end I have a reflow oven that is immediately recognized as mine:


A little "Frankenstien-ish", no?

That front-panel mounted PCB was probably not my ideal choice. I had considered something on the back of the unit where it belongs, but really, all of the electronics are at the front. A rear mount would need long cables routed. My ideal solution would have been a recessed header, perhaps even with some sort of protective trap door cover. Alas I don't have anything to poke a square hole into the case. I used what I had on hand. 

Note the manufacturer-supplied manual included this text:

Attention: This machine can't be used to solder components (like chips with metal encapsulation of strong reflective material) and the "plastic plug in board" which can't be heated up to temperatures of 250 degrees centigrade"



Find gojimmypi at gojimmypi.github.io

I'm currently working on my new blog home at  gojimmypi.github.io After implementing a variety of features such as dark mode , syntax hi...