Close
0%
0%

T962A Controller with 5" Touch TFT (using *STM32*)

T962A Controller Drop-In (using *STM32H7*)

This is a drop-in replacement controller board for the T962/T962A reflow oven, using the STM32H7

Similar projects worth following
STM32H7 CPU @400Mhz, 2MB on-chip flash

5.0" 800x480 Capactive-touch TFT display

64MB external SDRAM (LCD frame buffers, etc)

4 Max31855 on-board TC Sensors (K-type)

MicroSD socket for FatFS MicroSD (storing images, profiles, etc)

built-in CPU temp for CPU fan control

PWM control of CPU fan (6Khz PWm)

120VAC Phase-cut control of COOLING FAN for true speed control
(via 8-bit cpu DAC and FL5160 AC Phase controller)

PWM control of heater/SSR (10Hz PWM)

USB & RS232 on-board interfaces

5v & 3.3v switching power supplies

Unused STM32 I/O pins brought out to debug pads

** board is fully grounded and can be screwed/grounded directly to oven case **

** AC is fused on board for short protection, etc **

** USB & RS232 Not yet coded up in software **

**FYI***,

This is very much a WORK IN PROGRESS, I've only just designed an initial board, received it from Osh, and populating it up at the moment; at which point I'll start debugging the design, and then the firmware/software.


I haven't even started with any touch screen code yet, I imagine that part is going to be quite difficult!  But I plan to work out all the hardware and software kinks first, then tackle the display at the end.

