Cov txheej txheem:

Cov Khoom Siv Hluav Taws Xob: 12 Cov Kauj Ruam (nrog Duab)
Cov Khoom Siv Hluav Taws Xob: 12 Cov Kauj Ruam (nrog Duab)

Video: Cov Khoom Siv Hluav Taws Xob: 12 Cov Kauj Ruam (nrog Duab)

Video: Cov Khoom Siv Hluav Taws Xob: 12 Cov Kauj Ruam (nrog Duab)
Video: Tus Cawm Seej Hloov Neeg Txoj Hmoo (HD) 2024, Hlis ntuj nqeg
Anonim
Muaj nuj nqi Generator
Muaj nuj nqi Generator
Muaj nuj nqi Generator
Muaj nuj nqi Generator

Cov lus qhia no piav qhia kev tsim qauv tsim hluav taws xob raws li Maxims's Analog integrated circuit MAX038

Lub tshuab hluav taws xob ua haujlwm yog cov cuab yeej muaj txiaj ntsig zoo rau cov khoom siv hluav taws xob. Nws xav tau rau kev kho cov kab hluav taws xob sib nqus, ntsuas cov cuab yeej siv suab thiab vis dis aus, tsim qauv lim dej sib piv thiab rau ntau lwm lub hom phiaj sib txawv.

Niaj hnub no muaj ob hom tseem ceeb ntawm cov tsim hluav taws xob ua haujlwm; digital, (DSP raws, DDS…) uas yog siv ntau dua thiab ntau dua thiab sib piv, uas yog lub hauv paus pib.

Ob hom muaj lawv qhov zoo thiab qhov tsis zoo. Cov tshuab hluav taws xob digital tuaj yeem tsim cov cim nrog cov zaus ruaj khov, tab sis lawv muaj teeb meem nrog kev tsim cov teeb liab zoo sine (dab tsi tsis muaj teeb meem rau analog ib). Tsis tas li feem ntau nthuav tawm cov tshuab tsim hluav taws xob raws li DDS txoj hauv kev tsis muaj qhov loj ntau zaus ntau.

Txij li lub sijhawm ntev kuv xav tsim lub tshuab hluav taws xob muaj txiaj ntsig zoo, uas tuaj yeem ua ke qee qhov zoo ntawm ob hom (analog thiab digital) lub tshuab hluav taws xob. Kuv txiav txim siab los ua tus qauv tsim ntawm Maxim nti MAX038*

* Nco tseg - cov nti no tsis tsim thiab muag los ntawm Maxim. Nws yog qub lawm. Nws tseem tuaj yeem nrhiav nws hauv eBay, Aliexpress thiab lwm qhov chaw rau cov khoom siv hluav taws xob.

Tseem muaj lwm cov khoom siv sib xyaw ua hluav taws xob sib nqus (XR2206 los ntawm Exar, icl8038 los ntawm Intersil), tab sis kuv muaj

muaj MAX038 muaj, thiab kuv tau siv nws. Cov lej ntawm cov tshuab ua haujlwm tau ua los ntawm ib qho Atmega328 nti. Nws cov haujlwm yog cov hauv qab no:

  • tswj kev xaiv ntau zaus
  • tswj lub teeb liab hom (sine, duab plaub, duab plaub, sawtooth)
  • ntsuas qhov dav ntawm lub teeb liab
  • ntsuas DC offset
  • ntsuas qhov zaus ntawm lub teeb liab
  • ntsuas THD ntawm sine teeb liab hauv cov suab (qhov no tseem yuav tsum tau ua)
  • qhia tag nrho cov ntaub ntawv no ntawm tus cim 16x2 LCD zaub.

Kauj Ruam 1: MAX038 Nqe lus piav qhia

MAX038 Nqe lus piav qhia
MAX038 Nqe lus piav qhia

Kuv tau txuas nrog MAX038 cov ntawv teev tseg. Nws tuaj yeem pom qhov tseem ceeb tshaj plaws nti tsis:

