CategoriesLed Raspberry Pi Pico Uncategorized

#12 Smart Cooler Project with PicoBricks

Smart cooler

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.

Components

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)
m1.low()
dht_read_time = utime.time()
#define input-output pins

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

Arduino C Codes of the PicoBricks

				
					#include <DHT.h>

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

DHT dht(DHTPIN, DHTTYPE);
float temperature;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  dht.begin();
  pinMode(21,OUTPUT);

}

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


}
				
			

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.

Leave a Reply

Your email address will not be published.