1

First of all, thank you so much for your interest in my question.

Introduction

The following is a schematic diagram I drew up to represent my Raspberry Pi Pico WH - LED lamp project. I am controlling one 12V LED (LED1), four 5V LED strips (LED2, LED3, LED4, LED5), one Temperature and Humidity Sensor (DHT22), and one 3V LED (LED6) using my Raspberry Pi Pico WH. One 12V LED and four 5V LED strips are used as my lamp lighting. One 3V LED is used to indicate that the Pico is connected to Wi-Fi. I am running a webserver inside the Pico, so I can remotely turn on and off individual LEDs (LED1, LED2, LED3, LED4, and LED5) as I wish + read the temperature and humidity measurements.

I have provided all my components in the "Components" section below and also given links to the items where appropriate. All the components are assembled on a breadboard.

I am using a 230VAC-IN, 14VDC-OUT power adaptor to power up the whole project (e.g., an old Samsung monitor power supply). I then use a buck converter to step down from 14VDC to ~5VDC to power up the Raspberry Pi Pico WH and four 5V LED strips, and another buck converter to step down from 14VDC to ~12VDC, to power up the 12V LED.

I would like to point out to you the following values in ammeter AB1:

When? Current flowing through AB1 Ammeter
LED1, LED2, LED3, LED4, and LED5 are Off & LED6 is On 90mA
Just the 12V LED (e.g. LED1) & LED6 are On 170mA
LED1, LED2, LED3, LED4, LED5 and LED6 are On 930mA

Also, when all the LEDs are on, the values for AA1 & AA2 ammeters are as follows:

Ammeter Current flowing through the Ammeter
AA1 350mA
AB1 170mA

Problem

In general, the lamp works as expected, whether all the LEDs are on or off. I can remotely turn on and off individual LEDs (LED1, LED2, LED3, LED4, and LED5) as I wish + read the temperature and humidity measurements.

However, on a number of occasions during the day, I noticed the Pico restarts regardless of whether any of the LEDs (LED1, LED2, LED3, LED4, and LED5) were on or off.

I have been through my code on numerous occasions and still haven't found a reason for this restarting issue. I am not entirely ruling out potential issues in my code. However, I would like to ask all electronic experts on StackExchange platform: do you find any issues in my schematic diagram below? I would be very much delighted to hear your feedback.

Please let me know if you need any other information in order to share your findings. I am happy to provide :)

Components

schematics diagram

Thank you very much

Anjana Silva
  • 119
  • 4
  • I don't have the time to dive into the datasheets. But one thing sticks out immediately: you need to connect the [-] pin of your +12V buck converter to GND. – Velvet Mar 26 '24 at 08:48
  • 1
    Also, you might want to read Rules and guidelines for drawing good schematics. Main points: GND should point downwards; add reference designators for all components (e.g. buck converters) – Velvet Mar 26 '24 at 08:49
  • @Velvet Thanks for your reply. Its not necessary to connect the first buck converter's [-] to the ground. Because the 12V LED [-] is grounded anyway, it therefore completes the circuit. Did you mean to connect the MOSFTE's source pin to the first buck converter's GND? I will take note of the rules and guidelines for drawing good schematics. However, on the basic layout and flow, I can see GND1 is pointed upwards.

    Thank you

    – Anjana Silva Mar 26 '24 at 09:16
  • @Velvet I have updated the schematics to point GND to down. Thanks – Anjana Silva Mar 26 '24 at 09:26
  • Does the pico reboot when running via usb but not on your board? There’s a fair chance that the reboot is caused by code and it might not be the code you wrote. Pare it down until the reboots go away. – Kartman Mar 26 '24 at 11:02
  • Relying on one PICO-W GND connection (pin #3) for all currents may be causing supply glitches when those MOSfets switch. Can you tell if a reset is coincident with LED(s) going on-or-off? RP2040 has brown-out-detect (BOD) that might cause a reset - you should be able to read registers to see if this is so. – glen_geek Mar 26 '24 at 13:47
  • @Kartman I powered up using the USB and I can still experience the reboot. Did you mean a code in a library causing this issue? Thanks very much for your comment. – Anjana Silva Mar 26 '24 at 16:08
  • @glen_geek I can confirm that rebooting does not coincide with LEDs turning on or off. For example, if I left the Pico all LEDs turned off overnight, the Pico would've restarted at least a couple of times. Do you mean connecting at least one other GND of the Pico to the common GND? – Anjana Silva Mar 26 '24 at 16:12
  • Single-point grounding is good practice. That single-point should be back at the buck supplies. I would suggest a single PICO-WH GND (pin #38) returned to +5V buck, a single GND wire from the four 5V MOSfet sources back to +5v buck, a single GND wire from the single 12V MOSfet source back to +12V buck output. All GNDs are common - tied together at the three bucks. Does the PICO;s +3.3V power anything via DHT22 connector? – glen_geek Mar 26 '24 at 18:03
  • @glen_geek single PICO-WH GND (pin #38) returned to +5V buck & a single GND wire from the single 12V MOSfet source back to +12V buck output? Did you intend to mean to "-5V" and "-12V" outputs respectively (instead of +5V and +12V? Also, PIN 3 is already grounded. I don't understand why you mentioned to ground Pin 38 instead? Am I missing anything here? Thank you very much – Anjana Silva Mar 26 '24 at 18:24
  • Oh, yes of course, all GND returns to their respective supplies go to their output-side "-VE" terminals, not "+VE" terminals. All three bucks should have their input-side "-VE" terminals joined with short heavy wire. I'd expect that buck regulators would probably have their input "-VE" common with their output "-VE", but that is perhaps an unsafe assumption. – glen_geek Mar 26 '24 at 18:37

1 Answers1

1
  • As noted in comments, the regulator absolutely needs to be grounded down. Ideally with the shortest path back to the supply ground as possible.

    You cannot place arbitrary diodes and passives in the ground path of a voltage regulator, as your comment indicates you think would be fine. Otherwise it may not work as expected/at all and even if it did, it would drag EMI noise all over the circuit.

  • LEDs require current limiting in the form of series resistors. If these are LED strips rather than LEDs, they might have that built-in. But in that case you probably should pick a different schematic symbol.

  • As for why the MCU is rebooting, there is usually an option out of reset to check the reset cause. Clock failure, low-voltage detect or similar.

    I assume that the "Rasp Pi Pico" in your schematic isn't actually a MCU but a system level PCBA with everything on it. That's not particularly helpful for trouble-shooting - I would never assume that all the various hobbyist boards out there are correctly designed to begin with, so you may have to dig into the board itself. For example there ought to be decoupling and/or bulk capacitors at the supply pins.

Lundin
  • 20,162
  • 1
  • 26
  • 76
  • Thanks very much for your answer. I will certainly consider grounding the regulator. Yes, those LED strips do not need additional resistors (sorry for the confusion). Do you find anything else that is odd in my schematic diagram? – Anjana Silva Mar 26 '24 at 16:15
  • @AnjanaSilva I think you are going to have to peek closer at the system reset. Measure the reset pin with your scope when you can reproduce the problem. And also look at reset causes from the software side - if there is for example a low-voltage supply occurring then you likely have a supply problem. – Lundin Mar 27 '24 at 07:47