Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

General • Re: How to I solve this error

$
0
0
RPi Pico with relays is no problem at all, as long as the relay coils are driven properly.

A Pico board runs when non-Songle relays are working with no chattering, so the relay operation _may_ be messing with the power supply lines. And the Songle board that causes problems, it would be easier to find the reason if there was an oscilloscope at hand. Or the Songle one could have a short somewhere -- these things are most likely not 100% tested.

Since it's a model railway, I assume it has substantial wiring everywhere. I was just testing one Pico board's power consumption for another thread, and using another Pico interfaced to a INA219 board to measure current. Both plugged into an unpowered hub. Each time I switch the former on, the latter will crash. Didn't take a lot of current to crash it there... So, your crashing Pico _could_ be due to the relay chatter.

So I guess you are using those common Songle breakout boards, 1, 2 or 4 etc on a board. If so, then I think 1K is too big and the current to the base of the NPN is not enough for reliable operation. A Pico GPIO pin can supply enough current, but the R has to be lower. If you have SMD resistors to replace the on-board one, that would be a good thing to try on the wonky relay board. Or add an axial R in parallel, which might be easier to solder. If this fix works, then I'm pretty sure that proves the case for the NPN issue. The problem won't arise if they used a suitable NFET, but NFET that switches on nicely at 3V3 is more expensive than generic NPN small signal sot-23s. Plus, these breakout board circuits always stick to "how things have always been done" and if the recommended circuit has an NPN, they will use an NPN always, and that kind of circuit will almost certainly be designed for 5V operation. Which causes a problem with 3V3 given NPN is current controlled.

Also, better isolation from big switching loads can help, maybe add some tank capacitors before the Pico. A modern high-speed board like a Pico board uses SMD caps with very low ESR to respond fast to load changes. I think some electrolyteselectrolytic caps upstream can buffer the Pico from load changes further upstream. Of course, if you have an oscilloscope, it can all be checked and there would be no need to guess.

[Edit] Fixed 'electrolytes' spelling, I must have drank too much Brawndo. :D My goal here is to point out some of the things that _may_ be spoiling your railway thing. Either one can opt for the working board and forget about the wonky one, or do a spot of troubleshooting to find answers. The person with the hardware will have to decide on the course of action. Happy hacking!

Statistics: Posted by katak255 — Tue Jan 06, 2026 4:24 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles