Go Down

Topic: MCP2515 Arduino standalone issue (Read 138 times) previous topic - next topic

subramanyamn

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

sherzaad

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?


subramanyamn

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.

sherzaad

#3
Jan 18, 2019, 02:30 am Last Edit: Jan 18, 2019, 02:38 am by sherzaad
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?

subramanyamn

#4
Jan 18, 2019, 02:49 am Last Edit: Jan 18, 2019, 02:50 am by subramanyamn
@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!

Go Up