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

General • Re: How to I solve this error

$
0
0
Let me approach this from another perspective. I found this interesting:
My understanding is that the output of the Pico Pin OUT is the trigger to the relay. The relay itself is driven from a separate 5 volt power supply and the relay output wither allows or stops the nominal 12volt DC supply which is the power to a model railway rail track.

I have a separate Pico doing the same thing on a separate track without any issues. The programs are similar but not identical.
It sounds like relay breakout boards are being used. Pico is at 3.3V, relay board 5V, railway 12V. Let me lay out one scenario that can happen with common Songle relay boards. I am working on the suspicion that the chatter means that the relay coil is not being driven adequately.

From the datasheet, a standard Songle 5V relay needs 90 mA to latch. From an online schematics, the common Songle relay board has a 1K resistor on the control line that leads to an NPN. Say the NPN drops 0.7V. Assume the Pico outputs 3.3V -- it may drop to 3.2V with this load but use 3.3V for now. That means 2.6V across the 1K, giving 2.6 mA NPN base drive. The transistor hFE needs to be >35. If they use cheap no-name parts then the coil drive may be barely sufficient, and any drop in drive strength may cause the relay to turn off, or chatter.

Like most breakout boards that have been around for years, Songle relay boards are designed for AVR Arduino, which means 5V. Unlike an NFET, for the NPN we do need adequate drive strength. Changing the resistor to something lower may improve the coil drive strength and make the relay board work reliably. Assuming Songle relay board, of course.

Just a guess, but since a similar Pico-relay combo works fine, this kind of marginal drive scenario is plausible.

Statistics: Posted by katak255 — Sat Jan 03, 2026 10:15 pm



Viewing all articles
Browse latest Browse all 8093

Trending Articles