--Boundary-00=_JEQKGFK9l2F/h6z Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I'm adding a series resistor to a PIC16F913 analog input and need to determine how this will affect the A/D value(s). In the attached circuit, RL is effectively 0-ohms now. R1=270 ohms, and Rsen is a sensor whose resistance changes from roughly 0 to 1.8kohms. Rsen is very slow changing, so effectively giving AN0 a DC voltage. Vdd=5V. "IN" is an external input, and I worry that if the end-user accidentally connects it to a voltage source (~12V-14V, automotive) , it'll fry the protection diode and then the PIC. So if I add RL now, how does that affect the A/D result? And what would be a good value for RL? My thoughts -- the AN0 internal protection diode will conduct at 5.3V, so 14V - 5.3V = 8.7V across RL. Assuming I limit current to 25mA, this results in 348 ohms. Now, 25mA is an assumption from the absolute max ratings (Max current sourced or sunk by any I/O pin) though that's probably a function of the I/O drivers rather than the protection mechanism. I cannot find the correct spec/parameter for max current allowed into AN0. Assuming it's 10mA, RL becomes 870 ohms. Now, let's even say I use a 1kohm resistor for RL. From the analog input model, the internal impedance of the analog sampling circuitry is mostly Rss + Zchold (the impedance of Chold). Since Rss is already ~7Kohms at 5V, and Chold should be very high for a DC input, my 1Kohm should have a negligible effect on AN0. By "negligible", I mean should be much less than 1%. If it gets to 1%, I'll have to re-calibrate for the different sensors. Another thing I am considering is that since the impedance of the sensor can go to effectively 0 now (with RL=0), and never higher than 270 ohms then with RL being 1K, the input impedance would be significantly higher. But this should only change the max rate at which I can sample (not a problem). Of course, I'll try/test this, but looking for the theoretical effect first so as to pick a correct value for RL. Thoughts? Cheers, -Neil. --Boundary-00=_JEQKGFK9l2F/h6z Content-Type: image/gif; name="PIC_Rlimit_01.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="PIC_Rlimit_01.gif" R0lGODlhNAHlAPcAAAAAAACEAIQAAISEhP////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////ywAAAAANAHlAAAI/gAJCBxI sKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bN mzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LNuaAs2fL qh07oGDbtXC7vh0496CAuHif1iWwt+DdvICVoh2c8O7fwIipGk7MeOjgvgMPH25MWedeyAQWT67M ueZlu5kFiO5M2rNb0KIXl1798nFag6MNb2ZNm+bozAJv195d8jFCyZF5C0fZV7fk2cOTdyxOcDJy 5dAzYs4dvTrI6dSta7foeyGA7eBJ/gYITx7k+PLoN55Pz97i+vbwI76PT5/h/Pr4D97Pz1/g/v75 /Qdgfd8NOOBzBsaHYILtLchgeg4+WF6EEoZHYYXbXYihdRpuGF2HHiqXWojwjUgieKmBeOJquq04 YYsuWqhijKyZSCN0Kd5YHYw67shjjzjO+FKKRBZp5JFIJmkjkA0tyZOQTKqUo1BQRmnSj0BVaeWV WD65pU9d5qTllx5h5uROY5LJnWvNndlTmmpWVNdbYb4Z50116gTnnRKhJRBzQ+3J50NzveYXUYIO 2lChvyGqKHF0NRrooycxCtqklPbG5qGYZgpToieB6ulEopZU6qgQnTqSqqg26Wir/i0VSCWsLQmI Jq0s2aonrivpKiavKvmKE6vAGiQsnvD5yVekUx1rE7GBFfoWdkodS9iyLkELmLR/UmVtpNSSpG1e jLYVLlLfdnuuSOPiZamhUaW77LohtRvXu/QWZa2y+X5k71r8MitVutMOWSxKBHebkqH/8iqvudeO VDBuB5vkrFnB1YacgxtXdXFzIGecnXQha8zpQps1HOzHuTlXMsUki2x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R HItPyXrUskDFbGY1O1POVtSznQWtl0Q7WtLuyrSnjUlAAAA7 --Boundary-00=_JEQKGFK9l2F/h6z Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --Boundary-00=_JEQKGFK9l2F/h6z--