User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Capturing (2.5mm-18mm) sparks with Raspberry camera

Sat Mar 10, 2018 7:50 pm

Today I bought a 1€(1.23$) lighter and extracted its piezo spark igniter. After some preparation I took a 5s 90fps 640x480 raspivid video of the sparks. I used the technique from this posting:
viewtopic.php?f=43&t=45887&p=1280449#p1280449

In that posting I put the 60° f6.0mm lense as far out of the M12 mount as possible and achieved 1.7μm/pixel resolution, with a 5MP v1 camera frame.

Today I did move lense out only near to the maximum, and frames were taken with 0.3MP resolution only. But the images still have 7.1μm/pixel resolution.

During the 5s video I triggered 5 sparks, which will be shown further below. First, this is the recording setup (lens only few millimeters above scene):
Image


I took a 2nd video with this setup, but this spark shows that the set square did pull the 2.5mm spark!
Image


So now the 5 sparks from first video, without set square, here the first:
Image


2nd spark:
Image


3rd spark was hit by rolling shutter effect in line 317, this is its 1st frame:
Image


This is 2nd frame of 3rd spark:
Image


4th spark:
Image


5th spark was hit by rolling shutter effect in line 298, this is its 1st frame:
Image


This is 2nd frame of 5th spark:
Image


Next step: take 640x128_s 665fps raspivid video of sparks
Last edited by HermannSW on Sun May 06, 2018 2:43 pm, edited 1 time in total.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat Mar 10, 2018 11:00 pm

I did capture 640x128_s at 665fps video, but for some reason both cables where out of view.

Normally adjusting scene would be easy, but see this 640x240_s frame taken at 360fps for what is the problem:
Image


Before seeing this "normal" frame I would have expected frames to be too dark because of only 2.7ms shutter time at 360fps, but the opposite is true. Maybe this is caused by lense only few millimeters above scene. I cannot see where the cables are, which does not allow me to adjust. Good that a spark's light makes things different ...

Here is first of 6 sparks I captured at 360fps:
Image


This is 2nd spark, hit by rolling shutter, 1st frame::
Image


This is 2nd spark, 2nd frame::
Image


3rd spark:
Image


4th spark, 1st rolling shutter effect frame:
Image


4th spark, 2nd frame:
Image


5th spark, 1st frame:
Image


5th spark, 2nd frame:
Image


6th spark:
Image


The 5s recording at 360fps had 0 frame skips.

What I learned today is, that high framerate video capturing is not only useful in capturing videos. It is like doing stills photographs like a machine gun. That is useful as in current application scenario when event is extremely short and you don't know when it will happen.

For the frames without rolling shutter effect there is nothing from spark on frame before and after. That means that whole spark light effect has duration less than 2*(1000/360)=2*2.78=5.56ms.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat Mar 10, 2018 11:53 pm

Wow, I did a step back and verified that there are no sparks in case cables are more than 4mm distant. I remembered the "set square" effect seen above and made cable distance bigger than 1cm. And I did place set ruler near both cables. I had to readjust the v1 camera to be 2cm above scene in order to capture the whole scene, and to adjust the lens in M12 camera mount.

This spark is as I would have expected based on the previous set square spark shown above:
Image


But I am really surprised on this spark, jumping 4mm before going to set square:
Image


Less than a quarter of piezo triggerings result in a spark with this setup.

I don't know the material of the set square markings.
But seeing all three set square sparks seems to indicate it is good jump point for sparks.


P.S:
I created a 1fps video from all sparks captured at 90fps, just to have them in one place
(with modified "raw2ogg2anim" tool from "raspivid"):
https://youtu.be/FdoUbjiWV7g
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Fri Mar 16, 2018 4:44 pm

This is kind of "spark art", 10 sparks in a row, with f6.0mm 65° lens 4cm above scene.
Single frame of video taken by this command:

Code: Select all

