Wireless telemetry system of an Off-Road vehicle

The article presents the construction and operation principle of a wireless data transmission system read out from the CAN bus of an off-road recreational vehicle. The built-in system uses data transmission standards, through Bluetooth that allows data to be received on portable devices such as a tablet or smartphone, but it is characterized by a relatively small range. The second channel of data transmission is a radio transmitter operating on the frequency of 433MHz, which allows reception and recording of data on PCs and has a range of 1000m. The article also describes built author applications that work with the discussed device.


Introduction
The progress in the field of modern mechatronics, that is the interaction of mechanical engineering, electronics, steering and computer science, where all fields are integrated in one process, for example to service a vehicle, is heading towards miniaturization. Especially new possibilities can be noticed in telecommunications, where in mobile phones like smartphone is used increasing computing power. This type of small devices which are already working on multithreaded processors, will enable to enter more and newer functions, also including the field of motorization. They offer not only the access to multimedia, providing entertainment, but they also function as communicators, navigation systems as well as providing additional information for the driver. In addition, the ubiquitous wireless communication, which has become the standard in data exchange, allows them to be exchanged in both directions, i.e. from and to the device. Thanks to such solutions, it is possible to perform basic vehicle diagnostics using a smartphone. In e-mobility, it is common to operate electric vehicles, while in everyday service appear more and more diagnostic applications, which also monitor the parameters of the vehicle's propulsion system.
The study presents the Current Parameters Visualization System for the operation parameters of the off-road vehicle drive system (CPVS Off-Road) developed in the Vehicles' Department of the Opole University of Technology. The system consists of a wireless communication transmitter, a CAN BUS system for handling on-board messages, software for PCs and mobile devices like smartphones on the Android operating system.

Current Parameters Visualization System -CPVS OFF-Road
Off-road vehicles as well as agricultural machines very often work in difficult terrain conditions, which the current control of parameters is difficult to monitor for. The determination of nominal values of the drive system's operating parameters is important for the analysis of the drive steering system conditions or the current adjustment of the settings depending on the terrain conditions, which may have a significant impact on the life of such vehicle and its failure rate.
That is why these vehicles are increasingly equipped with series of sensors monitoring the operation of the drive system or suspension system, which provides information through the on-board data transmission network to the vehicle's on-board controller.
This driver, often referred to as the ECM (Electronic Control Module) in off-road vehicles, controls the operation of the engine to provide the required power in the propulsion system. At the same time, the ECM controller has diagnostic functions and on the basis of sensor data it determines the technical condition of the entire vehicle components, including EPS (Electronic Power Steering), ABS (Anti Block System) and other parameters of the drive system such as engine temperature, etc. However, this system is not equipped with On-Board Diagnostics (OBD) [1,2], as in passenger cars. The diagnostic system is aimed at performing the following operations for selected parameters [3]: Determining temporary changes in their value, Performing actual measurements, Recording with the possibility of recreating trend changes, Determining the probability of defect's occurrence or time consumption of working elements, based on the conducted measurements.
The essence of diagnostics is studying the influence of input variable values U and the output ones Y, as well as the disturbances Z on the object X's condition [4]. In the last dozen or so years, especially in the automotive industry, a great emphasis is placed on the early detection of irregularities especially in the vehicle's propulsion system, due to the possible increase of environmental pollution caused by an incorrectly functioning system. The ecological aspects forced the manufacturers of passenger cars to equip the OBD II system. Off-road vehicles are not equipped with a diagnostic system and exhaust gas cleaning systems. It encouraged the authors of this publication to develop in the Department of Vehicles of the Opole University of Technology a system that measures and monitors a correct operation of a vehicle drive system, introducing an early warning system for exceeding limit parameters, e.g. the temperature of internal combustion engine. However, the main purpose of these activities is the development of a comprehensive system that in the future will allow to early detect and eliminate inefficient vehicle components [5], which affect both the emission of harmful substances, as well as the safety of its users [4,6]. Simultaneously, an active vehicle suspension control system is expected to be introduced, as well as other additional functions such as GPS position and drive system parameters record that are currently transferred to the data acquisition system. The concept of CPVS Off-Road is based on telemetry data transmission from off-road vehicle's on-board data transmission system. The designed data transmission system has been equipped with a transceiver, corresponding to the level of data transmission of the vehicle, decoding the transmission protocol and transferring them via radio to the superior vehicle system consisting of a PC computer or a mobile device such as a smartphone or Android tablet.

