Hello,
First of all, i don't know a lot about electronics... but i'm learning.
For my first arduino project, I wrote a small program controlling 2 RGB LEDs. It basically goes from a continuous green light to a blinking pink one when I press a switch, and back and forth. I then transfered the program to an ATTINY85 and made it work without issue on my breadboard.
My problem is the following :
When i use the 5V from the arduino to power my circuit, it works, but when I try to power it with a battery, the program doesnt seem to run properly. Either the color switch doesnt happen at all, or it happens, but the LEDs doesnt blink.
From what i understand,
-
The RGB LEDs i use come from an arduino kit, have integrated resistors, and are made to run with 5V.
-
My two LEDs, being powered by different pin of the ATTINY85, are in parrallel.
-
The ATTINY85 can run using 2.7V to 5.5V.
-
Since my ATINY is set at 8Mhz, it would theoretically consume 5mA at 5V, if i understood the datasheet correclty.
I tried to power my circuit with a 9V battery and different resistors, but never got the microcontroller to run properly
With wich battery would you power such a circuit ?
Would i need resistors ? or something else ?