Can simulator: CAN chip not responding

I printed the shared can simulator PCB design and soldered the components, but when I run the simulator-program I get the error :

Error occured: CAN chip not responding

And no more errors. Is there a way to figure out why this is happening ?

@maleficarum,

I am not sure what tools you have, but I would suggest checking some basic things to start.
Also, I have not actually used this simulator myself.

If you have a multimeter, I would suggest checking:

  • are the power rails correct (5V, 12V, etc.)?
  • are any signal lines directly connected to a power rail or to ground (best done with everything disconnected)?
  • check your power supply to make sure the voltage is within range and that it can supply enough or more than enough current?
  • are any signal lines directly connected to another signal line?
  • are all the chips installed in the correct orientation?

Some of the things above can also be carefully inspected to be absolutely sure.

Can you verify that the computer is communicating on the correct bus (not sure if it is Serial or USB or something else)?

Let us know how far you get with that.
After that, then we can look into some more advanced troubleshooting.

@maleficarum - You ever figure out what was causing your issue?

I have two SIM boards I made. The first one I am getting the same message as you. Haven’t got to try out the other board yet. Plan on doing that tomorrow.

I think there is enough interest in these things, that if someone had a run of say 100 professionally made, they would sell pretty quickly.

I didn’t give a time to check the board. I do prefer to connect the device directly to a car.

I haven’t a spare components to compare connections or discard soldering errors.

I’m waiting for components to arrive to assemble a second board.

If I achive something, Ill let you know.

I’ve request more parts to assemble a new PCB, but it will take a while; in the mean time, if you can get working your PCB, tell me what was the error, so I can be careful with that issue.

Thanks

I tried my 2nd board, and I get the same error. I am decent at soldering some things, but these tiny components where beyond my skill level. There was a local electronics shop that I had do these two. I bought enough parts to make 3 of these, so I have the ability to make one more.

I’m taking both these boards to work tomorrow. There is a guy there who repairs all the hardware that we test on. He has a bad ass soldering station, nice large magnify glass. We’ll go through and try to test as much as we can.

@cyclin_al1 - Here are some pics of what was done. I printed out the schematics from the github page and gave to the guy who did the soldering. He was very confident he could do it.

And another since I am tied to one picture per post

And the last one…

This is my first versión of the pcb. Looks like trey’s pcb (the Components looks well oriented).

So I took both my boards to work. The guy there tested them, and one had a bad 120ohm resistor, he replaced that. Then on the MCP2515 board connections, I don’t know how many cold solder joints he said there were on each board. So he re-did every connection on both boards. These boards are now bad ass looking, like a robot did it on the assembly line. Everything is also pin indexed as it should be.

All said and done, I still get the exact same message, on both boards.

I went through each board connection, and followed the wiring schematic, checking for continuity, everything checks out.

This code is now 2 years old. I’m thinking something is different, possibly with the Raspbian version, or this was developed on a RasPi 2 instead of a RasPi 3 B that I am using, if that even matters.

I’m currently running version:
Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

I’ve also tried to initialize the MCP2515 with the OS, and I can’t get that to work either. I keep getting the below in my dmesg:
[ 4.872985] mcp251x spi0.0: Cannot initialize MCP2515. Wrong wiring?
[ 4.873023] mcp251x spi0.0: Probe failed, err=19

I’m at a loss. I don’t feel it’s the hardware, I feel it’s something with the OS.

Anyone using this on the latest Raspberry PI 3 B or B+ boards with the latest OS?

@jvanier - Any pointers on this?

It’s cool to see other folks experimenting with the CAN simulator board!

I haven’t haven’t tried this hardware and code with a new Raspberry Pi. It was originally built with a Pi 2. I haven’t tried it with the latest and greatest Raspbian. I’ll try that over the weekend.

The hardware I’m using had a mistake where the CAN transceiver IC2 pin 8 (top left) was not grounded. I fixed it in the schematic, but it would be good to check that the top left pin of IC2 is at ground with a multimeter.

