I am trying to make a DC motor turn in a direction for a few seconds and then rotate it back to the other direction. I am using a L298n, a Arduino UNO and 4 x 1,5V batteries. It works when I am using a really small DC motor, but when I use a motor from a drill, the motor stops spinning after a small "step" and goes back. It is also making a lot of noise. The drill was using 12V batteries. My question is, is the problem the power supply?
What is the amperage draw of that drill motor? I suspect it is a lot higher than the 2 amps that L298N motor controller can supply. It might be 20 times that.
Almost certainly. The L298 will drop at least 2V so you're giving 6-7V to a 12V motor and it probably also wants more current than the L298 can supply.
OTOH before anything else you could try giving it full power (max 255 instead of only 100).