Mosfet circuit with load indicator design question. - Page 1
Forum section: electronics / beginners

author: GarySmith
author_rank: Newbie
timestamp: April 11, 2019, 11:09:17 pm
content: I'm working on a mosfet circuit for the hot bed on my 3d printer (24v). The mosfet circuit itself is actually pretty simple. I have that in place. What I want is create a sense circuit that will drive an LED when the hot bed element is passing current (i.e. working).I have looked at a few things and the solutions they have provided seem overly complex for what I'm looking to do (with little explanation)Any pointers on how I would go about this? I want to understand the process a little more (not just a simple diagram).

author: KC0PPH
author_rank: Unknown
timestamp: April 12, 2019, 12:00:36 am
content: Can you just put a LED from the output of the mosfet through a resistor to ground? If not you could put a .1 ohm resistor in the +24V and measure the voltage drop across that with an OpAmp or current sense amp.

author: GarySmith
author_rank: Newbie
timestamp: April 12, 2019, 04:24:42 am
content: Here is what I came up with. It's rough I know.https://imgur.com/a/LVvJ31o

author: MarkF
author_rank: Super Contributor
timestamp: April 12, 2019, 06:10:17 am
content: Any reason you can't just put a LED and resistor across the load.

author: GarySmith
author_rank: Newbie
timestamp: April 12, 2019, 06:14:53 am
content: The idea is that if the load dies (as in the case of my hot end element dying for example) the indicator would still show active. Right now it's an LED but ideally I would like the indicator (LED or whatever) to be a 5v digital value that I pump to a raspberry PI

author: MarkF
author_rank: Super Contributor
timestamp: April 12, 2019, 06:18:04 am
content: Then I think a LM393 comparator is what you want instead of an op-amp.You are looking for a switch not an amplifier.The LM393 is open collector so you want a pull-up resistor to the PI logic voltage.All though, it's more likely the MOSFET will die before the hot bed!

author: GarySmith
author_rank: Newbie
timestamp: April 12, 2019, 06:22:28 am
content: That makes sense. I'll play around with that and see what happens.

author: aheid
author_rank: Regular Contributor
timestamp: April 12, 2019, 06:28:30 am
content: edit: never mind, violated rule #3, never poat while still in bed

author: MarkF
author_rank: Super Contributor
timestamp: April 12, 2019, 06:56:04 am
content: Also, I would not compare against one of the voltage rails.Instead, setup a divider or pot to set a midpoint to switch around.

author: GarySmith
author_rank: Newbie
timestamp: April 12, 2019, 07:41:41 am
content: I like this solution. I just ordered a couple LM393 and they will be here on Saturday. It'll give me time to get the rest of my project setup to start testing. I know this is overkill, but I'm doing this for more of recreational/learning experience. My backup plan is the 2 external premade mosfet's I also bought for the 3d printer, but I really wanted to go through the process of rolling my own. It's been so long since I did anything electronics related. I've tinkered.

author: Zero999
author_rank: Super Contributor
timestamp: April 12, 2019, 08:25:57 am
content: The LM393 won't work reliably when one of its inputs gets within 3V of the positive rail, so another potential divider on the MOSFET is a good idea.The value of R1 is probably too low, as the maximum gate-source voltage rating of most MOSFETs is only 20V, which would be exceeded, with 24V and 100R and 10k for a potential divider.

author: exe
author_rank: Unknown
timestamp: April 12, 2019, 11:05:44 am
content: Quote from: MarkF on April 12, 2019, 06:18:04 amI don't think this matters for this application. Why having extra stock of comparators if a cheap opamp does the job?

author: Zero999
author_rank: Super Contributor
timestamp: April 12, 2019, 11:20:07 am
content: Yes, a single supply op-amp or comparator will do. It's a low speed design, so the LM358 is fine.The simplest option is to connect the LED in parallel with the MOSFET, but the logic will be reversed.

author: MarkF
author_rank: Super Contributor
timestamp: April 12, 2019, 03:44:02 pm
content: Quote from: GarySmith on April 12, 2019, 06:14:53 amI believe the Raspberry PI GPIO logic is 3.3V and NOT 5V.