♦ 0.1Hz txog 20MHz Kev Ua Haujlwm Ntau Zaus

♦ Daim duab peb sab, Sawtooth, Sine, Square, thiab Pulse Waveforms

♦ Kev ywj pheej ywj pheej thiab Kev Kho Duty-Cycle

♦ 350 rau 1 Zaus Zaus Ntau Yam

♦ 15% mus rau 85% Kev Hloov Tus Cwj Pwm Caij Nyoog

♦ Low-Impedance Output Buffer: 0.1Ω

♦ Tsawg 200ppm/° C Kub Drift

Lwm qhov kev xav tau tseem ceeb yog qhov xav tau ntawm kev muab khoom siv ob (± 5V). Qhov tso tawm qhov dav tau tsau (~ 2 VP-P nrog 0 V DC offset).

Ntawm nplooj ntawv 8 ntawm daim ntawv tuaj yeem pom qhov thaiv-daim duab ntawm lub nti. Ntawm nplooj ntawv 11 tuaj yeem pom qhov yooj yim tshaj plaws hauv Circuit, uas tuaj yeem siv rau kev tsim cov teeb liab sine. Lub voj voog no tau siv los ua lub hauv paus rau kev tsim lub tshuab hluav taws xob ua haujlwm.

Kauj Ruam 2: Circuit…

Kev Circuit…
Kev Circuit…

Ntawm daim duab tau nthuav tawm lub Circuit Court ntawm lub tshuab hluav taws xob ua haujlwm Kuv tau ua cov duab no nrog kev daws teeb meem siab tshaj plaws los lav tau tias txhua tus.device tus nqi tuaj yeem nyeem kom raug. Cov duab qhia zoo li nyuaj heev thiab kom nkag siab zoo dua Kuv yuav piav qhia nws qhov tseem ceeb sib cais. Ntau tus neeg nyeem tuaj yeem liam kuv tias kev sib txuas lus tsis dhau. Qhov tseeb. Thaum xub thawj koj tuaj yeem pom tias nws muaj ob lub MAX038 chips. Qhov laj thawj yog tias PCB txhawb ob hom pob SO thiab DIP. Qhov rov ua haujlwm tuaj yeem pom hauv qee qhov haujlwm -

1) LED qhia qhov tam sim no nquag siv ntau, tab sis nws kuj tau tshwm ntawm LCD;

2) LEDs kuj tseem siv los qhia hom teeb liab, tab sis kuj LCD qhia cov ntaub ntawv no

Kev tsim qauv tau ua tiav hauv txoj hauv kev no kom tso cai yooj yim dua rau cov neeg siv - raws li qhov xav tau nws tsis tuaj yeem siv lub LCD, lossis yooj yim tuaj yeem tso tseg qhov muag ntawm LED's. Kuv tau muag lawv kom muaj peev xwm debug qhov ua haujlwm thaum tsim theem.

Nws tuaj yeem pom kuj tias kuv siv ntau opamps. Qee qhov ntawm lawv tuaj yeem raug rho tawm yam tsis muaj teeb meem - tshwj xeeb yog qhov tsis. Nyob rau lub sijhawm tam sim no opamps los ntawm lawv tus kheej muab qhov tsis txaus ntseeg loj - hauv ib pob koj tuaj yeem pom 2, 4 txawm tias 8 cais cov suab nrov, thiab qhov no ntawm tus nqi qis. Vim li cas ho tsis siv lawv?

Cov nyiaj rov qab kuj tseem yog cov lim dej lim dej - txhua cov khoom siv sib piv tau siv nws tus kheej lub txhab nyiaj capacitor (tantalum + ceramic capacitors rau ob qho khoom siv). Ib txhia ntawm lawv tuaj yeem raug rho tawm.

Kauj Ruam 3: Piav Qhia Circuit - Cov Khoom Siv Hluav Taws Xob (1)