This is the first project I've ever done using an STM32 processor, but so far I'm really enjoying the stmcube for generating the initial setup of the peripherals, it's quite handy!  I'll be starting from the initial codebase I used on the pic32 design (ported from WJ's code), but the plan is to only do that to get the initial hardware working.

I plan on re-writing the entire design once I get the hardware kinks worked out...I currently don't have any PCB/SCH files or github files posted, as there is no point yet, since I'm sure I will have schematic screw ups to fix, etc..

T962A_Controller_V3.0C_Schematic.jpg

Schematic in JPG format

JPEG Image - 4.37 MB - 05/14/2019 at 23:52

Preview
Download

T962A_Controller_V3.0B.brd

Eagle Board file (Eagle 7.7)

brd - 683.10 kB - 05/14/2019 at 23:52

Download

T962A_Controller_V3.0B.sch

Eagle schematic file (Eagle 7.7)

sch - 2.03 MB - 05/14/2019 at 23:51

See BOM
Download

  • 05/14/2019

    PhillyFlyers05/15/2019 at 20:56 0 comments

    Alright!  

    Schematic/Board design is finally complete.  I still have some notes/comments/etc to cleanup in the eagle schematic file, but wanted to post it so at least anyone interested can at least get an idea of the size... I haven't done the BOM yet, that will take some time.

    So EAGLE files are posted, along with a link to the initial Github repo, which currrently just has the eagle files, and a jpg of the schematic, and also the OshPark link for the board I had made.  I'm *SURE* you can get this board made cheaper somewhere else, I am just happy with Osh and their reliability, but $200 for this board is very very steep, i'm sure other places can do much much cheaper. 

    You'll notice the odd 'L-shaped' board, but that is so it can mount cleanly on the 6 mounting posts already there on the inside of that cover for the oven, and when the LCD is mounted on the outside, you dremel a slot where the LcD connectors pass through and connect up to the board.  (I'll post some pics shortly of how this looks)

    Just built the final version, using 64MB SDRAM, and all other fixes, and it's working without issues, everything looks great.

    I'm currently working on the touch screen menus and things using the STemWin Graphics IO package, which is working great.

    Hopefully within the next month or less I will have a first working version and will have the initial software repo to post... hoping that will happen!

    But definitely not too far away, that is for sure, as I have many of the LCD screens already working, just trying to design some decent first drafts, and then get an actual run going.

  • 04/27/2019

    PhillyFlyers05/15/2019 at 20:55 0 comments

    Alright, got FreeRTOS & StemWin integrated, and got some demo code working so I could see the LCD actually run some animation, widgets, etc.  Have to say, STemWin is an awesome library, almost endless possibilities of what you can create.  I wish I was a better artist.

    ** I'm really hoping others following this may be able to contribute someday and and some sweet graphics designs, I'm going to do what I can to make a nice thing working, but like I said, I don't have much artistic talent, so my graphics designs tend to be boring. lol **

    So, the SRAM I put in this current design was only 4MB, and couldn't really get higher than that.. BUT, I was such an idiot and didn't realize my pin restriction was because I was comparing to their eval board and assuming I had to go with 32-bit wide SDRAM, which is not the case, as the SRAM was only 16-bit wide.  No problem with using 16-bit wide SDRAM, and only had to move 1 pin to change the board to use a 64MB SDRAM, so we have plenty of room for multiple LCD Frame Buffers, and STemWin internal buffers, and whatever else cool we can use it for!

    So, one more board spin, to remove the SRAM and replace with the SDRAM... once I get that back and working, I'll finally put up the schematics, pcb, and oshpark link.... then after that I'll try to get a parts list together...this design obviously isn't going to be cheap, but I think it's worth it, considering the endless opportunites this provides, and also gives any enduser the opportunity to design almost anything custom they want.  

    Really the 3 most costly components are the LCD:

    1) 800x480 NewHaven display is about $65

    2) STM32H7 processor is about $22

    3) 64MB SDRAM is about $15

  • 04/12/2019

    PhillyFlyers05/15/2019 at 20:55 0 comments

    Finally, got the MicroSD -> Jpeg Decoder -> DMA2D converter -> LCD display flow to all work.

    took a couple weeks of fighting with this mcu to get everything working right, but finally I can read a JPG image from my microsd on my board, decode the jpg image to the 4MB SRAM, then use the DMA2D converter to output into the correct pixel format to the framebuffer in the sram, and successfully display the full 800x480 image to the LCD

    (I uploaded a screen shot showing my snowy wallpaper image I chose), screen looks beautiful.

    So now I'm onto the actual fun part, making LCD images for the actual oven operation, getting some profiles setup, etc, this may take quite some time..

    Also I had to make one more spin of my board, as the SPI bus and LCD bus needed some serious inline termination resistor packs on all the data/address lines to dampen signal reflections, otherwise all is good.

    I'll post up the EAGLE schematic/board files prob. next week, as well as a link to the current OshPark board (I'm SURE you can make this board cheaper elsewhere, but I like Osh because of their high quality)

  • 03/11/2019

    PhillyFlyers05/15/2019 at 20:55 0 comments

    Ok,  finished up the code for all the peripherals, so all the PWM and timers are working, SPI, I2C, LCD touch screen interrupts, etc.  cleaned up all the code so I got everything into nice working order.

    Also, have to say after getting used to the STM32 code, and the Cubemx examples, finally really liking how they made the HAL so easy to use, saves so much time!  Was a pain at first with the jpeg and messed up code, but things are much better now with all the other sample code.

    Now onto the main event, LCD & JPEG integration, I updated my board and re-routed, after digging into the LCD area, I realize I don't need the external flash, what I really need is external ram, plus add on a socket for a MicroSD (via SPI) so I can have an external file system for storing images, even profiles, etc.  SD's are so cheap now anyway! 

    So I put all that onto the new board, and removed the flash, and added in the SRAM...

    ** only annoying part is I can't use SDRAM, as I don't have enough available pins to use the SDRAM setup with the FMC, unless I bump up to the larger 144-pin STM32H7 package, which I really don't want to do.. I'm already using the 100-pin package, and it takes up a nice footprint..

    SRAM is a bit more expensive than SDRAM, but for now it is good.. about $20 for the 4MB SRAM chip... maybe down the road once this thing is all iron'd out we can weight using the larger STM32 chip, and drop in an SDRAM instead..

    there is more than enought flash on-board the STM32, 2MB total, and at most the program will take 1MB, prob. more like 100kB or less, so at least we have 1MB of free internal flash...

    external SRAM will add 4MB of ram, plus the external MicroSD which can be massive amount of storage...which we can use for all sorts of nice bmp/jpg images, so we can have our own custom displays,e tc..

  • 01/13/2019

    PhillyFlyers05/15/2019 at 20:54 0 comments

    Finally, got all the modules working properly, JPEG, LTDC, and NOR flash all working and test out good.  All the HAL issues were because of an issue with CUBEMx, and its code generation for IAR. CubeMx doesn't setup the linker file properly for the STM code it generates, especially for JPEG init.  IAR uses a fixed 'stack size' in the linker file, but their JPEG huffman code requires more than they specified, so the JPEG init overwrites other vars in memory, and wrecks havoc.

    I will let STM know their CubeMx gen for IAR needs a little tweak there... but anyhow, all looks good, now moving on to actually writing some code and setting up all the rest of the Perips....

    I setup this project to work in both IAR and TrueStudio, as TrueStudio is quite nice (and free), but I still prefer IAR a bit over TrueStudio, mostly because I've just used it so much I can navigate faster in it..

  • 01/09/2019

    PhillyFlyers05/15/2019 at 20:54 0 comments

    LCD is working good, so far I don't see any issues with it, so I'm moving forward to testing out the 16MB external flash I decided to use.  (Still not sure yet if I'm going to really need external flash or SRAM).  The biggest issue is how I'll store/use images, and whether I need external flash for storing jpeg or RBG images, or if I'll need external SRAM for decompressing images stored in internal flash.

    I won't know until I really start hammering into it... the FMC on this chip allows you to easily have both SRAM and flash (as you can see from the STM32H7 eval board/schematics), but that would most likely require a 4-layer or larger board to handle both chips... so for now I'm hoping to only need one or the other...

  • 01/05/2019

    PhillyFlyers05/15/2019 at 20:53 0 comments

    Ok,

    I figured out what to do, decided to do one more round of experimenting, the FL5160 is very very sensitive to a stable/clean power source, so no idea how in the world their schematic concepts in the datasheet would work when trying to get a decent DC supply right from the AC mains, with very little filtering/smoothing.

    I already have a DC Boost supply in this board for the LCD driver, which requires ~19VDC, generated from the 5V source, with the FAN5333B IC.  Just added a second setup of this boost circuit, providing a nice clean 12.5V or so source, plenty to keep the 5160 happy and avoid any brown out possibilities for under voltage.  (means a few more components on the board, but they are quite cheap, so not much added to the cost).

    I really hated the requirement of having to mod the T962A oven itself changing out a transformer or whatever, as my approach all along for these designs is to truly be a 'drop-in' without having to mod the oven itself.  Of course in this case having an external 5" LCD does mean a little bit of a mod, but will be minimal.

    Anyhow, I'm onto the main task now, LCD is fired up and powered on, looks good, seems to be booting up and no bad connections from what I can tell.. going to start testing some actual LCD sample code now from STMicro to see if it can actually talk to the micro correctly..

    (I posted a photo so you can see my little debug/test setup)

  • 01/03/2019

    PhillyFlyers05/15/2019 at 20:53 0 comments

    Alright, the DAC is working fine, this FL5160 chip is a real pain in my ass as it always has been!  as I expected, things just do not work like they show in the datasheet; trying to power the chip from the AC mains just doesn't work right.   As I was saying, this chip is very strange and is very touchy.

    As much as I tried numerous things to smooth the supply for the chip when using their circuit, the chip just wasn't happy.  It would startup but die.  I'm not sure which approach I'll end up with, but for now I'm moving on and will work on the rest of the code, circuit, and LCD panel.

    Since the easiest fix I did with my oven right now, with the Pic32 board, was to just replace their cheap 9v AC transformer with a 12v one, that may end up being the requirement I'll end up with this board as well.

    If the stupid 5160 ran off normal 5v/3.3v supply, then it would be so easy.  But since it needs about 10-12vdc for it's main supply, it becomes a pain with this oven because they ship it with a cheap 9V ac transformer that outputs around 9-11vdc, but isn't consistent.

    So with a good 12v ac trans, we have all the dc we need for the board and the 5160.   I hate using this chip because its such a pain in the ass, but it works awesome once the circuit is right.  And I am not aware of anything else out there that does what this chip does all in one package.  I could put a zero-cross detection into the cpu via a GPIO reading the aC mains, but then you have to account for a timer for that, and more overhead firing the FETs for just stupid fan control.  Makes so much more sense to have that offloaded as I'm doing with the 5160.

    So on to the rest of the board, I'll update more once I dig into LCD stuff and the meat of the thing...

  • 12/19/2018

    PhillyFlyers05/15/2019 at 20:52 0 comments

    Hi, finally got back to this, took me longer than I thought to get back to it!  haha.. so far so good, did some initial tests with the cpu running and AC applied, no smoke :)  I think the FL5160 setup will work fine, but I'm going to run through some DAC iterations this weekend to make sure it actually runs.

    Once I get it all verified, I'll update the schematics for the PIC32 version, and update all the info...

    I hope to actually start working on this design over Christmas break and figure out my issues with the jpeg and ltdc modules of this chip (currently I have them commented out from being init'd, as that is what was hanging on HAL init calls)...

  • 10/9/2018

    PhillyFlyers05/15/2019 at 20:52 0 comments

    FYI, please see the *details*, I've only just started this project, I'm just populating my 1st revision of a PCB now, then will have to start testing the hardware to see how many screw ups I made on the PCB...

    So gonna be quite some time before this is doing anything cool to show :)

