User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Fri Oct 15, 2021 5:29 pm

I did not touch the too far away from pellet trajectory leds yet, just did some shots with 2 pellets front loaded concurrently.
Measured speeds are always around 177m/s (637km/h).
This was command used, with "-awb greyworld" -- all captures always had 0 frameskips (verified with ptsanalyze):

Code: Select all

pi@raspberrypi4B:~ $ raspivid -md 4 -w 1640 -h 1232 -fps 40 -pts tst.pts -o tst.h264 -t 4000 -awb greyworld
Too many macroblocks/s: Increasing H264 Level to 4.2
pi@raspberrypi4B:~ $ 

The first two times multiple exposures were split on two frames, not nice.
Third 2-pellet shot with 2µs flash duration at 30KHz PWM got captured in single frame:

Code: Select all

pigs hp 13 30000 60000 && sleep 8 && pigs w 13 0

Distance between the two pellets is "the same" for several shots.
Therefore I captured with 20KHz 2µs flash durations, verifying that indeed the very close pairs are captured by same flash:

Code: Select all

pigs hp 13 20000 40000 && sleep 8 && pigs w 13 0

Airgun lies on side as can be seen in photos earlier in this thread.
Although trying to shoot through lower part of frame, pellets always appear somewhere at top.
Likely that airgun pulling up is cause of that.

I copied the multiple exposures of 30KHz (top) and 20KZ (bottom) PWMs together.
Full resolution (width 1640) capture: https://stamm-wilbrandt.de/airgun/tb.67.png
Scaled to 30% for forum attachment:
tb.67.png.30%.jpg
tb.67.png.30%.jpg
tb.67.png.30%.jpg (7.73 KiB) Viewed 5243 times

I did close window shutter before capturing this time, so room was dark besides the 2µs flashes.
Lower part is darker, because only 20000/40*2µs=1000µs=1ms total flash time happened per frame.
Higher part is brighter, because 30000/40*2µs=1500µs=1.5ms total flash time happened per frame.
(of course one pellet exposure gets 2µs flash time in total only)

In summary I find this experiment of two pellets flying side-by-side nice, although they fly with "only" 177m/s (637km/h).


P.S:
Speed calculated from top image is not much slower than 177m/s measured with gun chronograph:

Code: Select all

$ echo "0.0042/420*540*30000" | bc -ql
162.00000000000000000000
$
tb.67.measure_top.png
tb.67.measure_top.png
tb.67.measure_top.png (85.7 KiB) Viewed 5226 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sat Dec 18, 2021 9:19 pm

Recently I got crash course in using freecad from my older son, and crash course how to export as .stl, slice with cura and print generated .gcode with octoprint from my younger son. Both live somewhere else because of University, but the Ender-5 3D printer of my younger son is still in our basement.

I started to 3Dprint small parts I used for my tiny robots ("the MCU PCB is the robot platform"):
viewtopic.php?p=1949133#p1948730

In the past I did measure caliber 4.5mm airsoft pistol pellets with a bad (plastic) vernier caliper as 4.2mm diameter:
viewtopic.php?t=319956#p1917937
That was wrong, today I used new metal vernier caliper and that showed exactly 4.5mm diameter.

In this thread best muzzle speed I got with pointed bullets was 109m/s.

With 6mm diameter airsoft pistol pellet, dremeled to fit into 4.5mm caliber airgun I saw 275m/s(!).

Later with the 4.5mm caliber airsoft pistol pellets speeds around 220m/s were the new normal.


Today I 3Dprinted my own pellet, 2.2mm high cyclinder, with 2.2mm radius half sphere on top. Although I printed with best 0.1mm setting, top of half spheres did not look that nice. I measured diameter as 4.4mm, but at very bottom of 3Dprinted part, diameter was 4.6mm for few layers:
p44.jpg
p44.jpg
p44.jpg (64.16 KiB) Viewed 5106 times
I measured much faster speeds than with 4.5mm airsoft pistol pellets, all slightly above speed of sound (343m/s).
Reason seems to be that 4.5mm airsoft pistol pellet did weigh 122mg, whiile the 3 self 3Dprinted pellets I did shoot today did weight 70/66/65mg only (the first two with 100% infill, the 3rd with 20% infill).

First speed I measured was 346.4m/s(!).

I did record a video, mainly for sound, of 2nd 348.8m/s shot, and uploaded to youtube:
https://www.youtube.com/watch?v=VGMWaAGZGk4
p44.348mps.jpg
p44.348mps.jpg
p44.348mps.jpg (75.44 KiB) Viewed 5106 times

Last pellet with 20% infill and 65mg weight showed even 356.0m/s (1281.6km/h !):
20211218_195946.part.30%.jpg
20211218_195946.part.30%.jpg
20211218_195946.part.30%.jpg (15.12 KiB) Viewed 5106 times

I assume that sound barrier gets crossed by pellet inside airgun barrel, so with 2µs exposure duration flashes as done before in this thread, it is unlikely that I will see such spectacular photos as shown top right of this Wikipedia page:
https://en.wikipedia.org/wiki/Speed_of_sound

But perhaps air turbulence might be possible to get captured — 356m/s speed means pellet does move 0.712mm in 2µs, perhaps it is time to reduce flash duration further ...
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sun Dec 19, 2021 11:10 am

To make it very clear, while I use airgun, I am only interested in high and higher muzzle speed for camera experiments.
I am not interested in hitting any target, bullets/pellets disappear in catcher directly after the scene.

The energy 4.3J of last night's shot has to go somewhere, and it is absorbed by 335g(!) bullet catcher. I was surprised to see how far the catcher got moved by a 66mg pellet hit (okay, a very fast pellet). I did slow down video 4×, and cropped out interesting frame part with ffmpeg. The resulting animated .gif is less than 250KB in size, allowing to attach here (camera smartphone video was 1280x720@30fps):
outs.anim.gif
outs.anim.gif
outs.anim.gif (215.65 KiB) Viewed 5036 times

Volume of sphere is 4/3 π r^3, volume of cylinder is h π r^2.
So volume of yesterday's pellet is 4/3 π r^3/2 + r π r^2 =5/6 π r^3.