Kev piav qhia Circuit - Cov Khoom Siv Hluav Taws Xob (1)
Kev piav qhia Circuit - Cov Khoom Siv Hluav Taws Xob (1)

Raws li kuv tau hais tias lub tshuab hluav taws xob no xav tau ob qho khoom siv. Qhov zoo qhov hluav taws xob tau tsim los ntawm kev siv 7805 linear voltage regulator. Qhov tsis zoo yog tsim los ntawm 7905 nti. Qhov nruab nrab kais taw tes ntawm 2x6V hloov pauv tau txuas nrog rau hauv av hauv av ntawm pawg thawj coj. Cov khoom siv hluav taws xob tsim tawm - ob qhov zoo thiab qhov tsis zoo raug cais mus rau analog thiab digital los ntawm chocks. Ob lub LEDs qhia tias muaj nyob ntawm txhua qhov khoom siv.

Kauj Ruam 4: Kev Piav Qhia Circuit - Kev Tswj Ntau Zaus (2)

Kev piav qhia ntawm Circuit - Zaus Ntau Yam Tswj (2)
Kev piav qhia ntawm Circuit - Zaus Ntau Yam Tswj (2)

Txhawm rau npog qhov ntau zaus ntau ntau lub txhab nyiaj hluav taws xob tau siv. Cov capacitors muaj cov txiaj ntsig sib txawv thiab lawv piav qhia ntau zaus sib txawv sub. Qhov tsuas yog ib qho ntawm cov capacitors no tau siv thaum ua haujlwm - nws cov phaj hauv qab yog hauv av los ntawm MOS transistor hloov. Cov capacitors twg hauv qab phaj kom raug rau hauv av yog tswj los ntawm Atmega328 los ntawm kev siv demultiplexer nti 74HC238. Raws li MOS hloov kuv siv BSS123 transistors. Qhov xav tau tseem ceeb rau qhov kev hloov pauv no yog kom muaj Ron qis thiab qis tshaj qhov muaj peev xwm ntws tau. Kev tswj hwm digital ntawm lub txhab nyiaj hluav taws xob tuaj yeem raug tso tseg - PCB muaj qhov rau siv cov xaim hluav taws xob rau cov tshuab hloov pauv.

Kauj Ruam 5: Piav Qhia Circuit - Kev Hloov Zaus (3)

Kev piav qhia ntawm Circuit - Kev Hloov Zaus (3)
Kev piav qhia ntawm Circuit - Kev Hloov Zaus (3)

Ntawm daim duab tau qhia qhov zaus thiab lub luag haujlwm tswj kev sib hloov. Muaj kuv tau siv tus qauv LM358 opamp (ob lub suab nrov hauv ib pob). Kuv kuj siv ob 10K potentiometers.

MAX038 nti tsim hluav taws xob sab hauv siv 2.5V, uas ib txwm siv raws li kev siv rau txhua qhov kev hloov kho.

Qhov ntsuas hluav taws xob no tau thov ntawm kev hloov pauv ntawm IC8a thiab nws tsim qhov ntsuas hluav taws xob tsis zoo siv rau DADJ (kev hloov pauv lub luag haujlwm). Ob qhov ntsuas hluav taws xob tau thov ntawm lub zog ntsuas hluav taws xob rau DADJ, uas nruab nrab kais tau cuam tshuam thiab siv rau DADJ tus pin ntawm MAX038 nti. Lub jumper JP5 tuaj yeem siv los ua haujlwm DADJ ua haujlwm, thaum txuas nrog hauv av. Qhov "Hoob" kev tswj hwm zaus tau npaj ua ntej los ntawm kev hloov pauv tam sim no poob / nrhiav hauv MAX038 "IIN" tus pin. Qhov tam sim no tau txhais los ntawm tus tiv thaiv R41 thiab qhov hluav taws xob tso tawm ntawm opamp buffering nruab nrab kais ntawm chav kawm zaus tswj lub zog potentiometer. Tag nrho cov no tuaj yeem hloov pauv los ntawm ib tus neeg siv lub zog (hauv kev sib txuas reostat) ntawm REF thiab IIN MAX038 tus pin.

