Introduction: PID Controller for DIY Incubator

Note:

Vers 2 is published at my GitHub 2023-05-29


I wished to have my own Incubator. Arduino is sufficient to control the whole project. But the PWM and Heater switching was some how challenging.

I have many N-Mosfet, and almost non P-Channel.

This is a try to use the N-Mosfet in the high side to switch on-off the heater for the incubator.

Supplies

Step 1:

The project consist of Temp sensor, LCD, Heater, Arduino which controls the components, Rotary encoder with switch, N-Mosfet and a boost converter.

The idea of this design is to let the Mosfet run in the lowest RDS-ON area , and to let the power dissipation as low as possible. To be able to apply high current to the load which is here is the heater.

Looking to any N-Channel Mosfet datasheet, you will find that at the top of the diagram, the RDS is the lowest when the VGS is higher. To achieve that for my circuit, I thought about using bootstrapping. I tried that and I burned a Mosfet. It became so hot in non seconds.

The output voltage of the bootstrapping wasn't enough .. and I didn't like to retry that.

Look at my schematic, I have a 12V supply. I needed to have a VGS 12 Volts. To achieve that, I needed to have 24 volts at the gate.

The simplest way to achieve that, was to use a boost converter and I had many of the MT3608. So, the whole design are based on that.

Sure there are other ways to achieve 24Volts but, mine is depending on the MT3608 module. You need to adjust the MT3608's voltage to be 24Volts before mounting it. So you don't burn the Mosfet.

After using this setup, the Mosfet is quite cold .. No need even for a cooling. But still please use it.

The opt-coupler is to protect the Arduino GPIO. Take in consideration that it will invert the signal. I compensate for that in the code.

The biggest challenge in this project is to calculate the constants for the PID. My design keeps these constants saved in a serial EEProm. You find it in the schematic and it was salvaged from an old motherboard.

For any PID controller, there are several things that affect the constants. You need to make your measurements and find out the constants. Depending on the box you are using for the Incubator, you get different constants. That is why my constants will not work for you. Keep in mind.

The code, and the KICAD project and other PDF files with Gerber files are on my github. Please download your copy there. I don't want to put it here and make a two copy of them which might be difficult to update .

Note:

I made a mistake in my first version of the PCB design, when I designed the PCB by choosing a wrong footprint for the MOSFETs. I fixed the problem when I discovered that , and for this version should be OK. But, Please check twice the design before using it.

https://www.youtube.com/watch?v=bqohIZfpVf0

Step 2: Building, Ordering PCB or Building on Prototype Boards

You have the choice to order the PCB or build the circuit on a prototype board. For the LCD you can mount it to the board using a flexible (IDE for example) or using socket (pin list - female)

For the Arduino-nano, you need to use a socket. Otherwise you might not be able to mount some components. You see in my design, that I have smd and through-hole components, Use one of them. It is to make it easier for you if you choose SMD or through-hole components. Don't apply both or your circuit will not work. I made that even for the Mosfet not just the resistors.

Any questions? please ask.

https://www.youtube.com/watch?v=hDV_8OcstiI


Github: