I want to clarify: I understand there have been many questions on this site regarding this same voltage conversion; however, what I am asking is not simply how to convert 12V to 5V but how to do it in a simple way I can integrate into a PCB.
My situation is that I am trying to create a 'smart' RGB light strip controller. The strip runs off 12V and the NodeMCU board controlling it runs off 5V (usually via USB). This is the guide I am following. Currently, I have the circuit wired up using jumper cables and I am using a USB car charger to convert 12V to 5V for the NodeMCU, and the whole circuit works perfectly.
However, I am now looking to design my own PCB which negates the need for all this wiring, as I am looking to use this circuit more permanently. Thus, what would be ideal is to simply plug in a 12V plug to the PCB, have that feed the strip and also be converted down to 5V and offered on a pin so that I can attach to the NodeMCU's Vin pin via a jumper wire.
My question is: What is the cheapest (requires the least parts) and best way of converting 12V down to 5V with through-hole components on a PCB? Other guides recommend using an 7805 converter due to its simplicity; however, I understand that this is extremely inefficient and can pose serious problems due to excess heat, which would not be appropriate considering that I am looking to have this circuit permanently on. If someone would be able to attach a schematic of a circuit which solves this problem reliably, I would be very grateful.
Thank you in advance for any help.
P.S. Is it be worth just simply copying the circuit inside the USB car charger, as this seems to work perfectly with barely any heat? If so, which components are required?
P.S. As for the current requirements of the NodeMCU, I am unsure exactly what the maximum draw could be, as I couldn't seem to find a straight answer online. However, I assume that it must be way under the possible current of even the most basic USB ports, as it is such a small device.