Help finding PCB design flaw - Page 1
Forum section: electronics / beginners

author: mrburns
author_rank: Contributor
timestamp: April 18, 2024, 10:44:10 pm
content: My first PCB design with SMD components pre-assembled in pcbway went south immediately.(Magic smoke...)The pcb is basically a breakout board for a Pi Zero to connect 20 DHT22 sensors, but with 3-5V to 5V boost converter for external power and selectable 3.3V or 5V sensor voltage.- It also has level shifters for data lines coming from sensors to gpio.- Attiny10 smd microcontroller to have full system and sensor reboot possibility.- Place for dual usb-a connector with power on-off possibility.I ordered 5 boards from pcbway with smd components and usb-c and micro-usb connectors assembled. I want to solder through hole stuff my self but I did not solder those yet.I just got the boards. Before powering on the first one I measured that nothing was not shorted and it looked good. Then I connected the usb-c connector to my phones usb charger.1. First the power on led lit nicely and I was able to measure that the input was 5.125V and after the boost converter it was 4.999V. No problems. (The only thing consuming power at the pcb at this point was the small smd led.)2. I then proceeded to carefully try to feel out if any component was overheating by just gently touching the top of the components. At this point the smoke came out of the feedback resistor of the boost circuit (Rfbt). (CRCW0402732KFKED CRCW Series 0402 0.063 W 732 kOhm ±1 % ±100 ppm/K SMT Thick Film Chip Resistor).3. I disconnected the usb power immediately and started searching for shorts but found none.4. I measured the second pcb for shorts and continuity on power traces.5. I connected power to the second board thinking the probem with the first could have been a manufacturing flaw. -> Smoke from the input protection diode (D1) between the usb connector and the boost circuit.6. I have been trying to find the flaw for two days now but cant find one. I already got smoke from third pcb and this time it was the p-mosfet (Q3) after the protection diode before the boost circuit.All help is appreciated.Pictures:https://1drv.ms/f/s!AnfIOtcTpP6Bg4Njyl16cHLvhViyuw?e=eCatYSLink to circuitmaker project:https://365.altium.com/files/C33BBF2E-E81A-4FCC-8011-A663D419CE9AProject files archive: (corrected)https://d3mo.fi/storage/Pi_zero_20sensor_2024_03_25/What tools is have for debugging:Fluke multimeters, lab power supply, frequency generator, soldering equipment, internet.

author: ataradov
author_rank: Super Contributor
timestamp: April 18, 2024, 11:24:08 pm
content: First of all, stop powering things from USB power supplies. Use a lab power supply with a low current limit.Then attach your actual schematic. The schematic in the archive does not seem to match the board. In the Schematic D1 just goes to micro-USB connector. On the board it goes to both.Wait, schematic is for a completely different board.

author: mrburns
author_rank: Contributor
timestamp: April 19, 2024, 05:44:07 am
content: QuoteThanks for noticing. The I fixed the link to point to correct project archive.

author: mariush
author_rank: Super Contributor
timestamp: April 19, 2024, 07:55:13 am
content: Some oddities in your schematic ...VBUS of both usb connectors seem to be connected together, with no protection ... what happens if you have let's say a power bank on one port and a phone charger on the other...There's switch ICs like TPS21xx you could have used (TPS2121, TPS2211 to TPS2115) you could use to switch between inputs, there's ideal diodes you could use (ex LM66200 for dual ideal diode pack that auto selects highest input voltage, or single diodes like LM66100 that can be turned on or off with an enable pin to switch between two inputs)Why use a tps61022 with maximum 8A switching current and an inductor good for 3-4A switching current, when the total power of your board is gonna be less than 500mA if you exclude the pi. Looking at max 2.5 mA for each sensor (if you read them all at same time), maybe 10mA per voltage translator chip, maybe 5-10mA for the microcontrollers...The pi zero has it's own 3.3v buck converter on the board, you don't need to "stabilize" the 5v from usb, you're just doing a double conversion :https://datasheets.raspberrypi.com/rpizero/raspberry-pi-zero-reduced-schematics.pdfWhy the hell would you use possibly the shittiest version of 1117 regulator, that LM1117 needs capacitors with esr above 0.3 ohm.. you're using relatively expensive tantalum capacitors just to get this regulator working.There's plenty of regulators that have very low dropout voltage and are stable with all kinds of capacitors ... some random examples just looking at highest stocked on digikey ...AP7361Chttps://www.digikey.com/en/products/detail/diodes-incorporated/AP7361C-Y5-13/5638321orhttps://www.digikey.com/en/products/detail/diodes-incorporated/AP7361C-FGE-7/5638318,if 300mA is enough AP2210Khttps://www.digikey.com/en/products/detail/diodes-incorporated/AP2210K-ADJTRG1/4470821or AP2127K would workhttps://www.digikey.com/en/products/detail/diodes-incorporated/AP2127K-ADJTRG1/4470788for 500mA max, NCP8705https://www.digikey.com/en/products/detail/onsemi/NCV8705MTADJTCG/5257920You probably could have used a single buck regulator to convert whatever input voltage you have to something like 3.6v and run everything but the pi on 3.6v and use voltage translator if needed to change 3.6v signals to 3.3v for the pi)

