CN108388303A - A kind of variable frequency square-wave generator - Google Patents

A kind of variable frequency square-wave generator Download PDF

Info

Publication number
CN108388303A
CN108388303A CN201810172864.XA CN201810172864A CN108388303A CN 108388303 A CN108388303 A CN 108388303A CN 201810172864 A CN201810172864 A CN 201810172864A CN 108388303 A CN108388303 A CN 108388303A
Authority
CN
China
Prior art keywords
square wave
resistance
microcontroller
power supplys
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201810172864.XA
Other languages
Chinese (zh)
Inventor
张秀兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Green State Instrument & Instrument Co Ltd
Original Assignee
Ningbo Green State Instrument & Instrument Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Green State Instrument & Instrument Co Ltd filed Critical Ningbo Green State Instrument & Instrument Co Ltd
Priority to CN201810172864.XA priority Critical patent/CN108388303A/en
Publication of CN108388303A publication Critical patent/CN108388303A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/022Waveform generators, i.e. devices for generating periodical functions of time, e.g. direct digital synthesizers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Voltage And Current In General (AREA)

Abstract

The present invention discloses a kind of variable frequency square-wave generator, belongs to instrument field.Including microcontroller, digital regulation resistance, square wave generation circuit, display circuit and keyboard circuit;It is characterized in that:Square wave generation circuit generates square wave, and the frequency of square wave is adjusted by the resistance value that digital regulation resistance exports, and the resistance value of digital regulation resistance output is controlled by microcontroller;And the output of square wave generation circuit is connect with microcontroller, forms closed loop feedback control, microcontroller is controlled the output valve of digital regulation resistance by feedback signal, makes the frequency stabilization of square wave;Display circuit and keyboard circuit therein connect to show square wave frequency value and setting square wave frequency value with microcontroller.The present invention is replaced adjusting potentiometer for changing the common manual of square wave frequency with digital regulation resistance, so as to control the resistance value of digital regulation resistance by microcontroller, to realize the automatic function of changing square wave frequency.

Description

