Digital control of an AC circuit that uses a potentiometer

Thread Starter

Bost0n

Joined Jul 14, 2017
5
I've been working on a project for some time that has to have a digital control over what is baselined a potentiometer. The potentiometer is a simple 25 kOhm pot installed in an electric heat gun. Investigating the circuit, I now believe it is an AC circuit which contributing to the problem.

My first attempt with this has been to replace the potentiometer with a digital potentiometer. I tried two different digital pots thus far:
Microchip MCP42050 and 4131-103. I had the circuit functioning at one point with the MCP42050 but only briefly before it stopped functioning. Then I had to move and when I tried to rebuild with a replacement digital pot, I could never get it to work again. I'm driving the digital pots with an Arduino board. Thus far, I've fried 3-4 of arduinos and digital pots.

I'm thinking te AC heat gun is putting out quite a bit of power (even in the pot circuit) and I'm convinced its AC. Is there a better approach to this problem? Some kind of digital switch? I've played around with the idea of using a servo to drive the analog pot, but that seems inaccurate and like cheating.

FYI, the other half of this circuit uses a touchless infrared sensor and the arduino functions as a PID controller brain to regulate the heat gun and hold a specific heating profile over a time period.

P.S. tonight I rebuilt the circuit with the Microchip 4131-103 and actually got sparks to fly when I plugged it in with the heat gun, which is both exciting and makes me feel like a nincompoop. Prior to tonight it was just stinky, fried ICs.
 

Attachments

Last edited:

dendad

Joined Feb 20, 2016
2,978
I think you need to be REALLY careful! The pot is most probably at mains potential so it will be very easy to kill yourself, or others.
The sparks flying only reinforces that assumption.
Putting the original pot back and mechanically driving it with a servo or something like that is nor that bad an idea. In a recent project to trigger a camera, as I could not figure out how to get the camer open, a servo pushing the camera release button worked well. I may even 3D print a finger tip to put on the servo arm ;)

If you do drive a pot, make sure the mechanism is non conductine to preserve the insulation.
 

bertus

Joined Apr 5, 2008
20,040
Hello,

No wonder that the chip burned.
There is no isolation and the maximum ratings are exceded:

MC4131_ratings.png

The servo solution may be the best for this, as @dendad suggested.

Bertus
 

Attachments

Alec_t

Joined Sep 17, 2013
10,350
Welcome to AAC!
For safety, there should be galvanic isolation between the heat gun and your control circuit. Without that isolation, your Arduino will be LIVE at mains potential.
Most digital pots are rated for low applied voltages only (e.g. 0V-5V DC).
Do you have a schematic of the heat gun itself, and your interface to it?
 

sghioto

Joined Dec 31, 2017
1,039
Similar situation controlling a high voltage lamp dimmer. Replaced pot with photocell and controlled via the brightness of a LED which was PWM by the micro.
SG
 

Thread Starter

Bost0n

Joined Jul 14, 2017
5
Thank you all for your input. I abandoned the approach of using a servo and mechanical linkage for several reasons:
  1. Noise in the system due to mechanical components
  2. Complexity of the design
  3. The potentiometer has a 0-360 'ish degree rotation while all the servos I could find are 0-180
  4. The 360 servos I've been able to find are continuous rotation, I'm not sure how well this would work with a PID controller
The mechanical potentiometer didn't look like it could handle 120V AC (see attached image). I retrospect it was a foolish assumption that it must be DC, I should have looked up a spec for it, only I couldn't find a serial or model number on the POT. I did try running the heat gun and sampling the voltage at the pot, but didn't get a reading. I'm not sure why it didn't work as it was a while ago.

It looks like I'll be building a complex mechanical assembly or a photocell solution to control the heat gun.
 

Attachments

Thread Starter

Bost0n