author: mrburns
author_rank: Contributor
timestamp: April 19, 2024, 03:34:19 pm
content: QuoteI was thinking this. But it would be good idea to add the protection if I ever order more of these. I just wanted both common port options so I would not need adapters with these.QuoteI was thinking that if i need to attach a 4G/GSM Modem USB dongle or similar devices i would have enough power for them. Also I want to have option to use sensors and/or devices that draw more current.QuoteI had no idea this is the shittiest version...It would certainly be possible to use the Pi:s 3.3V but I have had so many problems with devices drawing too much from the Pi so I wanted to avoid that if I ever use 3.3V sensors..Did you get any ideas what might cause the power problems when nothing is even connected?

author: ataradov
author_rank: Super Contributor
timestamp: April 19, 2024, 03:40:47 pm
content: Run it with a current limited supply and measure the actual current consumption. If it is high, eliminate sub-circuits and see what consumes that current.The schematic is hard to read, but there is nothing obviously wrong, so you will have to debug it one part at a time.

author: MarginallyStable
author_rank: Regular Contributor
timestamp: April 19, 2024, 03:42:19 pm
content: Not the problem, but "HOLY VIA's" around the regulator.

author: mrburns
author_rank: Contributor
timestamp: April 19, 2024, 04:34:18 pm
content: I have now found two things that might or might not have anything to do with the frying..1. The MODE pin 6 is not connected to anything.2. In the section 8.3 of the datasheet of the regulator is says "For those applications with input voltage higher than 4.8 V, TI suggests adding a diode between the VIN pin andthe VOUT pin to pre-bias the output before the TPS61022 is enabled. As an example shown in Figure 8-13, theinput voltage is from a USB port in the range of 4.5 V to 5.25 V. The target output voltage is 5 V to 5.25 V".- I dont have that diode on the board.QuoteI just went through many youtube tutorials on pcb design and the two things I got to my head was to ground pour a lot and use a lot of VIAsQuoteYep it looks like I have to fire up my old GPC-3030. Do you have any suggestions how to start? Should I remove some of the SMD:s before injecting any voltage? Like the D2? I dont want to fry my two remaining boards that are still intact..

author: ataradov
author_rank: Super Contributor
timestamp: April 19, 2024, 04:40:35 pm
content: Quote from: mrburns on April 19, 2024, 04:34:18 pmI'm not 100% clear on the conditions when the boards die. If it is just the bare board as shown on the picture with nothing else connected, then the the current limit to 100 mA and nothing will get fried. There is no reason this bare board should consume 100 mA, so if you see PSU go into the current limit mode, then something is wrong and you need to remove components to disconnect parts of the circuit.

author: mrburns
author_rank: Contributor
timestamp: April 19, 2024, 06:07:42 pm
content: Yep, it is just the bare board as shown on the picture with nothing else connected. Thermal camera could propably help a lot if I find one..

author: aliarifat794
author_rank: Regular Contributor
timestamp: April 20, 2024, 06:52:47 pm
content: Before printing, did you simulate your circuit? Or implement it at home (perhaps on a breadboard or veroboard)?

author: tooki
author_rank: Super Contributor
timestamp: April 21, 2024, 12:29:37 pm
content: A potential issue I see is that all of your input capacitors are ceramic. This can cause voltage spikes if you connect a power supply that is already turned on, connected through a long (more than a few cm) cable. Seehttps://www.analog.com/media/en/technical-documentation/application-notes/an88f.pdfPrevious threads that at least mention this issue:https://www.eevblog.com/forum/beginners/boost-converter-explodes-when-connected-to-battery/<— really nice explanation in words in reply #4https://www.eevblog.com/forum/beginners/do-lc-power-on-spikes-usually-matter/https://www.eevblog.com/forum/beginners/hot-swapping-killing-ics/https://www.eevblog.com/forum/chat/why-did-my-lt3042-die/https://www.eevblog.com/forum/projects/tmc5160-keeps-dying-on-24v-input/https://www.eevblog.com/forum/projects/protecting-against-voltage-regulator-failure/https://www.eevblog.com/forum/projects/regulator-dies-and-takes-whole-circuit-down-with-him/https://www.eevblog.com/forum/projects/buck-converter-ic-fail-vin-shorted-to-ground/https://www.eevblog.com/forum/projects/synchronous-buck-ic-with-internal-power-switches-failing/If it is this, don’t be like most of the people in the above threads, who never gave any update on whether that was the problem or not: please leave an update!

author: mrburns
author_rank: Contributor
timestamp: April 21, 2024, 06:43:13 pm
content: QuoteThanks for the info! I will definetely keep updating. I was not able to break any components when testing with lab power supply. I did find one thing that could have caused these issues:- The Q3 P-mosfet was acting weirdly and showing 1V voltage drop across it until I jumped the gate to ground. It would also not open after I removed 5V from the gate.- Also with low voltages like 3-3.5 it would really slowly start rising the voltage through it, so it must have been in some unstable state.I now added 10k pull down resistor between the gate and ground on the U7 Attiny10 gnd and PB0 (driving the Q3 gate) breakouts and now it seems to be working..I dont have any code on the attiny yet but just jumping Vin to the PB0 seems to work correctly and it cuts the power to the board and resumes operating when the gate is low again.

author: gamalot
author_rank: Super Contributor
timestamp: April 21, 2024, 06:46:28 pm
content: Those vias make my head spin, are they really necessary?

author: amwales
author_rank: Regular Contributor
timestamp: April 21, 2024, 07:57:05 pm
content: I'm new to all this, so this may be a silly question but is the bag you are standing your board on conductive?

author: mrburns
author_rank: Contributor
timestamp: April 21, 2024, 08:17:08 pm
content: QuoteI had to check and there is no conductivity at all on that plastic.