raspivid -t 15000 -fps 90 -md 7 -w 640 -h 480 -o ten.sparks.h264
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Fri Mar 16, 2018 8:42 pm

Another pattern:
Image


This spark got hit by rolling shutter effect:
Image


2nd frame capturing the other part of the spark:
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Fri Mar 16, 2018 9:51 pm

Sparks take alternative routes as well, in this youtube video:
https://youtu.be/lXr3CeUsBq0

  • 9 times north route
  • 6 times south route
  • 2 times south-north route

sout-north route:
Image


south route:
Image


north route:
Image


P.S:
from male header alternative routes youtube video:
https://youtu.be/QwHDylPSHF4
Image


Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat Mar 17, 2018 3:33 pm

More on male header pins.

Here spark did jump 3x2mm=6mm in total (header pin is 0.54mm wide, 2.54mm distant):
https://stamm-wilbrandt.de/en/forum/Screenshot223.png

In this arrangement spark jumped more than sqrt(2²+2²)mm+2×2mm=6.82mm:
https://stamm-wilbrandt.de/en/forum/Screenshot224.png
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat Mar 17, 2018 3:33 pm

More on male header pins.

Here spark did jump 3x2mm=6mm in total (header pin is 0.54mm wide, 2.54mm distant):
Image

In this arrangement spark jumped more than sqrt(2²+2²)mm+2×2mm=6.82mm:
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat Mar 17, 2018 3:53 pm

I took a video of sparks between two (nearly) parallel cable heads (in the air, no contact to surface).
The 50 spark frames captured are played in 5s to give an idea of spark location/shape distribution:
https://youtu.be/ahWvhMwM7Xg


I only show one of the frames here, it is first spark that I captured where spark turns (two times) in the air. I don't have an explanation for that ...
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Wed Apr 11, 2018 6:24 pm

Today new 1000KV(!) igniter module arrived:
Image

It can do 1000KV with 7.4V input voltage, and generate 2cm sparks.
Today I did connect only one 600mAh 25C lipo via a motor controller controlled by Pi Zero, and made 1cm sparks.

I gave 4.05V to input of igniter for 0.21s by "./blink 210000":

Code: Select all

[email protected]:~ $ cat blink.c
#include <stdlib.h>
#include <unistd.h>
#include <wiringPi.h>

int main(int argc, char *argv[])
{
  int d=(argc>1)?atoi(argv[1]):100000;
  wiringPiSetup () ;
  pinMode (1, OUTPUT) ;
    digitalWrite (1, HIGH);
    usleep(d);
    digitalWrite (1,  LOW);
  return 0 ;
}
[email protected]:~ $ 

This was sufficient to see more than 3 individual sparks -- and it was really loud!

For some reason youtube does not want to process my .avi video generated with time overlay, so here it is.
180fps played at 30fps, 6 times slower than real:
https://stamm-wilbrandt.de/en/forum/t30.800KV.F.avi
P.S: Something happened, now video shows up on youtube ...
https://www.youtube.com/watch?v=KgOtzCWlcRI


Since I have control this time over the duration of voltage input to igniter, sparks don't show up in a single frame anymore.
Even the last minus first timestamp of frames with visible spark is 0.581-0.559=22ms long.
The video was taken with raspivid and v2 camera at 180fps.

This is frame just before 2nd spark begins to build up:
Image


In this frame spark begins to build up on left cable:
Image


In this frame spark (blue) can be seen emitting from both cables:
Image


Even more spark:
Image


Spark connects both cables now:
Image


Brighter and thicker spark:
Image


No spark. but picture error on top (white area):
Image


The last frame is the only of above frames with a frame skip (0.592-0.581=11ms).
Same frame skip happens at end of first spark, there that frame is completely white.


The printed millimeter paper shows that cables are a little bit more than 10mm apart.


P.S:
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Tue Apr 17, 2018 10:13 pm

