Particle sensor for flowing liquid or gaseous media, said particle sensor functioning according to the light obscuration measuring method, with - a medium flow path which includes a feed connection for the medium flow, a narrow passage configuration for particle detection and a discharge connection for the medium flow, - a miniaturised light source with an end face containing a light emission window for transmission of a light beam intended for illumination of the narrow passage configuration and a miniaturised light detector with an end face containing a light entry window for reception of the light from the light beam which has passed through the narrow passage configuration, characterised in that a housing body is provided with two opposite side surfaces (5, 14), each with a mounting recess (6, 15) for the light source or the light detector extending into said surface, - that these two mounting recesses (6, 15) are separated from one another by a diaphragm-like aperture diaphragm, provided between them in the interior of the housing body, which is oriented perpendicular to the optical axis defined by the light source and which contains as a narrow passage configuration a hole-formed pinhole aperture of small size oriented in line with the optical axis, - that the light source arranged in the mounting recess is, with at least a partial region of its end face and of the light emission window provided thereon, located at a distance from the front side of the aperture diaphragm at least adapted to the size of the pinhole aperture, leading to the formation of a narrow, slot-like feed gap for the medium flow, - that the light detector arranged in the mounting recess is, with at least a partial region of its end face and of the light entry window provided thereon, located at a distance from the rear side of the aperture diaphragm at least adapted to the size of the pinhole aperture, leading to the formation of a narrow, slot-like discharge gap for the medium flow and that the size of a particle in the medium flow passing through the pinhole aperture is determined by the light detector through light obscuration of the light in the light beam emitted by the light source. - a medium flow path which includes a feed connection for the medium flow, a narrow passage configuration for particle detection and a discharge connection for the medium flow, - a miniaturised light source with an end face containing a light emission window for transmission of a light beam intended for illumination of the narrow passage configuration and a miniaturised light detector with an end face containing a light entry window for reception of the light from the light beam which has passed through the narrow passage configuration, - that these two mounting recesses (6, 15) are separated from one another by a diaphragm-like aperture diaphragm, provided between them in the interior of the housing body, which is oriented perpendicular to the optical axis defined by the light source and which contains as a narrow passage configuration a hole-formed pinhole aperture of small size oriented in line with the optical axis, - that the light source arranged in the mounting recess is, with at least a partial region of its end face and of the light emission window provided thereon, located at a distance from the front side of the aperture diaphragm at least adapted to the size of the pinhole aperture, leading to the formation of a narrow, slot-like feed gap for the medium flow, - that the light detector arranged in the mounting recess is, with at least a partial region of its end face and of the light entry window provided thereon, located at a distance from the rear side of the aperture diaphragm at least adapted to the size of the pinhole aperture, leading to the formation of a narrow, slot-like discharge gap for the medium flow and that the size of a particle in the medium flow passing through the pinhole aperture is determined by the light detector through light obscuration of the light in the light beam emitted by the light source.