Data transmission system
Data transmission is the transfer of information between the transmitter and the receiver by information carrier. Data transmission may be using various signals. The transmitting and receiving equipment must use the same coding language so that the transmission can be properly transmitted and read [5].

On-board data transmission system
The on-board data transmission system is often referred to as the CAN BUS and it was developed in the eighties by BOSCH GmbH in cooperation with leading passenger car manufacturers such as Volkswagen, Audi and Daimler-Benz for the development of automotive technology. The increase of safety and driving comfort requirements, the reduction of fuel consumption and emissions caused rapid growth of drivers' number responsible for these systems. These controllers in order to work properly need to exchange necessary information between them. The bus was to ensure transparent and fast communication between electronic systems. The CAN BUS abbreviation stands for the 3 Controller Area Network -a network of controllers connected to each other to exchange information. As a medium connecting individual controllers in the CAN network, the most common is a twisted pair two-wire line. By using this medium, the impact of electromagnetic interference and mutual crosstalk is reduced. The maximum transmission speed is up to 1 Mb/s at a distance to 40 m, however, along with an increase of the distance, the maximum transmission speed drops e.g. to 250 kb/s at a distance of 250 m ( fig. 1).

Figure 1. CAN transmission speed depending on the bus length [7]
Many times, the CAN bus in vehicles doesn't have separate master unit supervising the operation of the entire network, therefore it belongs to the multi-master bus group. The communication is broadcast, because messages sent on the bus are received by all devices.
The most important CAN features are : • possibility of sending messages containing up to 8 bytes of data, • each transmitted message has an identifier, • hardware error handling, • significant reduction of wires' number in the vehicle, • fast data exchange between controllers, • protocol ensuring low number of incorrectly sent information, • space saving thanks to smaller controllers with smaller number of wires supplied to them.
The information sent between the controllers on the CAN bus are exchanged up two wires marked as CAN_L and CAN_H, which significantly reduces the number of wiring in the vehicle. The same information is transmitted in lines, however, these signals are reversed. If there is logical 0 on one data bus line, logic 1 is on the other wire and vice versa. The actual signal recorded on the CAN bus is shown in Figure 2. The CAN BUS is standardized all over the world, however, the identifiers of the individual information that is transmitted may vary and the system has also been used in off-road vehicles.

