I am using the Pololu motor “100:1 Metal Gearmotor 37Dx73L mm 12V with 64 CPR Encoder (Helical Pinion)” with a power source of around 12V (3 of the XTAR 14500 1200mAh 3.7V Protected 2.8A Lithium Ion (Li-ion)). After applying power to the motor with no load, I noticed there are voltage fluctuations where the voltage drops at a certain point of every revolution. This was tested using a multimeter and with the encoder through a USB oscilloscope revealing the period of the square wave changing.
Your description of the problem is not entirely clear to me. Could you post more details about your setup and how your multimeter and oscilloscope are connected? Are you just connecting the motor outputs directly to a battery or do you have other electronics involved (such as a motor driver)?
Also, could you post pictures of your setup that show all of your connections? If you think it would help, a video showing the problem might also be good.
TEST CASE 1: L298N Motor Controller
The multimeter probes are connected to motor power and gnd coming from the L298N.
Expected: voltage is constant throughout.
Actual: voltage is fluctuating. In the video below, you can hear the difference of the motor speeding up and slowing down.
Source code steps
Supply PWM value (hard coded to 100 out of 255) to signal MOT_A_EN_PWM.
TEST CASE 2: Power Supply straight to the Motor
Bypassing the L298N and plugging the power supply directly to the motor. I don’t have a multimeter video for this one, but it was 11.1V fluctuating with 11.2V (mostly 11.1V though).
I would not expect that behavior from the ancient, extremely inefficient L298N driver. It is a completely inappropriate choice for that motor. For one, the L298N is limited to 2A maximum and the start/stall current of that motor is estimated to be 5.5A, so the driver may be overheating and going into thermal shutdown.
Keep in mind that the stall current is briefly drawn every time a brushed DC motor shaft starts rotating.
Best to use a modern, appropriately chosen MOSFET-based motor driver. (I have no affiliation with Pololu).