--Boundary_(ID_DyjMLIYGmdNjHqXEwNNoCw) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT (Re-sent with attachment this time...) Kyrre Aalerud wrote... >Problem is: > >FET off = 16 Volts. >FET on = 0-70 mV. > >I need to compare the voltage when FET is on to a set reference of 70 mV. >If Voltage across FET is abowe 70mV I have a over-current condition and >should turn FET off. 70 mV is pretty small for the PIC's comparator to deal with, and 16V is way too large for its inputs to tolerate. The attached circuit will fix both problems: diode D1 clamps the voltage from the FET to protect the opamp while R1 limits the current drawn from the FET to less than a milliamp, and the opamp amplifies the FET's VDS(ON) by a factor of 48, giving you about 3.5 volts at the PIC's input. Dave D. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics --Boundary_(ID_DyjMLIYGmdNjHqXEwNNoCw) Content-type: image/gif; name=Image1.gif Content-transfer-encoding: base64 Content-disposition: attachment; filename=Image1.gif R0lGODlhkwH7AIAAAAAAAP///yH5BAEAAAEALAAAAACTAfsAAAL+jI+py+0Po5y02ouz3rz7D4bi SJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvmM TqvX7Lb7DY/L5/S6/b4AIPQHgD/hx4c3SBgiGCCY2LdY2OiIcch3yPhYaUkhSbl3ydnZkGkwGepJ Woo4qTiqaspK+Af42hfbSltre+s6i7vrqsn7S4cKPDwnTHzsZoy8rJbK/IwWCD0dTW1dJnqtvZW9 7W3V/S0eFT5uzlR+rn6Uvu4u1P4u3xM/b49Tf68/k7/v79Lvn8AUAQcaJFHwoMIPCRc61NDwocQK ESc6CaQLUTH+i2Ii7anYBSRHJR43yRE5EglGUSi1SJKWEgsoQBtLxqzizFcyjTpvQrG5Ms7LjAxs rpLlU58eo59MhjLWMumwpU4dMDUaVSqvofWuVs2qFVdDr7Iwhl1htmxOsD8hVeV5lO3ZPCZL5myW Ie1TmEznosgGSm5bv1MyxoK5kzA5unXfCFY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