130 likes | 320 Views
CAN2USB adaptor. Project of Uri Kogan ( surk@t2.technion.ac.il ) Under supervision of Konstantin Siniuk. Introduction. Technion is developing access control mechanism. Doors are interconnected using CAN bus.
E N D
CAN2USB adaptor Project of Uri Kogan (surk@t2.technion.ac.il) Under supervision of Konstantin Siniuk
Introduction • Technion is developing access control mechanism. • Doors are interconnected using CAN bus. • Database management and the control itself are done on regular PCs using special software. • Needed connection between CAN and PC.
Introduction (continued) • Interconnection options: • Serial (RS232). • Parallel. • Modern options: FireWire, USB, Wireless.
Why USB? Why CAN? USB • Serial and parallel are old and slow. • Supports high-bandwidth (up to 400MBit/s). • Supported by most operating systems (Windows, Unix) and hardware. • Relatively simple. CAN • Standard protocol for industrial networks. • Long distances. • Multiple-devices on one bus.
Project Goals • Main goal is to develop a bridge access control devices and PC. • Hardware design. • Software design. • Provide transparent communication between access control devices and PC.
Basics CAN CAN CAN USB CAN
What do I build? CAN bus CAN bus CAN2USB CAN bus CAN bus CAN bus
Block diagram of the card Power Supply 512kBytes RAM MCU Zilog CAN Channel 1 CAN Channel 2 USB Controller MCU Microchip CAN Channel 3 CAN Channel 4 Serial Communication (RS232) CAN Channel 5
Technology • Primary MCU: Zilog Z8 Encore!® family • 64 kBytes FLASH • 4 kBytes RAM • SPI • DMA • Secondary MCU: Microchip PIC18F452 • 16 kWord FLASH • 1.5 kBytes RAM • SPI • USART
Technology • USB: National USB1.1 compatible. • CAN: • Microchip CAN controller, MCP2510. • Microchip CAN transceiver, MCP2551. • RAM: 512 kBytes, ST Microelectronics, M68AW511AL • Serial: standard MAX232 • Power: LM1085-3.3, LM1085-5.0
Baud Rates • Maximal data transfer rate of CAN bus in ideal conditions is 1 Mbit/sec. • SPI throughput of MCU’s: ~3 Mbit/sec. • Maximal data transfer rate of USB1.1 in full speed mode is 11 Mbit/sec. • Since CAN conditions are not ideal and bus isn’t fully loaded, 5 CAN buses will work on one SPI bus.
Time table • 25 Nov 2003. Card design. • 25 Dec 2003. Card testing with basic software. • 15 Jan 2004. Card testing in real conditions. • 25 Jan 2004. Fully operational card.