Kauj Ruam 6: Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Pom Kev Zoo… (4)

Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Teeb Tsa … (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Signal Generation… (4)
Kev piav qhia Circuit - Amplitude Control, SYNC Signal Generation… (4)

Raws li tau sau hauv daim ntawv tso tawm cov teeb liab pf MAX038 muaj qhov dav ~ 1 V nrog DC qhov hluav taws xob sib npaug rau qhov muaj peev xwm hauv av.

Kuv xav kom muaj peev xwm los tswj lub teeb liab dav thiab muaj peev xwm txheeb xyuas DC offset los ntawm kuv tus kheej. Raws li qhov tshwj xeeb ntxiv kuv xav kom muaj SYNC teeb liab nrog CMOS qib sib luag nrog cov teeb liab tso tawm. Los ntawm lub neej ntawd, MAX038 nti tsim cov teeb liab zoo li no, tab sis hauv cov ntawv kuv tau nyeem tias yog qhov ua tau zoo no (txhais tau li cas - DV+ tus pin txuas rau 5V), qee qhov ncov (suab nrov) tuaj yeem pom hauv cov zis analog teeb liab. Kuv xav kom nws huv li ua tau thiab vim li ntawd kuv tau tsim SYNC teeb liab sab nraud. PCB tau ua tiav hauv txoj hauv kev uas DV+ tus pin tuaj yeem txuas tau yooj yim rau cov khoom siv tseem ceeb. Tus SYNC tus pin tau hla mus rau BNC txuas - tsuas yog 50 Ohm resistor yuav tsum tau muab siv. Hauv qhov no, SYNC teeb liab tsim hluav taws xob tuaj yeem tso tseg. Ntawm no raws li koj pom kuv siv kuj yog ob lub zog loj, tab sis lawv tsis txuas nrog ua ke. Qhov laj thawj rau qhov ntawd yog - Kuv ntsuas qhov dav sib xws. Qhov hluav taws xob ntawm qhov nruab nrab ntawm ib lub hwj chim tau hnov los ntawm Atmega328 ADC thiab lub teeb liab tau muab xam los ntawm tus nqi no. Tau kawg txoj hauv kev no tsis yog qhov tseeb (nws tso siab rau qhov sib txuam ntawm ob qho chaw potentiometer, uas tsis ib txwm tshwm sim), tab sis nws txaus txaus rau kuv daim ntawv thov. Hauv Circuit no IC2A tab tom ua haujlwm li qhov tsis muaj hluav taws xob. IC4A ib. IC2B opamp ua haujlwm raws li kev sib txuas lub tshuab hluav taws xob - nws tsim cov teeb liab tso tawm ntawm lub tshuab hluav taws xob ua haujlwm raws li qhov sib npaug ntawm cov hluav taws xob hluav taws xob thiab lub teeb liab tseem ceeb nrog hloov kho qhov siab. Qhov faib hluav taws xob R15. R17 tsim cov teeb liab tsim nyog rau ntsuas DC lub teeb liab tseem ceeb offset. Nws tau hnov los ntawm Atmega328 ADC. IC4B opamp ua haujlwm raws li kev sib piv - nws tswj SYNC tiam inverter pom los ntawm ob lub MOS transistors (BSS123 thiab BSS84). U6 (THS4281 - Texas Instruments) hloov cov teeb liab tso tawm los ntawm MAX038 DC nrog 2.5 V thiab ua kom nws loj dua 1.5 npaug. Yog li cov teeb liab tau hnov los ntawm AVR ADC thiab ua tiav ntxiv nrog FFT algorithm. Hauv ntu no kuv tau siv txoj kev tsheb nqaj hlau zoo rau kev tsheb nqaj hlau nrog 130 MHz bandwidth (TI - LMH6619).

Yuav kom nkag siab yooj yim npaum li cas ntawm SYNC lub cim teeb tsa, ua haujlwm Kuv suav nrog qee cov duab ntawm LTSpice simulation ntawm Circuit. Ntawm daim duab thib peb: lub teeb liab xiav yog qhov ntsuas hluav taws xob (nkag ntawm IC2B). Qhov ntsuab yog lub teeb liab tso tawm nrog kho qhov dav. Ib qho liab yog lub teeb liab tso tawm ntawm lub tshuab hluav taws xob ua haujlwm, Qhov nkhaus cyan yog SYNC teeb liab.

Kauj Ruam 7: PCB Tsim

PCB Tsim
PCB Tsim

Kuv siv "Dav dawb hau" rau kev tsim PCB. Kuv xaj PCBs ntawm "PCBway". Lawv tsuas siv plaub hnub los tsim cov laug cam thiab ib lub lim tiam kom xa lawv. Lawv qhov zoo yog siab, thiab tus nqi qis heev. Kuv them tsuas yog 13 USD rau 10 PCBs!

Ntxiv rau qhov ntawd kuv tuaj yeem xaj xim PCBs sib txawv yam tsis tau nce tus nqi. Kuv tau xaiv cov xim daj:-).

