The problem with ‘knowledge’ is the level of it – we live in a world where everyone can be an instant expert just by Googling or doing some clever searches on the internet. That also goes for a subject like CAN bus and for example the Matrix MIAC controller: you can find everything on the internet, but to find a real hands-on expert you need to go to a small village in the lowlands (The Netherlands) of Europe. Here is where we meet Alwin – he is a CAN bus expert, an all-time MIAC user (and the new MIAC distributor for Holland) and a specialist in automotive solutions. Before we have a look at his special MIAC – CAN bus demo kit, let’s have a quick catch up on CAN bus.
CAN bus is a serial communication network. CAN stands for Controller Area Network which means it doesn’t need a host controller to operate. The bus is real-time and very robust which makes it very useful for connecting individual electronic parts in cars. Today it is unthinkable to think that a car can operate without electronics, but the first version of CAN bus was developed between 1983 and 1986 by Bosch Gmbh, in a time the cars were more mechanic and hydraulic than electrically operated. In more than 30 years of new car developments, CAN bus has been capable of providing a robust car network and is still the number one choice for many manufacturers.
MIAC CAN bus, how it works
The CAN bus consists of two wires that are many times intertwined to prevent the signal transfer from EMC effects and terminated with 120 Ohm resistors to make sure there are no reflections on the line. The two lines have their own names: CAN-H and CAN-L and if there is a ‘1’ data transfer they are both 2.5 volts. If there is a ‘zero’ data transfer, the CAN-H line voltage goes up to 3.75 volts and the CAN-L line to 1.25 Volts – in this way the ones and zeros of the communication can be identified. All MIACs come as standard with a CH, CL and a T(ermination) connection – just plug it in and away you go.
For automotive and many other applications
The real-time and robust bus is also popular for many other applications and therefore we find a CAN bus controller standard in every MIAC. The MIAC is an industrial grade controller that can operate right out of the box: you can do your development, build the whole physical circuit around the MIAC and build it into the application. The actual CAN bus controller chip used in the MIAC is a Microchip MCP2515.
MIAC CAN bus demo kit
To demonstrate the MIAC CAN bus implementation, we must go back to Alwin in The Netherlands. He has made a small demo-kit to show the basic operations of MIAC and CAN bus in an automotive application. “Inside the demo kit there are there are 4 variable resistors and two switches”, explains Alwin.
“They represent the value that in the real world would come from a sensor deep inside the engine. Basically, every sensor and/or data on the machine location, can be visualized. In the demo set-up we see: pump input pressure, pump output pressure, pump lubrication pressure, engine RPM, engine oil pressure, coolant temperature and engine hours. The engine data is read from the CAN bus and converted to Modbus data, pump data is read from analog sensors and with the modem I send commands to the MIAC and this can start/stop and increase or decrease the engine RPM. If required, the MIAC will also take care of the control of the engine in case of high temperature or low oil pressure.”
If you look closely at the image below, you will there are a few interesting things to discover. The green and yellow wires are twisted and form the CAN bus, you see the connections and the termination resistor with the connector. The signals coming from the switches and potentiometers go to the MIAC inputs (the grey wires). The dsPIC MIAC used here, has eight inputs for analogue or digital signals, four solid state outputs and four high current relay outputs.
Next to the dsPIC MIAC you see the small white box, that is a 2G wireless modem. When asked his reasoning for choosing a 2G model, Alwin replies, “I decided for a 2G modem because most of the data is simple/small data packs and I don’t need to program the device ‘online’. One other big advantage of 2G that it is more reliable than 3G. Even in the Netherlands with high level wireless networks 3G is not everywhere all the time available. The 2G network is more efficient and reliable.”
With the wireless modem it is possible to measure and operate the MIAC and CAN bus from the application. Alwin uses a special platform for remote applications to showcase all the functionality to his clients.
When asked why he chosen to use a MIAC, Alwin replies, “Why a MIAC? A simple question with a simple answer. Only this PLC can handle CAN and Modbus without ‘extra’ extensions, it is easy to program, it has a build-in display and function keys! I was very happy when Matrix announce the new series. The dsPIC MIAC is very well equipped for projects like this, but even the 8-bit PIC version will help you to set-up new projects. I use a PIC version in a prototype electric Vehicle. The MIAC can handle the input and output signals and the display is very useful for checking incoming and outgoing data and for error readings. In the electric vehicle I use the MIAC to read the CAN bus of the BMS (Battery Management System) and to control a small generator system when the battery goes empty.”