Author Topic: Help can not make MCP2515 to work  (Read 1785 times)

0 Members and 1 Guest are viewing this topic.

Offline JawadTopic starter

  • Contributor
  • Posts: 11
Help can not make MCP2515 to work
« on: July 19, 2019, 11:05:12 pm »
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 fine
the 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 great
I need to solve this as soon as possible spent the whole day trying to figure out what is missing
please check what is wrong with the design or guide me on how to diagnose the problem
any help will be appreciated
« Last Edit: July 21, 2019, 05:35:50 pm by Jawad »
 

Offline JagV12

  • Contributor
  • Posts: 25
  • Country: fr
Re: Help can not make MCP2515 to work
« Reply #1 on: July 20, 2019, 08:37:27 am »
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...
« Last Edit: July 20, 2019, 09:34:37 am by JagV12 »
 

Offline JawadTopic starter

  • Contributor
  • Posts: 11
Re: Help can not make MCP2515 to work
« Reply #2 on: July 20, 2019, 09:07:52 am »
I'm just a beginner this is the first time i make a design and first time using easyeda
The 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 side
Are the L1 connection wrong ? Since all i did is to copy schematic from the 3 modules i used
What is wrong with L1 ?
 

Offline JagV12

  • Contributor
  • Posts: 25
  • Country: fr
Re: Help can not make MCP2515 to work
« Reply #3 on: July 20, 2019, 10:18:42 am »
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 ?
« Last Edit: July 20, 2019, 10:45:48 am by JagV12 »
 

Offline Pinkus

  • Frequent Contributor
  • **
  • Posts: 784
Re: Help can not make MCP2515 to work
« Reply #4 on: July 20, 2019, 11:16:29 am »
To narrow it down: did you check your MCP2515 if it is sending/receiving data on its TXCan / RXCan lines?

 

Offline JawadTopic starter

  • Contributor
  • Posts: 11
Re: Help can not make MCP2515 to work
« Reply #5 on: July 20, 2019, 07:01:45 pm »
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 module
After it worked on the breadboard i wanted to make a small pcb without any wires and breadboard
So 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 wrong
 i have the 3 modules in hand so i followed all the lines with multimeter in continuity mode
For 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)
 

Offline JagV12

  • Contributor
  • Posts: 25
  • Country: fr
Re: Help can not make MCP2515 to work
« Reply #6 on: July 20, 2019, 10:05:44 pm »
Sorry to insist but what is the voltage at Vcc (Pin 2 on AVR_SPI connector) ?   It should be 5V.
 

Offline JawadTopic starter

  • Contributor
  • Posts: 11
Re: Help can not make MCP2515 to work
« Reply #7 on: July 20, 2019, 10:10:07 pm »
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
 

Offline JagV12

  • Contributor
  • Posts: 25
  • Country: fr
Re: Help can not make MCP2515 to work
« Reply #8 on: July 21, 2019, 08:01:20 am »
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...
 

Offline JawadTopic starter

  • Contributor
  • Posts: 11
Re: Help can not make MCP2515 to work
« Reply #9 on: July 21, 2019, 05:34:39 pm »
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf