Design and DIY for e-stim robot

Design and DIY for e-stim robot

By hvprvbo
1. Design of hardware system
    The hardware system is mainly composed of two parts: the PLC and the button drive module. The user designs the e-stim command list in the computer, and then burn the e-stim command list into the EEPROM in the PLC. The PLC controls the button drive module to realize automatic control of the e-stim device.
    For PLC chip, the STC15W408AS(STC MCU Limited) is used. We use serial port to communicate with the computer. The e-stim command list is burn into the EEPROM on the PLC chip. When the electro play is started, the PLC reads the command list from the EEPROM and controls the e-stim device via button drive module.
    The button drive module need to take over the action of hitting the buttons on e-stim device. For a considerable number of e-stim device, this button is a switch. When pressed or released, the corresponding node in the circuit is switched on and off. This behavior is very similar to the on/off status of a relay, so we use relay to take over the action of hitting the button. We connect the two ends of the switch to the normally-open contacts of the relay. When the relay coil is energized, it is equivalent to pressing the button of the e-stim device; when the relay coil is de-energized, it is equivalent to releasing the button. If the relay coil is energized first and then de-energized, it is equivalent to hit the button once. The relay is driven by triode, as shown in Figure 1. In the figure, the PLC_IO port is connected to the IO port of the PLC, and the normally-open contacts 1, 3 of the relay K are connected to the two ends of the corresponding switch of the buttons on e-stim device.

Figure 1 Button drive module
2. Design of software system
    The PLC needs to read the command list and control the button drive module. Therefore, it is necessary to encode the action of the e-stim device, which is the main consideration in the design of the software system.
    For the e-stim device, there are mainly five buttons to be controlled: the on/off button, used to turn on or off the device; the intensity increase button; the intensity decrease button; the mode switch button; the time button.
    The Modbus protocol is used to encode these actions. The encode of each action consists of 4 bytes, which are: one byte of function code, two bytes of operands, and one byte of checksum. The specific encode is shown in Table 1.

    The [c] in Table 1 represents the checksum, which is calculated as the sum of the first three bytes. For example, for an instruction that adds 1 to the shock intensity, the code is 02 01 00 03.
    Many e-stim device are automatically turned off when the button has not been hit for a certain period of time, however, this function needs to be disabled in the robot. Therefore, the PLC needs to control to hit the time button at regular intervals to prevent the e-stim device from automatically turning off.
3. DIY process
    The DIY process includes making for control module and setting up the outlet for e-stim device, as shown in Figure 2. First, make the PCB(Figure 2 a) using the PCB layout in appendix a. Then, weld the electronic components described in appendix b on PCB. After that, burn the program (appendix c) into PLC and burn the EEPROM file (which contains the command list) (appendix d) into EEPROM. Then we get the control module(Figure 2 b). Meanwhile, open the e-stim device (Figure 2 c) and find the weld point for the five button. Then, weld wires for each button (Figure 2 d), and making an outlet on the e-stim device(Figure 2 e). Finally, link the control module and the e-stim device and the e-stim robot is made(Figure 2 f).

Figure 2 DIY process for e-stim robot
    For safety, the output of the e-stim device should not be connected to the area above the waist. It should not be connected to the nipple or close to the heart.

Appendix:
A. The PCB layout
https://drive.google.com/open?id=13N_UoxoE8Tej47JBgo7u_gOb4rvep9IY
B. The electronic components list
PLC: STC15W408AS (STC MCU Limited)
Relay: G5V-1-5VDC, G5V-2-H1-5VDC (OMRON)
Audion: S9013https://drive.google.com/open?id=1b83SP7gyC6SSFQOFz8BmtK21hRa6jPWR
Resistor: 1K
C. The program burn into PLC
https://drive.google.com/open?id=1u78atIgUqkZtCXA9vOTS4oIdUvS2vWag
D. The command list data burn into EEPROM
https://drive.google.com/open?id=1SpjjDb3mopEM1sAyk78q6jzZX6kLe0vy
E. The example video
https://drive.google.com/open?id=1N8r6c3ZM5xb10jqBGTqWzcODXPHFvXdw

评论

此博客中的热门博文

SM电击器的电击强度比较

SM电击机器人的研发

SM电击器电路原理分析