Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: subramanyamn on Jan 18, 2019, 12:54 am

Title: MCP2515 Arduino standalone issue
Post by: subramanyamn on Jan 18, 2019, 12:54 am
Hello,

I'm using two pairs of Uno-MCP2515 sets as CAN bus send and receive nodes. I'm using the library from here:
https://github.com/autowp/arduino-mcp2515

The 8 byte data I'm transmitting is:
data = {1, 2, 3, 4, 5, 6, 7, 8};

The problem:
When the nodes are connected to two USB ports on my laptop, it works just fine. The data is visible on serial monitor connected to receiver node.

When I power them with an external 5V supply, connect laptop USB to receiver node, serial monitor shows that nothing was received. (Have checked baud rates). I tried with common ground, still the same issue.

I wanted to remove the USB port dependency and included a LCD display on the receiver node. Same issue. When the boards are powered by USB of laptop, the CAN bus data is displayed on the LCD. But on 5V supply, it shows no data on bus.

Am I missing something fundamental here? Is there a difference in handling USB power vs standalone power for Arduinos that I'm unaware of? Please help!

PS: I can share the send and receive node codes if it helps. Just didn't want to clutter the space.

Best regards,
SN
Title: Re: MCP2515 Arduino standalone issue
Post by: sherzaad on Jan 18, 2019, 01:44 am
Nothing to do with your code.

you need to study your wiring a bit more.

are you connecting the 5V supply to "Vin" or "5V" on your arduinos?

Title: Re: MCP2515 Arduino standalone issue
Post by: subramanyamn on Jan 18, 2019, 02:11 am
The Arduino Uno boards are powered by the standard 5.5mm DC power jack that come on the board, using a 5V DC adapter (so that is Vin?).

The MCP2515 modules are powered by 5V pins from the Uno.
Title: Re: MCP2515 Arduino standalone issue
Post by: sherzaad on Jan 18, 2019, 02:30 am
The Arduino Uno boards are powered by the standard 5.5mm DC power jack that come on the board, using a 5V DC adapter (so that is Vin?).

The MCP2515 modules are powered by 5V pins from the Uno.
hmmm.... strange. Should not really matter but try nudging the external power to something between 6-12V if you can.

Does it still not work?

Did you try resetting your transmitting arduino?
Title: Re: MCP2515 Arduino standalone issue
Post by: subramanyamn on Jan 18, 2019, 02:49 am
@sherzaad, I changed the adapter to 12V and it worked! You have been of great help! Thanks a million! Didn't know it was this trivial. The supply voltage to MCP2515 through 5V was only 3.45V!