Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430

Foreword

Recently, I have adjusted a circuit that controls the motor and measures the speed of the MSP430 microcontroller. The entire circuit was designed and debugged successfully. It took nearly four days, and there were a lot of bugs in the middle, but in the end it was solved.

Not much nonsense, go directly to the topic, first talk about my system. Figure 1 below is the main control part of MSP430. The chip used is MSP430G2553 MCU (11 and 12 pins are reversed). The first one is Pro Download interface. As the name implies, it is the program download port. I use the launchPad of MSP430G series. The development board is connected to the board I designed. I can use the launchPad to download the program through these interfaces. In order to facilitate the wiring, I have disrupted the order of these interfaces. The PWM1 and PWM2 interfaces are two interfaces connected to the H-bridge. Here, the timer A1 of the G2553 is used to generate the PWM. CAP_P12 is a capture interface that is connected to the MCU after the photoelectric pair is connected to the MCU. Because the capture interface of the timer A0 can be used here, the capture function of the timer can be used to make the program design simpler. The entire system utilizes two timers, combined with interrupts, so that the entire system is in a sleep state, power consumption can be made relatively low (but due to the existence of the motor and 12864, the low-power programming here is meaningless. . . . There is also a 12864 serial external interface (SPI) three wires.

Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430
Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430

Then put a picture of three-line control 13864. Since the MSP430x2xx series is a 3.3V device, a 245 chip is used here to convert the level voltage (the order of CS and SCLK is reversed, and later changed when wiring). Beginners often encounter a problem, that is why my 12864 sliding rheostat is adjusted, and the brightness of 12864 is unchanged. I will only mention one point here: pay attention to the level of your reset pin.

Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430

The H-bridge circuit is too common, and Baidu has come out to catch a lot.

Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430

As for the principle of the H-bridge, I will not say more here. Do not understand Baidu, actually learned the triode, a little calm to analyze one, you can understand. The following is a comparator circuit, using the photoelectric to the tube to emit a signal, after the black line reflects a certain voltage value on the PHOTO, when the circuit is measured, the input voltage of the LM358 is as high as 0.6V (haha, in fact, not high... ), the LM358 on the right constitutes a comparator, VCC is 5V voltage, after the 10K and 50 ohm resistors are divided, the voltage of pin 2 of LM358 is about 0.5V<0.6V, which satisfies the circuit design requirements. After adding a 1K resistor to protect the latter level of the microcontroller (haha, this resistor is convenient for the filter behind me) Let's talk about the problem.

Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430
Design and Debugging of Control Motor Speed ​​Measurement System Based on MSP430

LED Module Outdoor Full Color P3 Module Outdoor Led Display Module using the latest generation technology, 111111dots per square meter. P3 Module Outdoor Full Color has long span life time 10000hours. Picture true nature of Outdoor P3 Led Display Module is one good choice when compare Outdoor Full Color Led Display Module. We sincerely invite customers all over the world visit us for long term cooperation.

P3 Module Outdoor

P3 Module Outdoor,Led Display Module Rgb,Outdoor Led Display Module,Outdoor Led Module

Shenzhen Jongsun Electronic Technology Co., Ltd. , https://www.jongsunled.com

Posted on