A kind of variable frequency square-wave generator
Technical field
A kind of variable frequency square-wave generator, belongs to instrument field, in various instrument and meters and control unit.
Background technology
Current instrument and meter or some control units mostly use microcontroller core in order to control, are produced with microcontroller itself Raw variable frequency square-wave is possible, but is easy to bring unnecessary work load to microcontroller itself, this is to use one at present A microcontroller core and needs to generate the problems of variable frequency square-wave in order to control;Electric type student electronics skill in university Art Experiment Training equipment and single chip computer experiment training equipment are mutual indepedent, and Experiment Training resource is not combined together organically, Experimental resources utilization rate is low, is a kind of wasting of resources, the knowledge of student's study is also without effectively, continuously, synthetically obtaining Consolidate and applies.
Invention content
The present invention proposes a kind of square-wave generator for using digital regulation resistance as the adjusting potentiometer for changing square wave frequency, uses Microcontroller controls the resistance value of digital regulation resistance, can change and stablize the frequency of square wave automatically in real time, mitigates with a monolithic Machine is the work load of the instrument and meter of core or the microcontroller of control unit.
This invention takes following technical solutions:A kind of variable frequency square-wave generator, including microcontroller, digital current potential Device, square wave generation circuit, display circuit and keyboard circuit, wherein square wave generation circuit generates square wave, and the frequency of square wave is by number The resistance value of potentiometer output is adjusted, and the resistance value of digital regulation resistance output is controlled by microcontroller;And the output of square wave generation circuit with Microcontroller connects, and forms closed loop feedback control, and microcontroller is controlled the output valve of digital regulation resistance by feedback signal, makes square wave Frequency stabilization;Display circuit and keyboard circuit connect to show square wave frequency value and setting square wave frequency value with microcontroller.
The microcontroller uses the chip of model 89C52, and the digital regulation resistance is using model MAX5401's Chip, side's wave generation circuit are made of operational amplifier, and operational amplifier uses the chip of model LM324, described In closed loop feedback, diode D1, D2 and microcontroller that the output of square wave generation circuit is connected by dual serial are connected;Respectively The connection of device is:6,7,8 feet of 89C52 are separately connected 5,4,3 feet of MAX5401, and 20 feet of 89C52 connect Connect the ground of+5V power supplys, the 40 foot connection+5V power supplys of 89C52, the moon of the 5 feet connection diode D1 of 89C52 The anode of pole, diode D1 is connect with the cathode of diode D2,7,8 feet of MAX5401 link together and with two poles The anode of pipe D2 connects, the 6 foot connection+5V power supplys of MAX5401, the 2 foot connection+5V power supplys of MAX5401 Ground, one end of the 1 foot connection resistance R1 of MAX5401, one end of the other end connection capacitance C of resistance R1 and 2 feet of LM324, the ground of the other end connection+5V power supplys of capacitance C, the 4 foot connection+12V power supplys of LM324, The 11 foot connection -12V power supplys of LM324, the 3 feet connection resistance R2 of LM324, one end of resistance R3, resistance R2 Other end connection+5V power supplys ground, the other end connection resistance R4 of resistance R3, the one of bi-directional voltage stabilizing diode VZ End, while also being connect with the anode of diode D2, the other end of the 1 foot connection resistance R4 of LM324, bi-directional voltage stabilizing two The ground of the other end connection+5V power supplys of pole pipe VZ, the ground of+5V power supplys is also the ground of ± 12V power supplys.
Effect of the invention is that:Microcontroller controls to adjust the resistance value of digital regulation resistance, and electricity occurs to adjust square wave The frequency for the square wave that road generates, so as to realize the automatic function of changing square wave frequency by programming.And it is reliable adjustment square wave Frequency, a port that the output of square wave generation circuit is connected to microcontroller form closed-loop control, realize square wave frequency oneself Dynamic stability.
Description of the drawings
The block diagram of Fig. 1 variable frequency square-wave generators.
One embodiment circuit diagram of Fig. 2 variable frequency square-wave generators.
Specific implementation mode
Below in conjunction with the accompanying drawings 1, the present invention is described in detail by Fig. 2, the circuit block diagram of variable frequency square-wave generator As shown in Fig. 1, the circuit diagram of one embodiment of circuit occurs for variable frequency square-wave as shown in Fig. 2.It is single in Fig. 1 Piece machine connects digital regulation resistance, and microcontroller is with serial communication mode to digital regulation resistance transmission data, and digital regulation resistance is according to must To transmission data the potentiometer of its inside is adjusted;Digital regulation resistance connection side's wave generation circuit refers to digital current potential Three external connection ends of the potentiometer of its internal adjustable are connected in circuit and square-wave by device;Square wave generation circuit is according to digital electricity The resistance value that position device provides generates the square wave of corresponding frequencies;Microcontroller passes through the connection with square wave generation circuit square wave output end Come obtain square wave occur circuit output square wave frequency, the purpose is to for monitor square wave frequency whether reach control require, side Whether wave generation circuit has square wave output, forms closed-loop control.
In Fig. 2, microcontroller uses chip model for MCS-89C52, digital regulation resistance use chip model for MAX5401, the operational amplifier in square wave generation circuit use chip model for LM324;LM324 is used as hysteresis loop comparator, 1,7,8 feet of MAX5401 constitute the negative-feedback circuit of LM324 with resistance R1, capacitance C, and resistance R2, R3 are constituted The positive-feedback circuit of LM324, resistance R4 are current-limiting resistances, and bi-directional voltage stabilizing diode VZ makes the amplitude of output voltage be limited System is that the voltage of output+6V is dropped to+4.6V in ± 6V, diode D1, D2, so that monolithic function reciever wave exports The voltage value of circuit output.Specifically connection is as follows for circuit:6,7,8 feet of 89C52 are separately connected 5,4, the 3 of MAX5401 Foot, the ground of the 20 foot connection+5V power supplys of 89C52, the 40 foot connection+5V power supplys of 89C52,5 feet of 89C52 The cathode of diode D1 is connected, the anode of diode D1 is connect with the cathode of diode D2,7,8 feet of MAX5401 It links together and is connect with the anode of diode D2, the 6 foot connection+5V power supplys of MAX5401, the 2 of MAX5401 The ground of foot connection+5V power supplys, one end of the 1 foot connection resistance R1 of MAX5401, the other end connection electricity of resistance R1 Hold 2 feet of one end and LM324 of C, 4 feet on the ground of the other end connection+5V power supplys of capacitance C, LM324 connect + 12V power supplys, the 11 foot connection -12V power supplys of LM324 are connect, 3 feet of LM324 connect one end of R2, R3, R2's The ground of other end connection+5V power supplys, the other end connection resistance R4 of resistance R3, one end of bi-directional voltage stabilizing diode VZ, It is also connect simultaneously with the anode of diode D2, the other end of the 1 foot connection resistance R4 of LM324, bi-directional voltage stabilizing diode The ground of the other end connection+5V power supplys of VZ, the ground of+5V power supplys is also the ground of ± 12V power supplys.
Specific working mode is as follows:As shown in Fig. 2,3 feet of MAX5401 are chip selection signal end (low effective), For 89C52 to before MAX5401 serially-transmitted datas, 89C52 exports low level by its 8 foot makes the 3 of MAX5401 Foot is low level, and 4 feet of MAX5401 are serial data inputs, and 5 feet of MAX5401 are clock (CLOCK) inputs End.89C52 is stored with the program woven.Desired square wave frequency can be keyed in by keyboard, display portion can show key entry Frequency, 89C52 is according to the frequency of key entry, and calculating the series that MAX5401 should be in, (MAX5401 is to its 100K Ω Resistance is divided into 256 grades), then 4 foot serial transmissions of the 89C52 by its 7 foot to MAX5401 count accordingly According to (concrete operations mode can refer to the operation instructions of MAX5401), MAX5401 adjusts its electricity according to obtained data The sliding end of position device, square wave generation circuit generate the square wave of corresponding frequencies according to the resistance value of MAX5401.Pass through 89C52 5 feet and diode D1, D2, the square-wave feedback of circuit output is occurred into for square wave to 89C52,89C52 is according to the frequency of detection Rate can be finely adjusted to calculating the series that MAX5401 should be in.Square wave generation circuit in the present invention is typical circuit, Its working principle is that routine techniques.

