Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Environmental and Position Tracking System

Image of Arduino UNO Based Environmental and Position Tracking System

Circuit Documentation

Summary

The circuit in question is designed around an Arduino UNO microcontroller and includes a GPS NEO 6M module, a MKE-S14 DHT11 Temperature and Humidity Sensor, an ADXL345 accelerometer from Keystudio, and a MAX30102 pulse oximetry and heart-rate sensor. The Arduino UNO serves as the central processing unit, interfacing with the sensors and modules to collect and process data such as location, temperature, humidity, acceleration, and heart rate. The circuit is powered through the Arduino's voltage input pins, and sensor data is communicated to the Arduino via digital and analog pins. The embedded code provided facilitates the initialization and reading of sensor data, which is then output through the Arduino's serial interface.

Component List

Arduino UNO

  • Microcontroller board based on the ATmega328P
  • Features digital I/O pins, analog input pins, and various power pins

GPS NEO 6M

  • GPS module for satellite navigation
  • Communicates with the Arduino via serial interface

MKE-S14 DHT11 Temperature and Humidity Sensor

  • Sensor for measuring ambient temperature and humidity
  • Provides digital signal output to the Arduino

ADXL345 Keystudio

  • A digital accelerometer providing motion sensing on three axes
  • Uses I2C communication protocol

MAX30102

  • Integrated pulse oximetry and heart-rate monitor sensor module
  • Uses I2C communication protocol

Wiring Details

Arduino UNO

  • Vin connected to the 5V power supply lines of GPS NEO 6M and ADXL345 Keystudio
  • 3.3V connected to the VIN of MAX30102
  • GND connected to the ground lines of all components
  • A4 (SDA) connected to the SDA lines of ADXL345 Keystudio and MAX30102
  • A5 (SCL) connected to the SCL lines of ADXL345 Keystudio and MAX30102
  • D3 connected to the SIG pin of DHT11 Temperature and Humidity Sensor
  • D4 connected to the RX pin of GPS NEO 6M
  • D5 connected to the TX pin of GPS NEO 6M

GPS NEO 6M

  • VCC connected to the 5V power supply
  • GND connected to the ground
  • TX connected to Arduino's D5
  • RX connected to Arduino's D4

MKE-S14 DHT11 Temperature and Humidity Sensor

  • SIG connected to Arduino's D3
  • 5V connected to the 5V power supply
  • GND connected to the ground

ADXL345 Keystudio

  • 5V connected to the 5V power supply
  • GND connected to the ground
  • SDA connected to Arduino's A4
  • SCL connected to Arduino's A5

MAX30102

  • VIN connected to Arduino's 3.3V
  • GND connected to the ground
  • SDA connected to Arduino's A4
  • SCL connected to Arduino's A5

Documented Code

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
#include <DHT.h>
#include <SoftwareSerial.h>

// Pin definitions
#define HEARTBEAT_PIN A0
#define DHT_PIN 3
#define GPS_RX_PIN 4
#define GPS_TX_PIN 5

// DHT11 setup
#define DHTTYPE DHT11
DHT dht(DHT_PIN, DHTTYPE);

// ADXL345 setup
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);

// GPS setup
SoftwareSerial gpsSerial(GPS_RX_PIN, GPS_TX_PIN);

void setup() {
  Serial.begin(9600);
  gpsSerial.begin(9600);
  dht.begin();
  if (!accel.begin()) {
    Serial.println("No ADXL345 detected!");
    while (1);
  }
  Serial.println("Setup complete.");
}

void loop() {
  // Read heartbeat sensor
  int heartbeat = analogRead(HEARTBEAT_PIN);
  Serial.print("Heartbeat: ");
  Serial.println(heartbeat);

  // Read DHT11 sensor
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.println(" *C");

  // Read ADXL345 sensor
  sensors_event_t event;
  accel.getEvent(&event);
  Serial.print("X: ");
  Serial.print(event.acceleration.x);
  Serial.print(" \tY: ");
  Serial.print(event.acceleration.y);
  Serial.print(" \tZ: ");
  Serial.print(event.acceleration.z);
  Serial.println(" m/s^2");

  // Read GPS data
  while (gpsSerial.available()) {
    char c = gpsSerial.read();
    Serial.print(c);
  }

  delay(2000); // Delay for 2 seconds
}

This code initializes and reads data from the connected sensors, then outputs the readings through the Arduino's serial port. It includes setup and loop functions, which are standard in Arduino programming. The setup function initializes the serial communication, sensors, and checks for the presence of the ADXL345 accelerometer. The loop function reads data from the heartbeat sensor, DHT11, ADXL345, and GPS module, then prints the values to the serial monitor.