Every source I find says you should disconnect the jumper for the onboard voltage regulator when supplying the driver with more than 12V, otherwise the regulator takes damage.
And yet, the voltage regulator is a 78M05 and every datasheet I find says it can handle 35V input. It also does not supply the motors with high amps, only the control logic and the arduino, so I do not see any point in ever removing the jumper. But the manufacturer probably didn't install it there for the lulz...
Am I missing something or is it actually safe to use the onboard 78M05 with higher supply voltages than 12V?
You shouldn't talk of just "L298N" in this context, but rather an "XYZ model L298N module" since you aren't using a virgin 298 but one on a board with other stuff, and there are a few of those.
edit: The module reference I found, for example, says that its jumper connects the L298's Vs (motor) and Vss (logic), and if Vs>7V that would put Vss over its maximum allowed 7V. So then on that particular module, taking the jumper off actually brings the 7805 into play, disconnects Vs from Vss, and puts a regulated 5V into Vss regardless of Vs. It then at the same time allows you to run the Arduino off that regulated 5V.
So, please link to references you have, and let members take a look.
I want to build an RC car with an old 18V Li-Ion string trimmer battery and an ESP cam on it. So I think I will measure how much current the ESP CAM draws, multiply by (18V-5V) and see what power I get and how much that is compared to the motor power. If it pales in comparison and doesn't make the regulator too hot, I think I'll go with that.
The 78M05 has 700mA peak output.
Without any load, you can expect a 3-5V DC garden variety motor to consume 250mA without any load.
There is no way a 78M05 can supply enough output.
Plus the L298N is incredibly inefficient, so you will have significant losses when driving the motors with it. Unfortunately for some reason whenever you look up ways to drive small dc motors you will get swamped with L298N suggestions first.
Additionally you're running the 78M05 with 18V (to be fair 21V-~15V after which you need to turn off the device automatically or you will damage the battery pack), which is insane and on the very very border of the allowed input. It will waste 72% of the battery's charge just getting the voltage down to your 5V. At 1A, given 4 dc motors with no load, it will dissipate 8W of power which will burn it for sure.
The 35V you are reading in the datasheets are the maximum ratings. These are not for operating conditions but to say that under those circumstances you can expect immediate, catastrophic failure.
I recommend using a buck converter to supply the 5V you need that has enough current output for the esp and the motors under load (to measure peak current consumption of a dc motor measure resistance across the leads, and slowly turn the rotor until you get the lowest measurable reading, then divide that into your motor's supply voltage).
Furthermore you should look into a different motor driving circuit, for example the DRV8833, as it will allow you to drive the motors way more effectively and further increase your battery life.
Thanks for your reply! The 5V do not power the motors, only the controller. The motors get whatever I connect to Vcc (-1.4V I guess). However, I read the esp32 cam already sucks 300mA max, so times 13V that would already be 4W, so half of my cheap hot glue gun :P. And I guess I better get a buck converter anyway.