Electronics > Projects, Designs, and Technical Stuff
Low Voltage Detection & Power Cut IC
<< < (6/14) > >>
JDW:

--- Quote from: Ian.M on September 02, 2019, 08:51:35 am ---N.B. a 2N7000 is *NOT* suitable unless  you run your supply to the sensor at >7V as its max. Vgs threshold voltage is 3V, so it wont reliably stay on with 5V on the gate and a 3.3V logic '1' signal on the channel, which only gives 1.7V Vgs.   You need one with a max threshold voltage <1.5V to guarantee a full logic '1' level at the sensor RX pin.  <1.8V  threshold will work with a possible slight reduction of the logic '1' level but still within spec.

--- End quote ---

I know BJT's well but not MOSFETS, so I'd like to clarify.  I can find parts with a "Vgs" spec as low as 2.5V and a "Vgs-thresh" spec as lows as 300mV, so am I right to assume that the "Vgs" spec is different than what you were talking about in that the "Vgs spec" is the absolute max voltage when measured across the Gate and Source?  Consider these 3 parts.

If the "Vgs spec" is the absolute max, then it would be prudent for me to choose the highest "Vgs spec" that can accommodate the lowest "Vgs-thresh" -- for example, these parts.

Lastly, I am seeing "Rds-ON" as high as 3.5-ohms in some of those parts I linked for you.  I would assume this should be a non-issue on light of my 9600bps data rate?

Many thanks.
JDW:

--- Quote from: GeorgeOfTheJungle on September 02, 2019, 09:24:33 am ---If the power supply is 12..24V (and beefy enough) and you've got glitches in the 3.3V rail then that LM5008A regulator is not working as it should or you're pulling spikes of more than 350mA (isn't that its rated max current?).

Put a scope in the 3.3V rail, set the trigger to one shot, 2.8V falling edge and leave it there. If there's a glitch it'll catch it.

--- End quote ---
There is no glitching in the 3V rail, and currently on my bench test I am using a dedicated benchtop power supply set to 3.3V to ensure rock solid power.  But when I have been doing is creating my own glitch tests by yanking and reconnecting 3.3V power by hand to the board.  My PIC handles this fine, and while there is no damage to the sensor either, there are very rare occasions when it's memory gets wiped.  Imagine if you will someone who learns a dozen prints to this system and then finds them all erased one day!  Such is not insecure because I handle that in my PIC code, but being forced to re-learn all the prints again due to a glitch is something I must design around.  For that reason I contacted the manufacturer of the sensor and they told me that if the voltage dips to between 2.0v and 2.7v, then the memory could be wiped.  Clearly they were not talking about a "power off case," as such would drop the voltage to 0v (while passing through that 2.0v to 2.7v hazard land).  So I must assume they mean "if the voltage STAYS between 2.0v and 2.7v the memory will be wiped."  Regardless, they recommended I add a low voltage detection circuit that can kill power to the sensor completely, seeing I have no means to ground a RESET line on the sensor.  Add to that the fact I must put the sensor off my main board by 1.5m cable now, and you can see why I need to consider cutting wires and adding ESD protection, etc. as mentioned in my earlier post with schematic.

The fingerprints aren't normally deleted when I don't touch the 3.3v rail.  It's only when I deliberately introduce glitches by hand.
forrestc:

--- Quote from: JDW on September 02, 2019, 08:45:30 am ---So if you have any new thoughts to share in light of this schematic, I am happy to hear them.

--- End quote ---

I'm going to respond in two parts.  The first is assuming you want to shut this down quickly once the voltage reaches a certain threshold:

This is how I would do it:

1) Use a P-channel Fet in the power line.   There are quite a few out there which will work.   The Advantage of a fet is that you're not going to get a lot of voltage drop.   I personally use a DMG2301L for these applications.   At 3.3V you should have less than 150mohm of resistance.   Tie this to a output pin on the PIC.   I'd recommend using a resistor from gate to source to keep the gate pulled high until your PIC pulls it low to turn on the device.

The 3.3V rail connects to S, the sensor connects to D, and the G connects to the output pin on the PIC, possibly through a gate resistor, although this is probably not required and will slow the transition down.   

