Body Temperature Information Exchange Support Device
2022-09-01 | By M5Stack
License: General Public License Arduino
* Thanks for the source code and project information provided by @Keita Kaneko
Hardware components
Amazon Web Services AWS IoT EduKit
Sigfox module for M5Stack
M5Stack ESP32 Basic Core IoT Development Kit
M5Stack Thermal Camera Unit (MLX90640)
M5Stack PLUS Module Encoder Module with MEGA328P 500mAh (This can be achieved with other battery modules.)
Software apps and online services
Amazon Web Services AWS Lambda
I believe that if the vaccine for covid-19 becomes somewhat widespread, people will start to get out more.
However, it does not mean that the threat of covid-19 will disappear.
It is not realistic to have a device to check if you are in perfect physical condition wherever you go.
Ultimately, each of us needs to decide if we are willing to work with each other.
These activities will promote "reinventing healthy space".
So how do people make sure that each other is in perfect physical condition?
If PCR test kits were inexpensive, could be sold anywhere, could be tested anywhere, and gave results in 5 seconds, I would prefer to use them.
But the reality is different. So, what should I do?
At the moment, the only information we can rely on is cough and body temperature.
Of these, cough can be checked visually and audibly even when wearing a mask.
But body temperature is different. If you have a thermometer with you, you can ask the person to take it and show it to you.
However, can we judge a person's body temperature based on his or her immediate temperature without knowing his or her normal temperature?
In the end, you would want to make a judgment based on the progress of the person's body temperature information.
This project will solve this problem.
Solution
I am trying to create a device that allows device owners to easily measure their own body temperature.
Then, I will develop one that can quickly publish the recorded information to people with whom they share their activities.
The body temperature information that will be released will include previously recorded body temperature information, so it can show what the current value is in relation to the normal temperature, which varies from person to person.
With this information, the person to whom the information is disclosed will be able to determine more accurately than before whether or not to engage in the same activities as the person to whom the information is disclosed.
Characters
- User
The owner of the device developed in this project. It records one's own body temperature on a regular interval It also discloses the time-series information of one's body temperature.
- Approver
The approver checks the time-series information of the user's body temperature.
Development requirements
- Users should be able to quickly measure their own body temperature.
- Users should be able to check their body temperature on the spot.
- Users should be able to measure their own body temperature anywhere.
- Users should be able to store their temperature measurements in the cloud via the network.
- The device shall prompt the user to take his/her temperature if there is no temperature measurement or storage of temperature information for a certain period of time.
- The user should be able to give the approver a QR code with the URL of a web page where the user can check "time-series information of body temperature".
- The above QR code should be able to be displayed quickly.
- The QR code should be able to be hidden because the user may not want others to see it.
System Structure
SigFoxGateway
SigFoxGateway is responsible for sending the temperature information notified by the body temperature measurement gadget to the cloud.
It is also responsible for presenting a QR code to the approver.
The appearance is as follows.
Screen description.
1. Latest Sent Value: Displays the value of the body temperature information that was last sent to AWS.
2. Elapsed Time: Displays the elapsed time since the body temperature information was last sent to AWS.
3. Body Temperature Measurement Timer: When the timer reaches 0, a sound will be heard and "Please Measure" will be displayed in red.
4. QR CODE display: This is a link to the user's body temperature time series information on the web. For privacy reasons, it is not displayed when the gadget is started.
5. QR DISP button: Toggles between showing and not showing the QR CODE display.
Body temperature measurement gadget
The temperature measuring gadget is responsible for measuring the body temperature and sending it to the SigFoxGateway.
The appearance is as follows.
Screen description.
1. Main display: Shows the real-time measurement information of the thermal camera. Color legend is shown at the bottom of the screen.
2. Sub-display: Shows the body temperature information acquired by the "measurement butto".
3. Measurement button: Acquires and displays the temperature in the middle of the thermal camera.
4. Power OFF button: Pressing and holding this button turns off the power of the temperature measurement gadget.
5. Transmit button: Transmits the body temperature information displayed on the "Sub-Display" to the cloud via SigfoxGateway.
Body Temperature Time Series Information Disclosure Page
Time series information of body temperature is displayed.
Checking the plotted values will provide hint information for evaluating a person's physical condition.
Use Case 1: Periodic measurement of user's body temperature
1. SigFoxGateway notifies the user when it is "time to measure body temperature".
2. The user turns on the power of the "Body Temperature Measuring Gadget".
3. The user places the thermal camera of the "Body Temperature Measuring Gadget" on a place where it is easy to measure (generally the forehead or armpit, but it is important to keep measuring in the same place) and presses the "Measure" button.
4. Check your body temperature as it is displayed on the "Temperature Measuring Gadget.
5. If the measurement is correct, press the "Send" button. "The body temperature information will be sent to the cloud via the SigFox Gateway.
6. The user presses the "Power OFF" button on the "Body Temperature Measuring Gadget" to turn off the power.
Use Case 2: Disclosing time series information of body temperature to approvers
1. The user presses the "QR DISP" button on the "SigFox Gateway" to display the QR code.
2. The approver reads the QR code with any device and checks the time-series information of the user's body temperature on the web.
Development Procedure:AWS
1. configure AWS IoT Core to receive the TOPIC name "SigFox".
2. deploy a program that writes the content received from AWS IoT Core to cloud watch using AWS Lambda.
import decimal
from decimal import Decimal, ROUND_DOWN
import json
import binascii
def lambda_handler(event, context):
# get templature value from iot core via sigfox
ddata = event['data']
# to String
dataString = binascii.unhexlify(ddata).decode('utf-8')
# to Decimal
dataFloat = float(dataString)
# write to cloudWatch
client = boto3.client('cloudwatch')
client.put_metric_data(
Namespace='BodyTempInfo',
MetricData=[
{
'MetricName': 'bti',
'Value': dataFloat,
'Unit': 'None'
},
]
)
3. set up external access to the graphed content using the values written by cloud watch. This is in Japanese, but I referred to it here.
4. note down the URL of the dashboard published by cloud watch.
Development Procedure: SigFoxGateway
1. Embed Sigfox Module for M5Stack into M5Stack Core2 ESP32 IoT Development Kit for AWS IoT EduKit.
2. Download the program, replace "#define YOUR_WEBSITE_URI" with the dashboard URL published by cloud watch, build it, and write it.
3. Activate the Sigfox Module for M5Stack. It is in Japanese, but I referred to it here.
4. Set up a callback to convert sigfox packets into a data format for aws iot. The TOPIC name is "SigFox".It is in Japanese, but I referred to it here.
Development Procedure: Body Temperature Measurement Gadget
1. Install "PLUS Module Encoder Module with MEGA328P 500mAh Battery" into ESP32 Basic Core IoT Development Kit and connect "Thermal Camera Unit".
2. Write the program.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum