I'm using a MOSFET Power Control Kit (COMM-10256) and am trying to control voltage going to a 12v DC motor.
I have a program that fades an LED using PWM, but when I replace the LED with a signal wire to the MOSFET, the voltage doesn't behave as I hoped.
I can send an analogwrite(10,0) and get 0v. When I send an analogwrite(10,1), the voltage goes high to 11.4v.
No idea how you've connected things up, nor what power supply, nor which voltage
you are measuring, not the MOSFET part number or datasheet nor which
motor you are using, so if you want more than guesswork please provide
all the information about your setup.
Add a 150 ohm resistor in series with the gate if you want to avoid damage to
your Arduino. MOSFET gates are highly capacitive and you need to limit
the inrush current to protect the Arduino pin.
Now tell us which voltage you are measuring. A voltage is a potential difference
between two points in a circuit. You need to tell us which two points in the circuit
you are sticking the multimeter probes on. That's what "which voltage" means!
I merely hooked up a motor. It behaved as expected. The voltages stayed as measured previously.
Dunno why. Dunno how. It works.
I had expected the voltage to start low and slowly rise as the PWM ramped up. PWM(0) was 0 volts. PWM(1) was 11.29 volts and slowly climbed to 11.44 volts at PWM(255). (As measured on the motor side of the mosfet.)
You're measuring across the motor? It has a free-wheel diode? Is the motor under load (back
EMF depends on the speed of the motor of course).
Remember multimeters average the voltage so you are seeing a long term time average of a
waveform. I suspect you just need to check voltages are as expected at PWM 0 and at 255...