By Kailash Ranganathan and Sasvath Ramachandran
Our goal was to build a board that, given a certain temperature setpoint, can create a temperature controlled environment. To do this, we use an LM35-D temperature sensor which has a linear temperature-voltage relation in our desired temperature range. We use an ESP-32 for compute to run a digital PID control loop given a pre-defined setpoint, and our output from the microcontroller drives a Peltier module that maintains the temperature-controlled environment.
SCHEMATIC
Our schematic can be divided into multiple subsections. The first is the one that receives temperature values and amplifies them to fit the input range of the esp32 (0 to ~3.3V). The second one is power regulation circuitry that takes in an input 12V and delivers stable 5V and 3.3V to other parts of the board. The third is the ESP32 and its respective surrounding circuits, and the fourth is the H-bridge that drives the Peltier module using PWM (reverse polarity = cooling for the Peltier module)
LAYOUT
Our PCB layout is as follows. Note the larger traces for the H-bridge, which has to drive higher currents for the Peltier module (~3A)
COMPUTE
We use the Arduino software to interface with the ESP-32. Our PID loop calculates the error from the sensed temperature to the setpoint and accordingly outputs a PWM signal to the Peltier module.
ACTUAL BOARD/BUILDING
We have various pictures of our built board, including a video that shows our successful USB-ESP32 connection and uploading code to the microcontroller.
FUTURE STEPS
We have numerous future steps for our project; given that the time we had to design the circuitry and actually build the board was limited, there are many ways our project can be improved.
Right now, the temperature sensor does not actually directly connect to the Peltier module's heating surface and instead lies on our board. To solve this, we would keep all the same circuitry, only create a breakout board with the temperature sensor and wire its outputs to our board, and then put this breakout board on the Peltier module's surface.
Moreover, this would be stabilized using some sort of closed support system that houses both the Peltier module and the breakout board. Unfortunately, we didn't actually think of the breakout board idea until after our boards had been sent for manufacturing.
Though we have a working PID control loop, we did not perform any tuning of the coefficients for any of the terms (proportional, integral, or derivative). This is a very important step in creating effective control systems, and so that would be one of the most crucial next steps.