Hi, I run my code on the arduino nano and it works fine as long as it is powered using the usb cable connected to my PC but once I power the board using batteries instead, it doesn't work properly.
The components I use are the following:
-Arduino board.
-2 digit led 7 segment display driven by 2 74hc595 ICs (Display Module 7-Segment 2 Digit with 74HC595). connected to pins 8 to 12.
-a pushbutton to rest the display connected to pin 13 and ground.
-a capacitive sensor connected to pins 2 and 4 with a resistor in between.
-AAA batteries
I used 7 AAA batteries in a mixed series and parallel configurations to eventually deliver 4.9 V and 37 mA (as measured using a multimeter) and connected that to the 5V pin and the ground. The board led IN illuminates and the 2 digits LED display illuminates as well, the problem is when activating the capacitive sensor I no longer have the display changing, and also the pushbutton doesn't work any longer. When switching back to the USB cable everything works fine.
I would appreciate if someone can help me figure out what I am doing wrong.
The two digits module's specifications mention that the operating current is 50mA, however it runs fine using arduino that operates in the range from 20 to 40 mA so less that 50mA. Also please feel free to educate me on this if I am thinking wrongly about it.
Thanks in advance.
Please explain exactly what you mean by this
2 packs of 3 in series and 4 in series connected in parallel.
That sounds like a very bad idea. Please post a wiring diagram.
The Arduino Uno will run just fine with 3xAA in series (4.5V) applied to the 5V pin.
I will sketch one and post. Before I go for this battery configuration, I have tried the obvious things first, like I tried with 3 then 4 AAA batteries, but it didn't work as described. With this configuration one can have voltage at around 5 while increasing the current input (from 25 to 37 mA in my case) for more chance of providing enough current to the attached components, meaning closer to the maximum provided when connected to the PC using a USB cable.
I was afraid that you would say something like that
You have a 4.5V pack in parallel with a 6V pack. What made you think that was a good idea ?
Please explain what "didn't work as described" means.
the board turns on and the 7 segments light up but when activating the sensor the display read out doesn't change anymore when on batteries.
4xAAA batteries in series is 6V. If you applied 6V to the 5V pin, you have probably damaged the Arduino.
No, when I fed in voltages over 5 V (which was 6V , and later 9V) it was connected to the Vin pin. And the arduino still works fine when on USB.
problem solved by connecting the 74hc595 to an external power source.