I created solid 4.4mm diameter cylinder today, leaving away top half sphere.
With 1.8mm height only that resulted in half weight pellets (33mg).

I did two shots, the first slightly faster than 2nd, but with incorrect pellet weight in display.
As you can see muzzly speed increase massively from 356m/s to 416m/s, or 1496km/h:
20211219_112306.part.25%.jpg
20211219_112306.part.25%.jpg
20211219_112306.part.25%.jpg (15.52 KiB) Viewed 5036 times

P.S:
It takes only 0.18ms for pellet to pass 7.5cm from muzzle to completely having passed gun chronometer:
20211219_112306.part2.15%.jpg
20211219_112306.part2.15%.jpg
20211219_112306.part2.15%.jpg (11.8 KiB) Viewed 5028 times

P.P.S:
In pilot speak, last night pellet showed mach 1.04, today's pellet mach 1.21:
https://en.wikipedia.org/wiki/Mach_number
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sun Dec 19, 2021 11:41 pm

I thought that 4.6mm diameter at very bottom of 4.4mm diameter 1.8mm high cyclinder (left) was a bug, but it turned out to be a feature.

I learned from my older son that Freecad Chamfer feature is exactly for avoiding that (see middle photo/screenshot).
I tested with 1.72mm high 4.5mm diameter cylinder with chamfer and same with 4.6mm diameter and 1.65mm height.
Right I tried with 3.9mm high 4.4mm diameter cone, that has overlayed a 0.5 high 4.4mm diameter cyinder:
pellet_forms.png
pellet_forms.png
pellet_forms.png (118.75 KiB) Viewed 4983 times

All pellets did weigh in 28..32mg range.
4.5mm diameter cyclinder with chamfer was worst, 10-15m/s slower than the 416m/s or 418m/s seen in the morning.
4.6mm diameter cylinder with chamfer did show 414m/s once, both slower speeds as well (perhaps too much resistance in 4.5mm caliber airgun barrel).
The cone pellets showed 356|21|348m/s — much slower and with outlier caused likely by loosing direction in barrel at beginning (besides outlier still supersonic).

So 1.8mm high 4.4mm diameter cyclinder without chamfer pellet (left) is best sofar, most likely because of its 4.6mm diameter bottom.
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

pidd
Posts: 3945
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Gun chronograph / capturing inflight photo

Mon Dec 20, 2021 3:34 am

While supersonic the cone or chamfer might work against you as it will be trying to accelerate air and hence compress the air even more.

The pellet might only reach these speeds just as it leaves the barrel (maybe after it leaves the barrel) due the enormous air compression/pressure in front of the pellet constrained by the barrel.

The other thing I am wondering is if the pressure wave is capable of triggering the optics by itself? There can be large light diffraction caused by the pressure wave changing the refractive index. There can also be ice crystals developing due to rapid decompression.

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Mon Dec 20, 2021 9:12 am

pidd wrote:
Mon Dec 20, 2021 3:34 am
While supersonic the cone or chamfer might work against you as it will be trying to accelerate air and hence compress the air even more.
Interesting, I only tried it because supersonic jets have cones in front as well:
https://en.wikipedia.org/wiki/Speed_of_sound
supersonic_jst.png
supersonic_jst.png
supersonic_jst.png (31.88 KiB) Viewed 4934 times
The pellet might only reach these speeds just as it leaves the barrel (maybe after it leaves the barrel) due the enormous air compression/pressure in front of the pellet constrained by the barrel.
The speed gets measured by light barriers inside gun chronometer 1cm from each end. So the speed measured is the speed 1cm from left leaving hole of gun chronometer, which is 6.5cm after(!) leaving airgun muzzle (see the 7.5cm length photo in previous posting).
The other thing I am wondering is if the pressure wave is capable of triggering the optics by itself? There can be large light diffraction caused by the pressure wave changing the refractive index. There can also be ice crystals developing due to rapid decompression.
Interesting thoughts, but I think if the wave upfront of inflight pellet has supersonic speed between 1.5cm and 6.5cm after leaving muzzle, then the pellet itself is likely to have same speed.


My younger son brought up the idea that pellet might break inside airgun barrel. I doubt that because of the repeated measurements of same 414..418m/s speeds. Luckily I have a simple way to "see" what comes out of muzzle, or gun chronograph — just take 2µs duration flashes at high PWM frequency as I did earlier in this thread. The multiple exposures will show whether pellet is still in one piece, and allows for separate speed computation for comparison with gun chronometer reported speed.

HermannSW wrote:
Fri Oct 15, 2021 8:28 am
...
Because v2 camera looks up, 4.2mm diameter pellets fly from left to right through frame.
Because of nearly only horizontal movement, pellets are very sharp at top and bottom (pellet does fly 0.442mm in 2µs flash time at 221m/s).
I measured both pellet exposures as 432 pixel vertically.
Distance from left to right pellet is measured with gimp as 738.5 pixels:
Image


Computed speed from this measurement is slightly less than 221m/s, most likely because of lens effects.
But I like it to be so close to what gun chronometer measured -- camera is for getting photos, not precise measurements.

Code: Select all

pi@raspberrypi400:~ $ echo "0.0042/432*738.5*30000" | bc -ql
215.39583333333328410000
pi@raspberrypi400:~ $
...
As said earlier, caliber 4.5mm airsoft pistol pellets I used are really 4.5mm diameter, and not 4.2mm as measured incorrectly at that time with plastic vernier caliper. Now redoing the calculation shows slightly more than the gun chronometer reported 221m/s:

Code: Select all

$ echo "0.0045/432*738.5*30000" | bc -ql
230.78124999999985230000
$