Kuv txuas cov ntaub ntawv gerber raws li "PCBway" cov cai tsim.

Kauj ruam 8: Soldering

Image
Image
Soldering
Soldering
Soldering
Soldering

Ua ntej kuv tau siv lub zog hluav taws xob cov khoom siv hluav taws xob..

Tom qab kuaj cov khoom thaiv, kuv tau siv lub Atmega328 nti nrog nws cov khoom siv txhawb nqa: quartz siv lead ua, lub peev xwm, lim lub kaus mom thiab ISP txuas. Raws li koj pom kuv muaj jumper hauv kab khoom ntawm AVR nti. Kuv txiav nws thaum kuv teeb tsa lub nti los ntawm ISP. Kuv siv USBtiny programmer rau lub hom phiaj ntawd.

Raws li cov kauj ruam tom ntej kuv tau siv lub de-mux nti 74HC238, LED qhia qhov ntau zaus. Kuv thauj khoom me me Arduino program hauv Atmega nti, uas tau sim qhov sib txawv. (saib cov vis dis aus hauv qab qhov link saum toj no)

Kauj ruam 9: Soldering…

Soldering…
Soldering…
Soldering…
Soldering…
Soldering…
Soldering…

Raws li cov kauj ruam tom ntej kuv tau siv cov opamps ua haujlwm hauv DC hom (LM358) thiab qhov zaus thiab DADJ hloov pauv lub zog thiab ntsuas tag nrho lawv cov haujlwm.

Ntxiv mus kuv tau siv lub BSS123 hloov pauv, qhov txiav txim siab zaus capacitors thiab MAX039 nti. Kuv tau sim lub tshuab hluav taws xob ua haujlwm tshawb xyuas lub teeb liab ntawm cov khoom siv hluav taws xob ib txwm. (Koj tuaj yeem pom kuv lub qub Soviet, tsim xyoo 1986, tseem ua haujlwm oscilloscope hauv kev ua:-))

Kauj ruam 10: Ntau Soldering…

Ntau Soldering…
Ntau Soldering…
Ntau Soldering…
Ntau Soldering…
Ntau Soldering…
Ntau Soldering…

Tom qab ntawd kuv tau siv lub qhov (socket) rau lub vijtsam LCD thiab sim nws nrog "Nyob zoo ntiaj teb" kos duab.

Kuv tau siv lwm qhov ntxiv opamps, lub capacitors, potentiometers thiab BNC txuas.

Kauj ruam 11: Software

Image
Image
Software
Software

Txog kev tsim ntawm Atmega328 firmware Kuv siv Arduino IDE.

