TrafficPorducer
Posts: 2
Joined: Fri Sep 23, 2022 1:53 pm

Add a separate 3.3 Volt signal wire to output

Fri Sep 23, 2022 2:04 pm

Raspberry Pi 3B.

Is it possible, OK, to add a separate 3.3 Volt signal wire to a Pi pin that is also used to send an output signal to a MOSFET.

So that the Pi can switch that MOSFET on and also the separate 3.3V signal wire is able to switch the MOSFET on.

This is so that a switched 3.3v supplied from the Pi is sent to the MOSFET or a signal from the Pi is sent to switch the MOSFET on

For use with Octoprint Plugin Light Pi control or switch control of a light on a 3D Printer

Thanking all

User avatar
rpdom
Posts: 20874
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Add a separate 3.3 Volt signal wire to output

Fri Sep 23, 2022 3:02 pm

You could do it with a diode and resistor.
Screenshot from 2022-09-23 16-00-19.png
Screenshot from 2022-09-23 16-00-19.png (2.45 KiB) Viewed 334 times
The diode will prevent the 3.3V from backfeeding into the GPIO and the resisitor will pull the gate of the MOSFET to ground unless the button is pressed or the GPIO is set high.
Unreadable squiggle

danjperron
Posts: 4212
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Add a separate 3.3 Volt signal wire to output

Fri Sep 23, 2022 5:04 pm

Ok you really need to check the datasheet of the mosfet. A lot of them need more that 3.3V to drive.

This is a post about the IRF520 .

viewtopic.php?t=329402&hilit=mosfet&start=125#p1987589

The IRL520 is a better choice ,the IRLB8721Pbf if you are using Voltage < 30V or IRLZ44 < 60V.

The other method is to drive the mosfet with a transistor to increase the Voltage on Vgs.

TrafficPorducer
Posts: 2
Joined: Fri Sep 23, 2022 1:53 pm

Re: Add a separate 3.3 Volt signal wire to output

Fri Sep 23, 2022 8:09 pm

rpdom wrote:
Fri Sep 23, 2022 3:02 pm
You could do it with a diode and resistor.
Screenshot from 2022-09-23 16-00-19.png

The diode will prevent the 3.3V from backfeeding into the GPIO and the resistor will pull the gate of the MOSFET to ground unless the button is pressed or the GPIO is set high.
But: will the signal from GPIO pin may drain to Ground added to a diode drop in current/volts

ghp
Posts: 2887
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany

Re: Add a separate 3.3 Volt signal wire to output

Sat Sep 24, 2022 5:54 am

Refer to viewtopic.php?t=340509#p2040209:
The diode current is prox 0.33mA which for a custom 1N4148 diode results in a 'forward voltage' of prox 0.56V; there are still 2.74V gate voltage. This should be enough for a logic level mosfet. Schottky diode have around 0.4V forward voltage (bat43, taken from the datasheet at prox 0.3mA).

There are other options to have a 'light switch':
current_switch.png
current_switch.png (17.76 KiB) Viewed 224 times
This one is simple, as it just bypasses the mosfet. But if RPi is powered off then light is still on.

Or this one
current_switch2.png
current_switch2.png (27.56 KiB) Viewed 224 times
The second mosfet is operated from 5V just to have lower Rds if on. This option switches light off if RPi unpowered at the cost of an additional mosfet.

pidd
Posts: 4160
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Add a separate 3.3 Volt signal wire to output

Sat Sep 24, 2022 2:47 pm

Or use a switch that can handle the load current and simply put it across the drain source of the FET, no extra components needed.

drgeoff
Posts: 13312
Joined: Wed Jan 25, 2012 6:39 pm

Re: Add a separate 3.3 Volt signal wire to output

Sat Sep 24, 2022 4:32 pm

pidd wrote:
Sat Sep 24, 2022 2:47 pm
Or use a switch that can handle the load current and simply put it across the drain source of the FET, no extra components needed.
That is what ghp's first schematic in his post above shows.
Quis custodiet ipsos custodes?

Return to “Beginners”