Main Site Documentation

Cerbuino Bee and CAN Module Compatibility


#1

Is the CAN Module compatible with the Cerbuino Bee? By looking at the schematics the CAN Module uses pin 4 and 5 for CAN while the Cerbuino Bee’s AOPY connector uses pin 7 and 9. It looks like I will have to wire up my own connector using a breakout module. Is this correct?


#2

I got my CAN Module wired up to my Cerbuino Bee and it’s not working so I’m going to need a little help here, primarily in two areas - the hard wire connection and the bit rate timing. But first the connection. Here are the schematic I’m referencing:

The CAN Module has CAN_TD on Pin 4 and CAN_RD on Pin 5

The Cerbuino Board shows CAN_RX on Pin 7 and CAN_TX on Pin 9.

Is the Cerbuino CAN_RX the same as CAN_RD? Do I wire Cerbuino CAN_RX to the CAN Module’s CAN_RD and CAN_TX to CAN_TD? I’m assuming so but the RX/TX terminology made me wonder.

Once I’m sure I have it wired up correctly, I’ll start experimenting with bit timing. I currently have my CAN bus working on a USBizi, Cobra (EMX), and Cobra II (G120) using GHI’s CAN firmware. Has anyone been successful transferring their CAN code from a Cobra to a Cerb board? I’m using the Cerb CAN code from here:

https://www.ghielectronics.com/community/codeshare/entry/792

I’ll be very appreciative for any help here. I know what a challenge it was to get my CAN bus connected to a Cobra and USBizi many years ago.

Thanks.


#3

It’s often the case that the “sense” of the board dictates whether you connect RX to RX… Most times the module RX needs to connect to the board’s TX. But first up, make sure you have connected them in a “soft” way so they can be swapped.

My suspicion is that from the socket definition TD on Pin 4 is transmitting from mainboard so you’d connect it to the TX pin on your Cerb.


#4

I got it figured out. The connection is CAN_RX to CAN_RD and CAN_TX to CAN_TD.

The values for bit timing for a 250 kbs CAN bus are:

CAN Clock = 42 mhz
T1 = 12
T2 = 8
TQ = 21
BRP = 8

For a 500 kps bus, the BRP changes to 4.

Here is another link that helps explains some of this. Make sure you click on the Usage tab. That is what I missed and would have saved me a few hours.

https://www.ghielectronics.com/community/codeshare/entry/552

It would be nice if this information could get into the CAN document since the document has info on all the other GHI CAN boards.

https://www.ghielectronics.com/docs/110/can

Hope this helps the next person.


#5

And it would be nicer if these standard value would be in the driver as an enum for example or as a summary comment at least… :slight_smile: