Can the output of the Photon trigger a 5v Mosfet?

I am working on a project that basically triggers a solenoid to fire when the mosfet is triggered. I was using a LittleBits CloudBit with an led module that I stripped down to just the wires (this outputted 5v when it was turned on) so I was wondering can I replace the littlebits with the photon? Here is the original circuit diagram of it.

A level shifter might be needed as the Particle devices are on +3V3 -

Hi @ifstream

If you aren’t stuck with your choice of MOSFET, I would recommend choosing a logic level FET.
Logic level MOSFETs have a gate threshold voltage of less than 3V, meaning standard 3V3 microcontrollers can turn them on directly.
For example, I have used the IRLML0040TRPBF before in projects requiring logic level drive. (You’ll see in the datasheet that it’s gate threshold voltage (Vgs) is 1.8V typical.)

1 Like

Basically I need a mosfet that can handle the 36v from a laptop charger which triggers and allows the solenoid to fire at full force. btw the M1 part is the solenoid.

You’ll need to think about the hold current of the solenoid as well, do you have this information available? You need to size your MOSFET so that’s it’s maximum continuous drain current is comfortably above this hold current. As for the voltage, since you’re switching 36V, you’ll need a MOSFET with a Vds (drain to source voltage) of at least this. I would chose a FET with a Vds of at least 50V. As long as you have a diode across your solenoid you should catch most of the voltage transient but it’s good to stay on the safe side.

1 Like

Im pretty new to this but all the schematics and code are in this Onshape document. Its public!

Based on the datasheets in that Onshape document can you recommend a good perf-boardable FET for this project that will work?

Hi @ifstream

I often find it useful to have a look at sites like
They’ve often done the hard work in selecting cheap, easy to use parts that are good for hobbyists!
What you’ve got there is an N-channel MOSFET (N channel are useful for low side switching like you’re doing, and P channel are useful for high side switching).
What I mean by this is that you could either have the MOSFET above the solenoid (drain connected to +36V). Or you could have it below the solenoid, as you’ve got it there, source connected to ground. Both configurations are useful in different respects.
For logic level N channel MOSFETs I would recommend:

It has a 60V maximum drain to source voltage and a 2.5V maximum gate threshold voltage, which 3V3 from a particle photon will easily switch on.
You haven’t told me how much current your solenoid uses but this part can handle 32A (with heatsinking) and I’m sure your solenoid won’t use more than that!

Hope this is helpful. :smile:



This is my solenoid! and this is the mosfet kit I got, I think it has the same mosfet you recomended. I was using the same one for the 5v from the LittleBits so I guess that probably wasn’t the best idea!

So will these all work together then? Basically I need the photon to check for an email in my inbox labeled something specific and then trigger the solenoid. I’m wondering if I should write that solely on the photon (if there is a way to authenticate with gmail) or run it through ifttt.

Yip that’s fine, and it’s ok to use that MOSFET with a 5V microcontroller as well, it can handle up to 20V between the gate and source, remember, datasheets are useful!

Not sure about the software side of things sorry, someone else might be able to help with that!