On 22 Jun 2015 at 14:19, David C Brown wrote: > I need an overcurrent detector for a small DC motor. I thought of using > low side sensing with the ADC of a PIC measuring the voltage across the > sense resistor and then doing the integration and peak suppression in > software. I can tolerate half a volt or more voltage drop in normal > operation. >=20 > This seems to such an obvious idea that I am surprised that I can't find > any reference to it in a search for "overcurrent detection using PIC". Yes, it's a really common thing, perhaps typically appears along side motor= control=20 so less often referred to directly. Simplest is just a current sensingf res= istor, like you=20 say done on the low side (everything referenced to ground) makes some thing= s=20 easier. A decent sized silicon diode in parallel with the shunt is a good trick to = limit the peak=20 shunt voltage/power dissipation during startup/overload/motor stall conditi= ons. Just=20 need to be aware diode messes up current to voltage conversion as it starts= to=20 conduct.... though typically you might be measuring motor current somewhat= =20 accurately at the lower end of the scale (a working range of say 0-400mV or= so) and=20 anything higher you'd just flag as an overload condition. Shunt resistor voltage to an ADC input, or with Op Amp gain first for bette= r=20 reolution, should always have over-voltage protection and some filtering. Also a common alternative to using an ADC input is to feed shunt voltage in= to base=20 of an NPN transistor... basically a cheap ~0.7V voltage detector. Emitter t= o ground,=20 pullup resistor on Collector, pulls down I/O line or interrrupt input when = overcurrent=20 situation exists (whenever voltage drop accross shunt resistor is >=3D ~0.7= V). --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .