Spark detection system installed into dust extraction pipe