I have read on this website : http://www.ramge.de/powermonitor/doku.php?id=pulse_meter that I need a 200 Ohm resistor to connect a 24V input to the GPIO.
I know that RasPi need a voltage between 2 and 3.3V to detect a pulse. I also know that RasPi can't manage more than 16 mA. So I have tried a Voltage divider and putting the GPIO pin 2 in derivation with GND, but it doesn't work. So the website is correct but why ? And what is the internal resistor of the Raspberry ? (or equivalent).