ADS1115: mai sauya analog-dijital don Arduino

ADS1115

Ga waɗancan ayyukan inda sauyawa daga analog zuwa siginar dijital ya zama dole, kuma microcontroller da aka yi amfani da shi ba shi da wannan ƙarfin, yana da ban sha'awa a sami irin wannan ADS1115 koyaushe, wanda ke ba da damar sauyawar ADC tare da daidaitattun 16-bit.

Hakanan, wannan kayan lantarki yana iya zama mai ban sha'awa a tsawaita shi iya juyawa, Kodayake microcontroller da kuke amfani dashi don aikinku yana da irin wannan damar amma kuna buƙatar wani abu.

Masu canza A / D da D / A

Analog vs siginar dijital

Akwai iri biyu siginar masu sauya sigina na asali, kodayake akwai wasu kwakwalwan kwamfuta masu iya yin nau'ikan nau'ikan juyawa a lokaci guda. Wadannan su ne:

  • CAD (Analog zuwa Digital Converter) ko ADC (Analog-to-Digital Mai Musanya): Nau'i ne na'uran da ke canza siginar analog zuwa siginar dijital. Don yin wannan, zaku iya amfani da lambar binary wacce ke sanya siginar analog. Misali, haɗa darajar binary tare da takamaiman ƙarfin lantarki ko ƙimar ta yanzu. Misali, tare da ƙuduri 4-bit zai iya zuwa daga 0000 zuwa 1111, kuma yana iya dacewa da 0v da 12v bi da bi. Kodayake idan an yi amfani da alamar alamar, ana iya auna ƙimomin da ba su da kyau.
  • CDA (Dijital zuwa Analog Mai Musanya) ko DAC (Mai Musanya Digital-da-Analog): ita ce na'urar da ke yin kishiyar abin da ke sama, wato, tana canza bayanan binary zuwa siginar analog current ko voltage.

Tare da waɗannan masu juyawar zai yiwu a wuce daga sigina ɗaya zuwa wani, kamar yadda zaku gani a yanayin ADS1115, wanda zai dace da shari'ar farko.

Game da ADS1115

mara ADS1115

ADS1115 sigar mai sauya sigina ce. Abin da yake yi shi ne sauya daga analog zuwa dijital. Kuna iya tunanin cewa hukumar ci gaban Arduino kanta da kanta tuni ta haɗa da ADC na ciki don iya yin wannan aikin yayin amfani da abubuwan analog ɗin kuma suna iya dacewa da siginan microcontroller.

Ee, hakane, suna da ADCs masu ƙudurin 6 10 a cikin UNO, Mini da Nano. Amma tare da ADS1115 kun ƙara wani tare da 16-bit ƙuduri, wanda ya fi Arduino girma, ban da samun damar 'yantar da shari'ar Arduino. Goma sha biyar daga cikinsu don aunawa ne kuma abu na ƙarshe don alamar siginar analog, tunda kamar yadda kuka sani, siginar analog na iya zama mara kyau ko tabbatacce.

Bugu da kari, wannan manhaja tana samar da duk abin da kuke bukata, don amfanin sa ya zama mai sauki. Don haɗa shi da Arduino ɗin ku zaka iya amfani da I2C, don haka yana da sauki sosai. Har ma ya hada da fil mai alama ADDR da shi zaka iya zaɓar ɗayan adiresoshin 4 da ake da su don wannan ɓangaren.

A gefe guda, yakamata ku fahimci cewa ADS1115 yana da halaye na auna biyu, ɗaya shine bambanci da kuma wani guda ya ƙare:

  • Bambanci: yana amfani da ADC guda biyu don kowane ma'auni, yana rage adadin tashoshi zuwa 2, amma yana ba da wata fa'ida a bayyane, wanda shine tana iya auna ƙwanƙwasa mara kyau kuma ba ta da sauƙi ga amo.
  • Guda ya ƙare: yana da tashoshi huɗu ta hanyar rashin amfani da duka kamar yadda ya gabata. Kowane ɗayan tashoshi 15-bit.

Baya ga waɗannan hanyoyin, ya haɗa da yanayin kwatancen da ake samar da faɗakarwa ta cikin ALRT fil lokacin da kowane ɗayan tashoshi ya wuce ƙimar ƙofar da za a iya saitawa a cikin lambar tushe na zane.

Idan kanaso kayi ma'aunai kasa da 5v, amma tare da mahimman bayanai, ya kamata ka sani cewa ADS1115 yana da PGA wanda zai iya daidaita ƙarfin ƙarfin lantarki daga 6.144v zuwa 0.256v. Koyaushe tuna cewa matsakaicin ƙarfin lantarki wanda za'a iya auna shi a kowane hali zai zama ƙarfin wutan lantarki da ake amfani da shi (5v)

