Make your own Incubator v0.1

This article is part of: BioLab Kitchen.

Table of content

Teaming Up

To continue this journey of building my own incubator, I asked my partner in crime, Antoine J., to help me with the electronics as he has now a lot of new knowledges and skills thanks to his Fab Academy diploma ;).

I put here is some personal notes of the tests we made before we complete the v0.1 but you'll find more clearly on his documentation --incubator V0.1 where we got to with this first version.

Personal Notes

The choice of the board

arduino nano

spec: store.arduino.cc/arduino-nano

Microcontroller ATmega328
Operating Voltage 5 V
Input Voltage 7-12 V
DC Current per I/O Pins 40 mA (I/O Pins)
Power Consumption 19 mA

VS

NodeMCU Amica

spec: www.make-it.ca/nodemcu-arduino

Microcontroller ESP-8266
Operating Voltage 3.3V
Input Voltage 4.5V-10V

List of materials

  • Heating Pad Adafruit 1481 - 5-12DC (I ordered my one through a local supplier in Spain: BricoGeek)
  • 12V Axial Fan (caught in the fablab)
  • humidity and temperature sensor DHT11 > tuto
  • 2X MOSFET IRL540N (I bought in Diotronic) > spec
  • diode (caught in the fablab)
  • 3x 10K resistor (caught in the fablab)

Fan 12V powered with 9V

How to test a MOSFET with a multimeter

How to use a IRFZ44N MOSFET with 3.3V

IRL540N MOSFET

Arduino IDE

const int blue = 16;
const int green = 4;
const int red = 2;

const int pinHeat = 14;
int powerHeat = 99; // 0-99
int levelHeat = map(powerHeat, 0, 99, 0, 255);

const int pinFan = 12;
int powerFan = 85; // 80-99
int levelFan = map(powerFan, 0, 99, 218, 255);

#include <dht11.h<
const int DHT11PIN = 13;
dht11 DHT11;

int targetTemp = 28;
int tempRange = 2;

void setup() {
  Serial.begin(9600);
  pinMode(blue, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(red, OUTPUT);
  pinMode(pinHeat, OUTPUT);
  pinMode(pinFan, OUTPUT);
}


void loop() {

  int chk = DHT11.read(DHT11PIN);
  float humidity = (float)DHT11.humidity;
  float temperature = (float)DHT11.temperature;

   if (temperature <= targetTemp - tempRange) {
    analogWrite(pinHeat, levelHeat);
    analogWrite(pinFan, levelFan);
    Serial.print("Heat: on / ");
    digitalWrite(red, 1);
    digitalWrite(blue, 0);
    digitalWrite(green, 0);
  } else if (temperature >= targetTemp + tempRange) {
    analogWrite(pinFan, levelFan);
    analogWrite(pinHeat, 0);
    Serial.print("Heat: off / ");
    digitalWrite(blue, 1);
    digitalWrite(red, 0);
    digitalWrite(green, 0);
  } else {
    analogWrite(pinFan, 0);
    analogWrite(pinHeat, 0);
    digitalWrite(green, 1);
    digitalWrite(red, 0);
    digitalWrite(blue, 0);
  }

  Serial.println();

  Serial.print("Humidity (%): ");
  Serial.println(humidity);

  Serial.print("Temperature (C): ");
  Serial.println(temperature);

  Serial.print("Target Temp (C): ");
  Serial.println(targetTemp);  

  delay(5000);  
}

Interface

Sketch Arduino ide

#include <ESP8266WebServer.h>
ESP8266WebServer server(80);

// WiFi AP Config
IPAddress localIp(192,168,1,1);
IPAddress gatewayIp(192,168,1,1);
IPAddress subnet(255,255,255,0);
const char *ssid="Tempeh Maker";
const char *pwd="hola hola";

// LED
#define LED_PIN 6

void setup() {
  // Setup Wifi
  Serial.begin(9600);
  Serial.println("Initializing AP...");
  if (WiFi.softAP(ssid, pwd)) {
    Serial.println("AP ready....");
    WiFi.softAPConfig(localIp, gatewayIp, subnet);
    delay(200);

  }
  server.on("/", handle_home_page);
  server.on("/led/on", handle_led_on);
  server.on("/led/off", handle_led_off);
  server.begin();
}

void handle_led_on() {
  digitalWrite(LED_PIN, HIGH);
}

void handle_led_off() {
  digitalWrite(LED_PIN, LOW);
}

void handle_home_page() {
  char body[1024];
  sprintf(body,  "ESP8266

ESP8266

ONOFF"); server.send(200, "text/html", body); } void loop() { server.handleClient();

Created 11/10/2020

Updated 11/10/2020