Microcontroller TRIAC control - Page 1
Forum section: electronics / beginners

author: Delta
author_rank: Super Contributor
timestamp: May 31, 2016, 11:31:26 pm
content: I'm looking to use an MCU and TRIAC to control a ~2kW 240VAC heater element. I'm torn between two approaches:1) Use TRIAC control IC, and use a PWM output from the MCU to feed it its reference voltage.2) Use a zero-point-crossing detector feeding into the MCU, and have the MCU calculate the required delay / firing angle and drive the TRIAC's gate (probably through an smaller opto-isolated TRIAC).I'm thinking of a BTA25-600CW, with a MOC3020 driving it.I was initially edging towards method 1, but the more I think about it, the more I'm heading towards 2....Your thoughts, please!

author: mrpackethead
author_rank: Super Contributor
timestamp: June 01, 2016, 12:07:55 am
content: if you are looking to control a heater, dont' bother trying to phase control it.. Just switch it on and off at the zero cross points.. will save you a bunch of filtering..if you want 50%, just turn on for alternative cycles, if you want 10%, turn on for 1 in 10.. you can create algorithms to give you pretty good average power over a second, if you do this, and a 2kW heater has a lot of thermal mass you'll probalby be fine.

author: ebclr
author_rank: Super Contributor
timestamp: June 01, 2016, 12:19:33 am
content: I'm doing exact the same thing to control a hot air, on A hot air gun for SMD.I'm using the MOC approach, One thing that i dislike in that the resolution of control will be 1/ 120 for one second , I need to model the Heater ar air flow to see if this will be a problem or not.I'm using Psoc and the main processor

author: Delta
author_rank: Super Contributor
timestamp: June 01, 2016, 09:17:18 am
content: Quote from: mrpackethead on June 01, 2016, 12:07:55 amThat's a great idea!So if I decide to go for 0-100 control, each zero-crossing is one half-cycle, and there are 100 half cycles per second (50Hz), is it as simple as:For 75%Zero-crossing 0, set gate drive high.Count 75 zero-crossings.Set gate drive low.Count (remaining) 25 zero-crossings.Repeat...As we are using full half-cycles, I'm guessing the power relationship should be completely proportional and linear, ie 50 / 100 half cycles = 50% power developed in the load?How does my choice of devices sound?

author: danadak
author_rank: Super Contributor
timestamp: June 01, 2016, 09:37:22 am
content: Isn't the problem with cycle, 1/2 cycle skipping the long latency in the T correctionfeedback loop, manifesting itself in wide swings of T up and down rather than a "stable"temperature. Especially at low heat levels.This of course is affected by thermal mass, if system has low thermal mass than youwould get wide swings, if high mass then that acts as a filter to remove swings.Regards, Dana.

author: Delta
author_rank: Super Contributor
timestamp: June 01, 2016, 09:40:49 am
content: There will be plenty of thermal mass, so nice long time constants are absolutely fine...

author: Kjelt
author_rank: Super Contributor
timestamp: June 01, 2016, 09:42:14 am
content: I would use a decent SSR that has already the zero-crossing built in and are built to last.Furthermore concerning the timecycle you want to switch, heating elements are really really slow,what is the application? Thermal bath or room or oven or ? What is the accuracy you are looking for 0,1oC, 1C ?Before you start programming, I suggest to do a manual testing finding out how the system responds from roomtemperature to desired endpoint temperature (time),from desired temperature - accuracy to desired temperature (all at 100% power). That gives you information you need to set your controltime and PID parameters.Oh well if you have had control theory you probably already know all this.

author: Ian.M
author_rank: Super Contributor
timestamp: June 01, 2016, 11:54:53 am
content: For heavy loads, if you use cycle skipping, its important to only skip FULL CYCLES, to avoid DC imbalance and for more moderate loads, its still a good idea to ensure that the average numbers of +ve and -ve cycles skipped remain approximately equal.Excessive DC imbalance (summed over all loads) tends to cause saturation of the distribution transformer providing the supply feed and will make you *VERY* unpopular with the electricity distribution company. Fortunately in the UK, in urban areas, 240V single phase supplies to many customers are fed from one large distribution transformer so the chance of any individual customer causing a serious DC imbalance is small, but in remote rural areas where one distribution transformer may only feed a single customer, its a more serious concern.

author: Delta
author_rank: Super Contributor
timestamp: June 01, 2016, 08:58:50 pm
content: Before I say what this is for, please bear two things in mind.1) It is an educational project2) I've been watching too many poncy cookery programmes on telly....The plan is to make a "programmable hotplate". I can program it for example to "Ramp from ambient up to 60C in 15mins. Hold at 60C for one hour. Increase to 90C as quickly as possible. Hold for 30mins.... etc etc etc etc....1C absolute temperature precision should be enough, but I would like quite slightly better relative control - ie I don't mind if it's only within 1 degree of its setpoint, but I would like it to stay pretty close to where-ever it settles.Planning to use two PT100s, which will be in the cooking medium. (Using the average of the two readings, with an alarm & shutdown if the deviation exceeds a certain limit.Using only full cycles to avoid creating a DC offset on the mains makes sense.I do indeed have a fair bit of controls knowledge, having spent many an hour tuning control loops on heavy automated hydraulic machinery...Thanks for all the advice thus far.

author: DmitryL
author_rank: Regular Contributor
timestamp: June 01, 2016, 09:11:53 pm
content: ..You can also make a small cooker from your triac or SSR, calculate how much it dissipates at ~10A when it is turned on for 100% duty cycle

author: Ian.M
author_rank: Super Contributor
timestamp: June 01, 2016, 09:38:59 pm
content: That's going to be *INTERESTING* as the system consists of two thermal masses, the second of which is unknown, with a variable thermal resistance between them due to the condition of the interface surface between the hotplate and the pan, and variable losses to ambient from the pan. Avoiding overshoot if you are doing something like caramalizing onions, or other items with little to no water content, while still being reasonably responsive when there is a litre of water in the pan is going to be *DIFFICULT*.Personally, I'd hack a portable induction hob to make the power level MCU controlled rather than use a conventional hob element so I didn't have so much lag in the thermal circuit.

author: EPTech
author_rank: Regular Contributor
timestamp: June 02, 2016, 08:59:45 am
content: Hi there,I agree but HOB's already have quite responsive and intuitive feed-back. I doubt there is much improvement there. What would be cool though is to have a wireless temperature probe that one can stick in the medium to cook, like a steak or a pot of water and that would feed back to the HOB. What would be even greater is to have a temperature probe that can sense water boiling over in some way. If that were to switch off the HOB, that would save me the occasional mess.

author: Psi
author_rank: Super Contributor
timestamp: June 02, 2016, 09:16:42 am
content: Quote from: Delta on May 31, 2016, 11:31:26 pmYou can do mains zero crossing detection with a ATmega/tiny with just two 1M resistors to phase and neutral (240VAV).It sounds dodgy but it's officially in an Atmel App note.http://www.atmel.com/images/doc2508.pdfThe internal clamping diodes in AVRs are strong enough to handle mains through a 1Meg, no probs.

author: ebclr
author_rank: Super Contributor
timestamp: June 02, 2016, 11:41:06 am
content: The photocopier already do the zero crossing does not need to use the processor for that