May 27, 2021

How to make Pulse Oximeter at Home

In our previous blog, we interfaced Pulse-Oximeter (Max30100) Module to NodeMCU. With a little bit of modification that can be upgraded to a full functioning Pulse-Oximeter. We have interfaced 0.96" I2C OLED display before. Today we made a Pulse-Oximeter using that knowledge.

Follow our previous blogs for a better understanding of the scenario.
Pulse Oximeter MAX30100 Interface with NodeMCU
OLED Display Interface with Arduino

Things we need:

  • NodeMCU
  • Max30100 Module
  • 0.96" OLED I2C Display Module 
  • Female Berg Strip Connector
  • Dot Vero Board
  • Soldering Kit
  • Nut and Bolts 1/8"
  • PVC Spacer Tube

Connection Diagram:
Now follow the diagram below to do the connections.

After the connection is done upload the code below.

Source Code:

Video:
Watch the video for a better understanding.


Reference:

[1] Sarkar, S., Ghosh, A., Chakraborty, M., & Mondal, A. (2024). Design, Hardware Implementation of a Domestic Pulse Oximeter Using IOT for COVID – 19 Patient. International Journal of Microsystems and Iot, 2(1), 469–475. https://doi.org/10.5281/zenodo.10629635

May 11, 2021

Nokia 5110 LCD Display interface with Arduino

This LCD device is mainly used in Arduino but it can be connected with any 3.3V controller. These LCDs are used in Nokia 3110/5110 cell phones. It is a very cheap monochrome LCD module made of 84 x 48 pixels. It can be used to display graphics and text together. This display is based on the PCD8544 driver.

Pin configuration of this device is almost like the 16x2 LCD module only instead of 8 data pins one serial data in (Din) pin and one clock (Clk) are there. The list of the pins and their description are listed below.

RST: Pin type active low, so 0V Resets the LCD

CE: Cheap Enable is used to enable the device before sending anything to the LCD

DC: Data/Command is used to select between Rata Register or Command Register

DIN: Data In is used to send information serially to the display. It could be Data or Command

CLK: Clock is used to synchronize the display with the controller

VCC: To power, the pin 5V or 3.3V is applied here

BL: This pin is used to power the Backlight of the display

GND: This is used to ground the device.

Things we need

  • Nokia 5110 Display
  • Arduino
  • Resistors
    1. 1k Ohms x 5 Nos.
    2. 330 Ohms / Potentiometer 1k
  • Jumper Wires
  • Bread Board

Connection Diagram:

pin 7 - Clock (CLK) pin 6 - Data In (DIN) pin 5 - Data/Command select (D/C) pin 4 - Chip Enable/select (CE/CS) pin 3 - Reset (RST)

Before you upload the code library needs to be installed. Please follow the below mention instruction to install the library.

https://creativestudio1973.blogspot.com/2019/11/introduction-to-arduino-library-manager.html

In the code below we have displayed text, then we have displayed the same text in inverted mode, after that we have rotated the text finally we displayed the ASCII table.
Source Code 1:

Video 1:


Here in the second code, we tested display by displaying an image. To display the image we have to convert the image into code. To do that open the link image2cpp
Link: http://javl.github.io/image2cpp/

Go to "Choose Files" and select the file from your computer.



Select the "Canvas Size" to 84x48 and "Scaling" as Scale to fit. Then check the preview to make sure everything is alright.

Now select the "Code Output Format" to "Arduino code" and click on "Generate code"

Finally copy the code and add that to the code below to display an image of your own.
Source Code 2:

Video 2:

May 03, 2021

Pulse Oximeter MAX30100 Interface with NodeMCU

The MAX30100 has integrated pulse oximetry and heart-rate monitor sensor integrated circuit with I2C interface. NodeMCU is mostly preferred as it is a 3.3V controller.

Components Required:
  • Pulse Oximeter MAX30100
  • NodeMCU
  • Jumper Wires
  • Bread Board
  • Soldering Kit (Optional)

Before the connection is done there is slight modification needs to be done. The board shown above has little issue with NodeMCU or any other controller. As the NodeMCU is a 3.3V controller it sends or receives I2C signals at a 3.3V logic level. MAX30100 usually comes with its I2C bus pulled up to 1.8V. This is why if you don't make any modifications, the code might not run. Although without modification, you would be able to check its I2C address but rest of the functions won't work.
Now before we go for the modification let's see the Pinout of MAX30100. It has 14 pins. The I2C bus is at Pin 2 and Pin 3 is SCL and SDA. Pin 13 is for INT (Interrupt), Pin 11 and 12 is for Power and Ground.
If we look at the module we will be able to find that Pin 2(SCL), Pin 3(SDA), Pin 5(IR_DRV), Pin 6(R_DRV), Pin 13(INT) are connected to the header. Pin 9(R_LED+) and Pin 10(IR_LED+) are connected to 3.3V. Pin 11(VDD) is connected to 1.8V. Pin12(GND), Pin4(PGND) are connected to the ground. 
Above the red marked 3 pin device is a 1.8V regulator supplying 1.8V to VDD (Pin 11) and also to the three 4.7k Ohms pull-up resistors.