Wireless data transmission methods
In general, wireless data transmission can be implemented in two ways: x by infrared light waves, x by radio waves. Both methods are based on the electromagnetic wave. Among data transmission technologies, we can distinguish: • IrDA -an optical module that allows data transmission at 100 Mb/s. Its disadvantage is the necessity to face the devices to each other with an infrared diodes during transmission; • Bluetooth -a radio module allowing data exchange at 100 Mb/s; • Wi-Fi -a radio module operating on 2.4 or 5 GHz frequency enabling data transmission up to 600 Mb/s Wireless data transmission networks are based on standards marked with the IEEE symbol. Among them, there is a group no. 802.11 that works on several independent protocols. They were created along with the development of technology and were characterized by different work parameters, the most important of which is the data transmission rate. One of the most common is IEEE 802.11b called the Wi-Fi. It operates on the 2.4 GHz frequency band and provides transmission at 11 Mb/s. The transmission speed mainly depends on the 802.11b protocol's efficiency and in fact it is smaller. It is caused by the error control and collision prediction procedures.
The most common standard in communication with peripheral devices is IEEE 802.15.1. It is called Bluetooth. It operates in the 2.4 GHz frequency band and ranges from 1 to 200 meters in the open space using high power transmitters. Communication between devices takes place on 79 channels with a bandwidth of 1 MHz. The data stream is coded with the FHSS system. With this technology it is possible to communicate synchronously with the 432.6 kbps speed or asynchronously with the 721 kbps speed [8].
The premise of Bluetooth communication was to operate at short distances, to connect with several different devices and to operate on a band that does not require the use permit (ISM). This transmission standard was used in the developed CPVS Off-Road. The transmission standard shall operate in the first class [8] at 1Mb/s with a 10 m range and a transmitter power of 1 mW (Fig. 3). The usage of stronger transmitters increased the range to 200 meters.  The information access and indicator's service while driving is relatively difficult and dangerous, because the driver has to focus on driving and operating the display. Moreover, the parameters displayed on the meter can be read only individually, the user can not view several parameters at the same time. Such service may be sufficient for the average user, but it doesn't meet the requirements for a demanding professional or during conducting various types of tests and examinations. The information sent on the CAN BUS of the Polaris RZR vehicle was analyzed for the construction purpose of the discussed CPVS Off-Road using a special device called transceiver, which "listens" sent information. Data packets extracted in this way are sent to the receiving device and displayed to the user.

Data transmission system from an off-road vehicle
The data transmission system from an off-road vehicle does not require a direct intervention in the CAN BUS, however, it requires the connection to the diagnostic connector located under the vehicle's hood. After linking to the connector, the device receives power from it and analyzes the information sent from the CAN BUS. The microprocessor built into the device reads this data, interprets it and converts it, then sends it to the Bluetooth and radio transmitter operating on the 433MHz band, which range is up to 1km, using the UART serial transmission. Both transmitters send this information via radio. The block diagram of the constructed system is shown in Figure 5. The transmitting device was built based on PIC18 series microcontrollers, which advantage is the built-in port of CAN BUS service and UART serial transmission. The processor is clocked with a 25MHz quartz resonator. Moreover, in order to adjust existing voltage levels on the bus and support the CAN BUS protocol, it is necessary to use a specialized MPC2551 transceiver. The Bluetooth transmission module is connected to the processor's UART serial transmission port. The diagram of the built-in transmitter is shown in Figure 6 and the built structure is shown in Figure 7.  Figure 7. Data transmission system with a USB receiver While the discussed system was being designed, it was decided to use a radio transmitter with a frequency of 433MHz. This frequency is available for various types of public transmitters, e.g. remote controls for entrance gates, weather station transmitters and etc. It is also very often used in the industry to transmit selected parameters at a distance. Due to the above, while using this transmitter it is necessary to determine in advance the transmission channel which the device will work on, in order to minimize the possibility of transmission interference. The device has a choice of 100 transmission channels with a band of 400KHz, hence the actual frequency range is between 433.4-473.0 MHz (Figure 8).  where n-1 is a FIR filter row, and the IIR filter, and na is a feedback filter row, while nb is the feedforward filter row.
The filter structure is as follows (Fig. 10): Figure 10. The filter structure [10] The next values for step m are calculated according to the formula: Hence, the transfer function of the filter can be written as: The PIC18F processor implemented in the transmitter has been programmed in the MPLAB programming environment provided by the Microchip company -the manufacturer of PIC processors. The processor's execution program was written in C language. The microcontroller's program after receiving information processes them from the hexadecimal record (information on the CAN BUS is sent in that system) to the decimal format which is more understandable to the user. The information sent by radio is also provided with a verbal identifier representing transmitted value, e.g. RPM identifier (revolutions per minute) was used for the rotational speed.
The data sent by the built transmitter can be received on any PC computer, tablet or smartphone with a built-in or external connected Bluetooth receiver. The received information can be read for example by the Hyperterminal program integrated in the Windows system to support links made through the COM port or using publicly available programs.