Joined Jul 14, 2017
5
Alec_t:
Do you have a schematic of the heat gun itself, and your interface to it?
no schematic of the heat gun, only the interface. :( I do recall a rectifier in it though, that partially why I assumed it was a DC circuit. I'm wondering now if it was just a DC motor, and the heater element is kept AC.
 

Alec_t

Joined Sep 17, 2013
10,350
I'm wondering now if it was just a DC motor, and the heater element is kept AC.
Quite likely. That method is used in hair-driers. A tap on the AC-fed heating element provides a low voltage which is rectified to power the motor.
 

Thread Starter

Bost0n

Joined Jul 14, 2017
5
sghioto:
Similar situation controlling a high voltage lamp dimmer. Replaced pot with photocell and controlled via the brightness of a LED which was PWM by the micro.
I was thinking of using a SSR as an option to accomplish this. Researching a little, it looks like an SSR operates on a similar principle to what you are describing. I'm trying to work out if this is possible though.

The SSR I'm looking at is a Panasonic AQH3223. I'm thinking it will provide the voltage isolation required.
https://www.digikey.com/product-detail/en/panasonic-electric-works/AQH3223/255-2662-ND/2125651

The only thing I'm struggling with is what this circuit looks like. Do I connect one of the terminals to the wiper terminal and then connect the other terminal to the wiper through the SSR? In principle this sounds right to me, but wouldn't it basically create a short in the system when the SSR is full open? I could put a high wattage AC rated relay in line with the SSR so there was always some level of resistance.

I just put a voltmeter over the POT while the heat gun was running (POT not installed) and found almost no voltage (20mVAC) between the terminals but around 7VAC from the wiper to one terminal and 4VAC from the wiper to the other terminal. I'm thoroughly confused. I tested with the POT in place and measure 20 mVAC from the wiper to one of the rails, 37 mVAC to the other. Across the terminals, it's 15.8 mVAC.
 

Thread Starter

Bost0n

Joined Jul 14, 2017
5
I played around with the heat gun and the POT today. It now has limited capability, it just doesn't get as hot as it used to. When the circuit was working as I intended, it would heat a piece of wood up so much that it would ignite, the touchless infrared would detect a temperature rise from the combustion, it would reduce the power to the heating element, and the flame would be blown out. Then this would repeat; it was pretty crazy. Anyway, I think some of the functionality of the heat gun may have been lost with all the mucking around. The blower still functions fine, it's the heating element that doesn't work that well. At this point I'm at a loss for what to do with it. Short of ripping the whole gun apart, I'm not sure I can restore its original functionality or make it work in the modified configuration.

I'll take a look at it when I have time in a few days to see if I see any damage inside the heat gun, but I don't recall seeing any. That doesn't mean there isn't any, but troubleshooting it will be much more difficult as I don't have a circuit schematic for it.
 

ebeowulf17

Joined Aug 12, 2014
2,939
One very simple way to control the heat gun element safely would be to use an SSR with appropriate ratings (probably 15A or higher, voltage at least equal to your mains voltage, etc.) This list is a reasonable starting point:

https://www.digikey.com/products/en/relays/solid-state-relays/183?keywords=&sort=unitPrice-A&stock=on&pv41=339&pv434=u15A&pv434=u18A&pv434=u20A&pv434=u25A&pv434=u30A&pv434=u40A&pv434=u50A&pv2133=r24V+~+280V&pv69=885

Here's a good example:
https://www.digikey.com/product-detail/en/panasonic-electric-works/AQA221VL/255-2978-ND/2364683

The signal side of this SSR could be driven directly from an Arduino pin, and the line/load side of the SSR would switch the heat on and off. No trim pots to fry, nothing fancy.

The idea behind my plan is that heating elements tend to be relatively slow to respond, so you don't necessarily get a lot of benefit from the kind of high speed switching you use when PWM dimming an LED or SCR dimming a regular light bulb. The element is going to take seconds, or at least large fractions of a second to heat or cool anyway, so the signals you send to it can change at slower intervals without losing that much control.

If you configure your PID controls so that the period for each switching cycle is long (at least half a second, maybe one or two seconds,) the average heat output over time will still be correct (on for 10 seconds out of the last 20 equals 50% duty cycle, 5/20=25%, etc) but the control system can be much simpler... and as a result, MUCH safer to build as a beginner project.

Mains power cycles at 50-60Hz depending on what country you're in, and most SSRs only switch off at zero crossings (100-120 per second) so the resolution of heat control is limited, but I'd bet it's good enough for this project.

If you setup a 1 second period, the Arduino would calculate it's desired duty cycle, then turn its output on for that percentage of one second. Since you've got 100-120 zero crossings per second, you can choose duty cycles in roughly 1% increments. Similarly, if you want faster updates at every half second, your output resolution drops to 2% instruments, etc. The PID control loop feedback will adjust the target duty cycle up and down as needed to compensate for the small amount of error introduced by low resolution output.

As an example, at 1 second period and 25% duty cycle, the element would be on roughly 250ms, then off for 750ms, on for the next 250ms, and so on. It's just like any other PWM signal, but stretched out over a much longer time scale.

If you think you can live with a slightly slower response time than you might have been targeting, I think this will provide an easy to implement, safe solution.

Sorry for the wordy, long winded explanation.
 
Top