View all 10 project logs

Enjoy this project?

Share

Discussions

Nicolas Chaslot wrote 05/16/2019 at 08:08 point

Good Job!
I've had a look at the gerbers, it looks awesome! I just wanted to  know, did you confirm the fit on the T962 oven?

I'll order 5pcbs in china now (17$ for all of them) so if anyone needs one... :)

nick

  Are you sure? yes | no

PhillyFlyers wrote 05/16/2019 at 09:31 point

Holy crap, $17?  What place did you order from?  that is insanely cheap, I can't believe the prices I pay on OshPark sometimes :)

I don't have a T962, I only have the T962A... someone recently on my other Pic32 project had mention that board would not fit in the T962, so I really doubt this one would either..

  Are you sure? yes | no

Nicolas Chaslot wrote 05/16/2019 at 09:40 point

I quoted for that price on JLCPCB in china. 16,XX for 5 pieces.

Ok. I'll figure out a way to make it work then haha

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Jarrett wrote 05/15/2019 at 02:29 point

You should post these as project logs :)

Makes it easier to follow

  Are you sure? yes | no

PhillyFlyers wrote 05/15/2019 at 20:57 point

Great Idea!  did not even notice that was there!  I moved all these updates into logs, going to try and clean these comments up..

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Nicolas Chaslot wrote 05/05/2019 at 09:50 point