I’ll definitely check that when I get home later today.

One thing I see from other schematics on the web, is the use of GPIO25 on the Pi for the Interrupt to the MCP2515 Pin12.

I don’t see that on your board. I am very new to all of this, and still don’t truly understand what the interrupts are used for. Is it not needed in your implementation?

Thanks!

I had one of the boards with me here at work. I went and tested IC2 Pin8, and it is for sure NOT grounded.

I guess there is no path to ground in the PCB design? I got your version 1 board. Is this fixed in your version 2 board? I grabbed version 1, as that was listed in your Assembly Instructions.

I’m hopeful now that once I ground IC2 Pin8, everything will work.

I grounded the IC2 pin 8, I checked with a multimeter but I still getting the same error :

Error occured: CAN chip not responding

I have not built one of these myself, so take my thoughts with a grain of salt.
I plan to build one in the next few months; reality means it will be more likely in the next year.

@maleficarum,

Can you do some testing on your board to ensure that the pins on the chips are not shorted to other pins, that power and ground make it to where they should? Essentially go over your board trace by trace to ensure there are no opens or shorts. Also, look for cold solder joints that are not connected when they should be. Also, look for excess solder that could be shorting pins together.

This is meticulous work and will take a bit of time. Compare everything you check with the schematic. Unofortunately, it is necessary to be this detailed to eliminate board assembly as a possible cause for this.

You should be able to do these tests with a multimeter using a continuity setting, with no power on the simulator circuit board.

@Trey, You had some help doing these tests from someone at work … did you get yours working?

Good luck!

I tried the CAN simulator I built 2 years ago as a base. That one still works.

I then tried the CAN simulator board connected to a Raspberry Pi 3 that had Raspbian from April 2017, Raspbian 8 (jessie). At first it didn’t work because the SPI kernel module was not loaded. I did sudo raspi-config then Interfacing → SPI → Enable → Yes then reboot. After that I could see the SPI module in lsmod | grep spi (outputs spidev and spi_bcm2835). With these changes the simulator program worked.

I’m in the process of upgrading the Pi to the latest and greatest Raspbian to see if a recent change broke the setup.

This is what my fully connected setup looks like (click on image to see the full thing). Pi 3 connected to CAN simulator board connected to Carloop.

Disregard the extra capacitor on the 12V regulator board. I was having the issue that connecting a Carloop was drawing too much current and resetting the Pi. I tried adding an extra cap to no avail. Now I just power the Carloop through USB first before plugging it into the simulator board.)

I flashed this app (source on GitHub) on the Photon connected to the Carloop to transmit a message at a regular interval.

When running the simulator-program on the Pi 3 it I see the printout of the CAN messages transmitted by Carloop.

I can reproduce “Error occured: CAN chip not responding” by unplugging the CAN simulator board and restarting the simulator-program.

This seems to point to a hardware issue. Let me make some additional measurements on my side to help you figure out where the issue might be.

So one hardware debug method I like to use is to set this multimeter from Adafruit to the frequency measurement setting and check if signals I expect to toggle are actually toggling. This is how I originally found out that pin 8 from the CAN transceiver had to be grounded: even though the input lines were toggling, the output lines were not.

While running the CAN simulator program, the SPI clock (SCK) pin is indicating 73 kHz on the multimeter (that’s not the actual frequency, but it gives an idea the pin is toggling).

While running the CAN simulator program, the MISO pin is indicating 7.3 kHz on the multimeter.

While running the CAN simulator program, the MOSI pin is indicating 11 kHz on the multimeter.

I upgraded the Raspberry Pi as much as I could. The kernel is now:

Linux pi3 4.14.43-v7+ #1115 SMP Fri May 25 14:27:48 BST 2018 armv7l GNU/Linux

The simulator-program is still working on my setup.

Here’s a closeup of my assembled board.