Uncategorized

pico relay notes

Q: Is the WIZnet W5500 module affected by the signal pin of a relay module?

mrneedshelpalotI am using a Raspberry Pi Pico, a W5500, and a relay module. When I don’t connect 24VDC for the relay module (NO and COM pins,) the Pico, W5500 and relay module work properly (the relay only blinks.) When I added 24VDC for NO and Com side, my code is working for 1 or 2 minute then the ethernet di…raspberry-pipinoutschematicmrneedshelpalotNo, I didn’t move or didn’t change anything on relay. Only I changed pin14 to pin28, and it is working. I tried to connect pin14 again to see what will happen, It gave error again. tlfong016735(1) Are you using uart01/uart1 or SPI0/SPI1? (2) I found Pico uart0 on GP0, 1 OK. (3) I found uart1 on GP4. GP5 not reliable, intermittently failing. (4) I found uart1 on GP8, GP9 reliable. Is it this one? (5) W5500 Ethernet with POE IoT Board (Arduino Compatible) DFRobot $45. (a) dfrobot.com/product-1286.html, (b) wiki.dfrobot.com/W5500_Ethernet_with_POE_Mainboard_SKU__DFR0‌​342mrneedshelpalot@tlfong01 Sorry I didn’t mention it before. I added pins, w5500 , relay module and connections on question. I am using banggodlink this and SPI1. tlfong016735(5) Thanks for the updated wiring diagram. So you are using SPI1 (GP10, 11, 12, 13) and GP 14, 15 (later GP28). I have been using GP14, GP15 very often and found them OK. (6) But GP14, 15 seem to ‘overlap’ with SPI1, so you might like to try other pins with alternate SPI functions. (7) For a similar reason, avoid using GP28 or other ADC pins. (8) Your relay is JD-Vcc type, and might have the Pico/Rpi GP pins “High not high enough” problem. / to continue, …(8) Your JD-Vcc relay is Arduino compatible 5V logic, but Pico is 3V3. You might need to remove the relay’s JD-Vcc jumper and power relay side with 5V. See this: (9) How to properly use a relay module with JD-VCC from Arduino/Raspberry? Asked 1 year, 5 months ago Active 3 months ago Viewed 15k times electronics.stackexchange.com/questions/505318/…. (10) One more thing – GP22 seems very ‘clean’, so less chance making trouble.(11) For Rpi3/4. built in on board I2C pins have heavy pullups of 1k8, and other pins 50k (not sure about Pico). So this might cause complications, especially if your 3V3 Pico output level is marginal to 5V logic. (12) Just wild guessing, I am still experimenting with Pico uart/I2c/SPI stuff. Good luck, cheers. mrneedshelpalot56@tlfong01, thank you. First I actually use this [relay] (forums.raspberrypi.com/download/file.php?id=49019) but when I use this on GP14, W5500 isn’t working even 1 or 2 min. It is disconnecting immediatelly. Now I tried this on another pin GP28 (I will change it don’t worry, I will use GP23 or smt that not Analog pin) , It is working good. So I guess the problem is really GP14 pin. I guess I shouldn’t use it when I use SP1. tlfong0116:07Many thanks for telling me the good news. So GP14 might be guilty. BTW, I am playing with 4 or 5 Pico boards, I do find GP pins not working from time to time. I just swap pins or boards and often problem disappears. Happy learning. Cheers. mrneedshelpalotIn that link, they use 2N3904 but I couldn’t find it in my shop so I am using 2N 2222. Thank you for your great knowledges. Have a nice day, cheers. tlfong016735I see. 1N3904 and 2N2222 are usually interchangalbe. But le me do some casual quick and dirty calculations:Part A – 2N3904 Rb = 470R
(a) Vbe(Sat) ~= 1V max
(b) Ibe = 3V3 / 470R ~= 7mA ~= 10mA
(c) hfe ~= 100
(d) Ic = 10mA * 100 ~<< 1000mA maxUsually the typical toy relay switch needs only around 70mA. So there is a big safety margin. So 2N2222 should be fine. 

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.