12 Output Devices

The assignment of this week is to add an output device to a microcontroller board and program it to do something.

I want to control a stepper motor.

After the soldering of the components, my board looks like the foto

When I programmed the board, it seemed to be ok,  but when I connected the motor it didn´t move. I checked all the conections and finally I connected several leds witth its resistors and they where always ligthining .

I measured the voltage at the drain of the mosfet and it was always 5V. I checked the output at  the gate and it oscillated between 0-5V, so, the output of the microcontroller was ok.

Finally I noticed that the mosfet I soldered was a P-MOSFET. I replaced the T1 P-MOSFET by a N-MOSFET one and I saw that the LED I connected turned on and off

I have to change all the   P-MOSFET and I hope my motor works