Parameters visualization system
Visualization applications are an inseparable part of application software and also many mobile devices. However, if you want to share a software on many platforms, you have to create each one separately in programming environment dedicated to its operating system. Thus, data from one transmission system is transmitted to external receiving devices, where each parameter is identified by a separate address written in hexadecimal code, which is read from the data stream. Operating mode of the transmission system

Application for Windows
As a part of the developed system, there was also created a special program which graphically displays the received information on the screen of a PC computer and a mobile device with the Android system. The program displays information about the rotation speed, vehicle speed and throttle position as analog indicators, similar to those that can be found in passenger cars every day. The information about currently selected ratio (gear) is displayed in green colour in the middle of the screen. There are displayed L, H, N, R, P signs which correspond to the markings on the gear selection lever on the Polaris RZR vehicle. The information about the temperature of the engine, the type of the selected drive and the provided differential lock is displayed in the lower left part of the application. In the middle of the application, when the brake pedal is activated, the red "STOP" sign is displayed and when the brake is inactive, the sign is gray ( fig. 11).

Application for Android
The main assumption for mobile devices' application was the reading of eight previously assumed parameters, which were supposed to be presented on graphic disks. Furthermore, a numerical value consistent with the position of the pointer should have been displayed under the indicators. The application no longer displays the data stream received during transmission anymore. The application's algorithm was developed and it was supposed to scan several indexes in search of the appropriate parameter. Thanks to this solution the parameters will be refreshed more quickly, even if the place changes. The interface has been prepared in the way that displays the necessary parameters very clearly. The interface's cells have been blocked. This means that they do not respond to a click or swipe, only the function keys of the mobile device remain in interaction. The transition to the parameter reading screen is made by pressing the virtual button. The data's visualization system is automatically horizontally oriented, which prevents a confusion during the application usage.
The application was made including the basic parameters' reading of the vehicle's operation. The most important parameters are presented in the foreground. Less important readings have been arranged so as not to distract the eyes, but in visible way. The interface has been developed in shades of gray on a background smoothly going into a darker shade. The dials counters have a lighter shade that contrasts well with the background. The gauge of the crankshaft and coolant temperature have colored boxes, which increases legibility and allows to control working parameters of the vehicle without focusing the eyesight on the numerical value, which is additionally displayed under the meter.
In the central position of the screen there is a vehicle speed gauge, the engine rotation speed gauge is on the left side and a temperature indicator is on the right side.
The application interface (Fig. 12) was entirely based on vector graphics in the IncScape program. Vector graphics allows to design a graphic element with different properties. A vector object can be transparent or without a background. Thanks to this solution, only the right elements of the object are visible on the final image. The pointers were designed as separate elements and imposed on each other in the programming environment of App Inventor 2 application. Thanks to this, the effect of moving indicators was obtained.

Summary and conclusions
By developing of the Current Parameters System Visualization of the off-road vehicle's (CPVS Off-Road), there was prepared a start-up platform for further system development. At first, the drive system parameters accessible from the on-board vehicle data transmission system were made available.
Critical values that could lead to the emergency state of the vehicle were determined and there were also developed basic applications for data visualization for two different operating systems. The designed transmitter device is reconfigured, has the possibility of further development and tests showed reliability and no communication errors. In the scope of further improvement of the device, it is planned to: • increase the number of read parameters, • use the communication channel to control vehicle components using the application, including the control of a vehicle's damping system, • use of mobile device's sensors to perform acceleration measurements, vehicle tilting and record of the traveled route, • connect additional sensors to the analog processor ports. The project implementation shows that mobile devices are used not only as a multimedia entertainment center, but also as control, measurement, diagnostic or research tools. The recorded measurement data made during road tests are extremely valuable information by which you can implement and look for new diagnostic algorithms for off-road vehicles.