Questions tagged [can-bus]

CAN (bus) relates to 'Controller Area Network'. Primarily used in vehicles to allow different microcontrollers to communicate with one another without a host computer.

The CAN bus network is used in vehicles for being a robust message-based protocol. It allows multiple components to communicate with each other on a subscriber basis using IDs for each ECU (engine control unit), for example, the engine ECU would be subscribed to the throttle response ECUs ID. All nodes on the network sent out data continuously at asynchronous times due to data being sent out without a clock signal. However, the data is sampled a synchronous time.

38 questions
2
votes
3 answers

Cannot find device can0 with MCP25625

I have been developing an expansion board for my RPi Zero, which contains a power supply based on the buck converter TPS62130 (5V/3A) by Texas Instruments, a USB Hub and a CAN Controller/Transceiver MCP25625. The controller/transceiver is being fed…
eduardoSP
  • 49
  • 2
  • 4
2
votes
1 answer

CAN-bus board w MCP2515

Has anyone tried this CAN board? It uses the Microchip MCP2515, but I don't see any docs or sample apps. Qunqi MCP2515 Controller Bus Module TJA1050 Receiver SPI Protocol for Arduino SCM 51 also here: D33 MCP2515 CAN Bus Module TJA1050 Receiver…
Shade
  • 51
  • 1
  • 4
2
votes
1 answer

cansend to a CANBus device doesnt work

I am trying to control an Elcon battery charger (http://www.elconchargers.com/catalog/item/7344653/7638003.htm ) which outputs a DC voltage and current and can be set through a CANBus adapter. I have interfaced this adapter with Raspberry Pi using…
Chintan Pathak
  • 211
  • 2
  • 11
2
votes
1 answer

2-ch-can-hat (mcp2515) on SPI1 rpi 3 b+

On a Raspberry Pi 1 Mod. B+ Raspberry Pi reference 2021-01-11 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21090519d85bdaa1615d5d5057d37b09368ea5d2, stage2 Oct 29 2021 10:49:08 Copyright (c) 2012 Broadcom version…
martburg
  • 121
  • 1
2
votes
2 answers

persistent canbus data logging during power loss

I am trying to setup a robust raspberry canbus data logger. The pi will be installed on a mobile vehicle where the power to the pi is disconnected every time the vehicle is switched off, which will happen several times during the day. The pi will…
2
votes
0 answers

Reading registers from a (MCP2515) chip on a CAN Hat

I'm using a CAN Hat which talks SPI to the PI.. everything works, as it automatically loads the (MCP2515) drivers and makes the CAN bus accessible via sockets. However, is there a way to read-back what's on those MCP2515 registers? Or is that…
Ben Nguyen
  • 21
  • 1
1
vote
0 answers

CAN bus read on RPI3

I have 10 CAN IDs on the bus and would like to read all the 10 IDs every 0.1 seconds. I was able to write the code below but it shows me one message only. import can bus = can.interface.Bus ("can0", bustype="socketcan") reader =…
Moe
  • 19
  • 1
  • 3
1
vote
2 answers

Socketcan and Qt on raspberry pi

Is there a prebuild serialbus library for Raspberry Pi? I would to use QtCanBus in a project. Unfortunately I cannot find any reference for installing the necessary library. tried sudo apt-get install qt5serialbus5 without any success..
Alex B.
  • 41
  • 5
1
vote
1 answer

Can't get candump to work

I've got the RPi 3 model B with raspian lite. I've got a PiCAN 2 shield attached to my RPi and I'm using the screw terminals to connect to an ECU with an oscillator to monitor to verify. With the oscillator I can see patterns that represent CAN…
shmink
  • 137
  • 2
  • 13
1
vote
2 answers

CAN On Raspberry PI

I need some help with Can4Python/SocketCAN with Raspberry Pi. Currently, I am using PiCAN2. What I want to do is upon receiving a particular signal from transmitter, I would like to turn on/off LED (ON for signal value x and OFF for signal value y)…
Sailorman
  • 11
  • 1
  • 3
1
vote
1 answer

Problem in Initialization of PICAN2 on RPi3

I'm trying to initialize my PICAN 2 on a RPi3. I have installed the Kernel 4.4.9-V7+ and after sudo apt-get update and sudo apt-get upgrade, I have edited /boot/config.txt by adding the following…
mamuti
  • 11
  • 3
1
vote
1 answer

Unable to bring CAN interface up on Raspberry Pi 3

I followed a few tutorials on how to use CAN on Raspberry and most of them suggested I should add these lines to /boot/config.txt : dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=spi-bcm2835-overlay I made the CAN…
Stelian Saracut
  • 101
  • 1
  • 1
  • 8
1
vote
2 answers

Interfacing with CANBUS, screen and GPIO

I am working on an undergraduate project, looking to effectively create a car dashboard. As a result, my board would have to interface with: 1)A touchscreen, ideally touchscreen for control 2)CANBUS, receiving information from an ECU. 3)GPIO, i.e.…
1
vote
1 answer

Can my RPi B+ control a Apto® CAN-BUS Shield for Arduino?

I would like to get started into the CAN-BUS world and therefore I am looking for some CAN boards. I came across two of them. Pican Apto for Arduino The second one would be the best from a "commercial perspective", however it explicitly says (for…
user22948
1
vote
0 answers

Using MCP2515 with an RPi

I'm trying to connect 2 CAN lines to an RPi using 2 MCP2515 connected both to SPI0 (one with CE0 and the other with CE1) using GPIO27 and GPIO5 as the interrupt pins. I'm using the following configuration in…
1
2 3