it's my first post here. I am pretty advanced in mechanical stuff but not that advance regarding electronics. (Even if I already did small arduino projects like stepper motor drivers successfully)
I'd like to position control a simple geared 12V DC motor with encoder via an L298N H-bridge. I connected everything as in the picture below and also understand it (at least I thought so).
--> Arduino is powered via USB
--> Arduino code is also clear and the encoder and outputs are also working according serial monitor.
--> External power supply for the motor is a standard 12V plug in transformer
--> My first Nano immediatly died after first motor revolutions to reach the given target.
I got more careful with the second one and measured if there is a potiential / difference between the motor power ground and the USB ground
--> the red circeled (picture below) is not connected currently: I am measuring nearly 5V difference
--> if I connect both grounds my arduino immediatly dies (yes, I did the same failure 2 times)
Basic question: Why do I have so different ground levels? I never had this sort of issue before with stepper divers for example.
Any help or suspicions are appreciated
additional info: The jumper from the L298N is removed so that I supply the logic 5V to the H-bridge from the arduino.