

Through Hole Card
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.mdCargo 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
- The system initializes all sensors and prepares for data collection.
- G-force monitoring: The MPU6050 continuously checks for motion events exceeding the threshold.
- When motion is detected, environmental data is collected from the BME280 (temperature, pressure, and humidity) and the current timestamp from the DS1302 RTC.
- Data is formatted into a message and stored on the SD card in CSV format for later analysis.
- The system then enters a low-power sleep mode until the next event.
Installation and Setup
Hardware Assembly
- Connect the MPU6050 to the ESP32S3 via I2C (SDA and SCL).
- Connect the BME280 to the ESP32S3 via I2C.
- Connect the DS1302 RTC to the ESP32S3 using the RTC data, clock, and reset pins.
- Attach the SD card module to the ESP32S3.
- Ensure proper power supply connections to all components as per the provided PCB schematic.
Software Setup
- Clone this repository to your local machine:
bash git clone https://github.com/onurkarakoc79/Cargo-Damage-Detection-System - Open the project in the Arduino IDE or PlatformIO.
- Install the required libraries:
Wire.hfor I2C communicationAdafruit_Sensor.hfor BME280- Custom libraries for MPU6050, DS1302 RTC, and SDCard
- Upload the code to your ESP32S3 microcontroller.
- 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
| Timestamp | Temperature (°C) | Pressure (hPa) | Altitude (m) | Humidity (%) | AccX (g) | AccY (g) | AccZ (g) |
|---|---|---|---|---|---|---|---|
| 2025-01-25 12:00 | 22.5 | 1013.25 | 50.2 | 45 | 0.98 | -0.12 | -1.19 |
| 2025-01-25 12:01 | 23.0 | 1013.30 | 50.3 | 46 | 1.12 | 0.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| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | MountingHole_Pad | MountingHole:MountingHole_2.2mm_M2_Pad | H1, H2 |
| 1 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | ~ | Adafruit_Sensors:SDCard | SD_CARD1 |
| 1 | ~ | Adafruit_Sensors:MPU6050 | MPU6050_1 |
| 1 | ~ | Adafruit_Sensors:BME280 | BME280_1 |
| 1 | ~ | ESP32-C3-DEVKITC-02:ESP32-WROOM-32 | U3 |
| 1 | ~ | Adafruit_Sensors:DS1302_RTC_MODULE | RTC_DS1302_1 |
Similar boards
- 2 layers20.5 × 24.8 mm

- 2 layers14.4 × 10.5 mm

OSO SWAB B1-00 Sensor Watch Accelerometer
joeycastillo/Sensor-Watch
A board replacement for the classic Casio F-91W wristwatch
8 parts2.1k - 2 layers7.9 × 39.1 mm

Brain board STM32F407 SD wing it
rusefi/rusefi
rusefi - GPL internal combustion engine control unit
8 parts1.2k - 2 layers59.9 × 25.7 mm

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 mm

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 mm

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 mm

PicoMemcard pico
dangiu/PicoMemcard
Emulating PSX Memory Card (or controller) using a Raspberry Pi Pico
8 parts694GPL-3.0 - 2 layers36 × 10 mm

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.