Awesome!

Definitely not cheap but if that can make that little oven a little bit more suitable for work that's worth it!

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Nicolas Chaslot wrote 04/16/2019 at 08:12 point

Great news!
If hardware is validated i'll order and build it then :)

  Are you sure? yes | no

PhillyFlyers wrote 03/11/2019 at 00:48 point

...moved to project log...

  Are you sure? yes | no

Nicolas Chaslot wrote 03/22/2019 at 10:32 point

Awesome work as always!

Maybe the sd card could store the reflow profiles and user parameters too?

  Are you sure? yes | no

PhillyFlyers wrote 03/22/2019 at 14:05 point

Yes indeed, I was thinking this would be the way to go once things settle in, as we'll have almost endless space on a microSD card..


So I got the microSD card all working, just hacked up a socket on my current test board, since my newly spun board is showing up today (with the socket actually part of the board design :)

That was fun trying to figure out all the public microSD card code, using chan's FatFS lib (which is freakin bad-ass)... So got it all going, nice and clean running the SPI interface to it at 10Mhz using a 32gb microSD..

So once I start populating the new board this weekend, I'll test out that everything is up and working, and I didn't forget any of the many cuts/jumps I had to add to my current board.. lol... plus keeping my fingers crossed the SRAM works... in that case I can start testing displaying images from the SD card to the LCD...

  Are you sure? yes | no

