ARDUINO PRO MINI POWER CONSUMPTION after connecting resistor

Hi

I have written a code for low power consumption for arduino pro mini. with sleepmode and i have taken out voltage regulator and led it is consuming 0.02mA.

now i need to give input to din3 from reed switch. as it was not working i connected resistor between din3 and ground pin. now th sensor and communication between nrf24l01 is good. but the problem is after connecting resistor the power consumption got increases to 3mA.

how it can be solved?

Which resistor value?

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project.

i was using 1k resistor. it was showing 3ma. now i am trying to increase resistance value. if i increase resistance valve will power consumption decreases?
what is the maximum resistance i can use for din pin

47k will more than likely work, after that you can try 100k.; not sure if i would go higher.

It also depends on distance between contact and and pin.

1k at 3.3V is indeed around 3mA. But to get that, 3mA your contact needs to be closed at that time. If the contact is open, the 1k will not result in 3mA.

Switch the power to the Reed switch circuit so it’s only powered when the processor is awake .
Use a digital output as the power source and switch it when you want the Reed switch to operate .
** obviously won’t work if that Reed input is used to wake it up **

While you are here have a look at ohms law so you can work out the current through your chosen resistor.

Or don't use a resistor, and connect the reed switch between pin and ground.

Internal pull up can be enabled/disabled dynamically in loop().
Leo..

pinMode(reedPin, INPUT_PULLUP); // enable internal pull up
pinState = digitalRead(reedPin); // reed closed = LOW
pinMode(reedPin, INPUT); // disable internal pull up

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.