ENGR351 Lab 2020 Fall
Final Project - Temperature Recorder
Name:
Ryan Jeanes
Email: rejeanes@fortlewis.edu

PCB Design for Recording Temperature and Uploading to Thingspeak
Introduction

In order to have a more compact, deployable, design a PCB was designed for an earlier project. This PCB records temperature and uploads the readings to Thingspeak over a WiFi connection.

Methods and Materials

The PCB was designed with onboard voltage regulators to take a voltage input range of 7-12VDC to power the modules. The two ATMEGA328P-AU had code uploaded, where one processor was the master processor, that took readings from the DS18B20 temperature sensor and sent that data over SPI to the slave processor, which uploaded that data to Thingspeak over WiFi using the ESP8266. The code uploaded to the processors is shown here, and the schemtic is shown in Figure 1. The reset pins on the ATMEGA328P-AUs were pulled up to 5V with 10kOhm pullup resistors to prevent unwanted reboots that can occur with a noisy voltage signal if the reset pin is left floating.


Table 1 - Parts used in the PCB design
Part
Quantity
DC Barrel Power Jack (PJ-202A)

3.3V/1A Voltage Regulator (NCP1117ST33T3G)
1
5V/1A Voltage Regulator (NCP1117ST50T3G)
1
0.1uF Capacitor (C0603C104Z3VACTU)
2
1.0uF Capacitor (CL10A105KP8NNNC)

100uF Capacitor (EEE-HC1C101XP)
1
LED (LTST-C191KFKT)
1
470 Ohm Resistor (RC0603JR-07470RL)
1
1kOhm Resistor (2997-CR16102JTR-ND)
1
2kOhm 0603 resistor
1
5kOhm 0603 resistor
1
10kOhm resistor (13-RE0603BRE0710KLTR-ND)
1
1KV/1A Diode (1N5007-TP)
4
1P2T SPDT Vertical Slide Switch
1
ATMEGA328P-AU
2
16MHz Crystal Oscillator SMD (22pF capacitors included)
2
DS18B20 Temperature Sensor
1
Adafruit SSD1306 OLED
1
ESP8266 WiFi Module
1


Figure 1 - Schematic of the board used in this project
Figure 1 - Schematic of the board used in this project

Results

The master processor was succesfully buffering information to the OLED display, and the slave processor seemed to be communicating to the ESP8266 over serial. There was an error in the footprint of the DS18B20 design that did not allow female pin headers to be soldered, so the DS18B20 had to be soldered to the board instead. During runtime, the DS18B20 was sending error code -127 to the master processor, signalling a bad connection. The pins and connections were checked and measured throughout the board, and all the modules are receiving proper voltage and power. However, despite seeing nothing to indicate a poor connection for the DS18B20, the error persists. The powered PCB with the error displayed on the OLED is shown in Figure 2.

Figure 2 - Powered PCB with display error
Figure 2 - Powered PCB with 127 DS18B20 connection error displayed on the OLED


Discussion

It is possible that the DS18B20 was damaged by heat during the soldering process, as there was no issue with the soldering, and the DS18B20 was connected in the circuit as per the schematic of the sensor. The DQ pin was being pulled up to 3.3V, and the sensor itself was receiving 3.3V, as well as the ESP8266. The issue, then, is not like to be the power supply for the board, since other components appear to be functioning as intended. Despite the board not having buttons, due to being too tired to remember to add buttons to the PCB design, the wifi credential problem itself was solved using two push buttons. Even though the PCB used is this project did not have buttons on them, for future iterations of this PCB the updated schematic and board design are shown in figures 3 and 4. The code for both the master and slave processors that utilize buttons to change the wifi credentials can be found here. For both the PCB design used in this project, as well as the updated design in figures 3 and 4, there is room for improvement. The biggest one being that if SMD variants of the SSD1306 OLED and ESP8266 are not being used, there is a lot of unused space below these modules. To make the design more compact and printed on a smaller board, the female pin headers can be moved to a more central location, and the master and slave processor can be placed south of the pin headers, relative to the board design. The buttons could be moved to the left side of the board, instead of at the bottom as they are shown in figure 4.


Figure 3 - Updated schematic
Figure 3 - Updated schematic with button circuitry

Figure 4 - Updated board design to include buttons
Figure 4 - Updated board design to include buttons