? How to realize: mine equipment battery monitoring, intelligent robotic arm control?

E104-BT05 is a serial to BLE Bluetooth slave module based on Bluetooth protocol 4.2, working in the 2.4GHz frequency band. This module supports low-power broadcast, data transparent transmission, control configuration, IO port level reading, IO port level setting, and PWM output with variable frequency cycle. Modules can be widely used in smart wear, home automation, home security, personal health care, smart home appliances, accessories and remote controls, serial rs232 to wifi converter automobiles, lighting, industrial Internet, smart data collection, smart control and other fields. Data transmission with a maximum baud rate of 256000bps is supported. 1. Application of mining equipment battery data collection The E104-BT05 module is small in size, light in weight and low in power consumption, and is suitable for embedding in various small acquisition devices. Here we take the detection of equipment batteries in mines as an example. 1. Advantages of using E104-BT05   1. The module supports low-power broadcast of user-defined data format. Putting the detected device battery information into the broadcast packet can enable any host device to scan the data information without additional development of communication protocols. 2. The module supports low power consumption mode. Users can change the broadcast interval and turn on the low power consumption mode according to their needs. The minimum power consumption current can reach 8uA, and a button battery can meet the long-term monitoring of mine equipment. 3. The module supports over-the-air configuration. After the E104-BT05 module is embedded into the device, the module parameters can be modified at any time according to the over-the-air configuration instructions to adapt to user needs. 4. The module also has an additional IO port level acquisition function, which can reduce the user's MCU development, and directly use the E104-BT05 module air configuration command to read the relevant IO port level. 2. The structure of the program   1. The data acquisition terminal of E104-BT05 is included in the mine. 2. Data receiving terminals that support host functions, such as mobile APPs, small programs, and PC-side data receiving software. The workflow is as follows: mine equipment collects battery information and packs it in a certain format, and transmits the packaged data information as a parameter to the broadcast packet of E104-BT05 (using the set broadcast packet data of E104-BT05), and the terminal monitoring equipment scans the broadcast Data get device information. Recommended wiring diagram: 3. E104-BT05 is used for mine equipment battery monitoring configuration   1. Open the XCOM serial port assistant and configure the relevant parameters of the assistant. E104-BT05 default baud rate 115200. 8,1,0. The configuration is shown in the figure.   2. Users can modify the relevant parameters according to their own needs, here is the demonstration to modify the device name.   3. Connect with the data acquisition terminal according to the recommended connection diagram.   4. Pack the collected battery data in a custom format. The demo data package is as follows (assuming the battery has 57% remaining power) Here, 03 represents the packet length, FF is a custom field, and 0507 represents the remaining power. 5. The data acquisition terminal sends serial port data, modifies broadcast data with AT command, and the command sends "41542B4144564441543D 02010603FF0507" in hexadecimal. 6. Users can design the relevant APP or PC-side host computer according to their own needs to obtain the battery information of the device. Here we take the serial port assistant as an example to demonstrate. Download the BLE test tool, open the software and find E104-BT05, you can see the set battery information, and the user can design the interface software shown on the right to display it. 2. Application of intelligent control E104-BT05 comes with 2 IO outputs and 4 PWM outputs with variable periodic frequency, so it has great advantages in the field of intelligent control and can directly control related equipment. Here is an example of the control of an intelligent robotic arm. 1. Advantages of using E104-BT05 1. Small in size and light in weight, it will not cause extra burden on the robotic arm. 2. With 4 PWM outputs and 2 IO outputs, users can directly set the cycle and frequency to reduce the cost of additional microcontroller use. 3. The module supports air configuration, and the parameters of the manipulator can be set anytime, anywhere. 2. Program structure  1. Intelligent robotic arm control terminal. 2. The intelligent robotic arm execution terminal including E104-BT05.   blueprint: Recommended wiring diagram: 1. When using, you need to configure relevant parameters such as device name, etc. The specific configuration is shown in steps 1 and 2 of case 1. 2. The serial port assistant can be used for the control on the PC side, or the relevant interface control software can be developed by itself. Here, XCOM is used as an example to demonstrate. To set the output of IO2, use the AT command "AT+IO2=xx" to set the output level. The control here represents a certain state of the robotic arm. 3. The control of the robotic arm is generally based on PWM control. Here, the output period of PWM1 is set to 10ms, and the duty cycle is 10% of the PWM wave. The calculation method of the PWM period is as follows: inside the module, we set the precision to T=0.01ms, that is, the minimum period that can be set is 0.01ms, and the parameters can be passed in when setting. If the period needs to be set to 10ms, then t=T*para, Bring in T=0.01ms, t=10ms, and calculate para=1000. 3. Mobile APP air configuration to control the robotic arm   1. Use the BLE debugging assistant to search for the device and click convert ethernet to wifi to establish a connection.  2. Click No. 3 to enter the air configuration channel and verify the air configuration password.  3. After the air configuration password authentication is passed, you can set the control robot arm. Send control commands in the form of AT commands, such as a serial port demonstration example, such as sending the command "AT+PWM2=20"