This project is intended for implementing a low cost proximity/motion data logger, useful device that can be used on environmental / animal scientific research for school/university studies. However the goal of this project is to build an open source that can easily assembled that anyone can gathered data for research applications that requires high precision and accuracy which is capable to runs up to 8 ~ 12 months with 2500 mAh  lithium ion polymer battery . We assumed that you are familiar with this components. This project are driven on 5 main components, Microcontroller, Proximity Sensor (PIR), Real Time Clock on chip, microSD Card, and microSD card socket for TransFlash.

The DS32354 RTC (Real Time Clock) on chip is an extremely accurate SPI bus clock with integrated-compensated crystal oscillator and crystal. This device has incorporates a precision, temperature-compensated voltage reference and comparator circuit.

The pyroelectric infrared (PIR) / Passive Infrared / IR Motion Sensor. This sensor allows you to sense motion always to detect whether animals/human that moves in or out of the sensor range. This device are small and inexpensive that runs on low-power, easy to use.

Required Components

  • Arduino IDE | Atmel Studio
  • Microcontroller – Arduino NANO, MINI, MEGA, UNO, LEO, DUE, ZERO, 101, MKR1000, FIO,  NodeMCU, Teensy Board, TeensyDuino, ESP8266 12, 12E, ESP32, LinkItOne, ESP8266 NodeMCU, ESPDuino, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266, ATMEGA250 16 MHz, ATSAM3x8E, ATSAM21D, ATTINY85 16/8 MHz Note: The Diagram below is using NANO. (please refer to each MCU’s respective pin-outs)
  • RTC Chip or Module
  • PIR / Motion Sensor / Proximity Sensor
  • microSD Card (4~8 GB FAT)
  • microSD Card Socket / microSD Module
  • Capacitors (See below required values)
  • Resistors (See below required values)
  • Solder Less Breadboard (Optional)
  • Jumper Wire
  • Prototyping Board
  • PCB board (for testing)

Wiring Guide

Wiring with ATMEGA328P

Using 328P chip more convenient you can just program it with your FTDI/USB UART or Arduino SPI  and place into the  DIP Sockets Solder Tail mounted in the PCB board.

motion detection logging

Source Code


Motion Data Logging with RTC / PIR as Stand Alone
Tagged on:                             

Leave a Reply

Your email address will not be published. Required fields are marked *