Beginner hobbyist here. I would appreciate some design feedback.

Purpose of this circuit: It controls an RGB LED strip (5 Meters, SMD 5050) via an IR remote and also automatically powers on/off the LED using an ultrasonic sensor (HC-SR 04). The brain here is the Arduino Nano. The Nano takes input from the IR sensor (TSOP 1738) to determine which color and brightness needs to be output. It uses its PWM pins to control the LED strip via the 3 MOSFETs (IRF3205) which go to each of the 3 color wires of the LED strip. Both the circuit and LED strip are powered by the same power supply ( I confirmed via data sheets that the Nano can be powered by a 12v power supply). 

The radio (NRF24L01) module is for this circuit to sync and coordinate with other peers in the room. I plan to have multiple circuits like this powering a stairway. So when someone enters the upstairs/downstairs door, the ultrasound sensor would detect it and let the Nano know to turn on the LEDs, which would in turn pass this on to other Nanos that are further into the stairs but don't have the motion sensor.


  1. I've put in 220 ohm resistors between the MOSFET and Nano because I found that on several circuits and tutorials online. Would help an explanation of what exactly its purpose is and how to calculate the value.

  2. The power supply is from a local bazaar that doesn't seem to have any data sheet or guarantee. I'm almost sure the quality of the DC signal is not great and maybe its not even the 5A it claims. Is there any capacitor filter based circuit I can put in to ensure the circuit receives  a) Smooth, clean DC signal and b) protects against unexpected current or voltage spikes?

  3. This may be too broad a question but asking since this will be the first time I'll be trying to print and etch the PCB. Does this layout look fine? Is it even possible to provide feedback on the PCB layout design? I have done my calculations to ensure the track widths are able to handle the current. Schematics screenshot

PCB layout

  • \$\begingroup\$ Don't make your tracks skinny to fit between pins and then widen them out again. The current carrying capability of the track is only as big as the smallest part of the track. Either make the whole thing small or find a different way to route it. \$\endgroup\$
    – Ron Beyer
    Feb 14, 2020 at 13:26
  • \$\begingroup\$ NRF24L01 does not use bluetooth. \$\endgroup\$
    – Ocanath
    Feb 14, 2020 at 17:44
  • 1
    \$\begingroup\$ another question: If the Arduino code does not signal the LED to turn on, the LED would continue to stay off. Is this assumption correct? I ask because (1) the same 12V PS powers both the Arduino and LED strip (2) in one of my breadboard tests, the Arduino is not powering on for whatever reason but the LED strip starts glowing when I touch some of the wires. This is probably due to some other software issue but just checking if the circuit allows for a path for the LEDs to glow should the Arduino go bad or shutdown unexpectedly. \$\endgroup\$ Feb 15, 2020 at 15:22
  • \$\begingroup\$ If the ARduino pin is defined as an output AND is set low the LED will be off. If high, the LED will be on. | If the pin is an input without a defined pullup of pulldown then it will usually "float" and stray signals from induced mains hum or introduced fingers or .... may cause LED lighting. If you cannot guarantee the Arduino pin state then a pulldown resistor (from pin to ground (maybe 100K OK, less in severe cases) will keep the pun low when it is floating. 40+ years ago I drove an 8 channel data tape deck with a MC6802 processor. On initialisation the tape would fast reverse spool ... \$\endgroup\$
    – Russell McMahon
    Feb 15, 2020 at 23:42
  • \$\begingroup\$ ... off the reel. Very annoying. The tape drive pin was floating at powerup, being pulled high by the deck and sending a reverse signal. The code was immediately initialising the port and setting the pin low but tooooooooooooo late. I had to send an explicit stop signal and then all was well. \$\endgroup\$
    – Russell McMahon
    Feb 15, 2020 at 23:43

1 Answer 1


Just a few quick comments (past sleep time).

Fatten pads as much as possible.
J1 (and many other) pads can be oval and thicker to avoid loss of pad during etching, drilling and soldering.

Anything with mechanical attachment wants all the copper anchor you can reasonably give it.

Track between pins on ?pot? at lower left is OK but you could run track from pin 1 out and up and track to pin 2 around the end and have fatter pads and tracks.

Q1 2 3 stand vertical ?
OK if on heat sink with mechanical support for FETs.
If not heatsunk then 'lying down' gives MUCH longer life.

R4 5 6 slightly staggered ? - only cosmetic but proper alignment improves looks.

Gate drive R's help damp ringing. - a few Ohms usually.
IF switch speed is high you may need gate drivers -
OK if <= 1 kHz and MAYBE <= 10 kHz.

Power supply can be < 12V - add a LARGE filter capacitor.
ENSURE it is not > 12V - some clone nanos do not like over 12V. Lower reduces on-device regulator dissipation.

More can be said .

  • 1
    \$\begingroup\$ I looked up large filter capacitors. It looks I need to use a low pass RC filter here since I want to place the filter between the output of the 12V power supply and input of the circuit. Essentially the filter should allow DC to go through and smoothen out the output of the power supply. I hope my understanding is right? If so, how exactly do I choose values for the resistor & capacitor? It looks like RC filter design starts with choosing a cutoff frequency. Since this is DC, wouldn't the cut off be 0 Hz or 1 Hz? and then what? Can some please help me understand how to pick R and C values \$\endgroup\$ Feb 14, 2020 at 13:25
  • \$\begingroup\$ @SamuraiJack Q1 What current MAXIMUM are you drawing? | Q2 please provide link to LEDS used Q3 What is LED current max Q4 Are LEDs 12V rated? || | A large capacitor alone is a good start. 100 uF good. 1000 uF better. | You CAN add a resistor . | Rpsu = V/I = Max_V_drop/Imax. IF LEDS are 12V then they should be powered by psu directly. Have resistor only for controller. | If max current is say 200 mA for controller etc. If Vdrop is say 5V leaving 7V into Arduino then: . R = V/I = 5V/0.2A = 25 Ohms. Put large cap on nano side. \$\endgroup\$
    – Russell McMahon
    Feb 14, 2020 at 15:08
  • 1
    \$\begingroup\$ Thanks for your help so far. I tried upvoting your post but it says I don't have the "street cred" yet. Lemme google and figure out how to give you kudos. Answers to your questions: I'm using SMD5050 LED strips, something like [this] (e-radionica.com/productdata/RGB5050LED.pdf) \$\endgroup\$ Feb 15, 2020 at 15:28
  • \$\begingroup\$ MAX current for LED: I estimate 1.8A per color for a total of 5.4A Yes LEDs are 12V rated LEDs are rated to consume 6mA (at 12V) Question: How do I measure/determine Vdrop (You say "If Vdrop is say 5V") \$\endgroup\$ Feb 15, 2020 at 15:42
  • \$\begingroup\$ @SamuraiJack Vdrop is decided by you. The ARduino has a 5V and / or 3V3 internal regulator. If you feed them 7V minimum at max current that gives you 2V "headroom" for the 5V regulator. So the external resistor drops (12V-7V) = 5V. || Note again that the LEDs do not use this reduced voltage - just the Arduino. It reduces ripple ion the Arduino supply and move heat off the regulator into the external resistor. It also redcues the Vin on the Arduino to less than the somewhat suspect 12V. \$\endgroup\$
    – Russell McMahon
    Feb 16, 2020 at 0:01

Your Answer

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

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