Wireless intelligent control system based on MSP430 and CC3000

With the development of technology and the popularity of Internet technology, as well as the popularity of smart phones, mobile Internet technology is entering the lives of people with lightning speed. In the era of mobile Internet, smart phones are the main application platform. In the home environment, the smart phone can be used as a control terminal to control every smart home appliance in the home. This paper starts with a specific application example, and describes in detail the whole process of Android smartphone controlling DC motor through Wi-Fi, which has high reference value.

1 system structure and overall design

The structural block diagram of this system is shown in Figure 1. The system is divided into five parts: wireless router, smart phone, CC3000 Wi-Fi module, MSP430 single-chip circuit and DC motor drive circuit. First, the smartphone connects Wi-Fi to the wireless router; then opens the SmartConfig app in the smartphone and configures the CC3000 Wi-Fi module so that the CC3000 can connect to the wireless router; then open the motor control APP, build the smartphone and CC3000 Wi-Fi module connection. Among them, the CC3000 Wi-Fi module and the MSP430 MCU communicate via the SPI bus. Finally, the motor can be wirelessly controlled via the motor control APP in the smartphone.

A.jpg

2 hardware design

2.1 CC3000 Wi-Fi Module

The wireless communication part of the system uses TI's Simple Link CC3000 Wi-Fi, a self-contained wireless solution that greatly simplifies the implementation of Internet connectivity. And it provides a simplified Wi-Fi connection for microcontroller-based (MCU)-based systems, with the MSP430 and TIva C-Series MCU LaunchPad evaluation kits for a variety of MCU-based home automation, health fitness, and machine-to-machine ( M2M) Application Quick Start Development. The Simple Link CC3000 Wi-Fi solution is provided in modules, as shown in Figure 2.

B.jpg

It reduces product development time, reduces manufacturing costs, saves board space, simplifies certification, and reduces RF expertise. Connection to a low-memory microcontroller is achieved by fully integrating the software on the CC3000.

The main features of Simple Link CC3000 Wi-Fi are:

1 The wireless network processor uses the IEEE 802.11b/g (2.4 GHz) standard to embed the IPv4 TCP/IP protocol stack.

2 has good RF performance, transmission power is +20 dBm, 11Mbps (CCK); receiving sensitivity is -89 dBm, 11 Mbps (CCK).

3 Easily matched with low memory capacity, low cost and low power microcontroller systems.

4 Built-in antenna reference design certified by FCC, IC, CE and TELEC.

5 integrated crystal and power management module.

6 small packages measuring 16.3 mm & TImes; 13.5 mm & TImes; 2 mm.

7 working temperature is -20 ~ 70 °C.

8 intelligent configuration technology: You can configure Simple Link CC3000 Wi-Fi with a smartphone, tablet or PC.

9 Verified Wi-Fi Interoperability: Based on TI's seventh generation of proven Wi-Fi solutions.

10 Provides a complete platform for the program, including user manuals, migration guides, API guides, sample applications, and support communities.

The CC3000 specifications are listed in Table 1.

C.jpg

2.2 MSP430 microcontroller

MSP430 MCU is an ultra-low power type 16-bit MCU produced by TI. It uses RISC core structure and supports C language programming. At the same time, this series of microcontrollers integrates a large number of peripheral modules (such as LCD drivers, watchdogs, A/D converters, hardware multipliers, analog comparators, etc.) into the chip, which is especially suitable for designing system-on-chip. It is connected to the CC3000 Wi-Fi module through the SPI bus. The specific connection is shown in Figure 3. The MSP430 MCU can be used to configure the connection parameters of the CC3000 Wi-Fi module through the SPI bus, and can also communicate with other Wi-Fi devices.

D.jpg

2.3 DC motor drive circuit

