• CANtact & Wireshark

    Eric Evenchick01/07/2015 at 22:00 0 comments

    CANtact is now working with Wireshark! Here's what that looks like:

    This is done using SocketCAN on Linux. The slcand daemon is used to provide a bridge between the CANtact's USB CDC interface and SocketCAN. With this working, you can open up Wireshark and sniff the bus.

    Like any packet capture, this can be filtered, saved, and analyzed easily. Wireshark is a great utility for capturing packet data. The candump, cangen, and cansend utilities are also working with the tool.

  • The Next Version

    Eric Evenchick01/03/2015 at 23:33 0 comments

    This project got put on hold for a number of reasons. Now it's back, though I've changed course a bit.

    After talking with lots of people, it seemed that there was a need for a basic tool for getting on CAN that's easy to use. I decided to reduce the scope and build something a bit simpler.

    Here's the hardware:

    I think it's cool for a few reasons:

    1. Built in USB bootloader. I can make firmware updates and you can flash them.
    2. Jumper selectable DB9 pins. This lets you use it with the "standard" pinout, or with an OBD-II cable. In other words, it's very easy to get on your car's CAN bus.
    3. Built in termination. Need 120 ohms across the bus? Just put the jumper on.
    4. Works with SocketCAN. This means you can use Wireshark and other open source tools with it. Including some cool stuff that I'm building, but that's a different story.
    5. Open Source Hardware (soon). I haven't published this stuff yet, but it's coming shortly. All the hardware design (KiCad) and firmware (gcc friendly) will be released under an OSHW happy license.
    It also got renamed. The project is now called CANtact. Yep, I can't get away from the CAN puns.
    I am planning to do a run of these in the near future. If you're interested in getting one, let me know in the comments.

  • Layout & PCBs Ordered

    Eric Evenchick04/09/2014 at 18:16 0 comments

    I've ordered some boards from OSHPark. They should arrive in a couple of weeks. Files are available in the Github repo.

  • Custom Hardware

    Eric Evenchick04/07/2014 at 15:37 0 comments

    I've been working on the firmware for the past week, but I decided to get started on custom hardware for the project. Up until now, I've been using the Tiva C Series Launchpad from TI with a hacked together add-on board for CAN. It's time for custom hardware.

    This hardware uses the same microcontroller family, but opts for a model with 128k of flash instead of the 256k on the Launchpad. Since 128k should be plenty, this will lower the BOM cost of the hardware.

    There is room for four CAN transceivers on board. However, it is intended to only be populated with two at a time. This way, you can choose between two high-speed buses, two single-wire buses, or one of each. For the high speed buses, there's a termination resistor that can be enabled with a jumper.

    The hardware is fairly simple, and the next step is to design the PCB. That should get done shortly.

    The schematic is hosted on Github, and available as a PDF here. It's a draft, let me know if you spot any issues!

  • CAN Receive

    Eric Evenchick03/28/2014 at 21:10 0 comments

    After transmit was working, the next logical step was receiving CAN messages. This is now working, and the latest firmware is in the Github repo.

    One challenge is receiving messages without dropping any. This is something I'm still playing with, but the results so far are pretty good. The device keeps up at moderately high bus loads, but the next step will be testing on a real vehicle network.

    Now that the basics are done, I need to get the second CAN bus up and running. After that, I'll be writing some desktop software for dealing with the data. I'm looking at support for SocketCAN, which will allow it to interface with tools such as Wireshark easily.

  • USB and CAN Transmit

    Eric Evenchick03/25/2014 at 18:27 0 comments

    Good news, I now have USB and CAN transmit working! The development setup looks a bit like this.

    Right now I'm using CDC-ACM for USB. This emulates a serial terminal, and is really easy to develop applications for. It's also cross-platform, and does not need drivers on many systems.

    For CAN, I'm using a Kvaser Memorator to test with. This device provides a CAN to USB bridge. The green PCB in the middle is a CAN terminator, which puts a resistance across the differential bus to terminate it.

    The launchpad sits on top of a little Boosterpack, which just has the MCP2551 CAN transceiver on it. This transceiver operates at 5 V, which is available from USB. Fortunately, it will accept the 3.3 V input from the MCU, and the MCU is tolerant up to 5.5 V. This means no level shifting is required.

    Currently, the device can go onto the bus, set its bit rate, and transmit messages. Next up is working on receiving messages.

  • Transceiver Boosterpack

    Eric Evenchick03/22/2014 at 18:52 0 comments

    For a first step, I need to add transceivers to the Tiva C Series Launchpad. This is a pretty simple circuit which should be easy to build on perfboard. I've started the design on Upverter.

  • First Steps

    Eric Evenchick03/21/2014 at 20:57 0 comments

    We need to get this thing working quickly, so the first version will be built out of a dev board, some perfboard, and whatever else is lying around.

    For the dev board, I'm planing on using the Tiva C Launchpad, because I have a few of them. Thanks for the free stuff TI! The Tiva C Launchpad hosts a TM4C123GH6PM processor, which has two CAN buses. One of them is shared with the UART which is used for a debug console. We should be able to jumper wires into some test pads to get access to this, and hopefully the debug console will not interfere during normal operation. If it does, we'll be a bit more assertive and cut the traces. 

    To actually get on CAN, we'll need transceivers. I want to support one high speed (differential) CAN bus and one low speed (single wire) CAN bus. This means two different transceivers. The MCP2561 is a cheap differential transceiver that's available in a DIP-8. That'll make prototyping easy. As for single wire, the NCV7356 will work. It's available in a SOIC-8, which is only slightly more difficult to mount to a perfboard.

    Other than that, everything should be available on the Launchpad, making this a really straightforward hardware build. Time to order some components!