connecting pyboard to CAN BUS

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
User avatar
dbc
Posts: 89
Joined: Fri Aug 28, 2015 11:02 pm
Location: Sunnyvale, CA

Re: connecting pyboard to CAN BUS

Post by dbc » Mon Nov 07, 2016 11:08 pm

Roberthh wrote:The CAN bus uses a diffferential signal.
That is a very common misconception. CAN_H and CAN_L are often opposite, but during contention resolution they are often, by design, the same value. A logic ground reference for CAN_H and CAN_L is needed for reliable operation.

Again: CAN bus is *not* differential.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: connecting pyboard to CAN BUS

Post by kamikaze » Tue Nov 08, 2016 12:26 am

dbc wrote:
Roberthh wrote:A logic ground reference for CAN_H and CAN_L is needed for reliable operation.
What does it mean? Should I use GND (Chassis ground) or CAN_GND (Signal ground) from OBD2 port? :roll: CAN transceiver has only one GND pin...

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: connecting pyboard to CAN BUS

Post by Roberthh » Tue Nov 08, 2016 6:58 am

You should connect CAN_GND and GND of your PyBoard.

giacomoalbe
Posts: 9
Joined: Thu Dec 22, 2016 10:15 pm

Re: connecting pyboard to CAN BUS

Post by giacomoalbe » Thu Dec 22, 2016 10:27 pm

Hi all!

I'm new in the forum and I think I have similar needs with pyboard and CAN bus!

I need to use pyboard to drive an intelligent LCD screen (no need for graphic management, only commands for drawing the interface, at high level!) and to communicate via CAN bus with another board which deals with some data acquisition.

As I've seen in this thread, it is possible to make 2 pyboard communicate through the CAN bus via the CAN transceiver kamikaze built, so I think I can connect the pyboard to a general CAN bus and start to send and receive message.

Is it correct?

@kamikaze: is it possible to have the PCB schemes of your wonderful transceiver?

Thank you for your help!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

A common ground is vital

Post by pythoncoder » Mon Dec 26, 2016 9:03 am

A common ground is essential when connecting any two items of electronic equipment unless there is a physical isolation barrier such as a set of transformers or opto-isolators. This applies whether or not the interface is differential. The reason is that in the absence of a common ground a piece of kit can 'float' to an arbitrary potential with respect to the other, beyond the allowable input voltage of the receiving chip. If this occurs, at best it will stop working. At worst it will emit the magic smoke.

This is a concern where experimenters power devices such as Pyboards from laptops having an isolated PSU - i.e. one with no earth connection. Regrettably these have become common. In this instance the Pyboard's ground is isolated from earth. Connect a Pyboard pin to a pin on another device which is earthed may cause damage unless the grounds are linked first, preferably before powering up the laptop.
Peter Hinch
Index to my micropython libraries.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: connecting pyboard to CAN BUS

Post by kamikaze » Tue Dec 27, 2016 1:45 pm

giacomoalbe wrote:@kamikaze: is it possible to have the PCB schemes of your wonderful transceiver?

Thank you for your help!
Sure

Post Reply