Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to properly power a heating element to stay within a range?

Status
Not open for further replies.

Matienzo

Member
Hello everyone!

The title pretty much says it.

I'm using two heating elements to heat up a vessel of about 4 in^3 and this is the way I'm thinking about doing it. (senior ME student here so please easy with the jargon)

So here is the way I'm wiring the thingy:
abrxaq.jpg


The problem with this setup is that the temperature profile has many spikes. I figure that instead of an ON/OFF switch I could have something that controls the voltage to maintain the temperature at a certain temperature. How do I do this? Is there a better way to do this?

As you can tell I'm an avid user of modules as way to cope with my lacking EE knowledge. If this can be achieved with modules that would be perfect, if otherwise please brace yourselves for dumb questions.

2nd question: I would like to put a thermistor on the vessel by making a hole and gluing it there with a paste. What is the name of that paste? I've seen it on the thermocouples of my 3D printer as a way to fix it inside a small threaded brass piece that picks up the temp of the nozzle.

Thanks a bunch in advance!
 
If you want more precise control of the temperature rather than a discrete on/off, I would recommend replacing the relays with high power logic-level MOSFETs and using PWM (analogWrite function) from the arduino to drive them.

As for the paste, do you just mean heatsink grease? or do you mean some kind of thermally conductive adhesive? There are certain kinds of two-part thermal epoxies that one could use, or I have sometimes used a compound referred to as "heatsink plaster" which has some mild adhesive properties when dried but may or may not be a strong enough bond for your application.
 
Hi JLNY,

Correct me if I'm wrong but the MOSFET varies its output according to the voltage on the gate, right?
Wile testing the HE I saw that I will be using 18v at most so I will change the buck converter to something under 24v (not sure yet because I'm still experimenting)
I believe that the voltage will vary between 12v and 18v at 4Amps depending on the desired temperature. The variation is around 6v at 4Amps. I will have to dissipate 24w in the form of heat. It sounds like a lot of heat. Is there something that varies its output like the MOSFET but works like the Buck converter (no heat dissipation)?
 
In this application, the NFET would act as a saturated switch, either fully-on or fully-off. This makes the power dissipation in the NFET very low so that it might not even need a heatsink.

The natural Arduino PWM switching frequency is 500Hz, but the duty cycle is adjustable from 0/1024 (0%) to 1023/1024 (99.9%) in steps of 1/1024 (0.0098%). The thermal mass of the heater is such that it acts as a low-pass filter for the 500Hz Power pulses, so that the heater temperature is proportional to the average duty cycle with a time constant delay if the duty cycle is stepped.

48.png

The example above shows a 4Ω heater being pulsed from 24V with 25% duty cycle. The green trace is the power dissipation in the heater, and the red trace is the power dissipated by the NFET.

Now you just need to add a temperature transducer to the heater, let the Arduino's ADC sample it, and you can make a PID temperature controller.
 
Last edited:
Hi MikeMI,

The natural Arduino PWM switching frequency is 500Hz, but the duty cycle is adjustable from 0/1024 (0%) to 1023/1024 (99.9%) in steps of 1/1024 (0.0098%). The thermal mass of the heater is such that it acts as a low-pass filter for the 500Hz Power pulses, so that the heater temperature is proportional to the average duty cycle with a time constant delay if the duty cycle is stepped.

I understood 1/5 of this :facepalm: but I'll google around to find a way. Then it seems like the best way to do it is by using a MOSFET then. Do you have an idea of a of DIY project that uses a MOSFET and an arduino on a similar fashion. It would be a good way for me to get familiar with it.

Thank you for taking the time to simulate it!
 
Hi MikeMI,



I understood 1/5 of this :facepalm: but I'll google around to find a way. Then it seems like the best way to do it is by using a MOSFET then. Do you have an idea of a of DIY project that uses a MOSFET and an arduino on a similar fashion. It would be a good way for me to get familiar with it.

Thank you for taking the time to simulate it!

Perhaps think about it this way: a 25% duty cycle PWM signal is "on" 25% of the time and off 75% of the time. So if your heating element dissipates X watts at 24V when running continuously, its average power will only be 0.25*X Watts when it is only being turned on for 25% of the time.

PWM is basically just switching in on and off so quickly that the thermal mass of the heating element will basically be holding constant at the average. The MOSFET is effectively functioning in the exact same way as the relay, only a MOSFET can be switched very quickly and repeatedly, whereas chattering a relay at 500Hz is probably not a good idea. ;)
 
The natural Arduino PWM switching frequency is 500Hz, but the duty cycle is adjustable from 0/1024 (0%) to 1023/1024 (99.9%) in steps of 1/1024 (0.0098%).

What is the length of the duty cycle? I mean, what does 1024/1024 represent in practical terms, or what does each of those 1024 is? are you suggesting to have the arduino open the MOSFET gate 25% of a second (I'm assuming 1024/1024 = 1sec). I guess the arduino would open the gate in 1/1024, 5/1024, 9/1024... until it reaches 1024/1024 and start again.

Sorry for how basic my question is
 
Ooooh, I see JLNY. It makes a lot of sense.

So the way I should program the arduino to change the temperature is by making the duty cycle dependent on the temperature right?

Also, I'm not sure what the role of those 500Hz is
 
Exactly. If you are worried about overshoot on the temperature rise, you might program it to start gradually lowering duty cycle of the coil as it approaches the target temp, or you might have it hold at some intermediate duty cycle when it is at temp, rather than have it turn fully off once it reaches temp.

There are a lot of possibilities, and how you will want to implement them may depend on how much lag there is between the heating element and your temperature sensor.
 
The PWM built into the Arduino switches the port pin high/low at 500Hz, meaning that the period is 2ms or 2000us. Look at the green waveform in the simulation. Note that the current in the heater flows for 25% of 2000us or 500us or 0.5ms.

The Arduino code to get 25% duty cycle would be analogWrite(pin, value), where value = 64. (I screwed up the explanation above. The value is only 8 bits; not 10 like I said above, so the max value is only 255 (not 1023), so you can have 256 different values from 0 to 255.)

64/256 is a duty cycle of 25%, meaning that since the PWM period is 2000us, the pin will be high for 500us...
63/256 is a duty cycle of 24.61%, so the pin will be high for 492.2us.

The smallest step is 2000us/256 = 7.81us.
 
The PWM built into the Arduino switches the port pin high/low at 500Hz, meaning that the period is 2ms or 2000us. Look at the green waveform in the simulation. Note that the current in the heater flows for 25% of 2000us or 500us or 0.5ms.

The Arduino code to get 25% duty cycle would be analogWrite(pin, value), where value = 64. (I screwed up the explanation above. The value is only 8 bits; not 10 like I said above, so the max value is only 255 (not 1023), so you can have 256 different values from 0 to 255.)

64/256 is a duty cycle of 25%, meaning that since the PWM period is 2000us, the pin will be high for 500us...
63/256 is a duty cycle of 24.61%, so the pin will be high for 492.2us.

The smallest step is 2000us/256 = 7.81us.

Awesome, this is very helpful.

Exactly. If you are worried about overshoot on the temperature rise, you might program it to start gradually lowering duty cycle of the coil as it approaches the target temp, or you might have it hold at some intermediate duty cycle when it is at temp, rather than have it turn fully off once it reaches temp.

There are a lot of possibilities, and how you will want to implement them may depend on how much lag there is between the heating element and your temperature sensor.

I'm looking online for similar applications (I would like to see the code)
 
BTW this it's been really helpful. Thanks a lot. I'll do some research and get back, possibly with more questions :happy:
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top