I did tweet on my preparation for two camera recording of 1000KV sparks in my motor test station:
https://twitter.com/HermannSW/status/985266045165428737

Luckily I got a warning response on twitter wrt alligator clips being dangerous for the cables.
I then did tape both cables so that alligator clips are no threat for the cables anymore:
Image


Next day I did record 3 sparks with both cameras and arranged just the matching sparks:
Image

These bright lit video images do hide the details in spark build up as shown in previous posting.
So I did try with dark environment and got this:
Image


Not really useful, but explains the all white frames I had seen before with M12 mounted lens and much closer -- spark is just too bright, and GPU algorithms cannot deal with that.

I did the spark recordings with only 13mm distance between cables, did 14mm before, but with 8.07V (I know that is over 7.4V spec input max for the igniter) from two 600mAh 25C lipos more was not possible. This setup is able to provide 25*0.6/8=1.875A only at input side of 1000KV step-up converter igniter, maybe providing more C or higher mAh will allow for the 2cm sparks igniter product description tells are possible.

The sparks are really loud, nothing you should do at night.

I did do PWM and got a sequence of sparks:
https://www.youtube.com/watch?v=oNYDCkMZPPY

But there is a much simpler solution to get many sparks -- I just turned on 8.07V for 0.7 seconds, that resulted in 14 sparks one after the other. Video was taken @90fps with v1 camera, played on youtube 90/25=3.6 times slowed down:
https://www.youtube.com/watch?v=iDZrYDB-W3w
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing 2.5mm sparks with Raspberry camera

Sat May 05, 2018 1:36 pm

In the last days I was able to record 1000fps videos with raspiraw and v2 camera:
viewtopic.php?f=43&t=212518

Today I came back on capturing long 1000KV sparks at 1000fps.
I replaced the Pi Zero and motor driver by a simple switch.
I used all four arms of Realacc soldering station:
  • two for 1000KV output cables
  • one for v2 camera
  • one for 5000lm light
Image


First I did a small adjustment video with raspivid, 640x480 at 180fps.
Today wires showed sparks without issues with output wires 18mm apart.
I used a 150° lens in v2 camera M12 mount in order to move camera close to sparks.
Video looked really bad because of the spark flashes.
So I turned on 5000lm light before capturing the sparks.
For this very bright lit scene a spark is not that bright anymore, here is a frame capturing a spark:
Image


Next I took 1000fps video (in fact a 1007fps video) with scene lit by 5000lm light, here is a spark frame:
Image


Finally I wanted to know how 1000fps frames look at normal daylight.
Much better than with raspivid at 180fps.
2/3 of the 2966 frames have a 993μs delta to next frame.
This is the maximal value for shutter time as well (raspiraw has no "--shutter" option, which raspivid has).
In a 0.2s part of the video there were 7 sparks, 3 of them without rolling shutter effect:
Image


P.S:
Raspberry raspiraw/raspivid videos don't have audio.
Because the 1000KV sparks are so loud I took a video with smartphone.
So you can get an impression yourself:
https://youtu.be/O1HapNp-E8U
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Capturing (2.5mm-18mm) sparks with Raspberry camera

Wed Feb 27, 2019 10:15 pm

Just ordered four more 1000KV Tesla coils (<3$/pc). I want to use them for air-gap spark flash, a flash with duration in 1µs range:
https://www.raspberrypi.org/forums/view ... 6#p1434419

Birthday present from my children
https://www.raspberrypi.org/forums/view ... 4&t=233872
is a 150W constant voltage power supply (max 31V, max 5A).
It should suffice to generate five 1000KV sparks in parallel with 7.4V constant voltage and max 5A setting.

Just read product description of the coils again:
"Output voltage: 800KV-1000KV (please pay attention to safety when using)"

P.S:
Thinking again, because of the 7.4V/1A max numbers for the coils, a better setting would be constant current of 1A and maximal voltage of 4*7.4V = 29.6V for four coils in series?!?
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Camera board”