Re: Re: BOUNCE: Non-member submission to canlist
Abhijeet Badurkar <[email protected]> Sun, 7 Jun 2015 09:36:49 +0200
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <CAB1yiwNZY9EoJmt15D+XQeLBLuSWYMtFGFdx+NgBcTN6Xn_JPQ@mail.gmail.com> |
Hi Aayushi, Great to hear about your project. Few days back I also read about solar car project at your University. Well, I won't be able to comment about CAN physical layer implementation. That will be better answered by experts. I can answer your 3rd and 4th question based on my experiences. In automotive industry, we use Autosar software architecture for ECUs and we get its communication stack (CAN, LIN, etc. and their modules like CAN driver, CAN NM, CAN SM, etc.) from Vector Informatik. I do not think they are free. So better develop your own communication stack. Autosar specifications are available on their website. OSEK is operating system widely used in Automtive. Even Autosar uses it. You can read its specification. How you program CAN depends on controller you choose. IDE, compiler toolchain, will depend on controller. For example if you are using ARM, use gcc for ARM. Then specific to that compiler and controller you will have to write OSEK port, write CAN drivers, etc. I can send you example code if you want. In my university, students used FreeRTOS. Because it is easy to use, large number of ports are available. I recently used in my home-made project too. I don't know about your requirements so you will have to check if it suits you. Here is the list of supported platforms. http://www.freertos.org/RTOS_ports.html You will also need debugger. J-Link debuggers are best if you are using ARM. They are supported in almost all IDEs. Freescale microcontrollers are very popular in automotive, especially MPC56xx series. http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=MPC56XX&cof=0&am=0 I think it is good idea to implement CAN on prototying board first. You can sort out lots of things in this early stage. Raspberry pi does not have on board CAN. You need add-on module which has CAN controller and CAN Transceiver pair. CAN controller on add-on has SPI interface. So it connects to RPi with SPI and sends CAN messages to transeivers depending upon how you have programmed it. They can be purchased online. I guess same is case with Arduino. You need add-on. Board which I would recommend you is mbed-LPC1768 which I also used during my internship in an OEM here in Germany. It has two on-chip CAN controllers. So you just need to add CAN transceivers in hardware. mbed is a small DIL board. So you can develop a hardware which has DIL-40 socket to place this board. Use transeiver MCP2551 from Microchip or TJA1041 from NXP. Better you create DB-9 connection (Pin 7- CANH, Pin 2- CANL, Pin 3 - GND) your board because that is connection used in automotive. Programming of mbed-LPC1768 is simple. Just use ready-made CAN-APIs to configure baud rate, hardware pins and just send or receive CAN messages using send or receive functions. It will reduce your development time a lot. LPC1768 is Cortex-M3 microcontroller and hence is very powerful. See if it can fulfil your requirements. https://developer.mbed.org/platforms/mbed-LPC1768/ As Bibhash said you can go for CANoe/CANAnalyzer software for analyzing and data logging of CAN. They are costly. I don't know if Vector India can sponsor your project or give discount. You can also have a look at Kvaser products and software tools. http://www.kvaser.com/products-services/our-products/ Hope it helps. Regards, Abhijeet Badurkar On Sat, Jun 6, 2015 at 12:10 PM, Aayushi Sahu <[email protected]> wrote: > Sir, > > I'm a student of Manipal Institute of Technology, India and My team is > working on a driver-less car project where we need to use CAN for > automotive applications. I would like you to help me with the queries > regarding CAN bus. > I have questions regarding the implementation of CAN Bus. I've listed them > as follows. > > 1. Which CAN module is best for cars? > 2. How do I implement CAN physically? > 3. How do I program it? Using which OS and which software? > 4. Is prototyping CAN module with arduino/ raspberry pi a good idea for > cars? How else I can make CAN work? > > Kindly help me with these questions by providing me some references too if > possible. I would really appreciate your help Sir. Awaiting your response. > > Thank you. > > Regards, > Aayushi Sahu > [email protected] > >