Detailed explanation of intelligent robot infrared transmitting and receiving circuit
Source: InternetPublisher:难得正经 Keywords: Power supply other power circuits Updated: 2020/06/17
The mobile music robot is based on Infineon's 16-bit microcontroller XE162FN processor. The 16/32-bit microcontroller developed by Infineon has a high degree of system integration, does not require additional peripheral devices and related software overhead, and provides system security and fault protection. mechanism and other functions. Bluetooth is a global open, low-cost wireless communication specification. In addition, because Bluetooth has the advantages of long transmission distance, strong anti-interference ability, low power consumption, and high transmission rate, the design adopts Bluetooth wireless communication technology. The main body of the design is a wheeled mobile car robot, which has the functions of walking with the owner, playing music, It has multiple functions such as remote control operation, colorful lights flashing with clapping frequency, and home security. The robot moves by driving a DC motor to drive the wheels to rotate. The function of following the owner uses infrared emission and reception to determine the position between the handheld device in the owner's hand and the mobile music robot, and then drives the robot to follow the owner.
Wireless remote control operation is realized by Bluetooth communication. In terms of security functions, the mobile music robot is equipped with a typical smoke sensor for detecting fires. If smoke or gas leakage is detected, a local sound alarm and an alarm text message are sent to the designated location through the GSM wireless network control text message sending module. phone number. The GSM network is a wireless digital network standard developed on the basis of the cellular system. It has large network capacity, complete business types, strong signal stability, high confidentiality and security, flexible handover processing and automatic Roaming capabilities and many other advantages. The design of the handheld device is equipped with a 320*240 touch screen to realize intuitive and convenient button-less remote control, and an acceleration sensor to sense the tilt angle to control the robot movement.
receiving circuit
The system's intelligent following function is implemented through infrared. When the infrared receiver on the music robot senses infrared rays, it will track the infrared emission source. If it cannot sense it, it will rotate in place and search for the infrared emission source again until it reorients its direction. The infrared emission source is composed of 10 infrared emission tubes. The 10 infrared emission tubes are evenly placed on the surface of a sphere, so that the infrared emission source can radiate infrared rays in all directions, ensuring that the music robot can find the infrared emission source more quickly and accurately. The infrared transmitting tube emits a square wave with a carrier frequency of 38 kHz and a duty cycle of 50%. The infrared transmitting and receiving circuit is shown in Figure 1. 10.0 is connected to an ordinary I/O pin to control the on and off of the infrared ray, that is, on for 4 ms, then off for 11 ms, and on and off repeatedly. Connect a PWM square wave, the frequency of the square wave is 38 kHz. There are 10 infrared emission tubes in total.
The infrared receiving device uses two infrared receivers 1838, which are installed on the head and tail of the music robot respectively. The output pins of the two receivers are connected to pins 10.2 and 10.7 of the microcontroller respectively. The infrared receiver 1838 is sensitive to infrared rays with a frequency of 38 kHz, so the infrared receiver 1838 can detect the orientation of the infrared emission source and thereby drive the motor in the direction of the external emission source.
Figure 1 Intelligent following infrared sending and receiving circuit
Clapping signal capture circuit design
The implementation of the clapping lantern function is mainly divided into capturing the clapping signal and rotating and lighting the lantern. Rotating and lighting the lantern is relatively simple, but the signal generated by clapping is not a standard step signal when capturing the clapping signal. When using an oscilloscope When observing the waveform, there are actually many burrs on the rising and falling edges of the waveform, which means that one clap signal generates multiple step signals. If the microcontroller records the time interval between two rising edges, due to the existence of burrs, the microcontroller mistakenly captures the burrs as rising edges, causing the time interval between two rising edges to become shorter. The solution is to use an envelope detection circuit to perform envelope detection, and then select an appropriate comparison voltage value through a voltage comparator to generate a more ideal step signal, that is, one clap generates a step signal.
The circuit uses a microphone to collect sound signals, and then uses LM324 ($0.0900) to amplify the collected signal. The amplification ratio is 100 times, and then connects two 1N5819 ($0.0365) and a 104 monolithic capacitor for envelope detection. Finally, LM358 ($0.0737) is used as a voltage comparator, and a 1 K resistor and an 880Ω resistor are used to divide the voltage to obtain the comparison voltage value. The circuit is shown in Figure 2. The robot moves by driving a DC motor to drive the wheels to rotate, that is, controlling the forward and reverse rotation and speed of the DC motor. The system's DC motor driver chip uses SGS's L298N ($2.1300), which has a 4-channel logic drive circuit inside. Using transistors to form an H-shaped balanced bridge has large driving power and strong driving ability. At the same time, the H-type PWM circuit works in the saturation state and cut-off state of the transistor, and has very high efficiency.
Figure 2 Clapping signal capture circuit
DC motor drive circuit design
The speed of the motor depends on 3 factors: load, voltage and current. For a given load, the motor can be maintained at a stable speed through pulse width modulation. By changing the pulse width applied to a DC motor, the speed of the motor can be increased or decreased. Adjust the pulse width, that is, change the duty cycle, and adjust the speed of the motor. The driver board uses 6 high-speed optocouplers 6N137 ($0.2160) to isolate the driver circuit and the logic circuit, which can effectively avoid mutual interference between the driver circuit and the logic circuit. The circuit schematic diagram of the driver board is shown in Figure 3.
Figure 3 DC motor drive circuit
The duty cycle of the two PWM pulse signals of the microcontroller can be freely changed through software programming. The A terminal of the motor is connected to the PWM pulse signal, and the B terminal of the motor is connected to an I/O pin of the microcontroller. When this I/O pin is set to 1, the current flows from the B end of the motor to the A end of the motor; when this I/O pin is set to 0, the current flows from the A end of the motor to the B end of the motor, so that the motor can Changing the direction of motor rotation and controlling the duty cycle value of the PWM pulse signal can also change the motor rotation speed to achieve steering and speed control.
- Lithium battery overcharge, over discharge, short circuit protection circuit design
- Step-down power supply for driving relays
- What kind of circuit is a voltage regulator circuit?
- The constant current source composed of two transistors can drive high power
- Parallel DC regulated power supply circuit diagram
- A small and easy-to-make fast charger
- 0.7~24V continuously adjustable current limiting power supply
- Self-made high-stability, high-current, DC adjustable voltage-stabilized power supply using operational amplifier
- Simple battery charging protection circuit
- RF2131 optimal efficiency power amplifier circuit when powered by 4.8V power supply
- Analysis of various forms of packaging structures of LED light-emitting diodes
- Design of data transmission interface circuit for a car driving recorder
- Unit circuit of voltage and current control loop
- About the internal 5G28 circuit diagram of the integrated operational amplifier
- A brief discussion on the drawing skills of electrical control circuit diagrams
- Those classic analog circuits worth collecting
- ×100L161 operational amplifier
- mini stereo amplifier
- volumeter
- Underwater microphone circuit