Hello, I am designing the electronics for a portable battery-powered LED lamp and I would really appreciate a review before moving forward with PCB manufacturing.
I am currently designing the PCB in EasyEDA, and my goal is to have most components pre-assembled using SMD since I am not very experienced with soldering. I only plan to solder the Arduino Nano, the TP4056, and the MT3608 myself.
Additionally, the schematic includes several female JST connectors that I would like to have factory-soldered. These connectors are intended for components that must interact electrically with the PCB but cannot be physically mounted on it.
These components are:
- CN1: Female USB connector to provide a 5V charging port
- CN2: Connector for a single-cell 18650 LiPo battery
- CN3: Main circuit switch. It must allow the battery to charge but prevent the LEDs and the rest of the circuit from turning on. It is intended for an external SS12D10-style switch mounted on the enclosure
- CN4–CN7: Connectors for addressable LED strips controlled by the Arduino
- Touch sensor (TTP223): This will also be mounted in the enclosure and connected to the PCB
I have several questions I would really appreciate your help with:
- First, I would like to know if there are any critical mistakes in the schematic that could prevent the circuit from working. I am also open to suggestions, improvements, or design modifications that would increase reliability.
- I want to make sure the power path is correctly designed. I do not fully understand the MOSFET placement, and I attempted to replicate this design:
Power Path Controller Module - #4 by ShermanP
However, I am not confident that I implemented it correctly. - Finally, in my design the MOSFET ( AO3401A | MSKSEMI | Price | In Stock | LCSC Electronics ) is connected to the TP4056 through the drain and to the MT3608 through the source. I am a bit confused about how current actually flows in this configuration — does it go from drain to source or source to drain?
Also, here is my MOFSET PIN configuration ( Datasheet - LCSC Electronics ):
This is my first PCB, and I would really like to get it right. Shipping is expensive, and I already made a mistake on a previous design that resulted in unusable boards, so I am hoping this one will be the final version.
Also, my arduino firmaware (if its helps):
#include <FastLED.h>
#define LED_PIN 4
#define TTP223_PIN 6
#define NUM_LEDS 8
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define MAX_BRIGHTNESS 150
#define STEP 5
#define DELAY_MS 10
CRGB leds[NUM_LEDS];
bool ledsEncendidos = false;
bool botonAnterior = LOW;
void setup() {
pinMode(TTP223_PIN, INPUT);
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(0);
FastLED.clear();
FastLED.show();
}
void loop() {
bool botonActual = digitalRead(TTP223_PIN);
if (botonActual == HIGH && botonAnterior == LOW) {
if (!ledsEncendidos) {
fadeIn();
ledsEncendidos = true;
} else {
fadeOut();
ledsEncendidos = false;
}
delay(200);
}
botonAnterior = botonActual;
}
void fadeIn() {
CRGB coldWhite = CRGB(200, 255, 255); // White
fill_solid(leds, NUM_LEDS, coldWhite);
for (int b = 0; b <= MAX_BRIGHTNESS; b += STEP) {
FastLED.setBrightness(b);
FastLED.show();
delay(DELAY_MS);
}
}
void fadeOut() {
for (int b = MAX_BRIGHTNESS; b >= 0; b -= STEP) {
FastLED.setBrightness(b);
FastLED.show();
delay(DELAY_MS);
}
FastLED.clear();
FastLED.show();
}
Thank you very much for your time and any technical feedback you can provide.
UPDATE 1
Thanks to everyone who has been helping me in this thread. I’ve decided to make a series of changes to my PCB because, as you all pointed out, there were more issues than I initially realized (I’m truly grateful for all your help).
As a result, I’ve decided on the following configuration. I'd love to hear what you think:
This is the main schematic:
I have decided to apply a series of changes, so the functionality is now as follows:
-
Dual Power Supply: It can operate both plugged into a 5V 3A phone charger via USB or through an 18650 battery.
-
Resettable Fuse: Im using this before B+ in order to prevent a short. It's okey?.
-
Power Path Management: Whenever the USB is connected, it will draw current from there; when unplugged, it will automatically switch to the battery.
-
Manufacturing: I intend to order everything with SMD assembly from JLCPCB (the design is made in EasyEDA).
-
Control: A tactile touch button will control when to turn the LEDs on or off.
-
Voltage Sensing (Pin A0): I have tried to create a system to use the Arduino's Pin A0 to read the incoming voltage to the MT3608. My goal is to implement the following logic:
| Voltage in LOAD | LED Power | Powers comes from |
|---|---|---|
| > 4.5v | 100% | USB |
| 4.5v - 4.2v | 100% | Battery |
| 4.2v -4.0v | 70% | Battery |
| 4.0v - 3.8v | 50% | Battery |
| 3.8v - 3.7v | 40% | Battery |
| 3.7v - 3.6v | 20% | Battery |
| < 3.6v | 0% | Battery |
- LED Selection: Finally, as you can see, I have decided to swap the addressable RGB LEDs for 5V COB LEDs, as previously suggested, since they better suit my needs. Also, i decided to use only 3 LED stripes (instead 4).
So, my questions are as follows:
- I will be using these 8mm white LED strips (3 strips in parallel, 25cm each, for a total of 75cm). I’ve seen that these types of strips (320 LEDs/m) consume around 10W per meter. Therefore, my estimated maximum power consumption would be about 7.5W. This implies a current of I=7.5W/5V=1.5A. This should be enough for my MT3608 module, right?
- Regarding the Schottky diode, I have decided to switch to the SS54 model to ensure it can handle the required amperage. With this model, there shouldn't be any issues, right?
- Regarding the 'LOAD' sensing system to identify whether the USB or the battery is being used: is this setup correct? Will it work properly? I am going to start developing the new firmware for it.
Finally, the MOSFETs I am using are:
Q1: Type P for power path as discussed
Q2: Type N, for controlling the LED stripes
Is this circuit functional as it stands? Are there any improvements you would suggest? I would like to test it on a breadboard first, but I don't have the necessary components on hand and they take a while to arrive. In fact, I am still finalizing whether these specific components will be the ones I use in the end. Is it 'crazy' to send the board straight to production like this without prior testing—ordering it with the components pre-assembled (even for just a few PCB units)?
Thank you all so much for the help, I really appreciate it because this is driving me crazy.
UPDATE 2
You can find a detailed description of the failures encountered in my previous PCB batch here: #50
I have started this new thread to track the progress and feedback for the complete redesign I am currently working on here:



