Electronics > Projects, Designs, and Technical Stuff
Low Voltage Detection & Power Cut IC
JDW:
--- Quote from: GeorgeOfTheJungle on September 02, 2019, 10:11:18 am ---This is what you want? https://electronics.stackexchange.com/questions/4967/circuit-to-protect-against-undervoltage
--- Quote --- What is the simplest way to regulate the min DC voltage in a circuit? Is it possible to do with zener diodes?
Desired performance:
Input > 3.3 VDC Output = Input
Input = 3.3 VDC Output = Input
Input < 3.3 VDC Output = 0.
--- End quote ---
--- End quote ---
I think you are suggesting that I kill power to everything including my PIC with that, but I cannot do that and here is why.
This fingerprint sensor will be used in a vehicle as a security device. Think of it as an immobilizer. If the fingerprint sensor dies or gets disconnected while PIC code is in Disarmed mode, the PIC must energize a normally-Open relay to allow engine starting (when it sees the CAN wake -- there's an analog wire in the car to detect this). When the relay is not energized, the vehicle engine won't start. The PIC controls that relay. It won't kill the engine when it's already started. It only prevents starting. So if the power to the entire board goes down, the relay won't get energized and the vehicle cannot be started. So I need to keep the PIC alive regardless of what happens to the sensor. Of course, if the sensor dies while Armed, then it doesn't matter since Armed mode prevents starting anyway, and the fact the sensor is dead won't allow disarming, but for security reasons that is okay.
What I am doing is just trying to follow the fingerprint sensor manufacturer's advice in an attempt to eliminate any possibility of random fingerprint memory wipes. And in my previous post, I mentioned the two things they told me that might cause an unexpected flash memory wipe (on the sensor side, not my PIC).
But like I said, this occurs rarely, and only when I manually glitch the 3.3V rail by hand. I do that to simulate something bad going on in the car. I need to know what will happen in that case. And although my hardware survives it fine, sometimes the sensor memory gets wiped (rarely), and that is the main thing I am trying to resolve. The second and SEPARATE matter is how to best cut power and protect the sensor over a 1.5m cable, which will have connectors and could get disconnected. Conceivably, the wires could even get cut, which would induce a short. ESD is also a concern. So those are the 2 things I've been talking about:
1. Make sure the fingerprint sensor's voltage rail doesn't fall between 2.0v and 2.7V.
2. Make sure the PIC side and Sensor side are adequately protected in light of a 1.5m cable being used between them.
JDW:
Ian.M,
I would certainly appreciate your reply to the questions I asked you in Reply#27.
When it comes to MOSFETs, I’m still very much a student in learn mode.
Thank you.
JDW:
--- Quote from: GeorgeOfTheJungle on September 02, 2019, 10:27:28 am ---I second the 5V supply option as best. You only need some resistors to interface the sensor's 3.3V UART to the 5V UART in the PIC.
--- End quote ---
While redesigning my switching power supply today for a 5.0V output, I began to wonder what the real advantage of using 5V is over using 3.3V if my Tx and Rx from the Fingerprint Sensor are sent across that 1.5m cable at a 3.3V voltage level. The entire point of IanM.'s original suggestion to me of using 5V stemmed from the fact that there would be loses due to wire resistance and the connectors. To keep the voltage at the fingerprint sensor's Vin as close to 3.3V as possible, IanM. suggested I use 5.0V power and then use an LDO (at the Fingerprint sensor board, not my PIC board) to drop Vcc to 3.3V. But shouldn't that thinking apply to Tx and Rx lines too? Tx & Rx are being sent across the same 1.5m length of cable, so any loss in voltage due to the cable would apply to Tx & Rx too. But if I boost the Tx and Rx lines to 5v on the fingerprint sensor side, it's all getting a bit complex in a circuit I otherwise hoped to keep as simple as possible for the sake of board space and cost.
Therefore, I would appreciate hearing your thoughts on using 5V instead of 3.3V for Main power and Tx & Rx too. If you think it's fine and dandy to keep Tx & Rx at 3.3V across that cable, then why not keep the main Voltage rail at 3.3V too?
Thanks.
JDW:
--- Quote from: GeorgeOfTheJungle on September 03, 2019, 06:47:45 am ---A 1.5m long 3.3V power rail in a car doesn't sound like the best idea ever.
--- End quote ---
Do you say that because of noise that might be induced into the 1.5m long cable? Or do you say that because of the possible voltage drop (which I doubt would be more than 100mV)?
--- Quote from: GeorgeOfTheJungle on September 03, 2019, 06:47:45 am ---That's why I'd prefer 5V. The sensor board's VIn accepts 3.3 .. 6V IIANM. TX and RX are ~ high impedance signals, you won't have much voltage drop there, if any.
--- End quote ---
Since I would need to add a 5v-to-3.3v LDO on the fingerprint sensor side, would it be preferred to do the same on the PIC side, using a 5v-to-3.3v LDO to power the PIC at 3.3V so that no conversion is required for Rx and Tx? The reason I even ponder this is because the PIC will consume less current at 3.3V than 5.0V.
Thanks.
forrestc:
--- Quote from: JDW on September 03, 2019, 06:20:43 am ---Therefore, I would appreciate hearing your thoughts on using 5V instead of 3.3V for Main power and Tx & Rx too. If you think it's fine and dandy to keep Tx & Rx at 3.3V across that cable, then why not keep the main Voltage rail at 3.3V too?
--- End quote ---
The loss due to resistance in the wire is related to current. E=I*R. The higher the current, the higher the resistance, the more the voltage drop.
The current in a TX or RX line should be microamps typically, and the voltage drop on those lines shouldn't be easy to measure. Even with a large resistance.
The current in the power line is going to be much higher, several orders of magnitude. Possibly in short brief "surges"....
If the voltage normally at the sensor board is very close to 3.3V under normal operations, but you see brief spikes being lower, the simple solution is to add capacitance to the sensor board so that the capacitors provide the power during the demand surges causing the spikes. I'd only consider moving to 5V if your average voltage at the board is too low due to voltage drop.
You also mentioned that the units will self-erase if they think you're trying to read out the data. One of the common ways that people try to read out the data is to introduce a power glitch. Google "power glitch attack".
I think what is likely happening here is that the firmware on the device is detecting the power is rapidly glitching and is assuming an attack is in progress and is wiping the data in defense.
If this is the case, then the solution should be fairly simple:
1) Add enough capacitance to the sensor board such that you never have a power droop under normal use. Don't over do it, but make sure that it is sufficient and then some. You may already have enough on the board. You can figure this out with an oscilloscope monitoring the rail on the board during normal operation.
2) Introduce the circuit I described in to the PIC, and then program the PIC in such a way that if a glitch occurs, it powers off the device, and leaves it off for some reasonable amount of time has passed. The PIC can also be set up to only power on the device after power is good for a certain amount of time, which will avoid a certain additional class of power-on glitches on the 3.3V rail.
You'll need to characterize or find out how long the rail should be off to prevent this from occuring.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version