Last, but not least, the cone is an interesting concept, not only with tip direction forward. Reason is that it has exactly 1/3rd volume of same height cylinder. Using cone with tip backwards and 45° slope allows to get the weight advantage of cone, and still have no support added by slicer for 3Dprinting. I will later print this part — with 2.5mm total length it is longer than the 18mm cylinder used before, but still has less weight. I hope the 1mm cone diameter at bottom will be big enough to keep back 0.4mm high cylinder connected. Front and back cyclinder should give the pellet a good direction in airgun barrel, and what is between them has only to survive the enormous speed/forces until passing camera and/or gun chronometer. Without chamfer the diameter at very bottom is 4.6mm, which had turned out to be a feature and not a bug as discussed earlier:
s22_04_17_04.png
s22_04_17_04.png
s22_04_17_04.png (27.86 KiB) Viewed 4934 times

For taking multiple exposure photos I will have to increase PWM frequency of flashes because of higher speeds.The 221m/s pellet did pass 7.366mm between two flashes at 30KHz PWM frequency. 414m/s pellet needs 17.8µs for that distance, which corresponds to 56.2KHz PWM frequency for the flashes:

Code: Select all

pi@raspberryPi400:~ $ bc -ql
10^6/30000
33.33333333333333333333
10^6/30000*0.221
7.36666666666666666666
10^6/30000*0.221/0.414
17.79388083735909822864
10^6/(10^6/30000*0.221/0.414)
56199.09502262443438921432
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Mon Dec 20, 2021 12:24 pm

I did 3Dprint the new pellet 5×, and did weigh two of them as 26mg weight — should have weighed all:
20211220_122650.part.jpg
20211220_122650.part.jpg
20211220_122650.part.jpg (84.95 KiB) Viewed 4900 times

I did clear gun chronograph data, so the 5 measurements appear as measurements 1-5. I did shoot all 5 as planned with heavy side (top in photo) front. Very consistent supersonic readings at mach 1.2, and one new maximal speed outlier of 431.4m/s or mach 1.26:
20211220_125321.part.30%.jpg
20211220_125321.part.30%.jpg
20211220_125321.part.30%.jpg (18.92 KiB) Viewed 4900 times

I have other ideas to reduce weight and keep barrel guidance for the pellet — does not need a circle, 3 equally spaced points on 4.4mm or 4.5mm diameter circle are good enough. does not need to be a triangle, might be a "Y" only on top of a 0.5mm high base cylinder. Even a fully filled triangle reduces area of r^2*π of filled circle to only 42%. I just print 0.6mm high cyclinder with top 1.4mm high holed cyclinder with 0.6mm thick border ...
o22_06_14.png
o22_06_14.png
o22_06_14.png (34.17 KiB) Viewed 4900 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

pidd
Posts: 3945
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Gun chronograph / capturing inflight photo

Mon Dec 20, 2021 3:13 pm

The aircraft is cone shaped for efficiency at sub-sonic speeds, it uses well over five times as much fuel when going supersonic but probably more than that if blunt-nosed high speed sub-sonic. Figures can be much better for an aircraft that is designed for long distances at supersonic (eg long thin conical nose cone) but this will be at the expense of other desirable features like manoeuvrability.

A compromise is to have a a pole sticking out the front to start a pressure wave away from the fuselage but on your scale there would be strength and stability problems, some military supersonic have them but as they often have nose radars inside the nose-cone it can be difficult to get the structural integrity without interfering with the radar.

A high modulus solid plastic pellet is unlikely to break inside the barrel because it probably doesn't have a lot of differential pressure at high speeds because of the large pressure build up in front of it.

A diablo-ish pellet is more likely to crush.

As you are 3D printing you could have a solid exterior and hollow interior to get some weight down but it won't be much of a reduction because most of he the material is on the outside. I don't think a one-ended cylinder will be optimal at these speeds, either way around.

TBH, what I thought would happen is due to slight imperfect symmetry (weightwise or aero-dynamically) the pellet would start to tumble or spin and almost instantaneously change to dust after it left the barrel at supersonic speeds, rifling would tend to increase that liability. Being such a small object it is much harder to theorise, if it was tumbling or spinning the centrifugal forces will also be small, and also the lightweight plastic means there are only small forces. I'd imagine .22 would have significantly more problems than .177

You've probably already mentioned it, for comparison what weight is a normal .177 diablo (lead?) pellet?

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Mon Dec 20, 2021 10:09 pm

pidd wrote:
Mon Dec 20, 2021 3:13 pm
A high modulus solid plastic pellet is unlikely to break inside the barrel because it probably doesn't have a lot of differential pressure at high speeds because of the large pressure build up in front of it.
Sounds good , seems to explain why I got consistent results.
As you are 3D printing you could have a solid exterior and hollow interior to get some weight down but it won't be much of a reduction because most of he the material is on the outside. I don't think a one-ended cylinder will be optimal at these speeds, either way around.
I tested the "o22_06_14.png" type pellets with the hole, the five pellets did weigh 2×22mg, 2×23mg and 1×25mg:
20211220_133158.33%.jpg
20211220_133158.33%.jpg
20211220_133158.33%.jpg (10.98 KiB) Viewed 4861 times
I did shoot them in weight order, 1st in direction as planner, with holed cylynder direction front, then the ther way atound.
As can be seen the planned direction shows much higher speeds:
20211220_134859.part.25%.jpg
20211220_134859.part.25%.jpg
20211220_134859.part.25%.jpg (10.06 KiB) Viewed 4861 times

You've probably already mentioned it, for comparison what weight is a normal .177 diablo (lead?) pellet?
Yes, in initial posting of this thread (620mg), which is 23× more than the current used pellet weights.



I have to learn how to create this form with triangle in Freecad, did use square with 0.5mm thick border instead. The pellets did weigh 3×15mg and 2×16mg. So even less than the 22/23mg previously, but not faster. I did shoot all in planned direction, and the results are not that reliable. It is likely that only 4 corner points is not stable enough guidance in airgun barrel. Either small round arcs are needed instead of sharp corners, or 4.4mm diameter needs to be increaed to 4.5mm or even a bit more:
20211220_155709.33%.plus.jpg
20211220_155709.33%.plus.jpg
20211220_155709.33%.plus.jpg (46.37 KiB) Viewed 4861 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Dec 21, 2021 5:45 pm

