# How to measure 2.5 volts out of 5 volts and serial resistors?

I have a circuit that's being run from a 5v and is essentially a series of resistors. I want to be able to "tap" it to get 2.5v - 3v out of it, which I think would be straightforward, but I want to do this at the end of the circuit.

Specifically, I have a raspberry PI 5v output that goes through a resettable fuse (PPTC), then some heating coils (Kanthal wire) of various resistances, and then to a MOSFET drain. In total, the resistance is about 30 ohms. Source is connected to ground, and the Gate is controlled by the GPIO output of a Pi. This works fine.

However, I'm concerned that something might happen, like blowing out the fuse, and I want to monitor that it's working properly. To do this I was planning on connecting the circuit to a raspberry Pi GPIO input checking that the pin goes high when I turn on the circuit (via the MOSFET).

Simply, how do I connect this? I'd like this check to encompass as much of the circuit as possible. By that I mean that I only want to get the signal on the input if the PPTC and the wires are "working".

Since the 5v is not switched by the MOSFET I can't really tap that to check that the circuit is working. Notwithstanding the that, I considered taping after the PPTC and then using a voltage divider, but that would only confirm that the PPTC is working, and wouldn't confirm the heating elements. I considered tapping after the last heating wire and before the MOSFET, but at that point the voltage measures close to 0v, which wouldn't drive the GPIO input.

Two ideas:

1. Connect right before the MOSFET Drain. Also connect to the 3.3v line through a large resistor to pull up the pin. Then when the MOSFET opens up and the circuit is properly working then the /tap/ should get pulled to ground because it's close to 0v at that point.

2. Set a transistor right before the MOSFET Drain that can be driven with the small voltage that will exist there, then let the output pull up the pin.

Edit:

This is the schematic:

The two variable resistors (R1 and R2) are the heating wires, and are about 15 ohms each, but do vary.

• Could you add a schematic of the loop you are talking about? It is not totally clear from your description. Commented Nov 10, 2018 at 2:00
• The simplest solution would likely be a voltage divider across the FET to reduce its open circuit voltage to within the pi's allowed input range. Circuit intact but FET open reads high. Circuit broken or FET closed reads low. One you've read the input with the FET both driven and undriven you know the whole situation. Commented Nov 10, 2018 at 3:30
• @EdgarBrown: Apologies for the confusion. Added. Commented Nov 11, 2018 at 2:02
• That’s a very puny heater. <900mW?! Commented Nov 11, 2018 at 2:08
• Yes. About that... I'm heating two 15mm diameter lenses to prevent dew. Commented Nov 11, 2018 at 2:25

The low current is a small issue, but I believe your best solution is to use a low-side current sensing amplifier (like this one from TI) or just put together your own with an appropriate op-amp.

Place a small resistor at the source of the MOSFET, and amplify the voltage drop up to a usable range. Keep in mind that at these low voltages op-amp input offsets can be a problem, so pay attention to that.

As you have a ~200mA current, a 0.2ohm resistor would give you ~40mV. With a gain of 50 this would become an easy to read 2V.

If you can tolerate a much bigger drop, you could use a couple of transistors or a transistor and a resistor in a crude current mirror configuration that pulls down a pin when a high enough current is circulating.

If you want precision in your measurements, there are resistors designed specifically for this purpose. And, as the impedance of the traces/wires can be an issue a 4-point connection would be a must.

• Is there a straightforward way to limit the output voltage? The GPIO input is rated at 3.3v. Since the op-amp output voltage will vary with current (sense resistor voltage difference) I'm concerned with the possibility of too much voltage to the GPIO if, e.g., I decide to go lower resistance wires in order too increase the heating. Commented Nov 11, 2018 at 8:43

Instead of measuring voltages, you really want to measure the current. You can do that with any number of specialized integrated circuits, or you can build your own with a sense resistor (or use one of the series elements) and a comparator.

You can also run the resulting voltages into some ADC inputs and do some math.

• As an example you can go to digikey search under "PMIC - Current Regulation/Management". There are plenty of options. Commented Nov 10, 2018 at 2:51