jgv115
Posts: 5
Joined: Mon Dec 12, 2016 2:45 am

Using CAN and RS485 at the same time

Wed Dec 14, 2016 12:29 am

Hi all,

I'm a Raspberry Pi newbie but I'm very excited to learn.

For a project I'm working on, I need to be able to communicate using CAN and RS485 at the same time.

I have been looking at how I can enable CAN functionality on the RP3 and I have found the PiCAN2. I have also been eyeing the Sparkfun BOB-10124 breakout board for RS485.

I was having a look at the pictures and it seems like the PiCAN2 takes up all 40 pins on the RP3. So if I need to wire the RS485 to the RP3, how would I do it at the same time? Is it even possible? If not, should I look for a USB-RS485 adaptor?

Thanks!

User avatar
mikronauts
Posts: 2710
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Using CAN and RS485 at the same time

Wed Dec 14, 2016 12:36 am

Get a USB RS485 adapter.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

jgv115
Posts: 5
Joined: Mon Dec 12, 2016 2:45 am

Re: Using CAN and RS485 at the same time

Wed Dec 14, 2016 12:48 am

Yeah I was thinking that.

I was having a look at this one: http://sigma-shop.com/product/142/opto- ... r-box.html

Would this one work fine with the RP3 and be relatively easy to setup? (I need the converter to be opto isolated)

Thanks!

User avatar
TonyD
Posts: 447
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: Using CAN and RS485 at the same time

Wed Dec 14, 2016 1:29 pm

I built such a CAN Bus & RS485 board a few months back. Here's a short write up on it:

https://zuzebox.wordpress.com/2016/11/2 ... -on-board/

The CAN Bus chips use the SPI interface, while the RS485 transceiver chip uses the UART interface and also two GPIO signals. As long as your program can control GPIO signals for the RE & DE RS485 receive and transmit direction pins on the RS485 chip it works great.
Tony

Return to “Interfacing (DSI, CSI, I2C, etc.)”