I'm not sure, how to find out, how many sensors I can use with my Arduino Uno.
My arduino is connted to a L298N H-Bridge and gets its power from the L298Ns 5V output.
On this same 5V-Line I connect 3 Ultrasonic sensors HC-SR04 ...
The Arduino slows down and switches itself off sometimes.
Are the 3 Ultrasonic sensors HC-SR04 too much for it?
How do I find out how much mA I can put to the 5V Line?
Also the delays are much longer than milliseconds...
You are using a motor driver. Therefore you have a power supply and a motor. These will likely be the issue, the power supply cannot provide enough current for the motor?
What you are saying does not match what you drew. The number of sensors is theoretically unlimited but you will need more hardware when you run out of pins. Your statement "My arduino is connted to a L298N H-Bridge and gets its power from the L298Ns 5V output." is not exactly correct. The 5V pin on the L298 is for powering the internal logic of the L298, it does not supply a regulated voltage. What your drawing shows is you have three HC-SR04 sensors and the L296 powered from the 5V output of the arduino. Why not lose the 9V battery and connect the Vin pin of the arduino to the 12V power. Each sensor requires at least 15mA each, the L298 requires 36mA so 36+15+15+15 = 81mA. you ask: "How do I find out how much mA I can put to the 5V Line?" that is something you need to calculate. The data sheet of the regulator will give you its capabilities then you have to add the worse case load of the Arduino and then add the 81mA this is the load. Using Ohm's law calculate the wattage that you currently require. Look at the temperate characterless of the regulator and know the voltage drop. Then multiply your current times the voltage drop, that will give you the amount of heat you are trying to dissipate. From this you can calculate how much you can get out of the 5V. I believe you will find you ran out of power. Also when you connect to the 12V the dissipation of the Arduino regulator will also increase lowering what it can power.
Good Luck & Have Fun!