I did more experiments, first with just three round towers on the base 0.4mm high cyclinder, which was not successful.
Then I tried and just added a joining ring on top of the three towers, and to my surprise "printing in the air" did work for the short distances.
What came out of the 3Dprinter looked a bit strange, but I was able to use 3 of the 5 printed pellets.

Intentionally I made the towers as well as top ring 4.5mm diameter, while bottom cylinder is 4.4mm, which results in very first layer being 4.6mm. When I filled the pellets into airgun barrel, I felt that 4.5mm better needs to be reduced to 4.4mm as the base. Again two supersonic shots, while the 2nd "only 257m/s" outlier indicates that there was most likely a problem with friction because of 4.5mm diameter. Two new record speeds, and with 1st shot 439.2m/s now mach 1.28 got reached !
c44_3x12_45_c45.png
c44_3x12_45_c45.png
c44_3x12_45_c45.png (140.81 KiB) Viewed 4804 times

The pelllets look more and more like little spaceships, it will be interesting to see 56200fps slowmo video created from multiple exposure photo with 56.2KHz PWM flash frequency, by the technique described and demonstrated here (highest framerate slowmo I created sofar was 20000fps):
https://github.com/Hermann-SW/Raspberry ... ure-frames


I did put an empty box 20cm after gun chronometer, and the only 13mg pellets just passed through both sides easily:
20211221_182954.25%.jpg
20211221_182954.25%.jpg
20211221_182954.25%.jpg (16.85 KiB) Viewed 4804 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Wed Dec 22, 2021 10:49 pm

Last night I did an experiment to prove that speed does not drop abruptly after having passed gun chronograph. It took some effort to make sure the pellet does pass gun chronograph where it should, and does not hit it. As can be seen at 10cm distance to airgun muzzle still 404m/s supersonic speed is measured:
20211221_201511.16%.jpg
20211221_201511.16%.jpg
20211221_201511.16%.jpg (17.88 KiB) Viewed 4750 times
I did some experiments without bullet catcher behind gun chronograph — not a good idea. I aimed at a box 1.5m distant and saw clean holes on both of its sides repeatedly. I immediately stopped that after hearing pellet hit room window after hitting wall, 5m on other side of room — getting hit by supersonic pellet ricochet is not something I want to try out, even if of only 34mg weight.


I did numerous shots with numerous variants of pellets in order to get consistent results. Finally I learned how to do so. These are speeds measured for 12 same model 22mg pellets, a 0.4mm high cyclinder of 22mm radius, with a 16mm high tube with 0.6mm thick border on top (21mm outer radius, see freecad view). 0.4mm height means 4 layers, I printed with 100% infill and 0.1mm layer height. 0.6mm thickness was needed since 3Dprinter nozzle thickness is 0.4mm — with 0.5mm tube border thickness only a single circle gets printed per layer, with 0.6mm thickness two nested circles get printed per layer: There are two outliers, but having done so many shots+measurements I am pretty sure that those two measurements are just wrong (perhaps some supersonic wave effect). It is now time to setup 2×10000lm flashes and capture multiple exposure photos of inflight pellet leaving gun chronograph as a separate source of speed measurement (my younger son is on visit for 3 weeks over Christmas+New Year, and I had to remove my flash+camera equipment from next room).
The 10 non-outliers have min 407.4m/s, max 432.9m/s and average 418.64m/s (mach 1.19, 1.26 and 1.22):
20211222_214902.16%.jpg
20211222_214902.16%.jpg
20211222_214902.16%.jpg (53.78 KiB) Viewed 4750 times

I did say that I did consistent measurements, but did not tell how sofar. The airgun barrel is a little bit wider where I fill in pellets compared to the remainder of the barrel. The trick was that I used a tweezer with curved tip to press pellet 1.5cm into the airgun barrel. I uploaded 44 second video showing loading airgun with pellet, and measurement of 413.1m/s supersonic shot (shot 10 of 12) :
https://www.youtube.com/watch?v=ozdnLbDt5vQ
how_to_load.yt.jpg
how_to_load.yt.jpg
how_to_load.yt.jpg (55.85 KiB) Viewed 4750 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Mon Dec 27, 2021 11:24 pm

I bought and installed 3 storage racks, providing more than 3m² additional space for computer/electronics/robotics stuff. This allowed to setup new inflight pellet capturing environment in now free space.
16MP smartphone photo: https://stamm-wilbrandt.de/en/forum/20211227_233817.jpg
Scaled to 15% for forum attachment:
20211227_233817.15%.jpg
20211227_233817.15%.jpg
20211227_233817.15%.jpg (50.28 KiB) Viewed 4663 times

In past I used two PIs, one for controlling 2x(10000lm, 38V, 3A) leds as highspeed flash. Today I used a single Pi4B and got massive problems with eg. 1000Hz PWM and 1µs duty cycle. Pi4B console window got black and did not accept any keyboard input. I remembered chapter 4.6 of Pico getting-started-with-pico.pdf on how to power Pico serially with a Schottky diode ...
https://datasheets.raspberrypi.com/pico ... df#page=18

... which I had done with Tiny2040 as well before:
viewtopic.php?p=1936817&hilit=schottky+diode#p1936817

I inserted Schottky diode into connection from Pi4B 3V3 to Mosfet Vcc — no change in behavior. My theory was that voltage peak traveled back from Mosfet to Pi4B via SIG line, and so I inserted Schottky diode between Pi4B GPIO13 and Mosfet SIG line in addition. Now everything is fine, and Pi4B has no unwanted blackouts caused by high voltage/high ampere flash light:
20211227_233817.part.50%.jpg
20211227_233817.part.50%.jpg
20211227_233817.part.50%.jpg (14.48 KiB) Viewed 4663 times



I did replace HQ camera with v1 camera clone for first experiments. Unlike before where I capture from bottom upwards directly below muzzle, today I tried to capture more from front, but outside of shooting line. The first test with 353m/s 12mg 3Dprinted pellet went completely wrong: pellet did hit left led partially, then bullet catcher, and something (pellet?) went slowly back in the other direction. 1fps slowmo of 640x480@90fps video without frameskips:
Image


