EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: ZeroResistance on November 21, 2016, 05:23:00 pm

Title: Current sensing with ULN2003A
Post by: ZeroResistance on November 21, 2016, 05:23:00 pm
I have to drive a bunch of relays with a ULN2003A at any time only 1 of the 7 outputs would be on but I also need to measure the current of the relay coil which would be around 100mA but my intention is not to measure steady state current I want to measure the current rise and fall in the relay coil.

For this I am thinking to connect a 1E resistor to the ULN2003A emitter pin. and then sense the voltage across the pin by feeding it to an adc input of a microcontroller.

Does this setup sound OK? I mean would that resistor connected on ULN2003A emitter pin cause any issues with switching of the ULN?

Can I increase the value of the resistor to 2E, would a op-amp after this be a better idea or just the resistor is OK?

The other issue is I'm going to drive the ULN2003A with 3.3V output from the microcontroller this seems to be ok as per the datasheet which says the Vin(on) is around 2.4V for Ic of  200mA but I just want to confirm this with the experts on this forum.

Thanks
Title: Re: Current sensing with ULN2003A
Post by: Zero999 on November 21, 2016, 07:32:56 pm
Yes, it should be fine.

The only disadvantage of not using an amplifier for the current sense resistor is that, unless you have a high voltage drop across the sense resistor, you wouldn't be using very many counts on the ADC, which would reduce the resolution.
Title: Re: Current sensing with ULN2003A
Post by: HwAoRrDk on November 22, 2016, 02:15:25 am
If your microcontroller has the option to use a 1.1V internal ADC reference (e.g. like Atmega328), that will provide better resolution. Depending on your expected peak current (i.e. not >500mA), a 2 Ohm resistor would probably be ideal then. It'd need to be at least a 1/2W one, though.