Macbook Pro randomly shuts off
Hello, I have a mid 2010 Macbook Pro 15" and a few months ago my laptop would start randomly turning off with a little "pew" sound. I would wait to restart it and realized it wouldn't stay on if I attempted to start it up while plugged in to the power adapter. I thought it was the cheap power adapter I bought, so I bought a new apple power adapter. The problem persisted and I took it into an Apple store to run diagnostics. Sure enough, the battery needed to be replaced. I replaced the battery myself and it has been working fine until this morning when it started shutting down randomly again after having died from battery depletion last night.
I don't know if I need to reset some things or if it's a logic board problem or what, but I'd like to see if anyone has any helpful tips.
Thanks a bunch!
MacBook Pro (15-inch Mid 2010), OS X Yosemite (10.10.5)