Showing posts with label MCP2551. Show all posts
Showing posts with label MCP2551. Show all posts

Thursday, June 18, 2009

Two interesting CANBUS projects and some links

This CANalyser tool is pretty similar to what we want to do at the moment and is built with very similar chips. The project seems a bit outdated but the information is still very useful.
The tool is composed by a PIC microcontroller PIC18F458, and a MCP2551 CAN transceiver. The main features are listen to the CAN bus in active or passive mode and forward data to the serial port to the PC and send data to the CANBUS. This is exactly what we need now.
Digging further in the web pages I discover that they have built a real-time kernel to run their software on the PIC. There is a company behind this (Pragmatec) but they have released the sources under a GPL license. The website of the os is at PICOS18
There is a new version of the pages here but the page about the CANalyser tool is the same.

Another very similar tool is CAN2PIC. This one uses
PIC18F248 and MCP2551 CAN.
You can find there all the schematics of the circuit used and also all the software! So this page should provide all we need to get started and running very fast!

There are some other interesting links I found tonight:
  • GNUPIC: a small directory site with information on PIC programming with GNU/Linux
  • Another very good CANBUS learning page at CERN (yes they used it in LHC)
  • PICMICRO WebRing: A collection of websites about the Microchip PIC microcontroller and related projects

Saturday, June 6, 2009

Getting the tools part 2: a matter of levels

After choosing the main component of the project in a previous post, we also have to connect it :-)
On one side we have the CANbus connector, on the other (probably) a PC used to understand what informations are going up and down on the CAN. Unfortunately we can't connect PC directly to CANbus, due the lacking of a suitable peripheral on PC. So we choosed a PIC18F4682 to do the raw job. So is it all done?

NO

Connecting directly CAN, PIC and PC probably will result in a big roast, with nothing to eat :( . So we will use these two tiny chips, ready on the breadboard:
Their work is to convert voltage levels in a suitable way.



MAX232CPE from Maxim is a level converter for RS232 (serial) protocol. It converts +12/-12 signals from PC serial port to +5v accepted from PIC, and do the opposite job on the other direction. To do this it needs some condensers, not yet installed, to produce the necessary voltages, cause it's main voltage is only +5V.




MCP2551 from Microchip converts CANbus signals (what is the voltage on Vectra CAN bus? we still don't know...) to PIC level. We HOPE that this interface chip will do the job, cause the real implementation of CANbus on Vectra (voltage, speed, protocols, messages...) is still totally unknown. MCP main voltage is also +5V.



On the left side of the first photo you can see a bunch of components and wires. This will be our 5V power plant. LM7805 with 2 condensers will give power to all our chips and components we will use in this project. Now it is time to connect everything: stay tuned!