Nicolas Chaslot wrote 03/22/2019 at 14:08 point

Sounds good!
Really looking forward to ugrading my oven !

  Are you sure? yes | no

PhillyFlyers wrote 02/21/2019 at 14:04 point

...moved to project log...

  Are you sure? yes | no

Nicolas Chaslot wrote 01/16/2019 at 09:21 point

I can see there have been some awesome work done here! Don't know why hackaday doesn't keep me notified...

Anyway glad to see the thing going along and can't wait to get my hands on one!

  Are you sure? yes | no

PhillyFlyers wrote 01/13/2019 at 21:20 point

...moved to project log...

  Are you sure? yes | no

Elasia Squishie wrote 01/09/2019 at 16:34 point

I mean just the circuit as is on figure 4 and powering from 120V the application circuit, that chip looks like it needs to float on the ac line to work proper and you get that by the ground which is really connected to hot via the fets diode and then VS is connected to neutral via a rectifier diode and related resistors/transistor

so then you use an isolator connected to the fl5160 ground and power pins to drive a pwm into a low pass or feed a dac chip that is powered by the fl5160 as well

i plan to build the above once my voltera shows up next week, this is right up its ally

  Are you sure? yes | no

PhillyFlyers wrote 01/09/2019 at 17:06 point

Yep, you got it... this is why it get's tricky, because you are dealing with AC neutral/gnd and then the digital gnd for the rest of the logic.  

It made more sense to me to just keep the AC section as isolated as possible, and just power everything from my DC supply.  So this way, everything including the 5160 is powered by the DC supply, AC remains on the FET side, and nothing else.

but yeah, you can do it whatever way you want really... just gets complicated as you power more things from the 5160, and then try to interface with other logic on earth ground.

  Are you sure? yes | no

Elasia Squishie wrote 01/09/2019 at 20:10 point

Yeah, ideally only need to bang the serial pins through an isolator and leave the entire rest of it as an isolated mains power circuit

I just got done baking the oven for almost a full day... even after removing all that ridiculous masking tape before hand is still had this nasty smell i couldn't quite place other than being some kind of organic voc

In manual mode on the chinese controller it leveled off nicely at around 160C or so with the fan and lamp on out of the box.. only thing i can figure is whatever garbage mineral wool they used must have had the chemical in it because i had it completely torn down to inspect for putting an internal air stiring fan too.. that or maybe the adhesive from the heat tape they used?

Either way can barely smell it now... i'll still be placing it by my window in the lab though

  Are you sure? yes | no

PhillyFlyers wrote 01/09/2019 at 14:17 point

...moved to project log...

  Are you sure? yes | no

PhillyFlyers wrote 01/05/2019 at 20:16 point

...moved to project log...

  Are you sure? yes | no

Elasia Squishie wrote 01/09/2019 at 05:54 point

This peaked my interest so i picked up some parts to build figure 4 in the datasheet and then feed the dim control doing

pic square wave -> isolator -> low pass -> dim control

have you done anything of the like? The FL5160 has even its own built in power regulator to supply 5v

  Are you sure? yes | no

PhillyFlyers wrote 01/09/2019 at 14:14 point

