Star Trek: Real Working Sick-Bay – Build #1

This article supports a video on the build of the Star Trek Sick Bay project (external you tube link). You should watch that video as well as this article as it contains information not mentioned below. This is part one of a two part write up. Doing all this on one video/article would be too much at once and so has been broken down into to chunks.

Parts List (Ignoring wires/ breadboard etc.)

  • Arduino (Nano used, but Uno or Mega would also be fine)
  • MAX30100 Heart rate sensor/O2 sensor
  • DS18B20 (Temperature sensor – 2 required)
  • TFT Screen (ILI9341, SPI, 320×240 pixels, 2.4″ or 2.8″ are common)
  • DF Player Mini (MP3 player)
  • SD card – smallest you can find as very small file stored on it.
  • 4 to 8 Ohm 3Watt Speaker
  • Small tactile push switch
  • 4K7 Resistor (4 required)
  • Breadboard

Affiliate list (if you want to order from Amazon UK and support this channel)

Arduino Nano : https://amzn.to/2XmDDLT
TFT LCD : https://amzn.to/2YAGEo4
MAX30100 blood oxygen/pulse : https://amzn.to/2YnWR04
DS18B20 Temp sensors : https://amzn.to/2FMF37D
DFPlayer Mini (MP3 player) : https://amzn.to/2YrrXnx
Speaker : https://amzn.to/2FMFoqV
Push Button (multi pack) : https://amzn.to/2J5Tp4V
Breadboard : https://amzn.to/2xrHh7L
Wires : https://amzn.to/2FO7wtx

Tools
Due to some very tiny alterations to the MAX30100 board to get it to work with the Arduino you will need access to a soldering iron.

References
The body core temperature is derived from an equation based on the research paper published by Loughborough University (UK), here’s the link.

Circuit Diagram

Star Trek Arduino Based Sick Bay Circuit Diagram

Required Software Libraries
Several libraries are required to allow the source code (listed later) to work with the hardware. The list is below, typing these into the search of the Arduino IDE’s Library Manager should bring up the correct library, but double check the video linked to at the start to double check.

  • Adafruit ILI9341 LCD driver
  • Adafruit Graphics Library
  • Dallas DS8B20 temperature sensor
  • MAX30100 Pulse Oximeter

Building a bit at a time
This is a reasonably complex project for a beginner or intermediate builder and you should build and test each module in stages otherwise discovering what has gone wrong can be very difficult. Therefore use the video to help you build the various stages and the code below is used in the video for the various tests.

The ILI9341 Screen
One of the two more complex items to get working (the other being the pulse/oxygen sensor itself). First there are a lot of wires to connect and secondly there are conflicting accounts of whether to solder a jumper pad together. Wire it up as shown above and then follow the video for testing, if yours does not work then firstly double check your connections and then try connecting the two solder pads together. The test for this screen is the standard Adafruit graphics test as shown in the video.

The Max30100 Pulse-oximeter
Below is a picture of the sensor used.

The MAX30100 Pulse Oxygen sensor

They do need a small hack to work with Arduino which is covered in the video. But basically you need to remove the three 472 resistors shown above and add some 4K7 ones to your breadboard/prototype board. There is a version of the MAX30100 board that is supposed to not need this hack but I failed to get it to work with my set-up so I’ve ignored it for now. Note the external 4.7K resistors in the circuit diagram, this is explained on the video, but basically it allows our 5V Arduino to talk with this 3.3V sensor.

In the past when I’ve covered this sensor more than one person has asked if this is strictly necessary and the unfortunate truth is the sensor will not work with our Arduino unless these alts are done. See the video to see the resistors being removed.

Download the testing code below which presumes you have correctly got your screen working – as the results of the test will be displayed there.

End of part 1
In the next installment we’ll look at getting the two Dallas 18DB20 temperature sensors working together and setting up and using the DF Player Mini MP3 Player.