DW 201 IR proximity sensor 2-30 cm rangeI have built a rechargeable automatic hand sanitiser using an IR proximity sensor(HW 201.) It consists of an IR proximity sensor module, TIP 32 transistor, 3-6 V DC pump, TP4056 charging module and a 3.7 V Li-Ion 3800 mAh rechargeable battery.

I'm facing an issue with power consumption.

The battery drains too fast - it is empty after 1 or 2 days.

The IR sensor consumes about 20mA even during idle state (when not sensing hand.)

Is there any option to reduce the power consumption using 555 timer IC or any other programmable MCU (no Arduino?)

How can I make a low power consuming IR proximity sensor circuit?

  • \$\begingroup\$ A data sheet (PDF) link to the IR sensor would be good to add. Also add a schematic of what you've done so far. \$\endgroup\$ – Andy aka Jul 30 '20 at 10:50
  • \$\begingroup\$ If your sensor is connected to an MCU, use the sensor only for a short peridod (10ms) every 100ms. With a simple MOS switch you can enable/disable it. This is an example, but it will decrease the battery drain. \$\endgroup\$ – PierreOlivier Jul 30 '20 at 12:42
  1. Remove the two LEDs (over by the connector in your picture.) Lighting them uses current. Not much, but you don't really need them.
  2. Increase the resistor in series with the IR emitter LED.

(2.) will probably have the most effect. It will probably also reduce the detection range.

Use a camera to find out which of the two LED like things is the IR emitter (on the right end of your picture.)

I expect it will be the clear one.

In any case, you can "see" IR with most digital cameras (smartphone cameras, photo cameras, webcams, etc.) Look at your sensor through the viewfinder of your camera and see which is lit up.

Trace the connections to that part. You will find a resistor in series with it.

I expect that resistor will be some few hundred ohms.

Replace it with a larger value resistor. A value of two or three times the original should be a good starting place.

Try your sensor out. If it works reliably, run it for a couple of days and see how your battery holds up.

Try a larger value to get a longer run time, but keep in mind that a larger resistor will shorten the detection distance and at somd point the detector will not work anymore.

  • \$\begingroup\$ thank you very much mr.JRE. it worked . there was a 100 ohm resistor in series with IR emitter. replaced with different values : when i used 1k ohm current dropped to 3.5 mA. and detection range reduced but still under acceptable range.working fine and battery still holding without any issues. thanks alot for your valuable suggestions. \$\endgroup\$ – Rabah Aug 5 '20 at 10:13

If you use a discrete bipolar with 1uA collector current, set by 4.7Meg Ohm resistor to +5v, and Cob of the transistor is 10pF (for example), you'll have a time constant of 47 microseconds.

A 200 microsecond IR pulse should be adequate for detection.


I'm wondering why a 20mA current draw would drain 3800mA battery in 2 days. Simple mathematics indicate a good week of standby time with the module always on.

It's very likely that the battery itself is cheap/beated, being not able to provide the capacity it's rated for.

Or, maybe the pump draws too much power. Calculate the consumption of the motor by it's on-time duration and times it's activated within a charge cycle.

Removing indication LEDs, decreasing the range, and reducing on-time will do expand the battery life, though you'd better find out what is wrong there first.

  • \$\begingroup\$ as i mentioned .im using a tp4056 charging module with protection. it will not allow the battery to drain out completely. it is having a battery discharge cut off point. \$\endgroup\$ – Rabah Aug 5 '20 at 10:15
  • \$\begingroup\$ I've considered the cut off points and efficiency during calculations. Right now you either are getting less than 1000mA off the battery or there is a power hungry element in your circuit. \$\endgroup\$ – Kasra Koohi Aug 5 '20 at 14:54

I see two options here

Option 1 - You could spend some more money and get a purpose built PIR module with ultra low power consumption. Panasonic have a range for this purpose, one of the lowest power versions is the EKMB1107113 with 1.9 uA current draw. These are not cheap though and cost around £20 in the UK. With one of these you could put your MCU in deep sleep while no PIR motion is detected & wake up on PIR motion, this would maximise your power usage.

Option 2 - I think what you are trying to say is to modulate the on time of the IR modules to reduce its power consumption. You claim 20mA at 100% on time. If you use a Timer to reduce the on time to 100ms you could effectively multiple your battery drain time by 10.

You could have the power rail of the IR module connected via a Transistor with its gate toggled by a 555 timer with a 1:10 ratio setup and this could improve your performance.

Possible 555 Solution

I would strongly recommend you looking into how 555 timers work and transistor theory. Electronic Tutorials has some great explanations,



The easiest solution I can imagine can be seen in my LTSpice simulation below,

enter image description here

You can adjust R1, R2 & C2 to vary the time characteristics of the NE555 Output Pulse, you can then use this output pulse signal to control an NPN transistor that is toggling the IR Modules power supply.

The simulation above is just a suggestion for how you could solve this problem, you would need to dial in the specific values to ensure that the IR module is getting enough power and the duty cycle is what you want.

  • \$\begingroup\$ thanks Mr.jack .option 2 is good one as i am new in electronics im trying to learn how to set up a timer circuit along with this system. if you can explain it will be grateful. \$\endgroup\$ – Rabah Aug 5 '20 at 10:20
  • \$\begingroup\$ Hi Rabah, I've updated my original answer to include some helpful links so you can learn about the 555 timer & NPN transistors & added a suggestion for how you could modulate the power supply to the IR Module. If you have any more questions let me know. \$\endgroup\$ – Jack Soldano Aug 5 '20 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.