I'm having trouble isolating a short-circuit on one of my projects, and I keep going through fuses (it has its own transformer, rectifier, and fused AC input). I wanted a resettable fuse board so I could figure out what was causing my blown fuses.
Here is the board I came up with:
[attachment=1]
It's got terminal block and USB B connector input, terminal block and USB A connector output, a terminal for multimeter probes (for current measurement) and a bypass, a "power good" indicator LED, and a "fuse tripped" indicator LED.
[attachment=2]
The "fuse tripped" indicator is the most interesting part of the circuit (to me, anyway). The P-channel MOSFET source is on the near side of the PTC, and the gate is on the far side of the PTC, pulled down to ground. When the current through the PTC is less than the trip current of the PTC (250mA), the voltage drop across the PTC is negligible, and therefore the voltage at the gate is high with respect to the drain, and so the PFET does not conduct, and the LED is dark. When the current through the PTC exceeds the trip current, the resistance increases dramatically (and with it, the voltage drop across the PTC). Then the pull down brings the gate voltage closer to the drain voltage, and the PFET conducts, lighting up the LED.
[attachment=0]
Because I wanted to be able to handle large voltages (~40V, max), I used 3x 10k resistors in parallel, for a poor man's 3k3 high(er) power resistor, to avoid exceeding the current limit of the LED. I was worried that they would be too much to light up well when using the 5V from the USB connector, but I tried it out, and though dim, it is visible.
Now I have something I can use for in-line current measurements for USB-powered projects (or chargers, or whatever), and I can limit the current to less than the 500mA max provided by the USB spec (yes, I know that high power devices are supposed to negotiate high power usage with the host...). I hope it proves useful in isolating the short in my other project, we'll see.
This is very cool. I really like the LED indicator idea. We have a power supply coming soon that has resettable fuses, but not fuse blown indicators. So cool!
Yeah, I saw that on the Wiki, it looks really handy. I was designing my own for a while (with current limit and measurement) but the project has languished.
After implementing the PFET fuse-tripped indicator, I had some ideas about a way to auto-switch for current measurement (rather than using a jumper, as I did above, to switch between a multimeter and a bypass).
My goal was to have a circuit with two test points that would work normally (i.e., pass current) when nothing was attached, but when current-measuring multimeter probes were touched to the test points, the circuit would disconnect the bypass and switch all current through the multimeter. I was hoping that this would make current measurement as non-disruptive as voltage measurement.
Here's the circuit I came up with. It doesn't quite work, but I think I know why, and I will solicit suggestions for improving it, since I'm not sure how to fix it.
[attachment=0]
The idea is that Q2 (PFET) and Q3 (NFET) would take turns passing the current whether or not the multimeter was connected to the test points. If the test points were left unconnected, then R1 would pull the gate of the PFET down (with respect to the drain), causing Q2 to conduct, and the gate of the NFET down (with respect to the source), causing Q3 to not conduct.
When a multimeter is connected in current-sense mode, it (effectively) shorts the two terminals together. This overpowers the pulldown resistor, and brings the gate of the PFET high (with respect to the drain) and the gate of the NFET high (with respect to the source), which causes the PFET to stop conducing and the NFET to conduct through the multimeter, allowing for current measurement.
The problem, I think, is that this design requires ideal switches that are perfectly on or off, and that any MOSFETs I might find will probably never make it out of the linear region, because the voltage difference between the gate and the drain or source will never really be large enough to put the MOSFET in saturation. The MOSFETs will then have a substantial voltage drop across them, and I won't get the output voltage I want available to the load.
So, my questions are, is it just a matter of finding a high(er) performance FET to use (I'm using an 2N7000 for the NFET and the same higher-performance PFET as the indicator circuit)? Or should I look for some kind of other switching semiconductor (like a switch IC? A transistor would have more of a voltage drop between the collector and emitter than I would be looking for (I think). Or should I look for a different circuit entirely? Or should I give up on this, because it can't be done? I'm worried that anything more complicated would end up not being cost effective.
Non-disruptive current measurement is so cool too :) I don't have any advise on the circuit, but I imagine someone around here does. If nothing else, you could probably slip in a cheap and small macro to do the detection and completely switch the FETS on and off...seem overkill though, but gives a lot more room for customization and hacking.
I just realized I could also follow Dave Jones's microcurrent approach, and put a current-sense resistor and amp in there with the right gain, and use the multimeter voltage probes to take the measurement.
[Edit:] But I'm still very interested to find out if there is some approach that would work like the one I was exploring.
the Q2 part of the circuit should work, the q3 seems there is no way for it to work, 'cause when the multimeter is connected, with load at near to VCC, S,D,and G will be at the same potential..
how about using a high side Pfet for q3, that is driven with an nFet...(gate connected to the same gate as the q2, source and GND, drain at the gate of the q3 pfet(wiht a pullup there as well))...when there is a multimeter, this will turn off Q2, and turn on the nFet, whic will turn on the Pfet..,
when there is no multimeter connected, the q2 will open, and the NFET will shut shut down, this will leave the q3 pfet pulled up and it wil lshit off
*PS. the q3 symbol you are using is also for PFET...
P.S.S another thing, youll need a rectifier diode between the junction pint and the q3,to prevent current going into the q2 gate when there is no multimeter
Just thoght of even better solution, insted of the q3, just place a shotkey diode...when there is a multimeter, the current will flow through it and shut off q2, like you envisioned...when you take the multimeter off.. PMOS is switched on and the diode is reverse polarized preventin revrese curent to shut the PMOS off....
insted of the shotkey you could use a PMOS acting as a diode..like in this post..http://dangerousprototypes.com/2012/05/ ... -tutorial/ (http://dangerousprototypes.com/2012/05/29/p-fet-reverse-voltage-polarity-protection-tutorial/)
PFET..Drain at the and terminal of the multimeer and the gate of the q2, Sorce at Vout....and GATE to gnd...
You could also look at http://http://sensing.honeywell.com/index.php/ci_id/49804/la_id/1/document/1/re_id/0. It's a small hall-effect current sensor that comes in 40mA, 200mA, 1A and 5A sizes.
A multimeter might easily take half a volt of burden voltage, maybe even more. So its not easy to distinguish it from a diode. A small resistor (like to uCurrent) or a hall-based sensor (the one from Honeywell or the ACS712) might be better.
I also recommended using the u current setup, INA138, 139, 169 and 168 from TI are really cheap high-side current shunt monitors..
and the setup is simple as 2 resistors and a small sot23-5
Thank you for all the suggestions.
[quote author="arakis"]the Q2 part of the circuit should work, the q3 seems there is no way for it to work, 'cause when the multimeter is connected, with load at near to VCC, S,D,and G will be at the same potential..[/quote]
You're right, of course, I wasn't thinking about this.
[quote author="arakis"]how about using a high side Pfet for q3, that is driven with an nFet...(gate connected to the same gate as the q2, source and GND, drain at the gate of the q3 pfet(wiht a pullup there as well))...when there is a multimeter, this will turn off Q2, and turn on the nFet, whic will turn on the Pfet..,
when there is no multimeter connected, the q2 will open, and the NFET will shut shut down, this will leave the q3 pfet pulled up and it will shut off[/quote]
This is what I ended up doing, and it worked. There was still a small difference in the voltage to the circuit, but it was only a 5mV or so.
[quote author="arakis"]P.S.S another thing, youll need a rectifier diode between the junction pint and the q3,to prevent current going
into the q2 gate when there is no multimeter[/quote]
The need for this goes away when I use an NFET to drive the PFET.
[quote author="arakis"]Just thoght of even better solution, insted of the q3, just place a shotkey diode...when there is a multimeter, the current will flow through it and shut off q2, like you envisioned...when you take the multimeter off.. PMOS is switched on and the diode is reverse polarized preventin revrese curent to shut the PMOS off...
insted of the shotkey you could use a PMOS acting as a diode..like in this post..http://dangerousprototypes.com/2012/05/ ... -tutorial/ (http://dangerousprototypes.com/2012/05/29/p-fet-reverse-voltage-polarity-protection-tutorial/)
PFET..Drain at the and terminal of the multimeer and the gate of the q2, Sorce at Vout....and GATE to gnd...[/quote]
A Schottky would probably work, but it would give me more of a voltage drop than I was looking for. The first thing I tried, actually, was the last thing you suggested, the PMOS-as-ideal-diode. It works well for the reverse-polarity-protection case illustrated in that post, but it fails for the OR-ing case I need there. Because the gate of the Q3 PFET is always at ground potential, when the multimeter is *not* attached, the Q3 PFET conducts back from the vout to the gate of the current-passing Q2 PFET, which starts to choke off the voltage going through. It reaches a steady state around 3V or so on the output.
[quote author="arakis"]I also recommended using the u current setup, INA138, 139, 169 and 168 from TI are really cheap high-side current shunt monitors..
and the setup is simple as 2 resistors and a small sot23-5[/quote]
I have some INA169s around, and so I will investigate this approach next. I really like the idea of leaving the current sense resistor in there, that way, the output voltage will not change (possibly disrupting the load) when adding or removing the multimeter. I will experiment with this. If it works, and the cost difference isn't too huge, I expect I'll go with it. (I've been thinking of making a small production run of PCBs or kits if I get this thing working).
So I designed a PCB for this and sent it away to OSH Park. It arrived the other day, so I thought I'd post up some pics, even though the parts order hasn't come in yet.
I took it a step further from the earlier version, and made it with a footprint for the two most common (at least, as far as I know about) breadboard power rail layouts. I also really tried to reduce the footprint.
[attachment=0]
It still features the resettable fuse and indicator LED, as well as a current sense resistor and INA138 with some pads for testing. It is meant to output roughly 1mV per 1mA of current.
It uses the MCP1824S series of voltage regulators, which can give from 5 and 3V3 all the way down to 0V8. The switch is an ON-NONE-ON SPDT which will switch between 5V and whatever regulator you're using.
If it works, I'll fix a few things I've noticed, and I'm planning to put it up for sale as a kit at Space Age Robotics (http://www.spaceagerobotics.com/ (http://www.spaceagerobotics.com/)), and maybe also Tindie (http://www.tindie.com (http://www.tindie.com)).
My PC seems to be jacked up -- Eagle won't let me add a frame or text to the Schematic, so I can't add the CC BY-SA markings. So I'll have to post the schematic later after I sort that out.
Anyway, I welcome any feedback....
Okay, it took me a while, but here is the updated version. I call it the 'Power Prong' now, because I can never think of a good name.
The design files are up on github: https://github.com/space-age-robotics/P ... USB-Supply (https://github.com/space-age-robotics/Power-Prong-USB-Supply)
[attachment=0]
Some notes on the first rev (the one in purple, in the post above):
* It actually worked pretty well, esp. the fuse and trip indicator.
* My measurements for the breadboard connectors were way off, by ~0.1" too wide. So I had to seriously bend some extra long pins.
* Fixing the connector made me run out of room on top of the board, so I put some of the components on the bottom side.
* Having some components on the bottom makes it a lot less crowded up top, it should be much easier to solder now.
* The current measurement thing works okay, it seems accurate to a few mA. I have a really low-end multimeter, though, so a nicer one might give better results.
* The white square under the switch is so you can write your own label in for the VREG voltage. The MCP1824S series comes in a bunch of different voltages, and they are interchangeable on this project.
* I had to make my own package for the SPDT switch, based on the datasheet drawings. It fit perfectly the first time, what a relief.
[attachment=1]
I'm going to send this design away to Seeed, and if it works, I'll post the extra boards up for sale.
I really like this. May I please use your current measurement setup on the smoke tester? We were going to scuttle that feature in v1 but your setup works great on my breadboard.
[quote author="ian"]I really like this. May I please use your current measurement setup on the smoke tester? We were going to scuttle that feature in v1 but your setup works great on my breadboard.[/quote]
What is the smoke tester project? Feel free to use this setup, if you like, thank you for asking. Feel free to send a spare PCB, if you have any.
I had considered using a higher value sense resistor so that I could get a more precise measurement, but I didn't want to lose the 1mA/mV correlation on the output. It's hard to have a lot of confidence in the measurement with my cheapo multimeter anyway (which can barely get mV right, I think). So some more thorough evaluation of the circuit might be in order.
Thanks schazamp. The project is a personal project (not currently intended for sale) so I have a way to do a first power up and not fry anything. Multiple fuses, multiple inputs (18v/usb) , and outputs (3.3,5v, fused, fuse indicators, terminals and USB female jack). My main goal was a fused USB female for testing prototypes (what I do most), the other stuff was just the kitchen sink :)
Of course you can have the pcb :)
Here's the thread with the DP smoke tester (http://http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=4583)