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.sstatic.net/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).


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.


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

  • 5
    \$\begingroup\$ For one I think the MOSFET can't really work the way it is connected but it should just pass current all the time through its body diode. The schematic doesn't follow rules for easy readability so no surprise some mistakes werent spotted during checking \$\endgroup\$
    – tobalt
    Commented Dec 23, 2021 at 17:53
  • 5
    \$\begingroup\$ Second the whole circuit around the power supply of the MCU doesn't seem to have any GND connection \$\endgroup\$
    – tobalt
    Commented Dec 23, 2021 at 17:55
  • 2
    \$\begingroup\$ If you're interested in improving your schematics then have a read of Rules and guidelines for drawing good schematics on this site. It will help make the schema (design intent) more clear. \$\endgroup\$
    – Transistor
    Commented Dec 24, 2021 at 16:35
  • \$\begingroup\$ "I think my description and the schematic might have misrepresented the MOSFET" <- if there's a mistake, edit your post with the corrected schematic. \$\endgroup\$ Commented Dec 24, 2021 at 16:52

3 Answers 3


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).


First obvious reason is that MCU has no ground connection.

That's not the only problem, all the LEDs should be always on and the MCU can't control them.


In addition to the other answers, the soldering job looks a little borderline to me. It could be OK, but I think you may have used too much solder paste. You have a lot of flux oozing around and bumpy reflections which could be stray solder balls:

enter image description here

I don't particularly recommend either an oven, or low-temperature solder for DIY reflow of small single-sided boards. I prefer using a steel pan (NOT Teflon) with a flat bottom. This works fine with normal lead-free solder and makes it a lot easier to observe the process and know when to stop (wait 5-10 seconds after the last pad has flowed before turning off the heat).

What is critical for DIY reflow (without a stencil) is to apply the paste sparingly, because you'll have more immediate failures from too much paste than from too little. Before populating the board, use the corner of a business card or stiff paper to wipe off smudges of paste that could cause shorts, and tidy up around the pads with a knife edge. Inspect the boards closely after soldering, scrape off any stray solder balls, and rework the occasional solder bridge between pins.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.