So, I have this vending machine setup using a universal coin slot, keypad, and LCD system powered up using a 12 volt power supply. I am using a 4x3 keypad (the arduino version), a 16x2 LCD I2C, and a universal coin slot with all systems working properly.
However, when I unplug it from the computer, the orange light on the arduino starts to blink rapidly with the LCD screen, and it lowers contrast ridiculously (the text still shows in the LCD but its very low contrast). The only power source I use is a 12v battery pack and a 12v power supply for testing purposes.
Below is the schematic and also some pics
This is what happens when it's connected to the PC (all working normally and clear LCD screen)
However, this is what happens when I unplug it
Do note that the screen does light up with the text (it cannot be seen in the pic) but it's just a very low contrast version.
I have tested it with two LCD I2Cs (I have a spare) and it showed the same results, I have also tried to change wirings for everything, also same thing. It cannot be the Arduino itself because everything is working perfectly when I plug it in the computer (basic vending machine shenanigans are working, coin slot and keypad have no problems)
I am guessing it's with the battery/power supply I am using? I bought a new set a few hours ago and tested it and it's also the same result, and the batteries aren't lowbat yet. For further explanation, I am using a 12v battery pack with double AA batteries having 1.5 volts each, because circuit.io told me it works. The coinslot uses 12 volts and I think the LCD only uses 3-5 volts
It did work a few weeks ago, but when I disassembled and assembled it again using the same setup, it stopped working? I genuinely have no idea what's happening and would like some help.
Also, just wanna add that the 5v pin is quite loose, but it was working a few weeks ago though and nothing literally changed with the setup.