This is only a preview of the December 2021 issue of Silicon Chip. You can view 0 of the 112 pages in the full issue. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Hummingbird Audio Amplifier":
Items relevant to "SMD Trainer Board":
Articles in this series:
Items relevant to "Digital Lighting Controller Translator":
Items relevant to "Orrery (planetarium) using a Micromite LCD BackPack":
Items relevant to "Non-contact cloud-based temperature sensor with speech":
Items relevant to "USB Cable Tester – Part 2":
Purchase a printed copy of this issue for $11.50. |
Non-contact cloud-based temperature sensor with speech
To help track the health of the
employees in our department, I have
created this non-contact temperature
sensor at the entry point. All you need
to do is place your forehead close to
it (within 2-5cm), and it measures
your body temperature and plays back
audio to indicate whether it is normal
or high. It also uploads the data to a
cloud server (www.thingspeak.com)
for later analysis.
It uses an HC-SR04 ultrasonic sensor
to measure the distance to the person.
Once that distance is close enough, it
measures the temperature, plays back
an audio file depending on the reading,
then uploads the data to the internet. If
it detects that someone is nearby, but
not close enough (between 5cm and
78
Silicon Chip
15cm), it plays back an audio file asking them to approach closer.
The ESP32 has two digital-to-analog
(DAC) outputs at pins 9 & 10 (IO25/26).
Audio playback in this case is from pin
9. One of two 8kHz PCM (pulse-code
modulated) audio files is played back
depending on whether the temperature measurement is below or above
37°C. A special Arduino library is used
for this capability (XT_DAC_Audio
from xtronical.com).
A small 5V audio amplifier using
the PAM8403 IC is used to deliver this
sound to a 3W 8W loudspeaker.
The ESP32’s WiFi capability is used
to upload the temperature data to the
cloud server at www.thingspeak.com
The Arduino sketch to load onto
Australia’s electronics magazine
the ESP32 is available for download
from siliconchip.com.au/Shop/6/6052
You will need to open a free account
at www.thingspeak.com and modify
the API key in the software to match
the one you are supplied with before
it will upload data.
It supports multiple WiFi networks
with separate SSIDs and passwords,
so that whichever one is found will
be used to transfer data to the cloud.
You will need to modify the SSID and
Password section of the sketch to contain your network details.
The circuit uses two ESP32 modules; one is dedicated to handling
the audio playback while the other
monitors the temperature and distance sensors and drives the display.
siliconchip.com.au
The voice-handling module is programmed to play back one of the
two sound files when pin 28 or 29 is
brought high, and these pins have pulldown resistors to prevent audio playback at power-up or when the other
micro is reset.
The main ESP32 connects to the
ILI9163 colour TFT display via an
SPI serial bus, the HC-SR04 ultrasonic
ranger via a two-pin digital interface
and the MLX90614 IR temperature
sensor via an I2C serial bus.
As well as playing back the appropriate sound file, the unit also lights
the red or green LED (red = high temperature, green = normal temperature),
and it sounds the connected piezo
buzzer if the temperature is high.
Both the ESP32s may be powered
from one 5V DC power supply.
The audio data I have created is in
the files “fever.h” and “ok.h”, while
the file that is played when someone
is not close enough for measurement
is in “wel.h” (short for “welcome”). To
change this, first record your desired
audio to 8kHz, 16-bit WAV files.
You then need to change these files
to HEX format. There are many online
sound converter sites such as www.
fromtexttospeech.com that can do this.
You then need to convert the HEX
data to C code by using the software
HxD from www.mh-nexus.de which
produces a simple text file that you
can use to replace “fever.h”, “ok.h”
or “wel.h”.
You can see the data recorded on
my cloud server at www.thingspeak.
com/channels/1371171
Besides showing the temperature
readout on the screen, it also shows
a letter code in the lower-left corner. C = Connected to WiFi, U = Data
Uploaded, D = Distance measurement.
Any form of ESP32, ESP32S or
ESP32 S2 module will work for this
project.
Bera Somnath,
Vindhyanagar, India. ($100)
Editor’s note: while normal body temperature is generally considered to be
36.5-37°C, it is possible to measure
above 37°C without being ill. Some
people are simply hotter than others,
and exertion and other factors can
affect your core temperature to a certain extent.
That time of year is nearly here...
CHRISTMAS
Spice up your festive season
with eight LED decorations!
Tiny LED Xmas Tree
54 x 41mm PCB
SC5181 – $2.50
Tiny LED Cap
55 x 57mm PCB
SC5687 – $3.00
Tiny LED Stocking
41 x 83mm PCB
SC5688 – $3.00
Tiny LED Reindeer
91 x 98mm PCB
SC5689 – $3.00
Tiny LED Bauble
52.5 x 45.5mm
SC5690 – $3.00
Tiny LED Sleigh
80 x 92mm PCB
SC5691 – $3.00
Tiny LED Star
57 x 54mm PCB
SC5692 – $3.00
Tiny LED Cane
84 x 60mm PCB
SC5693 – $3.00
We also sell a kit containing all
required components for just
$14 per board ➟ SC5579
siliconchip.com.au
Australia’s electronics magazine
December 2021 79
|