#12 Smart Cooler Project with PicoBricks

Air conditioners are used to cool in the summer and warm up in the winter. Air conditioners adjust the degree of heating and cooling according to the temperature of the environment. While cooking the food, the ovens try to raise the temperature to the value set by the user and maintain it. These two electronic devices use special temperature sensors to control the temperature. In addition, temperature and humidity are measured together in greenhouses. In order to keep these two values in balance at the desired level, it is tried to provide air flow with the fan.

In PicoBricks, you can measure temperature and humidity separately and interact with the environment based on these measurements. In this project, we will prepare a cooling system that automatically adjusts the fan speed according to the temperature. You will learn the DC motor operation and motor speed adjustment.

Details and Algorithm

First, our code will display the temperature values ​​measured by the DHT11 temperature and humidity sensor on PicoBricks. Then, we will define a temperature limit for the DC motor connected to PicoBricks to start running when the temperature value reaches this limit, and to stop when the temperature value falls below the limit.


1X PicoBricks
1X Sound Sensor
3X Jumper Cable

Wiring Diagram

You can code and run Picobricks’ modules without wiring. If you are going to use the modules by separating them from the board, you should make the module connections with grove cables.

MicroBlocks Codes of the PicoBricks

You can access the Microblocks codes of the project by dragging the image to the Microblocks Run tab or click the button.

MicroPython Codes of the PicoBricks

					from machine import Pin
from picobricks import DHT11
import utime

LIMIT_TEMPERATURE = 20 #define the limit temperature

dht_sensor = DHT11(Pin(11, Pin.IN, Pin.PULL_DOWN))
m1 = Pin(21, Pin.OUT)
dht_read_time = utime.time()
#define input-output pins

while True:
    if utime.time() - dht_read_time >= 3:
        dht_read_time = utime.time()
        temp= dht_sensor.temperature
        if temp >= LIMIT_TEMPERATURE:     
            #operate if the room temperature is higher than the limit temperature

Arduino C Codes of the PicoBricks

					#include <DHT.h>

#define LIMIT_TEMPERATURE     27
#define DHTPIN 11
#define DHTTYPE DHT11

float temperature;

void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly:
  temperature = dht.readTemperature();
  Serial.print("Temp: ");
  if(temperature > LIMIT_TEMPERATURE){
  } else{


Project Image

Project Proposal πŸ’‘

Using the OLED screen on PicoBricks, you can print the temperature on the screen and keep track of the temperature at which the fan is activated.

PicoBricks has a modular structure, modules can be separated by breaking and can be used by connecting to Pico board with Grove cables. By mounting the smart cooling circuit we made onto the robot car chassis, you can develop a project that navigates autonomously in your environment and cools the environment at the same time.

Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *