- Home >> Technical Service >> Bluetooth
Bluetooth CNC DC Voltage Source
Design of Bluetooth NC DC Voltage Source with Chinese Voice Prompt Function
With the rapid development of science and technology, and people's demand for low power consumption and high efficiency of electrical appliances, DC voltage sources are developing towards higher flexibility and intelligence. However, the current numerically controlled DC voltage source has problems such as low adjustment accuracy, inconvenient observation of the output voltage value, and insufficient output voltage accuracy. Therefore, this paper designs a digitally controlled DC voltage source with the STC12C5A60S2 microcontroller as the core. The power supply can realize the following functions: the output voltage is adjustable from 0 to 10V, the step is 0.1V, the output current is 500mA, the output voltage value can be remotely adjusted through the Bluetooth device, and there will be a Chinese voice prompt every time the output voltage value changes.
1. The overall design of Bluetooth CNC DC voltage source
The design block diagram of this design is shown in Figure 1. The voltage source uses 12C5A60S2 single-chip microcomputer as the control chip, and the output 8-digit digital value is converted into an analog voltage value through the D/A module, and then amplified by the amplifier module. Then the current is amplified by the output drive module to increase the load capacity and then output. The output voltage value is displayed through seven-segment digital tubes. The output voltage can be adjusted by changing the output value of the single chip microcomputer. After the output voltage is sampled, it is input to the built-in A/D module of the microcontroller for sampling feedback, so as to realize closed-loop adjustment of the output voltage and ensure the accuracy of the output voltage. The power supply has also added the HC⁃05 Bluetooth module, the user can adjust the voltage value of the power supply or query the current output voltage value with the APP on the mobile phone through the Bluetooth protocol. By adding the SYN6288 voice module, the function of Chinese voice prompt is also realized.
2. Bluetooth CNC DC voltage source hardware circuit design
The circuit design of each module is described below.
2.1D/A module and amplifier module
The D/A module is composed of DAC0832 chip and LM358 operational amplifier module. The DAC0832 chip is an 8-digit/analog conversion chip. The conversion result is a differential current output. It needs to connect an LM358 at its output terminal to form an external conversion circuit to convert the current value into voltage, get the reverse voltage output. The single-chip microcomputer outputs an 8-bit digital quantity from the P0 port, which is input to the D/A module. The DAC0832 is powered by 5V voltage, and the resolution is 5256≈0.02V. Because it outputs a negative voltage, when the digital quantity increases by 1, The output of the D/A module increases by -0.02V.
The amplifying module consists of an operational amplifier LM358 and resistors R2, R3, and R4 to form a 2.5-fold inverting amplifier, which reversely amplifies the output of the D/A module by 2.5 times. Every time the voltage adjustment button is pressed, the digital quantity will increase by 2, and the output of the D/A module will increase by -0.04V. After reverse amplification by 2.5 times, the output voltage will increase by 0.1V, realizing a step of 0.1V. And because the output range required by the voltage is 0 ~ 10V, the range of digital input is 00000000 ~ 11001000, the range of DAC0832 output is 0 ~ -4V, and the resolution meets the requirements. By changing the digital output of the P0 port of the single-chip microcomputer through the keys KEY1 and KEY2, the output voltage can be adjusted from 0 to 10V.
2.2 Current amplification module
The design of the power supply has a maximum output current of 500mA, so after the signal is output from the amplifier circuit, it must pass through the current amplifier circuit to make the current reach the design standard. The output value of the amplification module is input into the current amplification module from the adjv port, and output from the UO port to obtain the final output value. The current amplification module is composed of operational amplifier LM358, high-power transistor 2SD1677, and resistors R5, R6, and R7. A high-power triode is used to form an emitter follower, powered by a 15V voltage, and the current is amplified under the condition of voltage following. In the selection of triode, since the maximum voltage of UCE is 15V, the maximum current is 500mA, and the maximum power is 7.5W, the maximum power dissipation PCM of the selected triode should be greater than 7.5W. After considering the heat dissipation factor and leaving a margin, this design selects the triode 2SD1677 with a PCM value of 100W.
2.3 Sampling module and A/D module
In order to ensure the accuracy, it is necessary to sample the output voltage value and then perform A/D conversion, and compare it with the preset value output by the microcontroller to form a closed-loop system with negative feedback. The output voltage forms a voltage divider resistor through R8 and R9, and then passes through an LM358 operational amplifier to form a voltage follower and then enters the A/D module. The A/D circuit adopts STC12C5A60S2 single-chip built-in 8-bit A/D module, the reference voltage is 5V, and compares the converted digital quantity input to the single-chip with the output preset value.
2.4 Bluetooth module and voice module
This design uses the HC⁃05 Bluetooth module to realize the Bluetooth remote control voltage function. Set the Bluetooth module to work at a baud rate of 9600b/s, and set it to work as a slave, and connect it to the serial port 1 of the microcontroller. The user can send data to the HC-05 module after connecting with a device with Bluetooth function such as a mobile phone; the HC-05 module then transmits the data to the MCU through the serial port to change the digital output of the MCU, thereby realizing Bluetooth control output voltage value.
The voice prompt function is realized through the SYN6288 voice module. The SYN6288 voice module is packaged in SMD SSOP, small in size, connected to the host computer through the serial port, and receives the text sent by the serial port to realize the conversion from text to Chinese voice. SYN6288 has a built-in push-pull DAC and a speaker interface, which can directly drive the speaker for sound broadcasting. In this design, the SYN6288 module is connected to the serial port 2 of the microcontroller. When adjusting the output voltage, the MCU transmits the adjusted voltage value in the form of a string to the SYN6288 module through the serial port, and the module transmits the Chinese voice prompt to an 8Ω, 0.5W speaker for playback.
3. Software Design of Bluetooth CNC DC Voltage Source
The software of this power supply is written in C51 language. The system initializes first, and then judges whether the Bluetooth has received the value, and if so, changes the value of outv and outputs it; if the Bluetooth does not receive it, then judges whether the button is pressed, and if the button is pressed, changes the value of outv to output. Assign the output value sample to setv, compare whether the value of setv and outv are equal, if not, adjust the value of setv and output, and then perform sampling comparison until the value of setv is equal to outv.
4. Bluetooth CNC DC voltage source system test
Install the SPP Bluetooth serial port debugging APP in the MOTOX smartphone of the Android system, and after connecting with the Bluetooth module of the power supply, use the SPP Bluetooth serial port debugging APP to adjust the value of the output voltage. Take 10 values from 0 to 10V for measurement, and use a digital multimeter VC9860+ as the measuring instrument to measure the voltage value at both ends of the load.
During the test, whenever the preset voltage value is changed, the voice module can correctly broadcast the changed voltage value. The test results show that the output of the voltage source meets the output requirements of 0-10V, the output is accurate, the output response is good, and the function of bluetooth remote control of the output voltage is realized.
epilogue
This paper introduces a design scheme of a digitally controlled DC voltage source based on the STC12C5A60S2 microcontroller. The voltage source adopts a closed-loop system with high output precision and compact structure. The value of the output voltage can be adjusted remotely through a Bluetooth device, and it has a Chinese voice prompt function. After testing, when the power supply is used to provide voltage to the load, the output response is good and the error is small, and it can be used in experimental teaching, scientific research, automatic measurement systems and other fields, and has broad application prospects.
The above is the design technology of Bluetooth CNC DC voltage source with Chinese voice prompt function introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
- TOP