Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Components and supplies

Assessing Sensor Accuracy: External vs Body Temperature Comparison
Maxim Integrated DS18B20 Programmable Resolution 1-Wire Digital Thermometer
×1
Assessing Sensor Accuracy: External vs Body Temperature Comparison
DHT11 Temperature & Humidity Sensor (3 pins)
×1
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Resistor 10k ohm
×3
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Jumper wires (generic)
×10
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Adafruit Waterproof DS18B20 Digital temperature sensor
×1
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Test Probe Connector, Crocodile Clip
×3
Assessing Sensor Accuracy: External vs Body Temperature Comparison
USB-A to Mini-USB Cable
×1
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Arduino UNO
×1
Assessing Sensor Accuracy: External vs Body Temperature Comparison
micro:bit BBC micro:bit board
×1

Apps and online services

Assessing Sensor Accuracy: External vs Body Temperature Comparison
Arduino IDE
Vittascience platform for micro:bit

About this project

Different sensors are used to get temperature data, they all have different limitations and accuracy. For health-based projects it is extremely important to get the most precise values of both external and body temperature in order to get a realistic view on the state of health and any recommendations. For this reason I decided to compare the precision of the most popular temperature sensors and micro:bit temperature sensor.

For this project I took temperature sensors DS18B20, waterproofed DS18B20, AM2302, arduino and micro:bit boards and standard thermometers.

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Firstly, I connected the sensors to the arduino board (see Schematics part) and that's how they look connected:

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Then I uploaded the code for arduino board (see Code part) and I used the platform Vittascience (https://en.vittascience.com/microbit/) to generate a code for this project:

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Here's the results when we check room temperature (10 experiments were provided, analysis of the data from the experiment with the most representative data is shown below):

Assessing Sensor Accuracy: External vs Body Temperature Comparison
Assessing Sensor Accuracy: External vs Body Temperature Comparison
Assessing Sensor Accuracy: External vs Body Temperature Comparison

Room thermometer showed the value 21°C, which we consider as the most precise one. Micro:bit showed the value of 27°C, which is very far from correct values. All three connected to arduino board sensors were quite accurate in showing room temperature, but sensor AM2302 showed the highest accuracy.

Here's the results wen we check body temperature, using extra wires to be able to keep sensors in my hand (10 experiments were provided, analysis of the data from the experiment with the most representative data is shown below):

* thermometer value: 32.2°C

Assessing Sensor Accuracy: External vs Body Temperature Comparison

* micro:bit value: 34°C

* waterproofed sensor 18B20 (third column): 32.40°C

Assessing Sensor Accuracy: External vs Body Temperature Comparison

* sensor DS18B20 (first column): 31.50°C

Assessing Sensor Accuracy: External vs Body Temperature Comparison

* sensor AM2302 (second column): 33°C

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Hence, waterproofed sensor 18B20 showed the most precise values and should be used for taking body temperature and sensor AM2302 is the best for taking room temperature.

Code

  • Code for arduino and temperature sensors
  • Code for micro:bit
Code for arduino and temperature sensorsC/C++
#include <SoftwareSerial.h>
#include <cactus_io_AM2302.h>
#define AM2302_PIN 3
#include "cactus_io_DS18B20.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
AM2302 dht(AM2302_PIN);
int DS18B20_Pin = 4;
DS18B20 ds(DS18B20_Pin);

void setup() {
  Serial.begin(9600);
  ds.readSensor();
  dht.begin();
  sensors.begin();
  Serial.println("18B20  |  AM2302  |  DS18B20");
  Serial.println("Temp (C) | Temp (C) | Temp (C)");
}

void loop() {
  ds.readSensor();
  sensors.requestTemperatures();
  dht.readTemperature();
  
  if (isnan(dht.humidity) || isnan(dht.temperature_C)) {
    return;
  }
  
  Serial.print(sensors.getTempCByIndex(0)); Serial.print("      "); Serial.print(dht.temperature_C); Serial.print("      "); Serial.println(ds.getTemperature_C()); 

  delay(1500);

}
Code for micro:bitPython
from microbit import *

uart.init(baudrate=9600, bits=8, parity=None, stop=1, tx=pin8, rx=pin14)


while True:
  if button_a.is_pressed():
    uart.write(str(temperature()))

Schematics

Assessing Sensor Accuracy: External vs Body Temperature Comparison

Manufacturing process

  1. HDC2080 Digital Humidity & Temperature Sensor: Circuit Diagram, Specs & Applications
  2. Connect Multiple DS18B20 1‑Wire Sensors to a Raspberry Pi for Accurate Temperature Monitoring
  3. How to Connect a DS18B20 One‑Wire Digital Thermometer to a Raspberry Pi – A Step‑by‑Step Guide
  4. Build a Multi‑Sensor Temperature & Light Monitoring System with Raspberry Pi & DS18B20
  5. Testing the DS18B20 Temperature Sensor on Raspberry Pi
  6. Mastering Raspberry Pi Sensor & Actuator Control: Accelerometer, Servo, and Data Streaming
  7. Digital Light Sensor – Power an LED with Ambient Light Using Windows 10 IoT Core
  8. Arduino UNO: Distance Measurement Using HC‑SR04 Ultrasonic Sensor and Adafruit OLED Display
  9. DS18B20 1-Wire Digital Temperature Sensor: Pinout, Key Features & Practical Applications
  10. High-Precision Spindles & Advanced Processing Technologies