Got Raspberry Pi? use it as a CAN simulator

In order to debug Carloop without getting in and out of the car, @jvanier came up with a really cool tool. The Carloop CAN Simulator. That is what I call it anyways, but it is so cool! If you’ve got a Raspberry Pi lying around, this is your opportunity to make it into a full fledged CAN simulator.

CAN Simulator hardware

CAN Simulator software

2 Likes
  1. where can I find more info on how to setup (HW and SW) this CAN simulator? I guess I need a Raspberry Pi + Carloop attached via USB to the Raspberry => CAN traffic generator/simulator, right?
  2. Is there any configuration file on how to start/stop the CAN simulator service?
  3. What type of CAN messages will I get (i.e. Random)?
  4. Is it possible to simulate a CAN network with RPi (1) + Carloop and sniff the traffic with another RPi (2) + PiCAN (from Skpang) connected via SPI ?

Hi @alanm, can you include some details on how I can get the Raspberry Pi CAN simulator running ( maybe here or a readme file on the github). I have a first gen Pi and would like to use it as a simulator.

Regards,
Subbu

Hi all,

I wrote up some information about the hardware and software for the simulator.

Hardware info

Software info

The software is currently sending hard coded messages and printing messages it receives to the console. If you have suggestions of what would be useful, please write it here.

Thanks a lot @jvanier for the detailed information.

2 Likes

I built up a couple of the simulators, but I am having SPI issues.
There have been some recent changes with overlays in Raspbian.

Would you mind posting the changes you made to your config.txt?

Thanks!

I have not spent enough time with my RPi3 to have an answer for you.
@jvanier may know more, but appears to be really busy with work at Particle.
Maybe try the Raspberry Pi forums have some clues in the meantime?
https://www.raspberrypi.org/forums/

Alright. Thanks for getting back to me. I will see where I can get.

Hi all.

Perhaps this is a very simple question with a very simple response, but I can’t figure out how to assemble the OBD extension cable; I know that is explained in the github README, but this is a little bit confussing for me:

How the cable has to be connected to the simulator PCB ?

Thanks for the support.

@maleficarum,

From the Github readme, this is the picture:

The picture shows the orientation of the OBD2 connector, the cable and the simulator PCB.
If you look closely at the picture, you can see there is a gap on the right (upper in the picture) side; this is where the pin not connected is. Keep the cable to the left (lower in the picture) side so there is no gap, so that it matches the picture.

Hi!
I have 2 quick questions:

  1. how do we connect the OBD II port to the CAN-Simulator_v1.1?
    The OBD cable in the link has an OBD port on both sides. The repo says i should cut it and connect it, but I am a bit confused. should the cable be soldered to the board? Can you please elaborate on this point?

  2. Regarding soldering the Pololu 12V Step-Up Voltage Regulator U3V12F12 and the other components to the CAN-Simulator_v1.1, is the part reference in the BOM considered the location on the board where it should be soldered to? if yes, where are the STANDOFF 1 through 4 positions?

Thanks!

Hi! Have you managed to resolve that issue?

@asb,

It should look like this when it is done:

The cable on the left side has a USB connector on one end and is attached to the CAN simulator PCB (the purpole board) on the other end.

The STANDOFF positions are the large holes drilled in the PCB. There are no parts required.
If you want to mount the PCB inside a case or enclosure, then standoffs are the usual mounting hardware used to do this.