I've been working on a project for quite a while now, which involves the ESP8266 NodeMCU (v1.0), as well as two SPI Modules: ENC28J60, and RFID-RC522. With that being said, I encountered a problem recently, which I haven't been able to resolve so far. Working with micro-controllers and electronics is still a learning experience for me, so my knowledge here is limited. When I assembled the prototype for my project on breadboards, everything was working fine in the end. So I thought I can move on, and design my first PCB (ever).

After doing so, I quickly noticed that something is not working right: When inspecting the serial output, I found out that only the Ethernet-module (ENC28J60) has been recognized, whereas the initialization of the RFID-module (RFID-RC522) didn't work out. My first guess was, that the RFID-module was broken. After testing only the module on the breadboard, the initialization of the RFID-module worked out fine. Also, when only pluging the RFID-module into my PCB, it is recognized without any problems.

After some research, I found out the problem might stem from the SPI-lines on my PCB, as they should approximately have the same length when working with high frequency devices, such as the ESP ( https://resources.pcb.cadence.com/blog/2019-tips-for-optimal-high-speed-spi-layout-routing ). So I designed another PCB, with exactly this condition (+ I also tried to keep the SPI-routes short). When I soldered my newly designed PCB, I still got no positive result. The problem stays the same.

Does anyone have an idea, why only one of the SPI-devices is recognized, during initialization phase? The initialization of all the other devices works fine. I have attached the schematics of my PCB-design to this thread.

As a side information: I am using the LM3940 voltage regulator. When measuring the voltage, I get almost exactly 3.3 V (as required by my modules).

I would really appreciate any comment and help on this.

Please let me know if some information is missing. I will reply as soon as I can.

PCB schematic

  • 1
    \$\begingroup\$ Why do you have Q2 on the ENC28J60 /CS signal? What can you tell use about the differences between the working breadboard test and the non-working PCB? You're also going to need to include your code, particularly the parts involved in the assignment of the SPI chip selects and the detection of the respective peripherals. \$\endgroup\$ Dec 8 '20 at 22:13
  • 1
    \$\begingroup\$ Ed S. - Welcome :-) (a) As commented by Chris Stratton, one of the standard troubleshooting approaches is to compare (in increasing detail) what works (breadboard h/w) with what fails (PCB h/w). There will be unavoidable differences, so skill & experience can help to prioritize the list of suspects. (b) I hope you have access to a scope (not, at first, a logic analyzer) to be able to compare the analog quality of relevant signals e.g. SPI on working vs. failing h/w. (c) All your resistor symbols are non-standard (varistor?). Is that a schematic error and the resistors are actually normal? \$\endgroup\$
    – SamGibson
    Dec 9 '20 at 0:17
  • \$\begingroup\$ @ChrisStratton Hello, thanks for your comment. (Edit) First question: For the prototype I needed a workaround to add the Eth-module to my project, as I had no more (CS) pins left link. Secondly, the only differences that come to mind are (1) I am no longer using any jumper cables/breadboards, and (2) I am powering the whole system over microUSB and a voltage regulator (instead of a adjustable power supply). All the other components used are the same. \$\endgroup\$
    – Ed S.
    Dec 9 '20 at 16:38
  • \$\begingroup\$ @SamGibson Hello, thanks for the reply. To answer your questions: (a) Unfortunately I have already "destroyed" my breadboard-prototype over time (after documenting the schematic), as I needed some of the parts for other small projects. So I need some time to rebuild it (if necessary). I have noted the main differences to Chris in my comment, but most likely I lack experience to notice any other more detailed differences. (b) Unfortunately, I don't have access to a scope, maybe I'm lucky if I ask around. (c) The resistors are actually normal, I chose the wrong ones for my schematic. \$\endgroup\$
    – Ed S.
    Dec 9 '20 at 16:51
  • \$\begingroup\$ The transistor does nothing to change the need of a /CS pin, really it doesn't seem to accomplish anything at all. Sounds like there may be some mistakes there - how exactly are you driving that? Driving the wrong chip select at the wrong time would easily explain your failures. \$\endgroup\$ Dec 9 '20 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.