2) On the PIC side, the PIC you selected has a comparator and a DAC and a FVR.    You can program the FVR to 1.024V, then connect the FVR output to the comparator (internal to the chip, not an external connection).     If you're concerned about the VCC of the PIC, you can use the DAC to divide it down and feed it into the other pin of the comparitor.    The output of the comparitor can then go to the FET I described above. 

If you are concerned about the VCC of the sensor itself, you can bring a sense wire back, maybe dividing it down and feed it into the PIC.  This way you can sense the voltage at the device.

The description above will automatically shut down power to the sensor.   It looks like the only other pin you have to worry about is TXD.   I'd set an interrupt on the comparator output as well, then in the ISR turn off the serial port and makes the pin goes either Tri-state or pull it down, whichever you feel is safest.   

There are other variations on this, but by just adding the Pchannel FET I described in the high side line and controlling the TXD line, you should be able to shut this down within a few microseconds.   If you're worried about sleep current, I think all of the above can run in sleep, and the comparitor input can wake the processor back up.    I haven't verified this last part with the datasheet on this exact part.

BUT..... The second part.

I'm confused why you're browning out at all.   I'd highly recommend what GeorgeOfTheJungle and others say...   You need to figure out why this is browning out, as you shouldn't have this happening at all.    One alternative might be to run 12V to near the sensor, and then step down to 3.3V there...   

If this is an issue with just poorly timed power-off (which might be the case), you might also want to consider adding a supercap or largish cap near the sensor, however this would interfere with the power shutoff I described above.

forrestc:

--- Quote from: JDW on September 02, 2019, 09:46:27 am ---There is no glitching in the 3V rail, and currently on my bench test I am using a dedicated benchtop power supply set to 3.3V to ensure rock solid power.  But when I have been doing is creating my own glitch tests by yanking and reconnecting 3.3V power by hand to the board.  My PIC handles this fine, and while there is no damage to the sensor either, there are very rare occasions when it's memory gets wiped. 

--- End quote ---

Are you absolutely certain that this isn't just a badly timed glitch?  I.E. while the sensor is for some reason writing to the flash?

Also, if you are manually connecting/disconnecting/connecting the 3.3V rail, you're probably causing all sorts of evil things on the rail just because a connection isn't instantaneous.    I can't tell if you mean physically yanking or being nicer.   
JDW:

--- Quote from: forrestc on September 02, 2019, 10:00:07 am ---I'm confused why you're browning out at all.   I'd highly recommend what GeorgeOfTheJungle and others say...   You need to figure out why this is browning out, as you shouldn't have this happening at all.    One alternative might be to run 12V to near the sensor, and then step down to 3.3V there...   

If this is an issue with just poorly timed power-off (which might be the case), you might also want to consider adding a supercap or largish cap near the sensor, however this would interfere with the power shutoff I described above.

--- End quote ---

I mentioned that in my previous post.  As I mentioned in that post, there is no memory loss when I leave the 3.3V rail alone.  And even when I deliberately take the 3.3V output and tap it on/off to my breadboard, the memory is usually fine.  But on rare occasions doing that manual glitching of the 3.3v rail by hand will result in the sensor's flash memory being wiped.  The manufacturer told me two things about memory wiping:

1. It could happen if the voltage falls between 2.0v and 2.7v.
2. It could happen because there is code in the sensor (proprietary, they won't share details) that auto-wipes the memory if the sensor sensing it is being read.

#2 is as thick as mud, and it's hard for me to decipher it.  I asked if they could kill that code and give me a firmware update, but they said no.

But again, the memory only gets wiped rarely, and only when I am manually tapping the 3.3v power line into my board and yanking it out.  I want to simulate major voltage issues on the 3.3v line by doing that.  The chips survive it fine, it's just that the flash memory of the sensor (not my PIC, but the fingerprint sensor) gets wiped for reasons I've already mentioned.

Thank you for your other suggestions.  Using 3.3V goes against the advice of Ian M. who recommends I use 5.0v instead since I will have a 1.5m cable between my PIC board and the sensor, so I will need to ponder your suggestions along side his.

And no, it's not happening during a flash WRITE.  I know that.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod