Powering Nano, DC motor + Servo

Hi folks, long time lurker here. Usually I have been able to solve my problems without having to ask the question, but this one really stumped me today, was wondering if anybody could guide me in the correct direction.

I'm working on a modified turntable project where I would move something on a servo something based on sound. So far everything works correctly when I use a big power supply box when prototyping (Long Wei PS-305D). I have it set running to 12v, get a reading that everything working correctly I am drawing between 10ma-500ma. It changes when the servo moves.

Anyway, I am starting to finalize everything and I happen to test it on an AC/DC adapter. Doesn't really have a brand name, got it in a local electronics shop. But it outputs a regulated 12v supply and 2A.

What is really bizarre is when I power my project using this thing, my Nano seems to reset the sketch, after it detects some sound that changes the position of the servo. Not entirely sure why. My multimeter just ran out of battery so I am unable to check what is really happening, but because I powered it on the bigger power supply box first I figured I can just see the draw with them.

I am attaching a photo of the setup and how everything is connected. Hopefully somebody could help out.


I should also add, not sure if it matters, but I am powering the Nano with 9v into the Vin pin.
I also do not have any diodes on the LM317T circuit. I just used the general purpose schematic that I had to calculate values for R2 + R1 to output my voltages correctly. Unsure if adding diodes on the LM317T's Vin and Vouts would make a difference? I am currently out of stock of any other regulators so I had to go use my stash of LM317Ts (both made by ST)

It just got more bizarre... I tried using the adapter again, and this time the DC motor didn't turn on. A few moments later I plugged it in again without changing anything and now everything is working. Gonna leave it on for a few hours and see if anything weird happens...

Alright guys, so it seems that I have solved the problem! Sorry about that. I had a few cold solder joints and some parts that shouldnt be touching touched each other. But everything is working properly now!

I made a change as well, I hooked up the second LM317T that was stepping down to 5v to the other one that was stepping down to 9v. It was getting too hot before, so now everything is fine!