Getting started

Started by Bart Vanbrabant

Bart Vanbrabant

Today I finally got to playing with the NoCAN platform. But it was not very succesful. I wired up one zero board to the hat and terminated with a resistor. I started the nocand the leds lit up and showed me this output:

2018/12/06 19:51:08 DEBUG+ (65) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:08 DEBUG+ (65) SPI RECV 11: 184000ba0a0000fc05f905
2018/12/06 19:51:08 DEBUG+ Driver voltage=24.3, current sense=0 (~ 0 mA), reference voltage=3.29, status(40)=+powered.
2018/12/06 19:51:18 DEBUG+ (66) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:18 DEBUG+ (66) SPI RECV 11: 184000c00a0000fe05f905
2018/12/06 19:51:18 DEBUG+ Driver voltage=24.4, current sense=0 (~ 0 mA), reference voltage=3.29, status(40)=+powered.
2018/12/06 19:51:28 DEBUG+ (67) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:28 DEBUG+ (67) SPI RECV 11: 184000c40a0000fb05f905
2018/12/06 19:51:28 DEBUG+ Driver voltage=24.4, current sense=0 (~ 0 mA), reference voltage=3.30, status(40)=+powered.
2018/12/06 19:51:38 DEBUG+ (68) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:38 DEBUG+ (68) SPI RECV 11: 184000d50a0800fb05f905
2018/12/06 19:51:38 DEBUG+ Driver voltage=24.6, current sense=8 (~ 12 mA), reference voltage=3.30, status(40)=+powered.
2018/12/06 19:51:48 DEBUG+ (69) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:48 DEBUG+ (69) SPI RECV 11: 184000b80a0500fc05f905
2018/12/06 19:51:48 DEBUG+ Driver voltage=24.3, current sense=5 (~ 7 mA), reference voltage=3.29, status(40)=+powered.
2018/12/06 19:51:58 DEBUG+ (70) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:51:58 DEBUG+ (70) SPI RECV 11: 184000bb0a0200fd05f905
2018/12/06 19:51:58 DEBUG+ Driver voltage=24.4, current sense=2 (~ 3 mA), reference voltage=3.29, status(40)=+powered.
2018/12/06 19:52:08 DEBUG+ (71) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:52:08 DEBUG+ (71) SPI RECV 11: 184000ba0a0700fa05f905
2018/12/06 19:52:08 DEBUG+ Driver voltage=24.3, current sense=7 (~ 10 mA), reference voltage=3.30, status(40)=+powered.
2018/12/06 19:52:18 DEBUG+ (72) SPI SEND 11: 0300000000000000000000 (SPI_OP_POWER_LEVEL)
2018/12/06 19:52:18 DEBUG+ (72) SPI RECV 11: 184000bd0a0700fe05f905
2018/12/06 19:52:18 DEBUG+ Driver voltage=24.4, current sense=7 (~ 10 mA), reference voltage=3.29, status(40)=+powered.

The power led of the zero board comes on and I see regular flashing of the net led on the zero board. However no address is handed out.

I tried with a first node and keep it connected for a few minutes without result. Then the power led went out and the reported bus power went to 150mA. Afterwards no results anymore. Additionally the capacitor on the left side becomes really warm.

A second and a third board powered up, but no address. No failure however.

I checked the wiring 5 times.

Alain

Thanks for the post. This gives me the opportunity to provide some information that might be helpful to many others.

Here's a few tips that might help diagnose the issue.

Termination

In most cases, you don't need a termination resistor. I strongly recommended to start without one and add one only if needed (e.g. with very long cables). Note that the resistor must be connected between the CAN_L and CAN_H pins, i.e. the two middle pins of the connector, as illustrated in the picture below:

LED indication

On the CANZERO node:

  • If the red led in on, power is correctly applied.
  • If the green led blinks regularly, the node is attempting but failing to connect to the network.
  • If the green led is continuously on, the node is correctly connected to the network.

A blinking green led is almost always related to a cabling issue.

On the PiMaster:

  • If the green led is on, the PiMaster is correctly powered on.
  • If the orange led is on, the NoCAN network power rail is activated.
    • You still need to make sure that network power is provided to the PiMaster through the DC jack.
  • If the red led is on, this signifies that the board detected an over-current event, such as a short-circuit.

Logs

In the PiMaster logs, looking at the lines that start with "Driver voltage", provides some other insights:

  • The value of "Driver voltage" (e.g. 24.4) shows the voltage level applied to the network (a value less than 5V here is suspicious).
  • The value of "current sense" gives a (very rough) estimate of the current consumption of the network. A single digit value is consistent with a single node connected to the network.

The default application

The default application provided with the CANZERO board activates the Serial USART on pins D13 and D14. Connecting these pins to ground should be avoided until a new sketch is uploaded to the node.

Cables

It's easy to get cables wrong at first. In case of doubt, you can make a short cable as shown below:

With a continuity tester on a multimeter it's easy to check that all connections are good.

We used 3.5mm pluggable terminal blocks from 3 different suppliers. One of them had a tendency to allow misconnected cables, by making it easy to plug the wire below the the connection "hatch", as shown in the picture below:

This type of misconnection might even pass a continuity test but then fail once the board is plugged.

Finally, a multimeter can be used on a CANZERO to check the voltage levels of the connector.
The picture below shows the pinout of the pluggable header:

A multimeter should be used to probe the metal screws on the connector, by checking the voltage between GND and the 3 other pins, to confirm that:

  • VIN matches your NoCAN network power voltage level (e.g. 24V or 12V)
  • CAN_H is about 2.5V or a little less.
  • CAN_L is about 2.5V or a little less.

If CAN_L or CAN_H don't match these levels, the cable is likely faulty.

If it all fails…

Despite our careful testing, it might still be a hardware issue. If it all fails, please send an email to support(at)omzlo.com and we will see how we can sort you out.