Control design of the control subsystem of the hot

  • Detail

Snake robot control subsystem (control design)

1 touch induction adjustment circuit

Figure 5 shows the basic schematic diagram of touch induction circuit, S2, S3, S4, S5 are touch switches, port port port is connected to the external trigger input port of MCU, different switches are touched, then the corresponding interrupt function in the program is triggered, and the robot automatically adjusts and responds to different actions to bypass obstacles

during the execution of the program, if it is detected that the input level of the port port has changed, and the changed level can be maintained stably for a period of time, confirm that the switch is touched, call the interrupt function, and the interrupt is represented by Newton (n). The function controls the motor to produce the corresponding action, and automatically cancels through the delay function. The maximum torque, torsional strength, upper yield strength and lower yield strength of the automatic obstacle crossing work can be achieved. After the action responds for a certain time, call back the main function, and successfully realize the

2 control program design

step L: in the main 0 function, carry out timer T2 interrupt initialization and INT0 interrupt initialization; The while 0 cycle waits for the external infrared signal input to trigger the interrupt, while the timer T2 overflow interrupt

step2: work R_ Work n () is an external interrupt o function, which receives the external infrared signal input by p3.2. The received external signals are stored in the array ircom[]. The signals are identified by checkl0 and the control command ID L is updated

step 3: overflow after the timer T2 count is full, enter the interrupt function timer2 (). First call checkl 0 to get the value of the current L, and different L corresponds to different action responses; Secondly, speedchange (x, y) is called to adjust the 'narrow ratio' to realize PWM speed regulation, while the functions forward() and backward 0 are nested in SP eedchange 0 to realize forward and reverse, and the functions turnleft 0 and turnright 0 are used to realize left turn and right turn respectively

step4: timer T2 continues to interrupt, so that the equipment will not be damaged. Capture the l-taking finger to respond. When there is a new external infrared signal input, jump to step 2 to continue. The control flow chart is shown in Figure 6

3 main parameters of the system

lifting motor torque:

lifting motor load speed: 12R/min

module theoretical lifting angle: 0=60

power of reduction motor: p=1.5w

speed of reduction motor: n=17500r/m in

reduction ratio of reduction motor: i=87.5

theoretical degree of straight forward or backward of module: v=0.335m several positive signals/s have appeared in the economic operation of China's extruder industry

Copyright © 2011 JIN SHI