Additional Addressing of Nodes

A while ago, I wrote a post about choosing the resistor values for setting ADDR on the MCP23018. At work, we make use of pumps by a company called EMP, which produces a range of CAN-controlled pumps. The pumps have three pins on the LV connector that allow you to change the address of the pump between 0x88 and 0x97. This looks like a good way to get additional addresses on my hardware projects with limited pin requirements. The specific addressing for the EMP WP150 high-voltage pump is as follows.

Address Input 1Address Input 2Address Input 3CAN Address
OpenOpenOpen0x88
OpenGroundOpen0x89
GroundOpenOpen0x8A
OpenOpenGround0x8B
GroundGroundOpen0x8C
OpenGroundGround0x8D
GroundOpenGround0x8E
GroundGroundGround0x8F
OpenPowerGround0x90
PowerOpenOpen0x91
GroundPowerOpne0x92
PowerGroundOpen0x93
OpenPowerGround0x94
PowerOpenGround0x95
GroundPowerGround0x96
PowerGroundGround0x97
NOTE: Address input 1 and address input 2 do not support sensing shorting of both pins to power. Address input 3 does not support sensing short to power.
Selectable CAN address table for the EMP WP150 high voltage pump.

This means that by taking a single pin on a connector can have three states: either power, ground, or open circuit. The EMP has some rules about pins not being able to be used in some combinations, which is why they only list 16 addresses.

An advantage of making the addressing a function of the wiring of the connector, rather than either a software configuration or DIP switches, is that it allows for quick replacement of FRUs (Field Replaceable Units), and reduces the risk of misconfigurations.

CAN Addressing Component layout

Making some assumptions, I think the internal circuit looks something like this. I have wired the connection for 0x95 per the table above. I don’t know why they have the limitation on the pin assignments; it may be an optimisation due to the number of components they have used internally or the number of Analogue and Digital pins they have available on their ASIC.

The circuit I have drawn out below can use the entire 27 address space (3×103 addresses). The +5 VDC rail was drawn for convenience, and could just as easily be a 3V3 rail; the diodes are used for voltage clamping and also make up part of the ESD protection. The diode pairs could be replaced with a single BAT54S SOT-23 diode, which would reduce the component count.

Proposed addressing circuit for up to 27 unique addresses using only three inputs to a micro controller.
Proposed addressing circuit for up to 27 unique addresses using only three inputs to a microcontroller. The above diagram is selected for the address 0x95 from the addressing table of the EMP WP150.

Number of addresses vs pin count

Having three states gives you a higher address space count per number of addressing pins than just having two states; you could get higher density using the hardware version numbers circuit, but that is harder to implement just using splices on the supply cable.

Address Pin CountAvailable Addresses
13
29
327
481
5243
6729
Pin count vs unique addresses available

Looking at the above table, three address pins with 27 addresses available in the address space seems like a sweet spot.

Spice Model of Addressing pin

I have modelled a single channel of the above circuit in Falstad. I have made some assumptions, and the spice is not guaranteed to be 100% representative, as the spice models are quite simplified. The value of 10 kOhm reisisors mean theat the forward current of the diode when connected to 12 VDC is limited to about 0.7 mA (far below its rated 200 mA forward current).

If there was a guarentee the the voltage was the same on the connector side as the supply to the microcontroller, and ESD protection was not required. The clamping diodes could be omitted.

This circuit could also be used as a replacement for the hardware version numbers circuit, allowing more versions with just the placement of a few zero-ohm resistors rather than changing the values of multiple resistors.

If you are looking to use this circuit as is in an automotive environment, please note that the design has not been specified to survive the requirements of LV124 and will need to be assessed against that standard.

Layout with the addition of a CAN termination resistor

If you are using this addressing system on a CAN, RS-485, DMX or another communication system that requires termination resistors, you can use an additional pin on the connectors to allow for automatic correct inclusion of a termination resistor when the FRUs are wired into the data bus, again reducing the risk of user error.

Proposed addressing circuit for up to 27 unique addresses using only three inputs to a micro-controller, This configuration also includes the addition of a 120 ohm termination resistor for CAN.
Proposed addressing circuit for up to 27 unique addresses using only three inputs to a microcontroller. This configuration also includes the addition of a 120 Ohm termination resistor for CAN.

Leave a comment

Your email address will not be published. Required fields are marked *

The maximum upload file size: 20 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here