I did crop the two frames before hitting led and scaled to 200% size. The animation allows to easily see the multiple exposures of pellet with 50KHz PWM flashes with 2µs duration. Because of 50KHz, each 90fps frame accumulates 2µs of 50000/90=556 frames and is quite bright. The 1fps animation of two frames makes it easy to sport the multiple exposures of inflight pellet. 50KHz has 20µs between flashes, and 353m/s speed means 0.353mm/µs, so pellet does fly only 20*0.353=7.06mm between exposures:
x.anim.gif
x.anim.gif
x.anim.gif (197.17 KiB) Viewed 4663 times

I will have to decrease 50KHz PWM to get more space between consecutive exposures of pellet.
With "kFPS videos from kEPS multiple exposure frames" technique ...
https://github.com/Hermann-SW/Raspberry ... ure-frames
... this will give 10000fps slowmo in case of 10KHz PWM and 35.3mm between consecutive pellet exposures.

From now on I will not be sloppy with aiming as done today ...
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Dec 28, 2021 3:45 pm

For unknown reason the newly printed 12mg pellet model that worked so reliably last time, did not work anymore in last night and today's tests. The caliber 4.5mm airgun pellets showed "only" just above 200m/s (that was cool some months ago, but I got used to supersonic speeds lately). So I just extended the length of the pellet by another millimeter to 3.0mm total height. My younger son got several rolls of colored PLA as Christmas present, as well as PETG which I used today. As can be seen top left, the 3Dprinted pellets show quite some stringing, but that turned out not to be a problem. Electronic micrometer in middle shows that current 3D printer settings for Z axis are quite off, not 3mm but only 2.741mm. I increased height of previously 2mm high pellet by 50%, but weight raised from 12mg to 30mg — it seems that PETG is more heavier than PLA (I print pellets with 0.1mm layers, 0.4mm nozzle and 100% infill). As gun chronograph shows, measured speed for that pellet and some pellets shot before) is clearly supersonic (343m/s). This will be the pellet I will use from now on for inflight multiple exposure photos, and its open front and closed back should be visible clearly if capturing with 2MP or 5MP and not with 0.3MP as last night:
petg.o22_04_26_21.25%.jpg
petg.o22_04_26_21.25%.jpg
petg.o22_04_26_21.25%.jpg (57.37 KiB) Viewed 4609 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Dec 28, 2021 11:14 pm

I switched to capture v1 camera mode 5 (1296x730), and verified that it allows to capture @57fps without frame skips (documentation states 49fps). Then I noticed that recorded videos showed big vibrations. Problem was camera holder on same desk as airgun. So I placed long soldering 3rd hand on drawer cabinet not connected to desk.

Using PWM scene was just too bright, and so I switched back to "Sound trigger" with microphone module:
https://github.com/Hermann-SW/Raspberry ... nd-trigger

I captured many shots, and regardless how short I chose the flashes to be triggered after sound detection (2µs), and how many flashes I did (1000, way too much normally), and going to 50MHz PWM frequency again just to not miss pellets in flight, I got frames with flashes, but never captured pellet inflight.

Finally I found the problem -- the Pi4B was a bit away from airgun trigger that created the sound, and microphone module was connected with short cables to Pi4B only. I added three 20cm cables for GND/VCC/D0, which resulted in microphone placed very near to airgun trigger. Now capturing pellet inflight worked for 1st time with microphone trigger (100% part of frame):
frame.0222.part.png
frame.0222.part.png
frame.0222.part.png (151.4 KiB) Viewed 4568 times

This is whole view of camera scaled to 50% size (top of frame is dark because of the much reduced number of 2µs duration flashes per frame):
frame.0222.50%.png
frame.0222.50%.png
frame.0222.50%.png (215.05 KiB) Viewed 4568 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Wed Dec 29, 2021 3:58 pm

After having resolved the camera vibration problem last night, many new problems popped up today.

First there was problem with 38V/6A cables too near to gun chronograph. I use script "doit" described later to start camera preview, and when microphone triggers eg. by hand clap, flashes get emitted and raspivid stops recording. As I said, I used hand clap to trigger, no real shot, but gun chronograph did show a new reading of 4366m/s ...:
20211229_141539.16%.jpg
20211229_141539.16%.jpg
20211229_141539.16%.jpg (49.15 KiB) Viewed 4521 times
Top left you see copied in two new 10000lm leds (the previous had both less than 50 of the 100 leds working). I used "tst" script, that uses 1000Hz PWM with 1‰ duty cycle (1µs) for 5 seconds and then turns leds off. This allows for visual inspection of the 10000lm leds without the risk of overheating:
#!/bin/bash

if [ ! -f /var/run/pigpio.pid ]; then sudo pigpiod -s 1; sleep 0.5; fi

pigs m 13 w
pigs hp 13 1000 1000
sleep 5
pigs w 13 0

This is script doit for automating all that needs to be done for highspeed recording:

Code: Select all

#!/bin/bash
raspivid -md 5 -p 10,10,1296,730 -fps 57 -w 1296 -h 730 -awb flash -o tst.h264 -s &
pid=$!
sudo killall -q pigpiod
sudo ./audio_shots 1000 2 10000 2
kill $pid
  1. script shebang
  2. start raspivid with correct resolution, flash awb and in signal mode, in background
  3. store pid(raspivid)
  4. as precondition for audio_shots pigpiod needs to be killed
  5. start emitting 1000 flashes of 2µs duration, at PWM frequency 10KHz, 2µs after microphone triggered
    https://github.com/Hermann-SW/Raspberry ... io_shots.c
  6. after flashes have been emitted, stop raspivid recording via signal

This is current setup, the second problem I got newly is problem with overlong camera cable. I will reverse direction of airgun because then the camera can be connected with short flat ribbon cable to Pi4B:
20211229_145802.15%.jpg
20211229_145802.15%.jpg
20211229_145802.15%.jpg (43.18 KiB) Viewed 4521 times

But despite camera problems I got a first 10KHz multiple exposure of pellet inflight with 374m/s (top right). I copied in just the pellets captured at 100% size left bottom. The leftmost pellet is already too close to v1 camera for sharp display, but the first pellets (from right) look really good, given the only 2µs(!) exposure time (by two very close 10000lm leds) :
frame.0108.50%.png
frame.0108.50%.png
frame.0108.50%.png (249.3 KiB) Viewed 4521 times