yeah, you can do that as well, the dim control in the chip has it's own internal ADC to determine what 'level' your output AC will be at... so whether you feed it a straight-up analog voltage level from a DAC (as I'm doing), or a smoothed out pwm signal, or whatever, it doesn't care... 

And yes, the 5160/5150 puts out a 5VDC supply from that pin, you can use that for other things if you want..

All of my issues with this chip were configuring as you were above (using figure 4 or similar), and getting the thing to run with the entire circuit connected, and proper 3-wire grounding, etc.  It was not working right in that scenario, so it made more sense to supply the chip from a more stable source.

  Are you sure? yes | no

Elasia Squishie wrote 01/09/2019 at 14:53 point

Did you use an isolated ground between the ground pin and in the middle of the fets?

  Are you sure? yes | no

PhillyFlyers wrote 01/09/2019 at 16:03 point

Yep,  I have an opto-isolator being driven by the FL5160 gate drive, which is in turn driving the FETs.  (gnd of FETs is gnd of opto)

You can look at the PIC32 project schematic to see how I set it up, as I'm using the same setup here, except for the extra boost circuit I'll be using in this version to drive a stable VS for the 5160..

In the PIC32 version I was driving VS from the 9VDC coming from the oven 9VAC transformer...but 9-10VDC is right on the borderline of POR margin for the VS, so for stable running, you need it to really be around 11-12VDC (at least).  5160 clamps it at 17VDC of course...

  Are you sure? yes | no

PhillyFlyers wrote 01/03/2019 at 01:26 point

...moved to project log...

  Are you sure? yes | no

Nicolas Chaslot wrote 01/03/2019 at 16:31 point

Yeah that's a pain when the datasheet schematics don't work as they should...
I'm sure having a 12v reg inside the oven on top of the ssr would not cause any problem to most of us wanting to go the custom pcb route.

It might simply be the simplest/quickest option to get the best results here, leaving time after to figure out what the problem is... Doesn't Fairchild have a forum or contact line for technical issues like this?

  Are you sure? yes | no

ghulands wrote 12/08/2018 at 07:09 point

Are you thinking of doing a kickstarter or small board runs for this board?

  Are you sure? yes | no

PhillyFlyers wrote 12/19/2018 at 00:24 point

...moved to project log...

  Are you sure? yes | no

ghulands wrote 12/19/2018 at 00:34 point

How's your progress going lately?

  Are you sure? yes | no

Nicolas Chaslot wrote 10/22/2018 at 08:02 point

Joining here to follow the progress of this version!
I'll try to be patient and not order the pic version for the moment haha :)

Keep up the good work :)

  Are you sure? yes | no

PhillyFlyers wrote 11/11/2018 at 20:33 point

...moved to project log...

  Are you sure? yes | no

Nicolas Chaslot wrote 11/12/2018 at 08:14 point

Haha yeah i know the feeeling of being overwelmed by projects ^^
Anyway, that's awesome!

  Are you sure? yes | no

PhillyFlyers wrote 12/19/2018 at 00:22 point

...moved to project log...

  Are you sure? yes | no

Nicolas Chaslot wrote 12/19/2018 at 08:35 point

Hi!

No big deal, there's no rush, you're doing an awesome job :)
Good that all the magic smoke stayed where it belongs!

I'll probably just wait for the stm32 board anyway, i don't really see the point of making two successive updates, considering the oven kinda works already using some low-temp soldering paste and I didn't even have the time to run as many boards as i wanted to :)

I started looking at stm32 development too a few days ago and i must say that it's way more complicated than I initially thought, with a lot of different libs and files to gather from all around to make the thing to build!

  Are you sure? yes | no

PhillyFlyers wrote 10/09/2018 at 21:25 point

FYI, please see the *details*, I've only just started this project, I'm just populating my 1st revision of a PCB now, then will have to start testing the hardware to see how many screw ups I made on the PCB...

So gonna be quite some time before this is doing anything cool to show :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates