กลับไปหน้ารวมไฟล์
airgun-chronograph-f61ddb-en.md

As a man with many hobbies including electronics and airguns I decided to use an old Arduino board laying around and make something useful. I always wanted to know what the real speed of my airguns was but never had a real chronograph, so I decided to make one using the mentioned Arduino board.

And here is the finished product:

Measurement taken

Engineering Principles

The core of this project is measuring the "Time of Flight" (the time an object takes to travel a specified distance) to calculate velocity using the fundamental physics formula $v = s/t$.

1. Sensor Detection System (Optical Gate)

The design is based on photodiodes, each triggering an LM339 comparator. There are two photodiodes (cheap chinese photo diodes) on both in and out sensors and they work as Inclusive OR logic. The photodiodes are illuminated with 4 IR leds each (8 in total) creating kind of 4x2 beam mesh. This 4x2 Beam Mesh configuration creates a comprehensive beam network to ensure detection even if a pellet passes through only a portion of the light beams.

2. Signal Processing with LM339 Comparator

When there is a difference in the light received by the photodiode/s a high signal is sent to the input pins on the Arduino. Signals from photodiodes are typically continuous analog signals. Using the LM339 (Quad Differential Comparator) IC provides crucial signal conditioning:

  • Inclusive OR Logic: Each photodiode pair operates with OR logic, meaning if any sensor within the same set is blocked, an output signal is immediately sent.
  • Signal Conditioning: The LM339 compares the voltage from the photodiode with a reference voltage set via a potentiometer, sending a crisp digital (High/Low) signal to the Arduino for microsecond-level accuracy.

Board and sensor assembly

Software Logic (Code Logic)

The Arduino program was written with a primary focus on response speed:

  1. Waiting for Start: The system waits for an interrupt signal or a change of state on the first input pin. When the pellet passes the first sensor, the micros() function is immediately called to record the start time.
  2. Waiting for Stop: The system waits for a signal from the second sensor. When the pellet passes this point, the current time is recorded again.
  3. Calculation: The time difference ($\Delta t$) is divided by the fixed distance between the sensors. The result is the velocity, which can be converted to meters per second (m/s) or feet per second (fps) as desired.
  4. Display: The result is shown on an LCD screen so the user can see the value immediately.

Challenges and Calibration

The hardest part is adjusting the sensitivity of the sensors to get reliable results. It is done by adjusting the potentiometer for each photodiode. This process involves "tuning the sensitivity" to be sensitive enough to detect tiny pellets, but not so sensitive that electrical noise causes false triggers. It took some trial and error but once set you don't need to touch it again. So far it works perfectly every time if the shot is not way off center.

Check it out and feel free to ask for help if you want to build something similar. If anyone is interested in building their own velocity measuring device or encounters problems with component selection and IR light layer arrangement, I'm happy to provide advice!

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "Pepisan"
category: "Screens & Displays"
components:
  - "1x Standard LCD - 16x2 White on Blue"
  - "1x Arduino UNO"
  - "1x Mastech MS8217 Autorange Digital Multimeter"
  - "1x Soldering iron (generic)"
  - "1x Photodiode, 45 °"
description: "Projectile speed measurement with arduino!"
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX18qQ3XTvRIacu+ndkjJlchNZb/pPuCxxQhBGDqzXnIsQpSVDr8k7rabKRPvtn6prtP7r42nls73Ot9iz+JRPFFbAw7MpfYNBiI="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/airgun-chronograph-f61ddb_cover.jpg"
lang: "en"
likes: 3
passwordHash: "51399c07f599ad3f8ea9c9c93e7727b2391542f4cb14a8c1374acf0263a44b13"
price: 1120
seoDescription: "Build an Airgun chronograph with Arduino for accurate Projectile speed measurement. A simple DIY guide for makers."
tags:
  - "chronograph"
  - "airgun"
  - "chrono"
  - "projetile"
  - "speed"
  - "measurement"
  - "hobby"
  - "photography"
title: "Airgun chronograph"
tools: []
videoLinks: []
views: 11865