Electronic – Amplify Square Wave with Simple Mofset Circuit

amplifiersquarewave

I am a hobbyist. I have a square wave being generated by a 5 volt Arduino. (I tried a 555 circuit but I couldn't get it at an exact square wave.)

The Arduino square wave runs from about 2 or 3 volts to 0 volts. I want to amplify that positive pulse to 12 volts with a mosfet (741) to pulse an electromagnet. The electromagnet is a 12vdc and should run at or below 250 ma. I tried the following setup but am getting a weird signal, kind of like a square wave with rounded shoulders at around 1 volt and a peak in the middle that goes up to about 7 volts. I expected to see the exact same square wave that went in, but coming out at 12v+ instead of 3. am I doing something wrong?

My First Attempt

enter image description here

Edit: Do you think the above circuit is correct?

Best Answer

Strange circuit: -

enter image description here

If it is a P channel MOSFET then that's OK because source connects to +12 volts (via a resistor whose value is unspecified) and the drain connects to the load BUT, to properly drive the gate, the gate levels have to be 12 volts (MOSFET off) or gate at say 6 volts or less to turn the MOSFET on. Clearly this is not achieved with the Arduino output.

If the MOSFET is N channel then the body diode will conduct and the load will be permanently powered by about 11 volts minus the volt drop across the resistor in series with the source.

Neither will do what I think you want.