Here we have three 4.7k Ohm resistor pulling up Pin 2(SCL), Pin 3(SDA), Pin 13(INT) up to 1.8V. Here we have to make a change and we have to pull these pins up to 3.3V to connect them with NodeMCU. This could be done in two ways.

Option 1: Remove them and connect 3 external 4.7k Pull up Resistors for 3.3V.

Option 2: Without removing them we will use them by making a slight change in the module. To do that at first with a help of a sharp cutter we will disconnect them from the 1.8V pin of the regulator. Just make a cut at the Red marked position shown in the image below. To make sure the disconnection is complete check continuity using a Multimeter. Do it carefully so that no damage happens at any other part of the device.
Then Connect the points shown below. Make sure during soldering no other points get connected.
If the above step is difficult for you then you can connect these two. Both the pins are 3.3V so they won't make any difference.
For me the first option was easier so after mofification my module looks like this.



Connection Diagram:
Now connect the pins accordingly.
  • VIN to nodeMCU 3.3V Pin
  • SCL to nodeMCU D1 Pin
  • SDA to nodeMCU D2 Pin
  • INT to nodeMCU D0 Pin
  • GND to nodeMCU GND Pin
Before you upload the code library needs to be installed. Please follow the below mention instruction to install the library.
https://creativestudio1973.blogspot.com/2019/11/introduction-to-arduino-library-manager.html

Source Code:

Video:

Datasheet:
https://datasheets.maximintegrated.com/en/ds/MAX30100.pdf

Reference:
[1] Sarkar, S., Ghosh, A., Chakraborty, M., & Mondal, A. (2024). Design, Hardware Implementation of a Domestic Pulse Oximeter Using IOT for COVID – 19 Patient. International Journal of Microsystems and Iot, 2(1), 469–475. https://doi.org/10.5281/zenodo.10629635

May 02, 2021

Light Sensor BH1750 Interface with Arduino

Light Intensity is an important parameter. This could be measured by various components (eg. LDR) with proper calibration. This is why BH1750 is easy to use. It has an I2C interface so data could be extracted easily using the I2C Bus.


Things we need:
  • BH1750
  • Arduino
  • Jumper Wires
  • Bread Board (Optional)
Connection Diagram:
Connection is very simple, BH1750 has five pins Vcc, Gnd, SCL, SDA, Addr. Connect the pins accordingly.
  • VCC pin to Arduino 5V
  • GND pin to Arduino Ground
  • SCL pin to Arduino A5
  • SDA pin to Arduino A4
Once the connection is done open Arduino IDE and upload the code below.

Before you upload the code library needs to be installed. Please follow the below mention instruction to install the library.
https://creativestudio1973.blogspot.com/2019/11/introduction-to-arduino-library-manager.html

Source Code:

Video:

May 01, 2021

Dot Matrix Display Interface with Arduino using MAX7219 Driver

In our previous blog, we discussed interfacing of Dot Matrix Display with Arduino and found out that the process consumes lots of Arduino pins. To solve this issue we will use a driver IC. With help of this driver IC, we will control an 8x8 Dot Matrix Display using only 3 I/O pins. 

The module has five pins. Their descriptions are given below.
VCC  - 5V
GND  - Ground
DIN    - Data In
CS      - Chip Select
CLK   - Clock

Materials Required:
  • Dot Matrix Display Module
  • Jumper Wires
  • Arduino
Circuit Diagram:
  • VCC pin to Arduino 5V pin
  • GND pin to Arduino GND pin 
  • DIN pin to Arduino Pin 11
  • CS pin to Arduino Pin 7
  • CLK pin to Arduino Pin 13

Connect the display module with Arduino as shown above. After the connection is complete then upload the program. You should find the result as shown in the below video.

Source Code:

In this second version, the array is introduced. Using array we can store multiple values in a variable. This allows us to make the code short. If you go through the resulting video you will find that this second version is more complex sill the code size is less. 

Source Code 2:
Video: 

Video 2:

Dot Matrix Display Interface with Arduino

Dot Matrix displays are categorized upon their number of rows and number of columns and size of pixels. Usually, dot matrix displays come in the square shape of 8x8 LEDs but here we are going to demonstrate a 7x5 LEDs Display. The benefit of a dot matrix display is that you will be able to display characters or images using this. The process shown here is very simple to understand but the drawback is that this process consumes lots of pins. If you look at the Arduino in the video below you will see that 12 digital I/O pins are used to control one display. For come controllers, we might not have 12 I/O pins at all. The process of overcoming this scenario we will discuss in our next blog.

Things we need:
  • Arduino
  • 7x5 Dot Matrix Display
  • 330 Ohms - 7 Nos
  • Dot Vero (KS-100) or Bread Board
  • Jumper Wires
  • Soldering Kit (Not required for Bread Board)

Connection Diagram:

Connect the pins as described then upload the code below. The first code is about displaying a heart in portrait mode and the second code is about displaying the same heart in landscape mode. Check the results in the video below.

Source Code:

Video: