A popcorn making machine includes a case, a roaster mounted therein and provided with a circulated hot airflow, a feeding pipe receiving raw corn and delivering it into the roaster, a dosage unit capable of controlling a flow of raw corn into the feeding pipe, a sensor unit that includes a light source capable of irradiating light at least partially directed into the roaster containing a quantity of corn kernels, a sensor capable of producing an electric signal corresponding to a light flow received by the sensor, wherein the light flow particularly depends upon the quantity of corn kernels contained in the roaster, a light-guide for delivering the light flow from the roaster to the sensor, and a programmable electronic module capable of processing the electric signal produced by the sensor, associated with the dosage unit and capable of controlling thereof. Detail design of the sensor unit is also provided.