LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control the power of a microwave.

I would like to heat a liquid to a specific temperature using a microwave and read the temperature directly. As far as that the program works exactly how it should. Now however, I would like to control the microwave so that the power of the magnetron is not only 100% or 0%. If possible, it should adjust the power by itself to keep the temperature as constant as possible.

I hope someone can help me

0 Kudos
Message 1 of 14
(4,345 Views)

The VI you posted only contains DAQ Assistant configured to sample 4 J-type thermocuples. However, a hardware of USB-6008 is selected, do you have this hardware? Are you aware that you cannot use this NI hardware to measure thermocouple signals? USB-6008 is not compatible with TCs. Read more about the reason here: http://digital.ni.com/public.nsf/allkb/8166630BD6965EEA86256FDD0052E89C

 

Besides, you just did not explain what kind of interface/hardware you want to use to power the microwave heater? In the posted VI there is only DAQ specified, plus you turn on a LED when any of the temperatures are below the specified setpoint value.

If you want to control a temperature, you should read and learn about PID control theory. But of course first you need to identify the required hardware and interface components. I do not know if this is a hobby project or schol project, but DO NOT play with a household microwave oven yourself! Only trained personals are allowed to deal with high voltages / microwave power, I do NOT recommend that you hack such oven yourself!

Instead of the microwave oven, I imagine you could just use a simple electrical heater submersible into water, plus a power supply controllable via a voltage signal...

 

PID theory explained for temperature control: http://www.ni.com/white-paper/3782/en/

 

0 Kudos
Message 2 of 14
(4,322 Views)

Hey, this is for my work I am a physics lab worker in education. So yes I have the hardware to read the thermocouples via the USB plug. But the PID theory helps me in any case further. Now I know at least what I have to look for.

0 Kudos
Message 3 of 14
(4,313 Views)

So yes I have the hardware to read the thermocouples via the USB plug.

Could you specify the hardware you want to use for the thermocouples? As I noted, the USB-6008 is not suitable for thermocouples. You need a different device, see the linked explanation.

0 Kudos
Message 4 of 14
(4,306 Views)

its the NI9211 that I'm using

0 Kudos
Message 5 of 14
(4,299 Views)

@Le0b95 wrote:

its the NI9211 that I'm using


Yep, it is compatible. What do you want to use for controlling the magnetron power?

0 Kudos
Message 6 of 14
(4,296 Views)

here in my workplace they want to adjust the microwave for me so i can use it i do not know what i will use for controlling. I'm new to this so i do not know how to go on. I thought maybe i could build the conections so when the microwave is ready i can just plug it in (more or less) and i can use it.

0 Kudos
Message 7 of 14
(4,291 Views)

@Le0b95 wrote:

here in my workplace they want to adjust the microwave for me so i can use it i do not know what i will use for controlling. I'm new to this so i do not know how to go on. I thought maybe i could build the conections so when the microwave is ready i can just plug it in (more or less) and i can use it.


Ok, so you have no idea how the microwave will be powered, and how you can interface it from LabVIEW. It is not that simple that you "can just plug it in (more or less)", and it just works 😄 Depends what you need to plug in, and where? 🙂 You need to get this info, otherwise you will be in trouble how to control that power. I imagine you will need a device with analogue voltage signal output which could drive a power supply creating a current driving the magnetron. Other options could also work, like a programmable power supply (with USB, RS232 or GPIB interface)...

 

edit: by the way, why do you need to use a microwave to heat the water? A simple electrical heater would be cheaper, simpler and safer...

0 Kudos
Message 8 of 14
(4,285 Views)

It's because I'm supposed to learn it and we're working with microwaves at my institut...

0 Kudos
Message 9 of 14
(4,282 Views)

@Le0b95 wrote:

It's because I'm supposed to learn it and we're working with microwaves at my institut...


Ok, I see. Anyway, when you get the magnetron powering part done, and you know the interface, you can post back here and we can help you with the PID control. The idea is that, you measure the temperature in a while loop, lets say set to 2 Hz sampling rate. In the same loop you can use the LV PID VI to control the power of the magnetron. The measured temperature is called process value - PV (you could average the 4 temperature signals, or use other type of algorithm to create a single variable), the setpoint is "SP".

When everything is together cabled and connected, you will need to tune the PID control loop in order to get the three PID parameters (proportional, integral and derivative terms). I often used the so called Ziegler-Nichols PID tuning "recipe" with good results for temperature controllers. Here you can read about it: http://www.chem.mtu.edu/~tbco/cm416/zn.html

The idea is that, using a pure "P" control (I and D parameters are set to zero), you bring the system to a stable oscillation by slowly increasing the P value step-by-step. The stable oscillation is when you use the smallest possible P parameter, and the amplitude of the temperature oscillation is not decreasing, neither increasing in time. You record this signal, and for example using an Excel table, you plot this oscillation in a Graph. The period time of this oscillation will give you the "ultimate period" parameter, and the P value gives the "ultimate gain".

In the end, you can use the table shown under the above link to calculate the P, I and D terms from the ultimate gain and ultimate period time:

  1. P = "ultimate gain" / 1.7
  2. I = "ultimate period" / 2
  3. D = "ultimate period" / 8

EDit: you will need to specify the period time parameters in minutes, since LV PID VIs are using minutes (so the I and D parameters). The gain is dimensionless.

0 Kudos
Message 10 of 14
(4,272 Views)