Sense pin configuration with on-demand scenario #8
-
Hello, I'm wondering what happens regarding the sense pin when Q1 is switched off ? According to calculation the voltage supplied to the pin is much higher than when Q1 is on, and it will consume current through R1. Do I need to switch the sense pin to output or something ? EDIT: Some precision after playing around with a simulator:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You need to use the voltage divider (R1 + R2) to lower the voltage at the sense pin to something between 1.1V and 3.3V, then use the Q1 to enable/disable the voltage divider altogether. The With a supply higher than your board (as in your condition) you ALWAYS need a voltage divider. With regards to what happens to the |
Beta Was this translation helpful? Give feedback.
-
OK for the voltage divider and its output limited to under 3.3V, and regarding my concern for the sense pin with Q1 turned off, everything is kept fine due to the 100MΩ internal resistance. So if I understood everything correctly, the Arduino won't see the 4.5v, EXCEPT if I try to read the value WITHOUT switching Q1 on, in which case I'll burn the pin and maybe the arduino ? I saw the library takes care of this in the |
Beta Was this translation helpful? Give feedback.
-
Yes, you risk your sense PIN functionality (Arduino should be safe, due to internal diode protection) only if you read without enabling the mosfet. With the current limiting protection of the 100MΩ resistor also the pin might remain intact even in that situation: the current allowed to pass through should not harm the pin anyway, but better not to risk. If you are concerned about all of the above, you can switch to a p-channel mosfet configuration, but you'll have to also add a NPN transistor to drive the mosfet from the higher voltage. |
Beta Was this translation helpful? Give feedback.
-
Honestly I'm more concerned about burning everything by misunderstanding what I'm doing ! I used to think about transistors as simple switches and now I'm in over my head with NPN/PNP and n/p channel MOSFETs. Anyway, thanks for the explanation and for the library, I'll try this using the higher on-demand configuration (almost) confidently. |
Beta Was this translation helpful? Give feedback.
Yes, you risk your sense PIN functionality (Arduino should be safe, due to internal diode protection) only if you read without enabling the mosfet. With the current limiting protection of the 100MΩ resistor also the pin might remain intact even in that situation: the current allowed to pass through should not harm the pin anyway, but better not to risk.
If you are concerned about all of the above, you can switch to a p-channel mosfet configuration, but you'll have to also add a NPN transistor to drive the mosfet from the higher voltage.