DIY Chronograph Revisited
This project is still a work in progress as I am waiting for PCBs and parts to be delivered, so details like the 3D-printed enclosure and software will probably evolve. I will create a GitHub repository once I am happy with how everything is working.
It has been over 10 years since my first blog entry on my DIY chronograph (https://gadjetsblog.blogspot.com/2013/02/air-rifle-chronograph.html), which used an Arduino Nano and a Bluetooth transmitter. That setup connected to an app on my phone and transmitted the elapsed time between trigger 1 and trigger 2. The app then used that time, along with the entered pellet weight, to calculate the muzzle velocity and kinetic energy of the rifle/pistol.
I have built a few projects since then. Although I enjoy designing hardware, writing software is not my strong suit. Like many others, I have started using AI—specifically Google Gemini—to help write code not only for the microcontroller hardware, but also for the web-based user interface.
I realised that I could modernise the DIY Chronograph using an ESP32, my favourite being the Seeed Studio XIAO ESP32-S3. Running at 240 MHz, it is substantially faster than the older Arduino Nano. Because it features built-in Wi-Fi and web server capabilities, the entire user interface can now be hosted directly on the chronograph itself. You simply open a web browser on your phone, tablet, or laptop to interact with the device.
Hardware
The core concept remains similar to the original design: two optical IR emitter/detector pairs are spaced 50 mm apart, creating two infrared beams. When a pellet passes through and breaks each beam, high-speed hardware interrupts measure the travel time across that 50 mm distance to accurately calculate the projectile's velocity.

The outer casing is printed in two halves that slide over the electronics and aluminium barrel tube. They lock securely together using two 2 mm alignment dowels and an M3 screw.
One interesting challenge was "how to package the FPC antenna" this proved to be a bit tricky so in the end I went for a single wire antenna 31mm long.
This solution allowed me to feed the antenna back into a hole inside the casing and it works perfectly well in the 2 or 3m range needed to work with your phone.
Unlike the original design, where raw timing data was sent over Bluetooth for the phone app to process, all calculations are now performed locally on the ESP32.
To view the live dashboard, simply connect your phone or PC to the **"AirChrony-S3"** Wi-Fi access point and navigate to **`http://192.168.4.1`** (or `http://chronograph.local`) in your browser.
User interface
When opened, the dashboard immediately displays the **"Live Chrono"** tab showing the latest shot's speed, muzzle energy, rolling averages, and a velocity progression graph.
Additional tabs include:
- Pellet Profiles:** Save custom pellet profiles with brand names, calibers, and weights (in grains or grams) to automatically calculate muzzle energy (Joules or ft-lbs).
- Saved Strings:** Store, recall, and export previous shooting sessions directly to CSV or JSON from the ESP32's onboard flash memory.
- Settings & Diagnostics:** Customise speed units (FPS / m/s), toggle between dark and light themes, configure sensor spacing, test beam alignment, and enable spoken voice callouts (e.g. shot count and velocity spoken aloud through your phone or Bluetooth ear defenders).
The project is constantly evolving as new ideas arise, and you are welcome to use AI to tailor the firmware and interface to your own setup!





No comments:
Post a Comment