Skip to main content
added 407 characters in body
Source Link
Spehro 'speff' Pefhany
  • 423k
  • 23
  • 352
  • 952

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

Look at the datasheet for the MOSFET and see if you can predict the power dissipation when on. The resistor R2 is to turn the MOSFET off if the drive line goes open circuit. R1 slows the switching a bit and may help to protect your MCU if something bad happens.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current. If your 3.3V supply can handle the base current it would be better to use a PNP + NPN transistor (active low input). Switching is hard on the output transistor so one with a good safe operating area (SOA) needs to be considered to avoid 2nd breakdown failure.


Based on your supplied datasheet link, there is no solid information on the solenoid current at 12V. The 4750 ohms is for 220VAC making it about a 10W coil, so I might guess it will be more like 5W at 12VDC (usually AC coils are less efficient), making the current about 450mA. So a small MOSFET will do a good job, and a 1N4005 is more than okay. You would need 25-50mA base current to drive a BJT deep into saturation so a MOSFET is better.

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

Look at the datasheet for the MOSFET and see if you can predict the power dissipation when on. The resistor R2 is to turn the MOSFET off if the drive line goes open circuit. R1 slows the switching a bit and may help to protect your MCU if something bad happens.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current. If your 3.3V supply can handle the base current it would be better to use a PNP + NPN transistor (active low input). Switching is hard on the output transistor so one with a good safe operating area (SOA) needs to be considered to avoid 2nd breakdown failure.

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

Look at the datasheet for the MOSFET and see if you can predict the power dissipation when on. The resistor R2 is to turn the MOSFET off if the drive line goes open circuit. R1 slows the switching a bit and may help to protect your MCU if something bad happens.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current. If your 3.3V supply can handle the base current it would be better to use a PNP + NPN transistor (active low input). Switching is hard on the output transistor so one with a good safe operating area (SOA) needs to be considered to avoid 2nd breakdown failure.


Based on your supplied datasheet link, there is no solid information on the solenoid current at 12V. The 4750 ohms is for 220VAC making it about a 10W coil, so I might guess it will be more like 5W at 12VDC (usually AC coils are less efficient), making the current about 450mA. So a small MOSFET will do a good job, and a 1N4005 is more than okay. You would need 25-50mA base current to drive a BJT deep into saturation so a MOSFET is better.

added 117 characters in body
Source Link
Spehro 'speff' Pefhany
  • 423k
  • 23
  • 352
  • 952

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

Look at the datasheet for the MOSFET and see if you can predict the power dissipation when on. The resistor R2 is to turn the MOSFET off if the drive line goes open circuit. R1 slows the switching a bit and may help to protect your MCU if something bad happens.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current. If your 3.3V supply can handle the base current it would be better to use a PNP + NPN transistor (active low input). Switching is hard on the output transistor so one with a good safe operating area (SOA) needs to be considered to avoid 2nd breakdown failure.

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current.

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

Look at the datasheet for the MOSFET and see if you can predict the power dissipation when on. The resistor R2 is to turn the MOSFET off if the drive line goes open circuit. R1 slows the switching a bit and may help to protect your MCU if something bad happens.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current. If your 3.3V supply can handle the base current it would be better to use a PNP + NPN transistor (active low input). Switching is hard on the output transistor so one with a good safe operating area (SOA) needs to be considered to avoid 2nd breakdown failure.

Source Link
Spehro 'speff' Pefhany
  • 423k
  • 23
  • 352
  • 952

You can use a circuit like this:

The particular MOSFET shown will handle easily 6A or more without getting too hot, however the diode D1 should be upgraded if the current is more than a couple of amperes (eg. 1N5405). The main missing piece of information is the solenoid current.

schematic

simulate this circuit – Schematic created using CircuitLab

If you use an NPN transistor you will have to supply a lot of base current (typically about 1/10 to 1/20 of the solenoid current), which will require at least another transistor to drive the NPN unless the solenoid is very low current. One possible configuration to do that is with a darlington, but that drops about 1V so the transistor will get hot if the solenoid draws much current.