Claims (2)

1. a kind of variable frequency square-wave generator, including microcontroller, digital regulation resistance, square wave generation circuit, display circuit and key Disk circuit;It is characterized in that:Square wave generation circuit generates square wave, the resistance value tune that the frequency of square wave is exported by digital regulation resistance The resistance value of section, digital regulation resistance output is controlled by microcontroller;And the output of square wave generation circuit is connect with microcontroller, formation is closed Ring feedback control, microcontroller are controlled the output valve of digital regulation resistance by feedback signal, make the frequency stabilization of square wave;It is therein Display circuit and keyboard circuit connect to show square wave frequency value and setting square wave frequency value with microcontroller.
2. according to a kind of variable frequency square-wave generator described in claim 1, it is characterised in that:The microcontroller uses The chip of model 89C52, the digital regulation resistance use the chip of model MAX5401, side's wave generation circuit It is made of operational amplifier, operational amplifier uses the chip of model LM324, and in the closed loop feedback, electricity occurs for square wave Diode D1, D2 and microcontroller that the output on road is connected by dual serial are connected;The connection of each device is:89C52's 6,7,8 feet are separately connected 5,4,3 feet of MAX5401, the ground of the 20 foot connection+5V power supplys of 89C52,89C52's 40 foot connection+5V power supplys, the cathode of the 5 feet connection diode D1 of 89C52, the anode and diode of diode D1 The cathode of D2 connects, and 7,8 feet of MAX5401 link together and connect with the anode of diode D2, MAX5401's 6 foot connection+5V power supplys, the ground of the 2 foot connection+5V power supplys of MAX5401, the 1 foot connection resistance R1 of MAX5401 One end, 2 feet of one end and LM324 of the other end connection capacitance C of resistance R1, the other end connection of capacitance C The ground of+5V power supplys, the 4 foot connection+12V power supplys of LM324, the 11 foot connection -12V power supplys of LM324, LM324 3 feet connection resistance R2, resistance R3 one end, the ground of the other end connection+5V power supplys of resistance R2, resistance R3 Other end connection resistance R4, bi-directional voltage stabilizing diode VZ one end, while also being connect with the anode of diode D2, The other end of the 1 foot connection resistance R4 of LM324, the other end connection+5V power supplys of bi-directional voltage stabilizing diode VZ Ground, the ground of+5V power supplys are also the ground of ± 12V power supplys.
CN201810172864.XA 2018-03-01 2018-03-01 A kind of variable frequency square-wave generator Withdrawn CN108388303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810172864.XA CN108388303A (en) 2018-03-01 2018-03-01 A kind of variable frequency square-wave generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810172864.XA CN108388303A (en) 2018-03-01 2018-03-01 A kind of variable frequency square-wave generator

