-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
... not so much a pull request, but more a test request #132
base: master
Are you sure you want to change the base?
Conversation
.. this should help to configure non-auto-detectable features. Signed-off-by: Helmut Raiger <[email protected]>
for heater and fan. They are non-inverted now, i.e. on if high. Change pin setup and reverse PWM. Signed-off-by: Helmut Raiger <[email protected]>
... this is in preparation for the secondary heater patch. If this is selected the 1-wire pin is moved from P0.7 to P0.5 to allow access to PMW2 (P0.7). NOTE: the display code simply writes to P1 pins, this would disturb the 1-wire communication if one of the P1 pins would have been used. Safer to stay on port 0!
.. currently this is simply driven with the same values as the original heater, this needs further investigation.
... just give it a standard baudrate and it'll work. This is mainly to support communication issues with 115200. As additional goody the serial interface now reports what it did not understand.
shell integration. Currently the serial command interpreter is disabled.
... GUI should be just the same, but more wrapped up.
only one left which is shared between Edit_Profile_Mode and Select_Profile_Mode().
currently this is more or less like the printfs before, but the level may be changed at runtime and new formats may be implemented. Currently only the level is prepended.
but a few things were sacrificed for simplicity. The bake timer is now not settable to infinity anymore. If no coldjunction sensor is installed it simply vanishes instead of stating 'not present'. Bake mode controls don't vanish on value limits, but in setup this won't either.
https://github.com/matthiasb85/SimpleCLI Needs commands and better texts. Shows internal commands as internal and external?
- implement non-mode-switching commands - improve user experience (prompt, version ...) - prepare main for mode switching Fix a bug in Makefile (used a wrong path for SimpleCLI includes).
set log_lvl 7 ... for verbose set reflow_log_lvl 7 ... for standby logging set reflow_log_lvl 0 ... for logging during bake and reflow
... implement reflow and bake. This is still a bit clumsy, it switches the display mode to keep the serial interface consistent with the GUI. The 'setting x y' was not implemented on purpose for now. Actually these values should not be set remotely (and most probably only once during first set-up).
- completely change the EEPROM format, holds 4 custom profiles now change temperature encoding to byte (20 .. 275 deg C allowed). - allow a profile to be saved from the shell: like: save NEW_PROFILE 30,40,50,60,... - custom profiles may have names now (only from the shell) - they may still be edited via the keyboard Some things are gone, like non-volatile bake setpoint.
adc.c used a buffer of 2 x 256 x 2 byte = 1024 bytes to calculate the sum over the last 256 values for oversampling. This is pretty useless in the first place as accuracy below 1K are not to be expected even with a precision opamp instead of the TLC27L2. The current implementation at least gets rid of the buffer completely by using a running average method. Along with the change the sampling is reduced to once per ms instead of ever 100us, which was an overkill, new values are delivered every 256ms now, which is good enough. USE_PRECISION_OPAMP switches the internal gain to 0.36845 as the pre-amplifier is supposed to have a gain of 222.2 (see adc.c). At 300 degree C it uses 834 LSBs instead of only 307. Using an OPA2333 or similiar and replacing the trim resistors by fixed (and accurate) resistors will do the trick.
.. there is still a bug when baking, this needs more than a few lines of code.
- simplify interface - make it an independent state machine (no external state switching). - move non-reflow stuff out to shell.c and main.c - get setpoint from profile using time (not index) - improve readability, lots of comments, lower complexity Compiles, but does not work yet.
- Reflow_GetSetpointAtTime() - add timing stuff standby fan control not yet working, switch out of reflow screen ...
- move plot profile to main.c, have profiles zero-terminated - make setpoint reporting independent of look-ahead drive
... to visualize bake mode better. Still very buggy.
.. don't use PID to cool down, go full speed and stop.
.. fix last value interpolation in Reflow_GetSetpointAtTime()
... print and dump moved to shell.c. Show current profile in 'profiles'
This is to visualize the forced cooling cycle after any bake or reflow (even if aborted). Only after cooling a new heating cycle can be started, this also fixes a few strange behaviours when started from the shell.
... this was removed during the change of the reflow state machine and can now be done directly using Set_Fan().
Hi, just downloaded the current source (21 March 2018 2215UT). With LPCXpresso v8.0.0 [Build 526] on Windows 7, I started a "new project from existing code with makefile" or similar, pointed it at the root of the unarchived project download. It imported and built just fine. I get 1 script error, probably because of the Version_GetGitVersion() call - /bin/sh: git: And I also get 3 warnings - format '%d' expects argument of type 'int', but argument 4 has type 'SCLI_CMD_RET' [-Wformat=] format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' [-Wformat=] implicit declaration of function '_write' [-Wimplicit-function-declaration] I haven't loaded it into the 962a yet. Toolchain used was arm-none-eabi. Target info is - text data bss dec hex filename |
Hi, Helmut |
Yep, I checked config.h. Most doesn't apply, including the low offset opamp as I've interfaced the thermocouples with the Maxim chip. What's the thinking behind this secondary heater?. I've not found the wiki to see any discussion of it. |
And I thought I was taking this too seriously :-) Your lamp diffusers block about 50% of the direct radiation energy, you'll get more reflections getting more diffusion, but also more loss at the walls.
I think this should be the other way round, the relative nearness of the the TC won't change too much, their absorption area is too small to catch radiation energy, they only pick up air temperature which is influenced by the convection flow induced by the lamps, and their temperature is always LOWER than that of the PCBs. This is why I'll try my coin test and 'let them get radiated'. |
BTW, I'll be unplugged for a couple of days, but still interested in more oven philosophy, ah, I meant physics. |
I was planning on buying the oven, doing the recommended mods, loading the latest release FW, and being done with it.... But this project is just too fun.
After looking at some old data, you are right. I had it reversed. I always got massive overshoot on the PCB's due to the ambient temps reporting much lower. And, since that was what was controlling the heaters, the boards would get blasted. More data... The added time constant is easily seen with the diffusers, but so is the benefit of even temperature as the temps converge perfectly, even at opposite ends of the drawer. Also, with diffusers, the front air probe tracks the board temperatures pretty closely, even if it is a bit more unstable. Without diffusers resulted in overshoot of the front board and a delta of about 16C for most of the run. Perhaps there is a compromise that can be made with less diffusion to achieve faster ramp ups with more even temps to realize the benefits of both worlds? The more I look at the diffused plot, the more I think that this could be easily solved to a fair degree by simply adjusting the profile itself to accommodate for the lack in ramp up rate so that the resulting PCB profile more closely matched the ideal profile with regards to time spent in each zone? Things to play with... |
Concerning your diffuser idea, we could:
This probably would generate largely better ramp-up behaviour with near perfect radiation distribution. Unfortunately I've never really used a ray-tracer before ... anyone to lend a hand? |
I'm currently looking into https://en.wikipedia.org/wiki/POV-Ray. It's even available for Windows ... No idea if I'm able to create anything useful. |
... as space is not critical use -O2 instead, BUT this fails completely! Won't start anymore, so the code is buggy at some point not allowing for this kind of optimization. So, onl make some of the time critical functions inlineable, i.e. put them in the headers and make them static inline. This is in preparation for the reduction of interrupt latencies in onewire.c, which block interrupts for quite some time (as identified and modified by radensb).
.. block and unblock on byte boundaries instead of whole sequences. This follows a patch by radensb.
I just found another resource to show the influence of the main fan: https://blog.petrockblock.com/2014/08/22/t962a-reflow-oven-upgrade/ They suggest the main fan running at 30% during the reflow process ... And even at this level peak oven (air) temperature is ~30K below the PCB temperature. The T-962 having less heating power (about half) will not endure 30% ventilation (never reach peak temperature at all). Concerning the ray tracing idea, I did not get anything useful ... The imaging guys like to get nice pictures, but do not care too much about physics, so it's pretty hard to get settings that reflect the situation in the oven well (too many parameters to tune, too many of them purely aesthetic), sorry. The next thing to try would be to set the fan to 0 and go to bake mode at 200°, put in something with weak conduction that fills the whole drawer, start baking, pull it out when the temperature is reached and shoot a quick thermal image of the board. This should show the absorbed radiation heat quite well, if the thermal capacity of the material is neither too high nor too low (plywood ?) Need to get hold of an infra-red camera though ... |
I attached a 5cent Euro coin (horizontally) to one of the thermocouples and it shows a reaction similar to a very heavily populated PCB (large components, lots of copper), in reality this is probably next to impossible as the coin has an iron core with only a thin layer of copper on it (which I oxidized using a Bunsen burner): The red line is the coin temperature, the blue still the air temperature, green the average and yellow the setpoint, main fan is set to 12. The PID-controller is far from functioning properly, currently I can not measure the real PCB temperature in real-time, but I plan to add a relative small piece of normal single sided PCB to the other internal thermocouple to show the reaction of an unloaded PCB. Then I will change the software:
This will hopefully:
Ramping to soak temperature is usually uncritical, the oven won't deliver more than 2K/s which won't hurt components (in 99% of cases). |
... use the HW-FIFOs and ring buffer adequately.
... in preparation of composing a control temperature which may be something else than a simple average.
In standby mode the fan and heater were always turned off, so that in setup mode the fan was turned on and off all the time. Along with this fix the PWM control in io.c is simplified.
Impressive amount of fixes, and an impressive amount of physics knowledge! ! I need to look into the configuration of this so we can have the defaults compatible with an unmodified oven as previously. |
The configuration for the original setup would be to define nothing but the UART0_BAUDRATE. As I said in the beginning I'm mostly interested in having this tested and be stable. I'd also like my changes incorporated in your project, so I'm ready to take some work to adapt as necessary. Currently I've been swapping to my coding style for files that were more or less a complete re-write, but tried to stay in your convention if files had only minor changes. Having the thermocouples measure radiation instead of air temperature will dramatically improve soldering performance and stability and hopefully bring the oven to top-notch (for IR based ovens), and the HW-patch is not really complicated. |
This is in preparation for the implementation of a new control strategy. Auto-detection of sensors may be neat, but has it's drawbacks if sensors disappear during operation. Currently this is not fixed with the change either, but it will allow such a change more easily. This also improves the performance of Sensor_DoConversion() as it will not check for the existance of sensors during the reflow process.
This allows the user to select the 'weight' of the PCB to be soldered. The value 0-100% goes from: 'super light weight': nearly no components, thin PCB material next to no reflective zones on it (it picks up lots of radiated heat). 'heavy weight': larger and heavier components (increased thermal capacity or lots of reflective zones (less radiation pickup). ... and everything in between. Note: this requires the termal couples to be patched, see wiki.
100% agreed. Another big part of this that I have come to appreciate is ensuring that the radiation distribution is even. I got excellent results with diffused heating elements measuring boards on opposite sides of the drawer under different heat lamps. I am building custom diffusers that are more open to try to combat the slowed down ramp up rate. I talked to some of the guys I work with about the effects of slower ramp up rates on solder. They said "what effects?". Haha. They didnt see any problems with modifying the soak and reflow stages by extending them to accommodate the slower ramp up rates using my original 50% open deffusers. Still, it will be interesting to compare data to the newer 63% open diffusers I am making. |
I'll have access to an infrared camera soon (early May) and this will hopefully shed some light on the distribution (actually heat :-) ). Concerning your diffusor, I'd make sure that the material is selected to:
Soak time is surely uncritical, wouldn't be too sure about the actual soldering peak. Quite a few components specify rather short times above 200°C (i.e. < 30s), for lead-free this may be challenging. |
- left TC is light, right TC is heavy - change weight to be integer from 0 .. 100 - add weight argument to reflow command in the shell
When simulating the PCB temperature the radiation pattern seems to overheat the PCB even with the lowest weight selected, if the PCB is placed on stand-offs in the drawer. But it works super stable having them placed on the drawer bottom directly! This spreads the heat on the board aswell! The drawback is the cooling is lagging a lot, even slower than the heavy thermo couple (which is more exposed to the air stream caused by the fan). The solution so far: - place the PCB directly on the drawer bottom - with pretty normal PCBs select a weight of about 20% - remove the cooling ramp from the profiles this makes the reflow state machine go to COOLING and fully ventilate the drawer. - tweak the control temperature so that it reflects something more likely to be the real PCB temperature (mostly informational anyway). - show the cooling phase on the display The best solution definitely would be to directly measure the PCB temperature, but ramp-up with the simulator is about +/-5K on the setpoint (the PID control still not fixed). The cooling process is very dependent on the position in the drawer, it's a lot more air on the left side!
Hi, I'm currently using a 5c coin on the heavy TC and a 0.2mm copper foil on the light TC. Placing the PCB in the middle of the drawer directly to the bottom follows the profile next to perfect. I'm now very sure that the oven is next to unusable without the TC patch, measuring air temperature is simply useless. Soldering with leaded solder will probably not show these problems at the first glance, but this will definitely produce very unreliable electronics. The cooling process without stand-offs was off a lot! I tried to emulate the cooling process by switching to the heavy TC and tweaking the temperature decay, currently this fits nicely in the center of the drawer, but is still off by about 20-30K if you go to the left. The air stream is still too uneven. Probably I'll try to reverse the fan as suggested by radensb. If that doesn't improve the situation all that is left is an external 'air buffer box', i.e. a rather large box to let the fan push air to and a straightener of drinking straws at the end. But that would probably double the space required by the equipment. |
Just stumbled over some videos by Jerry Walker on youtube who seems to have had very nice performance with a small fan moving the air around the heaters. https://www.youtube.com/watch?v=x1Q6p2QfASY Never actually used the oven since 2018. |
Hi evbdy, I'm not with T-962 or T-962A, but with "new" T-962-Z. What do you think about this kind of solution ? Moreover, is it possible to get a .exe of the software "Reflow Controller" you are using in this post ? The one I'm using now is not showing curves. Thanks in advance ! |
I don't think you'll reach the necessary temperature with this kind of shielding. |
I will try : as you can see on pictures, the idea is to create a kind of "sandwich", with the PCB in the middle. After testing it, I will also try to replace the drawer base by the same hole plate, so that getting a better air circulation than the drawer plate with slits (I think it's not optimize for air circulation). Moreover the T-962-Z version is different : the air circulation is different than with T-962. But I don't understand exactly how it's working at that time, I have to inverstigate more. But at that time before doing these tests (and seeing the curves on PC), I need deseperatly an executable version .exe of the Reflow Controller software shown is this post :'( Can someone help me to get it ? Thanks in advance. |
Edit on 2018/3/21
In the meantime I did lots of tests and did a complete rewrite of the reflow state machine. The oven still shows an extremely unsatisfying performance.
But this is now not really a problem of that specific product, but a systematic issue all IR-ovens have. They are using mainly radiation heat. In my test setup (using a leaded solder profile) I got over 275°C peak measuring on top of the PCB in a profile that has 215°C max even with the fan running at '14' during heating.
I'm now investigating a way to control the heating using the thermocouple on top of the PCB. And putting a 'stiring' fan above the lamps won't work either (I think).
I have changed quite a lot of things from the original code and I consider this very alpha-stage.
The major improvements are:
And many cosmetic changes to the code:
I know this will be very hard to review although I tried to create sensible change-sets. Due to the amount of code line changed, it's pretty much a re-write in quite a few files.
Happy testing!
BTW: I was unable to test this with LPCExpresso, maybe someone could jump in.