strange 36 volts from 12 volts

okay I am quite shocked (literally )
I am following this tutorial bildr High-Power Control: Arduino + N-Channel MOSFET - bildr
I uploaded the fade example and let the arduino run of the USB power
I connected the MOSFET to pin 9 (the fade pin)
I am using this motor with the PWM
I used a lead acid battery for the power source. The batteries voltage is 11.1
Once I tied the grounds together I got zapped. I was extremely surprised as my hands are not wet or anything and it was less than 12 volts. I thought.
I measured the voltage across the terminals of the battery when the motors was fading. it was anywhere from 12-36 volts. When I plug in the motor directly to the battery it goes to about 14-16 volts.

What is going on here. I am very confused. please help

Is it cold by you? It is possible that your body had some static electricity build up before you touched the battery, I've had that happen before to me.

OR it is possible that the motor you have was able to get up to a high enough rotation to basically make it into a generator, which could have given you the 12-36 volts.

Does this voltage spike/ increase happen every time? Can you replicate it?

Please post a picture or video.

yes it is repeatable. I set my multimeter to the 200 range DC and got 19 volts. I set it to 200 AC and got 35. when I set the multimeter to 500 DC it goes to 45. I know my multimeter is not broken as I felt the 30 volts at one point. I felt the square wave coming from the arduino

Was the motor turning at that point? You are getting the back EMF from the motor.

Ok so then as the motor is winding down, the coils inside pass by the magnets and that creates a DC pulse which could in-turn, become a little generator.

Yeah, look up "magneto", and I don't mean the guy from the Marvel comic books.

I can’t see any way you could get high voltages across a 12V lead-acid battery, however you will definitely get high voltages across the motor and across the mosfet if you don’t have the diode securely connected in parallel with the motor. The current rating of the diode should be at least as high as the stall current of the motor.

I can safely say when I started playing with DC motors like this - I got somewhat of an uncomfortable tingle whilst touching the heat sink the MOSFET was attached to (MOSFET drain is attached to the tab of package, usually)

Needless to say, I did not have the appropriate protection in place to protect against back EMF as mentioned by other members here.