PID Water Heating

I want to heat a small volume of water (~15 mL) using a waterproof heating pad (Electric Heating Pad - 10cm x 5cm : ID 1481 : $3.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and temperature probes (DS18B20). I have a good grasp of the math behind PID, and Arduino's PID(&Input, &Output, &Setpoint, Kp, Ki, Kd, Direction) is easy enough to use. However, I need to know:

  1. What does MOSFET do, and how do I use it? Lot's of PID posts mention this.

  2. Does PID require analog input and output? Are my parts analog?

  3. What parts need resistors, and what principles should I follow to choose their values?

I am inexperienced with circuitry, so thanks for everyone's help. I realize my questions may be broad, so providing links to read is fine.

  • Nathan
  1. A MOSFET can act as a switch, controlling large currents in a heater. An Arduino alone cannot do that.

  2. PID input requires a range of values, and PID output is a range of values. The DS18B20 temperature sensor is digital, but provides a range of values suitable for PID input.

  3. No general answer to this question. It is central to circuit design and requires study and training. Best to follow an established project.

You may not need PID. Be clearer about what you actually want to do.

Thanks for the quick reply. What are the gains and drawbacks of using MOSFET? Do I need to code, or will the MOSFET do it's job by itself (like a resistor)?

I want the water to be at a precise temperature instead of fluctuation due to on-off code. In my understanding, this type of scenario is what PID was created for.

You need a relay or a MOSFET to control the current in the heater. Current is either on or off, depending on a digital output from the Arduino.

I want the water to be at a precise temperature

That is more or less impossible, depending on what you mean by "precise".

The temperature will always fluctuate by some amount about the setpoint, no matter what the heating/control method and it won't be uniform throughout the sample, unless you carefully stir it.

The DS18B20 is not terribly accurate, and its output is stepwise in temperature.

That heatpad draws close to 1Amp, so it can't be powered from a pin (0.04A absolute max).
1Amp is also too much for the 5volt power pin of the Arduino (~0.4A max on USB supply).
So you MUST use an external 5volt >=1Amp supply just for the heating pad.

A cellphone charger could work. For AA batteries could work (for a short time).

The single most important part of this project will be the stirrer.

Of course, you have not told us what it is you want to do. XY problem.

My project's goal: I want to heat about 15 mL of water in a cylindrical container to a precise temperature (let's say at most +- 0.1C fluctuation from setpoint) with PID algorithm, but:

  1. I still don't know why or how to use a MOSFET. I would really like a layman's/practical description of what it is.

  2. How do I control the power to the heating pad with an Arduino? Is this how the MOSFET can be used?

Since my project is so small, will stirring really be needed? Also, heat will be emanating from the entire surface of the waterproof heating pad.

I hope this is more clear; thank you all for your patience.

You are still not giving us the full details - such as the purpose. Your prerogative I suppose.

I will take a punt that your intention is to wrap the heating element around the container. Will the DS18B20 be inside or outside? What is the container made of?

A MOSFET is an amplifier or a switch; you need a "logic level" FET if you are going to control it by an Arduino as the Arduino only provides a control voltage short of 5 V which you connect to the MOSFET gate. The Source connects to ground and the drain to your heating pad, the other end of which goes to your 5 V supply. If you have a well regulated 5 V supply, you can use it to also power the Arduino via its 5 V pin.