The L298N is used to drive the DC motor. It is a high-voltage, high-current motor driver chip produced by ST. The main features of the chip are: high operating voltage, maximum working voltage up to 46 V; large output current, instantaneous peak current up to 3 A, continuous operating current of 2 A; high voltage and high current with two H-bridges Bridge driver, which can be used to drive inductive loads such as DC motors and stepper motors, relays, coils, etc.; standard TTL logic level signal control; with two enable control terminals, allowing or not being affected by input signals The device is disabled; there is a logic power input that allows the internal logic circuit to operate at low voltage; an external sense resistor can be used to feed back the change to the control circuit.

E.jpg

The DC motor drive circuit is shown in Figure 4. The speed of the DC motor is adjusted by the PWM waveform of the P3.0 output of the single-chip microcomputer, and the rotation direction of the DC motor is controlled by the difference between the high and low levels of the P3.1 and P3.2 pins.

3 software design

3.1 MSP430 microcontroller program design

MSP430 MCU mainly completes two functions: one is to communicate with CC3000; the other is to control DC motor, the former is the difficulty of this program design.

The main program flow chart of the microcontroller is shown in Figure 5. Use the CC3000 as a server and wait for the smartphone to connect. The MCU first initializes the I/O port and configures some registers. Then it determines whether the CC3000 needs to be Smart Config. If it is not needed, it determines whether it is connected to a wireless router. After the CC3000 is connected to the router, it will get an IP address. Then CC3000 sends the broadcast and initializes CC3000 to Server mode, waiting for Clie nt connection. When the smartphone receives the broadcast and connects to the CC3000, it can control the DC motor through the smartphone.

F.jpg

3.2 Android application design

The APP is divided into two parts: SmartConfig and Motor Control. The SmartConfig program of this system directly uses the APP program provided by TI's official website, and no programming is required here. When the CC3000 is used for the first time or when changing to a network environment, you need to perform SmartConfig on the instrument and write the current network information into the CC3000. The instrument will automatically connect to the network when it is used again next time.

The motor control program interface is shown in Figure 6. The program mainly implements the connection of the CC3000 Wi-Fi module to the smartphone and controls the forward, reverse, stop and speed of the motor. The three Button components in the interface are used to control the forward, reverse, and stop of the motor. By sliding the SeekBar component, you can adjust the speed of the motor and display the speed above the component. The bottom Spinner component is used to display the connected device and will be displayed here when connected to the CC3000.

G.jpg

Conclusion

This paper adopts MSP430 MCU as the core of the control terminal, communicates with CC3000 Wi-Fi module through SPI bus, enables the smart phone and MSP430 MCU to indirectly perform data interaction, so as to achieve the purpose of remote control of MCU and its peripheral devices. After testing, the smartphone and CC3000 can be connected stably, and the motor control APP can be used to control the forward, reverse, stop and adjust the speed of the DC motor. The system has achieved the expected design goals and has high practical value.

DMX Controller

MA Black Horse DMX Controller lighting console


Technical Parameter
1.Intel core 3 generation processor Inter(R) core (TM) i5-3380M CPU
2. 120 GB solid state disk, 8 GB memory, corn I5 motherboard
3.standard 6 DMX output ports and MIDI interfaces, 3072 DMX channels
4. Built-in two 19-inch high-definition touch screens

5.21 program playback putter, 42 program storage function keys
6. 1 main control dimming wheel, 4 attribute coding wheel
7. 1 mian control putter, 2 AB putter
8 Hydraulic screen Angle adjustment support structure
9.size: 82*680*130mm, G, weight: about 56KG with flycase


Our company have 13 years experience of LED Display and Stage Lights , our company mainly produce Indoor Rental LED Display, Outdoor Rental LED Display, Transparent LED Display,Indoor Fixed Indoor LED Display, Outdoor Fixed LED Display, Poster LED Display , Dance LED Display ... In additional, we also produce stage lights, such as beam lights Series, moving head lights Series, LED Par Light Series and

Controller Series,DMX Controller,Console,DMX Console

Guangzhou Chengwen Photoelectric Technology co.,ltd , https://www.cwledpanel.com