Help can not make MCP2515 to work - Page 1
Forum section: electronics / projects

author: Jawad
author_rank: Contributor
timestamp: July 19, 2019, 11:05:12 pm
content: Hello guys.I need some serious help here.I spent the whole day trying to figure out what is the problem with my design since my MCP2515 canbus is not sending or receiving any data.I followed this tutorial and made the example on a breadboard it worked fine.I want to use this to listen to my car canbus to display some custom data on the screen.so on the breadboard everything is working finethe problem is I designed my own PCB and printed some samples in china and now it seems that it is working but it is not sending or receiving any data (CANH and CANL are 2.5v) on the breadboard the same sketch and schematic is working greatI need to solve this as soon as possible spent the whole day trying to figure out what is missingplease check what is wrong with the design or guide me on how to diagnose the problemany help will be appreciated

author: JagV12
author_rank: Contributor
timestamp: July 20, 2019, 08:37:27 am
content: I've never used EasyEDA but it looks like the layout is not finished yet ! The ratline shows that GND is not routed. Did you add a ground plane that is not displayed here ?On the schematic, is L1 wired as it should ? Did you check the power rails voltage ?Wiring around LM2596S-ADJ should be cleaned up (rearranged) so errors could become obvious...

author: Jawad
author_rank: Contributor
timestamp: July 20, 2019, 09:07:52 am
content: I'm just a beginner this is the first time i make a design and first time using easyedaThe design is finished.I think GND is connected.it is on top and bottom planes i think you should click on the coper area marked with dotted line and click update copper area to see it on your sideAre the L1 connection wrong ? Since all i did is to copy schematic from the 3 modules i usedWhat is wrong with L1 ?

author: JagV12
author_rank: Contributor
timestamp: July 20, 2019, 10:18:42 am
content: If this attachment is your model, double check your wiring (R2 & L1), it is wrong ! And I didn't notice but you have a second voltage regulator (mic5205-5.0ym5) after the first one and a diode (D2). Why all that ?Does this circuit REALLY work on the breadboard as per your schematic ?And once again,did you check the various power rails voltage ?

author: Pinkus
author_rank: Frequent Contributor
timestamp: July 20, 2019, 11:16:29 am
content: To narrow it down: did you check your MCP2515 if it is sending/receiving data on its TXCan / RXCan lines?

author: Jawad
author_rank: Contributor
timestamp: July 20, 2019, 07:01:45 pm
content: I followed that tutorial which the link i provided it worked fine on a breadboard because it uses 3 modules arduino pro mini mcp2515 module and LM2596ADJ moduleAfter it worked on the breadboard i wanted to make a small pcb without any wires and breadboardSo i didn't change anything just copied exactly the three modules go make a pcb.I didn't follow any schematics since i didn't trust the online schematics since i'm a beginner i will not know which one is wrongi have the 3 modules in hand so i followed all the lines with multimeter in continuity modeFor the TX and RX they are always high no data (tested it using a logic analyzer since i still didn't receive the scope yet)

author: JagV12
author_rank: Contributor
timestamp: July 20, 2019, 10:05:44 pm
content: Sorry to insist but what is the voltage at Vcc (Pin 2 on AVR_SPI connector) ? It should be 5V.

author: Jawad
author_rank: Contributor
timestamp: July 20, 2019, 10:10:07 pm
content: Yes the voltage is 5v on vcc pins coming out from the regulator to the atmega and mcp2515 and also the tranceiver chip.all of them are running on 5v.When uploading another code to it like a blinking led it works fine so atmega328p is working fine but it is not communicating with MCP2515 since there is no data mouvement on rx or tx and canL and canH are 2.5v

author: JagV12
author_rank: Contributor
timestamp: July 21, 2019, 08:01:20 am
content: OK, next thing is to make sure X2 is oscillating properly without disturbing it (search the internet on how to do that) and then to test the SPI part of the MCP2515...

author: Jawad
author_rank: Contributor
timestamp: July 21, 2019, 05:34:39 pm
content: Thanks guys i found out what it the problem and solved it it was a wrong pin number in the sketch changed it and everything is working fine now