Introduction: CigarSaver

Hello, my name is Thibault D'Haese and i am a student at Howest Kortrijk. I'm currently in my first year of Multimedia and Communication Technology.

At the end of the year we had to make an IoT-project. For this project I came up with the idea to make a humidor that sends all its measured data to a website. For my device i chose an obvious name, CigarSaver.

Below you can read all the necessary steps that I've had to go through in order to bring the project to a succesfull outcome.

Step 1: Components and Materials

For my project I used a lot of different components to be able to bring everything to a good end. The components that i used are listed below. The total cost for this project was around €233.


Components:

  • Raspberry Pi 4 model B
  • Raspberry Pi power supply
  • Raspberry Pi T-cobbler
  • 32GB micro SD card
  • Breadboard
  • Temperature Sensor ~ DS18B20
  • Humidity Sensor ~ DHT11
  • Magnetic door switch
  • 5K Resistors
  • LCD 16x2
  • Stepper motor ~ 28BYJ-48
  • ULN2003 Driver
  • Active buzzer
  • Female to Female jumper wires
  • Male to Male jumper wires
  • Female to Male jumper wires


Materials:

  • Wood
  • Plexiglass
  • Door handle


Tools:

  • Industrial wood saw
  • Electric saw
  • Electric screwdriver
  • Soldering Iron
  • Drill

In the excel file below you can see the complete price list of all my materials.

Step 2: Database

After i figured out every component, I started to create a entity relationship diagram.

With my database you are able to see:

  • The current value if the door is open or not
  • When the door has been opened
  • History of the temperature and the current temperature
  • History of the humidity percentage and the current humidity percentage

I hosted my Database on my RPi using MariaDB.

Step 3: Creating Fritzing Scheme

After everything was figured out, it was time to put together my hardware. First i did this virtually with the computer so i could not do anything wrong which could cause a short circuit.

For creating this scheme i used the program fritzing.

Step 4: Assembling the Hardware

Once my fritzing scheme was finished and I was satisfied with it, I started putting together my hardware. I started with my temperature and humidity sensor. I did that because the sensors looked the easiest to me. The door sensor was the last thing i did of the sensors because it still had to be delivered.

After the sensors were done, I did my LCD. This wasn't that hard anymore because I have switched and encoded it already in the past.

The last step was to connect my actuators. The first actuator I connected was my buzzer. Once I succeeded I switched to the last actuator, namely, my stepper motor

You can find my code on github.

Step 5: Design Mobile First Website

In order to be able to display all the data measured by my sensors i decided to make a design in Adobe XD which I will later convert to an actual website. Through the website you can also control the humidity percentage of the humidor.

Step 6: Building the Case

Then it was time to make my enclosure. For my materials I went to the Brico and bought wood an plexiglass. I made the outside of my box from wood that i had cut by a carpenter. On the inside I put my plexiglass so you can easily see the electronic components if something went wrong.

My code can be found on github right here.