Txog qhov ntsuas zaus kuv siv lub tsev qiv ntawv "FreqCounter". Cov duab kos thiab cov tsev qiv ntawv siv tau muaj rau rub tawm. Kuv tau tsim cov cim tshwj xeeb los sawv cev rau hom kev siv tam sim no (sine, duab plaub, daim duab peb sab).

Ntawm daim duab saum toj no tuaj yeem pom cov ntaub ntawv qhia hauv LCD:

  • Zaus F = xxxxxxxx hauv Hz
  • Zaus ntau Rx
  • Amplitude in mV A = xxxx
  • Offset hauv mV 0 = xxxx
  • hom teeb liab x

Lub tshuab hluav taws xob ua haujlwm muaj ob lub laub khawm nyob rau sab xub ntiag ntawm sab laug - lawv tau siv qhov hloov pauv ntau zaus (nce qib -nqis nqis). Nyob rau sab xis ntawm lawv yog tus swb hloov rau kev tswj hwm ntawm hom, tom qab nws los ntawm sab laug mus rau sab xis ua raws lub zog ntsuas rau kev tswj hwm zaus (chav kawm, zoo, DADJ), qhov dav thiab qhov offset. Nyob ze rau qhov hloov kho lub zog potentiometer tau muab tso rau qhov hloov pauv uas siv los ntawm kev hloov pauv ntawm 2.5V DC offset thiab hloov kho ib qho.

Kuv tau pom qhov yuam kev me me hauv "Generator.ino" code hauv ZIP cov ntaub ntawv - cov cim rau sine thiab daim duab peb sab yoj cov ntawv tau pauv. Hauv ib daim ntawv "Generator.ino" txuas ntawm no, qhov yuam kev raug kho lawm.

Kauj Ruam 12: Yuav Ua Li Cas…

Image
Image

Raws li cov kauj ruam kawg kuv npaj siab siv qhov tshwj xeeb ntxiv - ntsuas ntawm THD ntawm lub suab zaus sine teeb liab hauv lub sijhawm tiag tiag siv FFT. Qhov no xav tau, vim tias lub luag haujlwm ntawm lub teeb liab sine tuaj yeem sib txawv los ntawm 50%, dab tsi tuaj yeem tshwm sim los ntawm sab hauv nti tsis sib xws thiab lwm yam laj thawj thiab tuaj yeem tsim kev tsis sib haum xeeb. Lub voj voog ua haujlwm tuaj yeem hloov kho los ntawm lub zog loj, tab sis tsis muaj kev soj ntsuam lub teeb liab ntawm oscilloscope lossis tsom xam lub ntsej muag nws tsis tuaj yeem txiav qhov zoo. Xam THD raws FFT algorithm tuaj yeem daws qhov teeb meem. Qhov txiaj ntsig ntawm THD kev suav yuav raug nthuav tawm ntawm LCD hauv qhov chaw sab saum toj sab xis.

Hauv cov vis dis aus tuaj yeem pom qhov pom ntawm qhov tsim los ntawm MAX038 sine teeb liab. Kev ntsuas lub tshuab ntsuas hluav taws xob yog ua raws Arduino UNO board + 2.4 TFT daim thaiv. Lub tshuab ntsuas hluav taws xob siv SpltRadex Arduino lub tsev qiv ntawv tsim los ntawm Anatoly Kuzmenko los ua FFT hauv lub sijhawm tiag.

Kuv tseem tsis tau txiav txim siab - siv lub tsev qiv ntawv no lossis siv FHT lub tsev qiv ntawv tsim los ntawm Musiclabs.

Kuv npaj siab yuav siv cov ntaub ntawv los ntawm kev ntsuas lub ntsuas qhov ntsuas los ntsuas qhov ntsuas qhov ntsuas kom raug thiab ncua kev siv lub qhov rai ntxiv thaum lub sijhawm FFT suav. Kuv xav tau tsuas yog nrhiav qee lub sijhawm dawb los ua qhov no. Kuv vam tias yuav muaj qee qhov txiaj ntsig sai sai….

Pom zoo: