There might be an error in your thinking.SlowBro wrote:When not connected to the Pi and turned on via Arduino GPIO the MOSFET shows 3 ohms Drain-Source which according to Ohm's Law should be able to deliver up to 1.64A. (4.92V / 3 ohms = 1.64A)
The threshold may be 1v (the datasheet says 1v is the minimum, with 2.5v maximum) but you want it to pass 440mA with almost no voltage loss, so that the full 5v is across the Pi.SlowBro wrote:The Arduino puts out 3.2V when the GPIO is high and the threshold of the MOSFET is 1V. So the Arduino and MOSFET should in theory be sufficient for the task.
SlowBro wrote:On the Pi the Drok USB meter says 4.95V and my Dr. Meter says 4.92V, both of which are well above the ]under voltage threshold of 4.65V. Drok meter says current consumption is around 440mA and the undervoltage warning disappears if current is less, about 300mA or so.
Drops to 4.74V at pin 4, which is still above the threshold, though not by much. But after boot the voltage rises above 4.82V and I still get the lightning bolt.klricks wrote:You need to measure 5V at GPIO pin 4 or 6 and any ground such as a port shield.
Quite probable, this is the first time I've worked with MOSFETSBurngate wrote:There might be an error in your thinking.
So what resistance should the FET read if all is as it should be? I could try driving the gate higher with an NPN and in fact I'm going to try that now.Burngate wrote:The threshold may be 1v (the datasheet says 1v is the minimum, with 2.5v maximum) but you want it to pass 440mA with almost no voltage loss, so that the full 5v is across the Pi.
What do you consider to be a low RDS? And also, the one I'm using is listed as logic-level in the datasheet. But the Vgs on page one is 10V so it may be a higher level of logic.gregeric wrote:Use a different MOSFET: one with low RDS_ON *and* capable of being driven fully on by 3V3 or 5V logic as you prefer.
I might do that. I put in an order for an Arduino relay and some TIP120s last night; I could also use a P-channel like you said, and just tie its gate to 5V with an NPN to turn it on.gregeric wrote:I use FDN304P for a high side switch on the 5V rail. You could take a leaf out of the RPi engineers book & use the same DMG2305UX p-channel MOSFET they do on the model B's.
That will be the maximum, not the threshold. Looking at that SParkfun page spec I see:SlowBro wrote:And also, the one I'm using is listed as logic-level in the datasheet. But the Vgs on page one is 10V so it may be a higher level of logic.
Yep, there is 3.2V driving it.PiGraham wrote:You should ensure that you have >2.5V on the gate w.r.t. the Source to turn the device fully on, although some of these device could turn fully on at just 1v
Same voltage as before :-/ 4.74V at GPIO pin 4, which is above the voltage threshold anyway so I still don't know why I'm getting the warning. The FET resistance with the NPN driving it is now 0.0 ohms. Frustrating.SlowBro wrote:Since I'm seeing 3 ohms I know the voltage isn't optimal, so I'm going to try to drive the gate higher with a PN2222A. That should take care of any low voltage gate concerns.
Should I need to tie in also the shielding on the Anker maybe? Maybe it's not getting a good ground.gregeric wrote:problem must lie elsewhere, or it's the sum total of all those little resistances there & elsewhere adding up to give you issues.
Ok let me stop you right there. 4.92V was what is coming out of the MOSFET, and is Vout. Further, voltage on the other side of the fuse all the way at GPIO pin 4 is 4.74V to ground on the Ethernet shield.nicolap8 wrote:Hi,
some toughs. Assume:
Vin = 4.92 V
You got the under voltage threshold of 4.65V (warning: the USB under voltage thresold is 4.75 V) so doing some calculations:
Vin = 4.92 V
Vout = 4.60 V
Mine as well, so in the opening post I mentioned I am using a known-good, tested Anker cable that worked fine right up to the moment I cut it and inserted the MOSFET.nicolap8 wrote:Thanks to my (bad) experiences I learned not to trust USB cables... it's the first thing to check.
Are you measuring the voltage with a calibrated meter? It's reasonable to expect most meters to be better than +/-0.1V, but unless you know your meter is better than that (because it's calibration is up to date and better than that) maybe your 4.74V is really 4.64V.SlowBro wrote:Same voltage as before :-/ 4.74V at GPIO pin 4, which is above the voltage threshold anyway so I still don't know why I'm getting the warning. The FET resistance with the NPN driving it is now 0.0 ohms. Frustrating.
I do not have a high quality meter to calibrate against, but what I do have are two different meters by two different companies and both show the same voltage within 0.01V. For what it's worth, both meters have high ratings on Amazon.PiGraham wrote:Are you measuring the voltage with a calibrated meter?
I have a Gabotronics Xprotolab scope but haven't yet learned how to use it :-/PiGraham wrote:Have you checked the voltage on an oscilloscope?
Maybe I'll just stick a largish cap and ferrite on it and see what happens.PiGraham wrote:Perhaps the average level is OK but it dips with load enough to trigger the warning. I would expect there to be some smoothing on the warning to that short dips produce steady low voltage indications. If this is a problem a good size capacitor (Perhaps 100 to 1000 microfarad) across the supply pins of the Pi might help.
Are you saying that because I asked about ripple? Because the same supply worked great without the MOSFET. Still works great; I just plugged in a different cable and no lightning bolt.PiGraham wrote:And of course if you use a power supply that outputs a slightly higher voltage that will sort this out.
Ground return.drgeoff wrote:Where is the MOSFET? In the +5 volt supply to the RPi or in the ground return to the PSU?
Well it's somewhat better. Lighting bolt stays on for the last 10 seconds of boot and about 20 seconds after boot it disappears. I can make it reappear with cat /dev/zero > /dev/null. Idle current is about 380mA with no lightning bolt. Only comes on above about 400mA. Voltage at pin 4 now is around 4.82V idle and drops to about 4.78V running the stress test.SlowBro wrote:Maybe I'll just stick a largish cap and ferrite on it and see what happens.
Holy cow, you're right. I just bypassed the cable and no lightning bolt.mikronauts wrote:"and 3m USB extension cable" 22ga
I'd try a better USB extension cable...
The PSU puts out 5.20-5.21V; at least that's what both meters say. But yes I can understand the explanation of the cable moving me close to some limit.PiGraham wrote:That's good news.
I think the cable did not "work great before". It probably just worked near the limit and the addition of the MOSFET pushed thing too close to the limit, so that it still worked, but the warning was triggered when the current spiked.
The cap smoothed out the spikes and the cable change moved you away from the limit.
The main thing was the cable, but there were multiple factors, including a PSU outputting <5v
OTOH, the MOSFET was fine.
There is no software. It's all done in hardware...SlowBro wrote:....Hey I asked earlier and no one replied: Where in the software can I view the current and voltage limits? Some config file?