In this tutorial, I am going to explain the making of a temperature and humidity sensor using Arduino pro mini board with DHT11 (or DHT22) sensor.

Step 1: Watch the Video

It is important to see the video first before moving to the next step. The video explains everything and demonstrates how it is done. However, in this post, I will write more technical data and details.

1- I have used a 6-pin ICSP adapter to program the Arduino pro mini since it doesn't come with one on board. it is J2 at schematic.

2- R2 is 100 Ohms and it sets the brightness of the LCD. Basically, you could put more resistance than 100R if you want the LCD backlight to be dimmer. Or better yet, get a potentiometer to act as a variable series resistance.

3- JP1 is just a connector which has a nice PCB footprint. I never put an actual terminal but instead soldered the wires. Do as you like.

4- U2 is the battery connection terminals. Here, I prefer a nice screw terminals to get firm connection. You could solder the wires, but be sure to put enough solder to make the connection solid enough to withstand any shakes.

5- LCD1 is the LCD component in easyEDA. It has the basic connection to Arduino pro mini. Be sure that pins here are identical to the ones in software.

6- RV1 is a 10K potentiometer to set LCD contrast. It should be used only once and it is when you first power the LCD.

Step 4: PCB Design

After finishing the schematic design and understand what everything means, it is now time for making a PCB for it.

You should press "Convert to PCB" in EasyEDA to create the PCB in PCB editor. Then, start placing parts and doing routing as usual. I suggest never using the auto-router though.

I have used lots of vias to move from top to bottom layer since the space is so little.

Attachments

Step 5: Fabricate the PCB

Now, the PCB design is finished. We checked everything and no problem found. We need to send the design files (the gerbers) to the PCB fabrication company of our choice so it can do it for us.

My company of choice is JLCPCB. They are the best for such projects and prototyping and they offer just 2$ of price for an entire 10 pieces of your design!

So, now we click (....) and choose JLCPCB. We are directed to JLCPCB website since they are partners with EasyEDA. Now fill in everything and place the order. Now just wait until PCBs arrive.

It is worth mentioning that JLCPCB not only have EasyEDA associated with them, but they also have a big components store as well! The benefit here is getting both the PCB order and components order shipped together! Yes, no need to wait for 2 packages to arrive separately, but instead they come combined in one package. I highly recommend using this.

Step 6: Assembly

We have the PCBs alone with everything now. It is time to assemble everything together.

First, we need to solder the electronics according to schematic. It is an easy task for this project.

After finishing soldering, now cut the necessary holes in the plastic enclosure then fix the PCB with other components well inside using hot glue gun.

You should now use the potentiometer to adjust the contrast of the LCD, while choosing the required resistor valve for the brightness, I have chosen 100R.

Step 7: Code

Code for this project is attached with this step, and the explanation is as follows:

Finally, we display these values on LCD display. You can change it the way you want because it is simply printing values inside "h" and "t" variables. Putting a delay of 2 seconds is kinda optional but you won't benefit much from doing it faster since the sensor itself is not that fast and even if it is, still the physical values never change that fast. So 2 seconds are very very fast for the job!