Skip to the content
2 layers61 × 60 mmThrough Hole Card, the printed circuit board in 3D

A monitoring system for detecting package damage in cargo transportation by logging G-force, temperature, pressure, and humidity data upon impact events.

Size
61 × 60 mm
Copper layers
2
Thickness
1.6 mm
Parts
8
Nets
32
Pads
59
Tracks, vias
81, 1
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
30 Jan 2024
Updated
26 Jan 2025

Overview

Through Hole Card is an open-source printed circuit board by onurkarakoc79, from the onurkarakoc79/Cargo-Damage-Detection-System repository on GitHub. It is a 2-layer board of 61 × 60 mm with 8 parts on 32 nets, routed with 81 tracks and 1 via.

Its parts include 1 IC and 1 connector.

README

README.md

Cargo Damage Detection System

Project Overview

This project is designed to detect and analyze potential causes of damage to packages during transportation by cargo firms. By monitoring environmental factors such as G-force, pressure, moisture, and temperature, the system determines whether the package has been mishandled or subjected to conditions likely to cause damage.

The system records data when a threshold G-force is exceeded, indicating a possible impact or mishandling event. The collected data is stored on an SD card for later analysis to identify the environmental conditions leading to the damage.

Features

  • G-Force Detection: Continuously monitors acceleration and triggers data logging when a predefined threshold is exceeded.
  • Environmental Monitoring: Records pressure, moisture, and temperature readings to identify potential environmental causes of damage.
  • Data Logging: Saves event data to an SD card for post-incident analysis.
  • Threshold-Based Trigger: Optimized for efficient power consumption by only logging data during significant events.

Components

Hardware

  • G-force sensor: MPU6050
  • Environmental sensors: BME280 for pressure, temperature, and humidity
  • Real-Time Clock: DS1302 RTC
  • Microcontroller: ESP32S3
  • SD card module for data storage
  • Power source (battery or USB)

Software

  • Code written in C++ for microcontroller programming
  • Arduino IDE or PlatformIO used for development and debugging
  • Libraries for sensor interfacing, real-time clock, and SD card handling

How It Works

  1. The system initializes all sensors and prepares for data collection.
  2. G-force monitoring: The MPU6050 continuously checks for motion events exceeding the threshold.
  3. When motion is detected, environmental data is collected from the BME280 (temperature, pressure, and humidity) and the current timestamp from the DS1302 RTC.
  4. Data is formatted into a message and stored on the SD card in CSV format for later analysis.
  5. The system then enters a low-power sleep mode until the next event.

Installation and Setup

Hardware Assembly

  1. Connect the MPU6050 to the ESP32S3 via I2C (SDA and SCL).
  2. Connect the BME280 to the ESP32S3 via I2C.
  3. Connect the DS1302 RTC to the ESP32S3 using the RTC data, clock, and reset pins.
  4. Attach the SD card module to the ESP32S3.
  5. Ensure proper power supply connections to all components as per the provided PCB schematic.

Software Setup

  1. Clone this repository to your local machine:
    bash
    git clone https://github.com/onurkarakoc79/Cargo-Damage-Detection-System
  2. Open the project in the Arduino IDE or PlatformIO.
  3. Install the required libraries:
    • Wire.h for I2C communication
    • Adafruit_Sensor.h for BME280
    • Custom libraries for MPU6050, DS1302 RTC, and SDCard
  4. Upload the code to your ESP32S3 microcontroller.
  5. Insert an SD card into the SD card module.

Data Format

The system logs data in CSV format for easy analysis. Each log entry includes the following fields:

  • Timestamp: Current time recorded by the RTC
  • Temperature (°C): Ambient temperature
  • Pressure (hPa): Barometric pressure
  • Altitude (m): Altitude derived from pressure
  • Humidity (%): Relative humidity
  • Acceleration (g): X, Y, and Z-axis acceleration values

Example Data Format

TimestampTemperature (°C)Pressure (hPa)Altitude (m)Humidity (%)AccX (g)AccY (g)AccZ (g)
2025-01-25 12:0022.51013.2550.2450.98-0.12-1.19
2025-01-25 12:0123.01013.3050.3461.120.08-1.22

Applications

  • Package monitoring for logistics and cargo firms
  • Root cause analysis for damaged goods
  • Real-time quality control in shipping environments

Contribution

Contributions are welcome! Feel free to open an issue or submit a pull request to improve this project.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

If you have any questions, feedback, or inquiries related to the project, feel free to reach out to me:

My personal mail: onurkarakoc79@gmail.com

I appreciate your interest in my projects and look forward to collaborating with you in the fascinating field of scientific exploration and discovery.

Parts

8
QtyValueFootprintReferences
2MountingHole_PadMountingHole:MountingHole_2.2mm_M2_PadH1, H2
1Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1~Adafruit_Sensors:SDCardSD_CARD1
1~Adafruit_Sensors:MPU6050MPU6050_1
1~Adafruit_Sensors:BME280BME280_1
1~ESP32-C3-DEVKITC-02:ESP32-WROOM-32U3
1~Adafruit_Sensors:DS1302_RTC_MODULERTC_DS1302_1

Similar boards

  • 2 layers20.5 × 24.8 mmPi interface, the printed circuit board in 3D

    Pi interface

    opulo-inc/lumenpnp

    The LumenPnP is an open source pick and place machine.

    8 parts3.7k
  • 2 layers59.9 × 25.7 mmBuffer, the printed circuit board in 3D

    Buffer

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    8 parts1kGPL-3.0
  • 2 layers52 × 12.6 mmUSB, the printed circuit board in 3D

    USB

    shanteacontrols/OpenDeck

    A platform for building interactive control and sensing devices using MIDI and OSC built with Zephyr RTOS.

    8 parts960Apache-2.0
  • 2 layers87.5 × 48.5 mm7 input macropad, the printed circuit board in 3D

    7 input macropad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    8 parts915
  • 2 layers36.2 × 63.1 mmPicoMemcard pico, the printed circuit board in 3D

    PicoMemcard pico

    dangiu/PicoMemcard

    Emulating PSX Memory Card (or controller) using a Raspberry Pi Pico

    8 parts694GPL-3.0
  • 2 layers36 × 10 mmPCB4-PWR BTN Rev.A, the printed circuit board in 3D

    PCB4-PWR BTN Rev.A

    OLIMEX/DIY-LAPTOP

    Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop

    8 parts578Apache-2.0

Questions

How big is the Through Hole Card PCB?

It measures 61 × 60 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Through Hole Card use?

8 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Through Hole Card KiCad files?

From the onurkarakoc79/Cargo-Damage-Detection-System repository on GitHub, at the commit this page was made from: the board is PCB Card/Through-Hole-Card.kicad_pcb and its schematic PCB Card/Through-Hole-Card.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Through Hole Card design in my own project?

Its repository states no licence, so its author keeps all rights: ask onurkarakoc79 before reusing the design.