0
\$\begingroup\$

I'm drawing a schematic of 12V LED strip dimming switch board. Below is a summary of how it works:

  • A DC adapter (12V 2A) will power the board.
  • A controller inside (ESP-01) will be powered by 3.3V regulated output.
  • Output of the board is connected to the LED (consumes up to 1A,) and will be controlled by the controller's PWM output.

I'm planning to design a 2-layered PCB. However I'm very careful because I have failed twice previously.

Are there any problems with the schematic below? What are the common issues with these kind of applications?

Edit 1

Schematic updated. Thanks @Transistor.

enter image description here

Edit 2

I didn't want anything to be 'attached' to my board, so I decided to design the power supply for the controller, too.

I have other applications using NodeMCU or Lolin D32, which are very easy to handle, but implementing a single switching board using self-powered ESP-01 (requires no power supply than the 12V adapter) has long been my personal goal.

I forgot that the gate of the transistor sinks current and pulls down GPIO2 on boot. I'll update the circuit when I fix the problem.

I once used a low-side N-channel MOSFET and got a problem. So I decided to place a P-channel MOSFET at the high side and control it with NPN transistor.

Actually I found a board from Aliexpress that serves the exact function I need. I'm now waiting for the shipping. As @KD9PDP mention in the comments, it would be a great template I can learn from and build new things on.

Edit 3

I've posted this question because I have failed at a previous revision of the circuit above with randomly flickering LED and didn't want to make any failures again.

As @SimSon mentioned, the low side MOSFET doesn't seem to be the problem. I think I have some mistakes in the layout. Here is the schematic and the layout,

I have another question:

I'm going to use K7805-500R3 in my next revision. The datasheet says two capacitors on each input and output terminal are required, like below:

enter image description here

They also suggest two more things which are:

  • a circuit where an LC filter is placed on the output terminals.

enter image description here

  • and an EMC compliance circuit.

enter image description here

What are the benefits of adding an LC filter to the circuit, or following the reference of the EMC compliance circuit? What risks do I take when not following them?

\$\endgroup\$
18
  • 3
    \$\begingroup\$ Just a general comment: The schematic should usually read from left to right. Most of us would put the input power on the left as you have but the output connector on the right. I would probably have reorganised U2 with Output and Feedback on the right and all the Grounds along the bottom edge. Your vertical layout is good with higher voltages at the top of the schematic. The rules-and-guidelines-for-drawing-good-schematics on this site is well worth a read if you want to improve. \$\endgroup\$
    – Transistor
    Apr 24, 2021 at 16:37
  • \$\begingroup\$ Do you really need that switching regulator to power a microcontroller? Why not just use a simple LDO? \$\endgroup\$ Apr 24, 2021 at 16:49
  • \$\begingroup\$ There's a whole section about layout in that switching regulator's datasheet. Read it and apply it. Edge rates on that MOSFET are probably relatively slow so less layout critical. \$\endgroup\$ Apr 24, 2021 at 16:56
  • \$\begingroup\$ @user1850479 I used LM1117 for my previous prototype. However It got very very overheated. \$\endgroup\$
    – Potados
    Apr 24, 2021 at 17:06
  • \$\begingroup\$ @user1850479 ESP01 draws 70mA even when idle, if the internet is to be believed. So a linear regulator would dissipate a significant amount of power. \$\endgroup\$ Apr 24, 2021 at 17:17

1 Answer 1

1
\$\begingroup\$

There are 7805 type regulator replacements using buck conversion. This makes your pcb design simpler and more robust. Something like a Mornsun K78L03.

Why have you settled on an ESP-01. GPIO2 is used as part of the boot process, so if you load it, the ESP8266 goes into boot mode. It would make your life easier if you used something like an ESP-12 and used a free GPIO.

Q2 won't work too well as drawn. Your circuit configuration is for a P-channel mosfet, but you've used an N channel. There's also a fair chance the output is ON when the ESP8266 boots up.

Finally, there's a zillion boards with an esp8266 and relay that do the same as what you're proposing - most likely cheaper and better. That's not to discourage you from experimenting, but it makes sense to use what is available and only design something that adds value

\$\endgroup\$
2
  • \$\begingroup\$ Great point about existing boards. They also gives you a great template for what you can/should do so that you can add your own functionality on top of a solid base. Those boards are great teaching tools for how to design a PCB with a certain chip. \$\endgroup\$
    – KD9PDP
    Apr 24, 2021 at 23:48
  • \$\begingroup\$ Thanks for your answer! I'v updated the post. \$\endgroup\$
    – Potados
    Apr 25, 2021 at 0:35

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.