P.S:
10KHz PWM frequency is 100µs between flashes — pellet moves 37.48mm in that time.


P.P.S:
Just verified with giga samples oscilloscope that flash duration sent by audio_shots.c is really 2µs long.
I executed this command in one terminal:

Code: Select all

sudo ./audio_shots 1000 2 10000 3
For triggering I did configure GPIO17 as output pin and triggered with this command, without microphone:

Code: Select all

pigs w 17 1
Image
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sat Jan 01, 2022 11:43 pm

In the last days older son constructed, 3Dprinted and installed v1 camera+lens plus 16led WS2812B ring holder. Since that time we can record Octoprint timelapse as well as Octolapse:
cam_leds.jpg
cam_leds.jpg
cam_leds.jpg (68.72 KiB) Viewed 4464 times

I looked for 40x42mm led holder and stand on thingiverse.com and only found a cup holder:
https://www.thingiverse.com/thing:2809938

I took the basic idea and got the led holder and stand I wanted in 3rd iteration.
Details (STL files, cura placement, 22s timelapse video of 6h 3Dprint, ...) can be found here:
https://stamm-wilbrandt.de/en/youtube/led_holder_stand/
Image


I rearranged airgun pellet inflight capturing environment as discussed in previous posting, with new led holders and stands.
12MP smartphone photo (https://stamm-wilbrandt.de/en/forum/20220102_000254.jpg), scaled down to 15% for forum attachment:
20220102_000254.15%.jpg
20220102_000254.15%.jpg
20220102_000254.15%.jpg (43.74 KiB) Viewed 4464 times

Much too bright photo, also because of reflective mat, but mostly because doit script did 10^6us/57/100us=175 flashes in that frame, where 10 (with connect audio_shot offset) would be enough. Demonstrates that new setup works with new holder and stand (pellet did show only 329.1m/s), as basis for further experiments tomorrow:
tst.frame.0050.png.15%.jpg
tst.frame.0050.png.15%.jpg
tst.frame.0050.png.15%.jpg (16.69 KiB) Viewed 4464 times

I automated the process of determining the exact frame with multiple exposure capturing, now I just do "./show_multexp tst.h264" after shot and get the frame of interest displayed. Converts raspivid 57fps mode5 .h264 video to .mp4, extracts last 2 seconds, and then dectects first frame in alphabetical order of size >99999 bytes and displays it:
https://gist.github.com/Hermann-SW/364c ... 94cbbebcb2
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sun Jan 02, 2022 5:18 pm

I did numerous shots with airgun and my 3Dprinted 30mg pellets. They are white because I used PETG last time and not PLA. From the 100 pellets I printed, only 35 were usable, because of bed leveling and/or stringing problems at that time. I completely exhausted all pellets I had, need to 3Dprint (with yellow PLA now, as the led holders and stands) new pellets.

As described in previous posting I used doit script for the actual multiple exposure capturing. I started with 1000 flashes (which are 175 flashes per frame at 57fps), went down to 100, 60, 20, and then finally 5. These were the last multiple exposures taken, with offset in microseconds for 1st flash after microphone trigger, number of flashes and pellet speed measured by gun chronograph. The last 5 capturings were done with ampere meter turned off (it always showed around 49.2V), because that was too near to gun chronograph and produced >1000m/s incorrect readings with >100J energy, although the airgun is limited to 7.5J.

Code: Select all

3000 20 (explode)
3000 15 320.0
3300 13 366.3
3700 10 324.1
4200 5  361.7
4500 5  338.6
You can find those captures at 100% resolution (1296x730) on this webpage:
https://stamm-wilbrandt.de/en/forum/audio_shots/


Bad things that happened first:

Once I tried to capture video after a shot and camera did not work. Then I took a closer look at camera and saw that camera sensor as well as flat ribbon cable were disconnected. I am pretty sure that camera module did not get a direct pellet hit, because with >300m/s I would expect v1 camera module to be completely broken. It seems that pellet was not captured by pellet catcher, but reflected and has hit back of camera module. I plugged everything together and everything worked again as if nothing had happened:
20220102_153416.15%.jpg
20220102_153416.15%.jpg
20220102_153416.15%.jpg (33.95 KiB) Viewed 4411 times

I never captured inflight exploded pellet before, in this photo pellet broke into small pieces at some point in time. The multiple exposures allow to see the different trajectories of the parts quite nicely:
tst.frame.0056.png.50%.jpg
tst.frame.0056.png.50%.jpg
tst.frame.0056.png.50%.jpg (19.44 KiB) Viewed 4411 times

After many experiments/shots/offsets I finally captured with offset 4500us=4.5ms after microphone triggering, with only 5 flashes of 2us duration, or 10µs in total (room was completely dark). In frames with more flashes on the pointed to webpage you can see my arm that triggered airgun shot. But 10000lm leds at quite a distance to my arm with only 10µs total flash duration leave the arm just dark. You can see 4 pellet exposures outside in front of gun chronograph, and the 5th lighted less just inside gun chronograph — nice:
4500_5.png
4500_5.png
4500_5.png (73.31 KiB) Viewed 4411 times

Next I will have to think about the setup. Desk is too small, v1 camera would need to be placed further distant past gun chronograph for sharp pellet exposures. Or I will go with HQ camera and use a lens capturing sharp in the range I want. I have no idea which of the many lenses I have will be the needed one (low or high focal distance) yet.


P.S:
The front 10000lm led on side does not look too bright, only because each of its 100 led spots does light for 10µs in total in this frame.
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

pidd
Posts: 3945
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Gun chronograph / capturing inflight photo

Mon Jan 03, 2022 4:10 pm

That last photo is amazing!

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Jan 04, 2022 5:57 pm

pidd wrote:
Mon Jan 03, 2022 4:10 pm
That last photo is amazing!
I think the same. Plan is to make another recording with non-overlapping pellet exposures as in this previous photo
download/file.php?id=51698
with a darker background, and using this technique
https://github.com/Hermann-SW/Raspberry ... ure-frames
to create slowmo of 10000fps video from10000eps (exposures per second) multiple exposure photo.
This slowmo was created by that technique from 5KHz PWM flash frequency, plays at 5fps, 1000× slower than real:
frame.640.5.anim.50%.gif
frame.640.5.anim.50%.gif
frame.640.5.anim.50%.gif (170.2 KiB) Viewed 4314 times
HermannSW wrote:
Sat Jan 01, 2022 11:43 pm
In the last days older son constructed, 3Dprinted and installed v1 camera+lens plus 16led WS2812B ring holder. Since that time we can record Octoprint timelapse as well as Octolapse:
Robert did tweet about that camera housing, with some nice 4K renderings attached to the tweet (here one of them in small):
https://twitter.com/RobertWilbrandt/sta ... 0796831753
Image


Today I received a 2nd (same model) gun chronograph, and tested it successfully. Then I used both chronographs in series, one of the reasons I bought the 2nd chronograph. It turned out to be not that easy to shoot through both with getting valid velocity reading on both, but finally I was successful. Again captured supersonic speeds. The left ends of both chronographs are 10cm apart, as can be seen pellet speed reduces from 414.8m/s to 412.0m/s by only 2.8m/s:
two_chronographs.15%.jpg
two_chronographs.15%.jpg
two_chronographs.15%.jpg (17.86 KiB) Viewed 4314 times

Last night I tried to fixate gun chronograph at front of airgun. I had the bad idea to superglue one plate onto airgun front — it did work for two shots, but using cocking lever the 3rd time made gun chronograph fall apart:
Image


My younger son asked me to 3Dprint a holder that will be screwed around the airgun muzzle, with threaded inserts, as well as to use 4 M2 threaded inserts on front allowing to screw gun chronograph onto it. I already did a test 3Dprint, and it did fit around airgun barrel already (the yellow part in last but one photo. Here as screenshot from Freecad:
Attachments
airgun_holder.1.png
airgun_holder.1.png
airgun_holder.1.png (12.55 KiB) Viewed 4314 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Thu Jan 06, 2022 5:24 pm

HermannSW wrote:
Tue Jan 04, 2022 5:57 pm
My younger son asked me to 3Dprint a holder that will be screwed around the airgun muzzle, with threaded inserts, as well as to use 4 M2 threaded inserts on front allowing to screw gun chronograph onto it. I already did a test 3Dprint, and it did fit around airgun barrel already (the yellow part in last but one photo. Here as screenshot from Freecad:
Image
Did that, and came up with this Freecad model:
screenshot.394_1.png
screenshot.394_1.png
screenshot.394_1.png (21.25 KiB) Viewed 4257 times

After 3Dprinting, it was not that easy to get the holder over airgun barrel, and I did hear a short crack, but 3Dprint remained complete. I did solder the 4 threaded inserts from front. And the negative cylinder I had in the back through the whole length of 46mm over two parts was needed. I had to move threaded insert from outside through 19mm of SLA so hat it looked out a millimeter. Doing that soldering iron melted away a little SLA, but overall it just worked. Here is the whole construction, and measurement of 394.1m/s shoot I just did before the photo:
20220106_174052.part.20%.jpg
20220106_174052.part.20%.jpg
20220106_174052.part.20%.jpg (22.89 KiB) Viewed 4257 times

I only had pellets that I had accidentially 3D printed with coarse 0.28mm per layer instead of 0.1mm per layer. And they showed speeds in 370..380m/s range only (supersonic, but less than 400m/s). Reason was that they seem to be a bit too thick for caliber 4.5mm. So I used sandpaper and reduced a bit from pellet outside. Doing so I got consistent speeds in 390..398m/s range. Those shots were all done against pellet catcher. Only the last shot with 394.1m/s speed from previous photo was done 4m through room with cardboard as target. Pellet did hit target, and got caught. To get an idea how deep it went into cardboard, I placed another 3mm high pellet below:
20220106_174151.part.25%.jpg
20220106_174151.part.25%.jpg
20220106_174151.part.25%.jpg (12.51 KiB) Viewed 4257 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Fri Jan 07, 2022 9:08 pm

Younger son is building a custom housing for his 3D printer and CNC:
https://twitter.com/StefanWilbrandt/sta ... 8609071104

The camera housing built by older son
https://twitter.com/RobertWilbrandt/sta ... 0796831753
is mounted in top left front corner of 3D printer bottom part of custom housing:
20220107_181256.20%.jpg
20220107_181256.20%.jpg
20220107_181256.20%.jpg (37.77 KiB) Viewed 4178 times

I have no real use for wide angle lenses (besides M12 180° lens mounted reversed as macro lens for my Raspberry microscope). Yesterday I replaced the M12 lens in camera housing with 90° lens, now nearly the complete print area gets displayed by Octoprint:
90°_lens.png
90°_lens.png
90°_lens.png (193.85 KiB) Viewed 4178 times



In a twitter discussion I got confirmation, that even an only 30mg weight supersonic pellet should produce a weak boom.
And on recording the weak boom, "Will be easier the further you move from the gun":
https://twitter.com/DrChrisCombs/status ... 8169128961

With supersonic pellets around 400m/s speed, the weak boom at say 4m distance in front of muzzle will appear 10ms after leaving muzzle. Airgun sound of shoot will take 4/0.343=11.66ms. I will try to use 400Msps logic analyzer with D0 digital pin of microphone module to "hear" wether it recognizes sound at different times, 1.66ms apart.

In case pellet supersonic weak boom can be recognized by microphone module, it will be perfect trigger for capturing multiple exposure frame with both 10000lm leds just after the microphone, with audio_shots program.
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sun Jan 09, 2022 9:06 pm

HermannSW wrote:
Fri Jan 07, 2022 9:08 pm
With supersonic pellets around 400m/s speed, the weak boom at say 4m distance in front of muzzle will appear 10ms after leaving muzzle. Airgun sound of shoot will take 4/0.343=11.66ms. I will try to use 400Msps logic analyzer with D0 digital pin of microphone module to "hear" wether it recognizes sound at different times, 1.66ms apart.
I did experiments with the microphone module I used sofar. The digital D0 signal captured on 400Msps logic analyzer showed 2-digit millisecond total length of airgun shot. I wanted to compare sound arrival times at different distances. While I have several microphone modules, only that one I used sofar is working. So last night I ordered 5/5/3 modules based on LM393/Max9814/MAX4466 main chips that will arrive on Tue/Wed/Thu.
In case pellet supersonic weak boom can be recognized by microphone module, it will be perfect trigger for capturing multiple exposure frame with both 10000lm leds just after the microphone, with audio_shots program.
In a phone call with older son, he reminded me on the perfect signal for triggering flashes: a light barrier triggering when pellet flies through. I have totallly forgotten about that, talked about this in one of the first postings in this thread, and that I already identified where and how to access the 4 led signals in gun chronograph:
viewtopic.php?t=319956#p1916024

I removed the front plate of gun chronograph mounted on airgun and found no issues in measuring pellet speed without it. Without front plate direct access to the led readings is given, will use them for multiple exposure photo flash triggering next:
20220109_184911.16%.jpg
20220109_184911.16%.jpg
20220109_184911.16%.jpg (16.99 KiB) Viewed 4130 times

Since some time I shoot with reduced in height pellets, 20mm in freecad, but 3D printer is not calibrated well. I used electronic micrometer to measure real pellet diameter and height with micrometer precision. Pellet weights are in 17..19mg range, I had adjusted weight to 0.02g in previous gun chronograph photo, so the energy reported is correct.
pellet_micrometer.jpg
pellet_micrometer.jpg
pellet_micrometer.jpg (81.19 KiB) Viewed 4130 times

Today I played with airgun with target to get a setup that allows to nearly fixate airgun between shots. I clamped airgun barrel onto two 4x2 Lego pieces on wooden trestle. That allows to load the airgun without moving trestle (and airgun barrel). Worked surprisingly well. Clamping is done, so that loaded airgun just stays horizontal, although airgun middle til back are outside trestle:
20220109_152314.20%.jpg
20220109_152314.20%.jpg
20220109_152314.20%.jpg (29.9 KiB) Viewed 4130 times
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Jan 11, 2022 10:00 pm

The new main chip LM393 microphone modules arrived.
When powering, all of them showed both leds on.
I started with one and turned left full rounds, after 7 rounds one led did not light anymore.
Clapping loud into hands that led did show for a short time on, then off again.
I calibrated all new modules that way.

Then I did same with the 5 old modules I thought were broken, and calibration worked that way as well.

I screwed three of the new modules side by side onto wood, and did airgun shots without pellets from 2m distant.
Since the microphones are directed to airgun, and near together, there is nearly no length difference from airgun trigger to microphones.
I powered all 3 modules from constant voltage power supply with 3.3V, and connected GND/D0 from each to 400Msps logic analyzer.
20220111_222027.16%.jpg
20220111_222027.16%.jpg
20220111_222027.16%.jpg (48.76 KiB) Viewed 4078 times
I wanted to calibrate the three so that the very first rising edges for them are happening "at the same time".
I was successful up to 20µs difference between fastest and slowest microphone.
Good basis for doing speed of sound experiments (shots without pellet), and supersonic speed experiments (with 400m/s pellet).
Microphones are planned to be 1m/2m/3m distant from airgun trigger.


For easier soldering I removed gun chronograph case (the heart of chronograph is STM8S00 MCU):
20220111_215820.16%.jpg
20220111_215820.16%.jpg
20220111_215820.16%.jpg (51.76 KiB) Viewed 4078 times
The 4 leds and GND are accessible on the botom left 5 connectors.

I will not only solder cables to the 2nd sensing area leds, but to 1st sensing area as well.
Why?
Because then Raspberry can determine timestamp difference for passing pellet and determine pellet speed for each pellet.

Format of audio_shot command is

Code: Select all

audio_shot N d f o
(N flashes of duration d each, at frequency f after initial delay o).

When determining speed, argument o can be distance instead of microseconds, and Raspberry will convert distance to microseconds with the measured speed. This will allow to capture pellets always at the same distance to airgun muzzle, regardless of speed differences for the shots!
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Sun Jan 16, 2022 4:51 pm

It turned out that I get far better timestamps using MCU (Pico):
"Very precise timestamps for supersonic inflight pellet speed determination and position projection"
viewtopic.php?t=327588

Today I did solder two 5x1 male headers to gun chronograph, and the connected Pico does measure nearly same speed as chronograph (-0.37%..+1.0%) because I used "time_us_32()" today instead of systick as done before. Details on soldering and code here:
viewtopic.php?t=327588#p1962220
20220116_163350.heic.16%.jpg
20220116_163350.heic.16%.jpg
20220116_163350.heic.16%.jpg (34.23 KiB) Viewed 3948 times

Measuring speeds up to 213.8m/s works fine, but even when removing all cables, the chronograph does not report supersonic speeds anymore. Will investigate what can be the reason for that.
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 5354
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany

Re: Gun chronograph / capturing inflight photo

Tue Jan 18, 2022 12:17 pm

If I would have known the need to fixate Pico near chronograph when 3Dprinting the white chronograph holder, I would have created two more holes with centers 11.45mm distant for screwing Pico with two M2 screws. No problem, I 3Dprinted Pico adapter, soldered threaded inserts into, superglued onto white part and fixated Pico with M2 screws on it:
20220118_002607.part.25%.jpg
20220118_002607.part.25%.jpg
20220118_002607.part.25%.jpg (40.19 KiB) Viewed 3880 times

A bit further on software side as well, new thread "0.1µs unit PWM flashes" is improvement over pigpio 1µs unit for timing (here duty cycle with request 15 units of 0.1µs):
viewtopic.php?t=327911
Image
https://hermann-sw.github.io/planar_graph_playground
https://stamm-wilbrandt.de/en#raspcatbt
https://github.com/Hermann-SW/memrun
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

Return to “Camera board”