Monday, January 8, 2018

More robust USB connection, and a new CAN Dongle for Windows!

There has been increased interest in monitoring the Alternator Regulators, with some nodeJS scripts even in the works!   This however brings out the question:  What is the best way to attach to the regulators for long term monitoring?

My short answer: CAN

The CAN is designed for just this, the problem had been locating reasonably priced CAN adapters for PCs.  That has changed this past summer, as there is new a flood of low-cost CAN to USB adapters available for under $25.  One good source being:   Seed Studio is not the manufacture of this device, but they are well supporting it.  It is readily available from them, Ebay, Amazon (though at an insane price) and even Mouser and Digikey  (Hint, google the Seed Studio part number: 114991193  to see a few purchasing options).

To connect it up take a standard CAT-5 cable, cut one end off and connect the CAN-H and CAN-L wires.  If your PC does NOT already have some type of grounding back to the batteries negative terminal, also connect the CAN-GND wire.  That one will take some fiddling with.  Try it 1st without connecting the CAN-GND wire, if you start getting errors see if connecting the GND wire helps.  (We are hoping to avoid multiple ground paths back to the battery, aka a Ground Loop).

The RJ45 connector follows the CiA-303 spec for wiring, and when using standard CAT5 cables the wiring SHOULD be like this:

Regulator’s RJ45
CAT-5 color coding
EIA 568A
EIA 568B

Sorry, but there are two ‘common’ cable standards out there.  You will just have to look to see which one you have by the color of the wire in the 1st position.   For reference, here is the complete RJ45  pinout spec:

Once you have the pigtail on the CAN-USB done just plug it into one of the RJ45 connectors on the Alternator Regulator, does not matter which one.  Then follow the software driver instructions for the CAN-USB dongle and any app you wish to install.   If you have two regulators linked by an existing CAT5 cable, plug the CAN-USB pigtail into the open port on either regulator and remove the blue jumper on the TERM post for that regulator.  Then continue with driver/software install.  As a bonus, one of these CAN-USB dongles will provide access to BOTH regulators!

I have ordered one of these devices and have high hopes that with it and the work others in the community are doing we can get a simple and nice status display going.  Plus, this will be a great way to gain access for the configuration application being written as well!

Well, CAN is great – but if you want to use USB that is also an option.  I am a bit concerned about the long term reliability of the micro-USB connector on the regulators – it really is more for updating/configuration/diag then long term use.  And of course there is a distance limitation associated with USB (though active booster cables help).  One idea for a more robust USB connection is to install the 5-pin header into the PCB (just next to the existing USB micro connector) and use a cable to connect to that header.   The header pinout conforms to the standard PC 4 or 5 pin headers and there are several options out there, looking something like this:

The 5-pin header pinout spec is:

Note that some cables do not contain shielding, and hence are 4-pin.

Some ideas for sources include:

A ton of options out there - most all type ‘A’ in both male and female.  So, CAN is nice but if you are looking to do USB long term, consider connecting via a USB header.

No comments:

Post a Comment