last day (16 days later) » 

8:07 AM
0
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...

 
No, 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.
 
(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‌​342.
 
@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.
 
(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.
 
@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.
 
8:07 AM
Many 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.
 
In 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.
 
I 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 max
Usually the typical toy relay switch needs only around 70mA. So there is a big safety margin. So 2N2222 should be fine.
 
 
1 hour later…
9:20 AM
I am too lazy to proofread my often dodgy calculations. Anyway, let me move on to 2N2222.
2N2222 Datasheet - Fairchild/OnSemi
https://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf
I found that at 10mA, DC current gain is only 35 min. comparing to 2N3904's gain 10 100. But since the circuit's safety margin is very big, so I guess replacing 2N3904 by 2N2222 should be OK, especially you can check it out by experimenting with it.
My quick and dirty conclusion is that you have solved your only problem. Happy learning. Cheers.
 
 
2 hours later…
11:07 AM
Thank you tlfong01 , I learned a lot today. Thanks to you. Sorry for late message, I wasn't on computer. I will "check it out by experimenting ".
 

  last day (16 days later) »