4260 views|2 replies

422

Posts

4

Resources
The OP
 

【Automobile Engine Real-time Vibration Tracker】 Submission [Copy link]

 

● Design name: Real-time vibration tracker for automobile engines

[Overview] Listening to the sound of the car engine can give you a general idea of the car's working condition. Using a vibration sensor for real-time monitoring can bring more accurate and clear judgments. It can be used in working condition judgments. Combined with other information such as temperature, humidity, and running time accumulation, it can provide more valuable services such as auxiliary maintenance and status monitoring. This design is a benchmark prototype design that can be continuously improved and enhanced to achieve a more ideal effect.

1. Introduction of the work (photos of the work, function introduction, etc.)

The real-time vibration tracker for automobile engines uses RSL10-002GEVB as the core development board and the vibration sensor as the sensor. It collects data through ADC and then transmits it to the mobile phone through low-power Bluetooth BLE to obtain more effective information remotely. Through cloud information analysis, effective intelligent analysis results are obtained.

2. System software and hardware implementation block diagram

2.1 System Software Block Diagram

2.2 System Hardware and Hardware Block Diagram

3. Functional description and explanation of each part

3.1 Data collection function

First modify the data structure,

struct app_env_tag
{
    /* Battery service */
    uint8_t batt_lvl;
    uint32_t sum_batt_lvl;
    uint16_t num_batt_read;
    uint8_t send_batt_ntf;
    /* Customized service */
    uint8_t vib_lvl;
    uint32_t sum_vib_lvl;
    uint16_t num_vib_read;
    uint8_t send_vib_ntf;
};

Then set the settings for ADC and collect vibration parameters.

Sys_ADC_InputSelectConfig(2,  (ADC_NEG_INPUT_GND |  ADC_POS_INPUT_VBAT_DIV2));

Modify the acquisition frequency to 50Hz

ke_timer_set(APP_TEST_TIMER, TASK_APP, TIMER_20MS_SETTING); //Make 50Hz ADC sampling

viblel = ((ADC->DATA_TRIM_CH[2] - VBAT_1p1V_MEASURED) * 100 / (VBAT_1p4V_MEASURED - VBAT_1p1V_MEASURED));
viblel = ((viblel >= 100) ? 100 : viblel);

app_env.sum_vib_lvl += viblel;

3.2 Bluetooth transmission

        if (ble_env.state == APPM_CONNECTED)
        {
            if (app_env.send_batt_ntf && bass_support_env.enable)
            {
                app_env.send_batt_ntf = 0;
                Batt_LevelUpdateSend(0, app_env.batt_lvl, 0);
            }
        }

3.3 Mobile phone reception and data analysis

Start Android Studio on your phone, write the connection and processing code, and read the contents of the buff regularly through Gatt.readCharactistics().

                    @Override
                    public void onServicesDiscovered(BluetoothGatt gatt, int status) {
                        super.onServicesDiscovered(gatt, status);
                        List<BluetoothGattService> services = gatt.getServices();
                        BluetoothGattCharacteristic characteristic = null;
                        for (BluetoothGattService service : services) {
                            //sendmsg("UUID IS " + service.getUuid().toString());
                            for (BluetoothGattCharacteristic serviceCharacteristic : service.getCharacteristics()) {
                                characteristic = serviceCharacteristic;
                                boolean successfullyRead = gatt.readCharacteristic(characteristic);
                            }
                        }
                    }

The layout written in the code is as follows:

4. Project source code

4.1 Main code analysis

4.2 Code compression package, the program code is as follows.

vibration_tracing_02.zip (651.59 KB, downloads: 4)

V. Demonstration Effect and Instructions

1. Android studio mobile APP project download and debugging background

2. This mobile phone APP receives the Bluetooth signal of RSL10. See this video for the working status of the development board.

5.1 Hardware Connection

5.2 Mobile phone interface (to be optimized)

The connection is successful and Vibration Tracing communication begins.

The picture below is the Android Studio development page used for self-development.

Latest reply

  Details Published on 2021-7-2 21:58
 
 

626

Posts

209

Resources
2
 

Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

422

Posts

4

Resources
3
 
This post was last edited by Beifang on 2021-7-27 15:18

Added 2 videos,

1. Android studio mobile APP project download and debugging background

2. This mobile phone APP receives the Bluetooth signal of RSL10. See this video for the working status of the development board.

WeChat_20210727151532.mp4 (3.07 MB, downloads: 2)

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list