Pinout da takaddun bayanai

Idan kana son ganin dukkan bayanan fasaha na ADS1115 don sanin iyakokinta a matakin lantarki ko yanayin da zai iya aiki bisa ga shawarar masu sana'anta, zaka iya amfani da da takaddun bayanan cewa zaka iya samu akan yanar gizo. Misali, zaka iya zazzage wannan daga TI (Kayan Kayan Texas).

para da pinout kuma an haɗa shi, a baya na riga nayi tsokaci game da wani abu game da siginar ALRT wanda ya haɗa da game da ADDR. Amma yana da wasu fil wanda yakamata ku kuma sani don daidaitaccen haɗi tare da kwamitin Arduino ko don kowane yanayi. Pin da ke kan ADS1115 koyaushe sune:

  • VDD: wadata tare da 2v zuwa 5.5v. Kuna iya iko da shi ta hanyar haɗa shi zuwa 5v daga jirgin Arduino ɗinku.
  • GND: kasan cewa zaka iya haɗuwa da GND na kwamitin Arduino naka.
  • SCL da SDA: sakonnin sadarwa don I2C. A wannan yanayin dole ne su je fil ɗin da suka dace bisa ga samfurinku na arduino.
  • ADDR: fil don adireshin. Ta hanyar tsoho yana haɗuwa da GND, wanda ke ba da adireshin 0x48, amma za a iya zaɓar wasu adiresoshin:
    • Haɗa zuwa GND = 0x48
    • Haɗa zuwa VDD = 0x49
    • Haɗa zuwa SDA = 0x4A
    • Haɗa zuwa SCL = 0x4B
  • ALRT: fadakarwa fil
  • A0 zuwa A3: analog fil

Idan kana son amfani guda karshen Zaka iya haɗawa da analog current ko voltage da kake son auna tsakanin GND da ɗayan 4 fil ɗin analog ɗin da ake dasu.

Don haɗi guda karshen, kawai muna haɗa kayan da za'a auna tsakanin GND da ɗayan maɓallan 4 da ake dasu. Don yanayin bambanci zaku iya haɗa nauyin da za'a auna tsakanin A0 da A1 ko tsakanin A2 da A3, gwargwadon tashar da kuke son amfani da ita.

Hoto na Arduino ADS1115

A matsayin misalin haɗi a cikin batun yanayin karatu daban-daban, zaka iya ganin hoton da ke sama. A ciki ana amfani da batura 1.5 a jere, ana ƙara 3v waɗanda aka haɗa tsakanin A0 da A1 a wannan yanayin don hukumar Arduino ta iya auna ƙimar ƙarfin ƙarfin da aka samu a kowane lokaci ta hanyar I2C. Babu shakka, zaku iya amfani da kowane sigina don auna, a wannan yanayin batir ne, amma yana iya zama duk abin da kuke so ...

A ina zan sayi ADS1115?

ADS1115 koyaushe

Idan kana so sayi ADS1115Ya kamata ku sani cewa kuna da kayayyaki waɗanda aka shirya don haɗa kai da Arduino akan farashi mai arha. Kuna iya samun su a cikin ɗakunan shagunan lantarki na musamman, da kan eBay, Aliexpress da Amazon. Misali:

Haɗuwa tare da Arduino

Screenshot na Arduino IDE

Don farawa, abu na farko shine shigar da laburare daidai a cikin ID ɗinku na Arduino. Don wannan, zaka iya amfani da mafi shahararren, na Adafruwa. Don yin wannan, zaku iya bin waɗannan matakan:

  1. Bude IDAN Arduino
  2. Je zuwa menu na Sketch
  3. Sannan zuwa Hada da Laburare
  4. Sarrafa dakunan karatu
  5. A cikin injin binciken zaku iya nemo Adafruit ADS1X15
  6. Danna kan Shigar

Yanzu kuna shirye don farawa, zaku iya samun damar lambar lambar ɗakin karatun da aka sanya ko akwai misalai da kuma:

  1. Bude IDAN Arduino
  2. Jeka Fayil
  3. Misalai
  4. Kuma a cikin jerin ku nemi waɗanda suke cikin wannan laburaren ...

Daga cikin misalan za ku ga duka biyu don yanayin comparator, yanayin banbanci da yanayin ƙarshen ƙarshe. Kuna iya ganin misalai don fara amfani dasu kuma gyaggyara su gwargwadon buƙatunku ko rubuta rubutaccen lamba. Don ƙarin bayani, ina ba ku shawarar namu karatun gabatarwa kyauta a cikin PDF.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Sharhi, bar naka

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Pedro m

    A yanayin banbanci zan iya amfani dashi don auna tsakanin + 5V da - 5V?