niedziela, 26 sierpnia 2012

Controller Area Network (CAN) MCP2515 for Raspberry Pi

Universal CAN communication board for ARM, ATMEL, Raspberry Pi (3.3V and 5V power supply). Open Source project. Please treat this site only as a notebook. Until you see "Everything is ready and fully tested".


Schematic design of PCB board with all components- version 0.1 - incorrect => requires modification

Schematic design of PCB board with all components - version 0.1a  => modification Revised 0.1
Download Schematic design of PCB:
https://docs.google.com/file/d/0B1TmUZoDBigxdlpaMGZKZjNScHc/edit?usp=sharing



Drawing connected CAN board and Raspberry Pi


From left: Top Copper, Top Solder Mask, Top Silkscreen, Bottom Copper, Bottom Solder Mask, Drill Data


Pin Diagram and Pin Description of MCP2515 CAN board Raspberry Pi


Pin Diagram and Pin Description of MCP2515 CAN board for ARM and ATmega microcontrollers

How to Connect Multiple Raspberry Pi CAN Board with CANbus - CAN bus ISO 11898-2 Topology


Case for Raspberry Pi and CAN Board - created on RepRap Open Source 3D Printer
 First CAN Board for Raspberry Pi manufacture in the PL
How many cost one PCB? 3,8 euro ... quite a lot. MCP2515 - 0,85 euro, MCP2551 -  0,68 euro. The rest of the elements ... max 0,5 euro no more. This gives us 5,83 euros. Expander I2C PCF8574 - not necessary - 0,97 euro.
Gerber file (PCB) - CAN Board - 7zip
https://docs.google.com/open?id=0B1TmUZoDBigxcDQza0FwY2R5OUE

what is gerber?
http://en.wikipedia.org/wiki/Gerber_format


Minimal configuration for start with CANbus - 3.3V or 5V
Tabele from MCP2515 datasheet - how to select the resonator and capacitor
Recommended configuration: 16Mhz and 22pF or 10Mhz and 22pF


List of elements in minimal configuration:

Component Value                      Qty
-----------------------------------------------
2WP                                          1
3WP                                          3
4WP                                          1
C 22pF                                       2
C 100nF                                     2
LED_MINI                                   1
MCP2515-X_SO                          1
MCP2551-X_SN                          1
R 0.1W SMTF 0                           1
R 0.1W SMTF 2.2K                      1
R 0.1W SMTF 10                         1
R 0.1W SMTF 100K                     3
R 0.1W SMTF 120                       1
XTAL  16.000 MHZ                       1
----------------------------------------------- 
What is inside?

Version 0.1:


MCP2515 - Stand-Alone CAN Controller with SPI Interface

MCP2551 - high-speed can transceiver

PCF8574 - Remote 8-bit I/O expander for I2C-bus
http://www.nxp.com/documents/data_sheet/PCF8574.pdf



Version 0.1a:

PCF8583 - I2C-BUS COMPATIBLE REAL TIME CLOCK MODULE

24C32 - 32K-bit. 2-WIRE (I2C) SERIAL CMOS EEPROM

TMP100 - temp sensor (I2C), temperaturę range of −55°C to +125°C



Sample "Source Code in Python" for the components on the board:



TMP100

TMP100_Config_Read_Temp.py


Test circuit TMP100 - "T100"


EPROM 24C32


EPROM_24C32_Write_Read.py - 24C16 and 24C64


Test circuit 24C32



PCF8583P

Sample Code:

PCF8583P_getTime.py




PCF8583P_setTime.py



PCF8583P_setTime_fromOS.py



The test circuit PCF8583



more soon...