Publications (1)

Publication Number Publication Date
CN108388303A true CN108388303A (en) 2018-08-10

Family

ID=63070173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810172864.XA Withdrawn CN108388303A (en) 2018-03-01 2018-03-01 A kind of variable frequency square-wave generator

Country Status (1)

Country Link
CN (1) CN108388303A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707495A (en) * 2023-07-12 2023-09-05 湖南师范大学 Frequency and amplitude adjustable triangular wave generating circuit based on memristor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707495A (en) * 2023-07-12 2023-09-05 湖南师范大学 Frequency and amplitude adjustable triangular wave generating circuit based on memristor
CN116707495B (en) * 2023-07-12 2024-03-26 湖南师范大学 Frequency and amplitude adjustable triangular wave generating circuit based on memristor

Similar Documents

Publication Publication Date Title
CN104426195B (en) The charge control method and charger of baby battery capacity batteries bar
CN104300555B (en) A kind of method suppressing power system Low Frequency Oscillation of Resonance Mechanism
CN105977996B (en) Control System for SVG based on DSP and control method
CN103414345B (en) A kind of negative high voltage direct current integrated power supply for X-ray tube and control method thereof
CN101866155B (en) Variable frequency square-wave generator
CN108388303A (en) A kind of variable frequency square-wave generator
CN108206529A (en) A kind of method for inhibiting low-frequency oscillation of electric power system
CN108365636A (en) A kind of virtual synchronous generator control method
CN109149607A (en) A kind of three-phase imbalance compensation control system and control method
CN101867366B (en) Triangular wave generator with variable frequency and amplitude
CN101997523A (en) Window voltage comparator circuit capable of adjusting up limit voltage and low limit voltage automatically
CN1913320B (en) Digital controlled inversion power supply and its control method
CN109839524A (en) Voltage dip generator and voltage dip control system
CN205029558U (en) Power voltage stabilizing circuit
WO2018120908A1 (en) Wireless voltage-stabilizing and current-limiting circuit for exercise bicycle that can generate electricity
CN203645539U (en) Positive and negative voltage generation circuit
CN102332891A (en) Crystal oscillator circuit capable of modulating frequency
CN107147127B (en) An a kind of pressure regulation method of wind power generating set distributing access
CN204515580U (en) A kind of Intelligent power source based on converter regulation output voltage
CN205911757U (en) Photovoltaic cell organizes power supply system
CN207096736U (en) A kind of voltage-controlled potentiometer regulator control system
CN205754094U (en) A kind of intelligent digital excitation control system
CN203617906U (en) Single-node battery simulation circuit used for three-string balance charger detection
CN209593470U (en) Wireless router
CN202353526U (en) Simple frequency modulation device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20180810

WW01 Invention patent application withdrawn after publication