PCB – Troubleshooting Non-Working Assembled PCB

ledpcbvoltagevoltage-regulator

Attached are schematics and an image of a circuit I made for a project. It was reviewed by one of my instructors, but it still doesn't work (more details below) when plugged in.
I am a high school student working on this as a side project, I would greatly appreciate any advice you can offer.

The (updated) schematic of the entire circuit.

Description of PCB:
Due to production requirements, it was manufactured as four PCBs, connected with 16awg stranded wire soldered in at the parts that are depicted (schematic symbol) as a large circle. Three of the PCBs were just two LEDs and a resistor, the other included the same LEDs and resistor in addition to power regulation components, a microcontroller, pogo pins THTs to program the MCU, and wires to receive the power from the wall wart.

The large PCB should plug directly into a store bought 1A 12V wall-wart, at which point the voltage regulator reduces the voltage down to 5V for the MCU and its peripherals (i.e. the slide switch) while the standard wall-wart voltage is provided to the LEDs and their resistors, which can handle it directly. The LEDs are controlled by an N-Channel MOSFET controlled from the MCU, which responds to inputs from its photoresistor and the switch.

Desired function:
The system is supposed to control a hydroponic unit. It is left plugged in, and if the switch is in one position the lights are left on for 16 hours and then off for 8 until the system is unplugged, and if the system is in the other position the MCU records the original luminosity of when it was plugged in and then turns the lights off if the surrounding luminosity decreases below the original luminosity (so that if you turn off the lights in your room it turns off as well).

Troubleshooting:
I have no idea why it isn't working, however when flashing the MCU it was able to flash it and reflash it without problems using the THT pogo adapter and Arduino as ISP. As for the lights, when plugged in directly into the power only half of them turned on. The two PCBs that were farthest away from the large PCB (see img below) both turned on completely while the other LEDs did not, I have no idea why. Continuity testing showed them to be identical. I am relatively confident in the MCU functioning properly, and I suspect the issue is the voltage regulator. I used exactly the example circuit provided in this datasheet (see components table below), and it doesn't work. The wall-wart, despite the fact that I haven't been able to test it with my multimeter, seems fine (I have tested several identical wall-warts and none seems to cause it to work). I have also tested it with and without each of the two THT resistors (I was unsure of them) and no combination seems to work. A possible source of the problem is the resistors used for the LEDs. The footprint provided by the manufacturer turned out to be incorrect, but I soldered it in sideways and it seemed to work. The SMD components were all soldered using ChipQuik NC191LT10 solder paste, which was then heated to 138 C in a household oven until it seemed fully melted.

https://i.stack.imgur.com/JsqXw.jpg
Complete image of assembled PCB. Please note it wast tested other times with and without the two THT resistors. Sorry for the image quality and background. Below is the same PCB, without the two THT resistors and the wall-wart connection. The two smaller PCBs on the right are the only ones whose LEDs turned on when the wall-wart power was directly connected to the LED power (avoiding the control circuit).

https://i.stack.imgur.com/LG3wz.jpg

Detail shot of the main PCB. Note the resistor manually soldered unusually because the footprint did not match that of a standard resistor of its dimensions.

https://i.stack.imgur.com/r4GGR.jpg

Thank you all very much. Please let me know if you have any idea why it's not working.

Edit:
Link to components list. I think my original description and the schematic (since edited) might have misrepresented the MOSFET, but I may be wrong.
https://docs.google.com/spreadsheets/d/1vrnyYMaL4LTUEdR-Fa35R20bMgI528D4ixzeeOuktbI/edit?usp=sharing

Additional images of the PCB layouts, which I forgot.

Large PCB top

Bottom of the large PCB

The smaller PCB, of which 3 were used

Best Answer

As for the lights, when plugged in directly into the power only half of them turned on. The two PCBs that were farthest away from the large PCB (see img below) both turned on completely while the other LEDs did not, I have no idea why. Continuity testing showed them to be identical.

You may have some LEDs in backwards, or they may have been damaged by heat during soldering (SMD LEDs are more sensitive than most other components - I've burned a few by taking too long to solder them). Measure the voltage across each LED. It should be ~3.2 V. Much higher voltage indicates a reversed or damaged LED. Since there are two LEDs in series, if one is reversed or open circuit the other one won't go either.

The LEDs are controlled by a MOSFET controlled from the MCU,

The MCU is not controlling the LEDs. An N-channel FET turns on when the Gate is a higher voltage than the Source (in this case >=~3 V). But the source is connected to the +12 V supply so the Gate needs 12+3 = 15 V, while the MCU can only output +5 V.

However because you have the FET wired 'backwards' its body diode conducts all the time, making the LEDs go continuously.

You should connect the MOSFET Source to GND so the MCU can turn it on, then connect the Drain to the LED negative side and LED positive directly to +12 V.

I am relatively confident in the MCU functioning properly, and I suspect the issue is the voltage regulator.

There doesn't appear to be any connection from power supply ground to the regulator and MCU ground (I say 'appear' because you haven't supplied the PCB layout, which may have manually added connections).