Cov txheej txheem:

5V LCD Zaub Nrog Arduino Vim 3.3V I2C: 5 Kauj Ruam
5V LCD Zaub Nrog Arduino Vim 3.3V I2C: 5 Kauj Ruam

Video: 5V LCD Zaub Nrog Arduino Vim 3.3V I2C: 5 Kauj Ruam

Video: 5V LCD Zaub Nrog Arduino Vim 3.3V I2C: 5 Kauj Ruam
Video: How To Get Started with Arduino Killer(STM32Duino),STM32F103C8T6 Micro-Controller? 2024, Hlis ntuj nqeg
Anonim
5V LCD Zaub Nrog Arduino Vim 3.3V I2C
5V LCD Zaub Nrog Arduino Vim 3.3V I2C

Cov ntawv tshaj tawm no piav qhia txog txoj hauv kev yooj yim dua los siv Arduino Due (lossis lwm lub 3.3V board) nrog LCD nrov 16x2 Zaub nrog I2C adapter module.

Thawj qhov teeb meem yog tias LCD xav tau 5V rau nws lub teeb pom kev ua haujlwm kom raug, tab sis SCL thiab SDA tus pin yuav tsum ua haujlwm ntawm 3.3V txhawm rau sib tham nrog Arduino Vim tsis ua rau muaj kev puas tsuaj. Txhawm rau daws qhov no, Kuv tau pom ob txoj hauv kev:

Qhov kev hais daws feem ntau yog siv Bi-Directional Logic Level Converter, uas yog qhov tseeb daws qhov teeb meem. Tab sis nws tseem ntxiv lwm qhov ntxiv rau koj daim ntawv teev npe thiab txuas xov txuas ntxiv ntawm koj lub xov tooj

Lwm txoj hauv kev kuv tau pom yog kom yooj yim desolder 2 pull resistors hauv "I2C adapter hnab ev khoom" los ntawm LCD. Dhau li yooj yim dua, nws muaj lwm qhov txiaj ntsig tau piav qhia hauv kev sib piv thaum kawg. Txoj kev no yog lub hom phiaj tseem ceeb ntawm cov ntawv no

Khoom siv

Arduino Dhau

LCD 16x2 Zaub nrog I2C adapter module

Soldering hlau

Soldering twj tso kua mis los yog soldering wick

Tweezers

Kauj Ruam 1: Keeb Kwm ntawm Kev Kho

Kev daws tsis tau tsim los ntawm kuv, Kuv pom cov lus pom zoo thiab piav qhia ntawm Arduino Rooj Sib Tham hauv qhov txuas hauv qab no, uas kuv yuav rov tsim dua hauv kab ntawv no.

forum.arduino.cc/index.php?topic=553725.0

Teb los ntawm: david_prentice

Kuv tsis tuaj yeem pom ib qho kev qhia ua tiav hauv is taws nem thiab vim tias nws yog qhov teeb meem tshwm sim ntau, Kuv tau sim nthuav qhia qhov kev daws teeb meem ntawm no kom ntxaws, ua pov thawj nws ua haujlwm tiag tiag, thiab ntxiv cov ntaub ntawv uas tuaj yeem txo qee qhov tsis ntseeg txog nws cov txiaj ntsig.

Kauj ruam 2: Piav qhia

Devices

Rau I2C kev sib txuas lus ua haujlwm, nws xav tau rub tawm cov khoom txuas nrog SDA thiab SCL pins. Qhov ntawd vim tias cov cuab yeej tsuas yog tig cov pins LOW thaum sib txuas lus. Txhawm rau sawv cev rau HIGH, nws tsuas yog yuav tsum tsis xa LOW, thiab ua tsaug rau qhov rub tawm nws mus rau HIGH. (kev nkag siab no yuav tseem ceeb heev tom qab)

LCD "I2C lub hnab ev khoom" muaj ob lub 4K7 rub tawm cov neeg tawm tsam uas ua haujlwm rau I2C qhov xav tau. Tab sis txij li lawv tau txuas nrog Vcc, yog tias koj siv 5 V, lawv yuav rub SDA thiab SCL mus rau 5 V.

Yog tias koj saib ntawm cov ntawv teev tseg, koj tuaj yeem pom tias, tsis zoo li lwm cov laug cam, Lub Txim twb muaj onboard 1K5 rub tawm tus tiv thaiv ntawm nws lub ntsiab SDA, SCL pins, uas rub lawv mus rau 3.3 V.

Kev sim

  • Zaub LCD -> Arduino
  • Gnd -> Gnd
  • Vcc -> 5V
  • SDA -> SDA
  • SCL -> SCL

Yog tias koj tsuas yog txuas lub LCD ntawm qhov them (ua raws cov kab hluav taws xob saum toj no), 1k5 (lossis 1k0) Vim rub tawm txuas nrog 3.3V thiab 4K7 LCD rub tawm txuas nrog 5 V yuav ua rau tsis ua haujlwm I2C kab ntawm 3.7 V (3.6 V) nrog 1k0). Qhov ntawd tsis yog qhov zoo, vim Cov ntawv teev tseg tau teev tseg qhov siab tshaj ntawm 3.6 V rau nws cov kab I/O.

Los ntawm kev ntsuas qhov xwm txheej no, nrog tsuas yog LCD, Kuv tau txais 3, 56 V. Los ntawm kev ntxiv EEPROM Module rau tib SDA thiab SCL, nws nce mus txog 3.606 V. Hauv ob qho tib si txhua yam ua haujlwm ib txwm muaj, tab sis cov ntawd nyob deb ntawm qhov zoo tshaj qhov hluav taws xob qib txiav txim siab txog 3.6 V teev qhov siab tshaj.

Yog li, muaj lub sijhawm nws yuav ua haujlwm ib yam li kuv tau ua thaum tsis ua ib qho hloov pauv. Tab sis qhov ntsuas hluav taws xob tseem nyob deb ntawm qhov zoo tshaj plaws thiab qee qhov sib txawv ntawm Kev Them lossis LCD rub tawm tuaj yeem ua rau nws nce siab dua 3.6 V txwv. (Nws yuav pom zoo kom ua yam tsawg kawg ua ntej ntsuas nrog 20K lossis 100K potentiometer dab tsi yog qhov qis tshaj ntawm 5 V thiab SCL/SDA pins ua ntej lawv mus txog 3.6 V, txawm hais tias qhov kev daws teeb meem muaj kev nyab xeeb dua thiab tej zaum yooj yim dua)

Tshuaj

Kev daws teeb meem nthuav tawm yog kom tshem tawm qhov rub tawm ntawm cov hnab ev LCD, uas sim rub txoj kab mus txog 5 V. Tom qab ntawd, tsuas yog Dua ntawm lub nkoj rub tawm cov neeg tawm tsam yuav nyob twj ywm, rub SCL thiab SDA kab rau 3.3V. Nws ua haujlwm tau zoo, tswj tus pin tsis nyob ib puag ncig 3.262 V!

Cov kev sib txuas tseem nyob tib yam:

  • LCD Zaub -> Arduino
  • Gnd -> Gnd
  • Vcc -> 5V
  • SDA -> SDA
  • SCL -> SCL

Yog tias koj xav tias LCD yuav tsis rub kab mus rau 5 V los sawv cev rau HIGH thaum sib tham, nco ntsoov tias ntawm I2C cov cuab yeej tsuas rub cov kab LOW, ua HIGH teeb liab sawv cev thaum tsis cuam tshuam, uas yuav yog 3.3 V los ntawm Dua's onboard rub-ups.

Tsis tas li, 3.3 V txaus rau I2C hnab ev los txiav txim siab ua lub teeb liab.

Kauj Ruam 3: Txheeb Xyuas thiab Tshem Tawm Cov Tiv Thaiv

Txheeb xyuas thiab Tshem Tawm Cov Tiv Thaiv
Txheeb xyuas thiab Tshem Tawm Cov Tiv Thaiv
Txheeb xyuas thiab Tshem Tawm Cov Tiv Thaiv
Txheeb xyuas thiab Tshem Tawm Cov Tiv Thaiv

Cov duab saum toj no qhia pom liab rub tawm qhov kuv tau pom hauv kuv tus qauv.

Qhia paub

Raws li lub LCD I2C lub hnab ntim khoom yuav txawv, cov neeg tawm tsam yuav tsis nyob hauv tib lub teeb tsa. Txhawm rau txheeb xyuas cov neeg tawm tsam rub tawm, koj tuaj yeem siv lub ntsuas ntsuas nrog ntsuas txuas ntxiv. Txhua tus rub tawm tus tiv thaiv yuav tsum muaj ib kawg txuas nrog SCL lossis SDA tus pin thiab lwm qhov kawg rau Vcc.

Hauv kuv qhov xwm txheej, muaj peb ntawm 4K7 (472 hauv SMD code) resistors ntawm lub rooj tsavxwm. Tsuas yog ob ntawm lawv txaus siab rau qhov xav tau saum toj no, taw qhia cov no yog cov rub tawm uas peb tau nrhiav!

Rau kev ceev faj ntxiv (yog tias qee qhov laj thawj lawv tsis yog 4K7), Kuv kuj tau sim lwm qhov kev tawm tsam thiab lees paub tsis muaj leej twg txaus siab rau qhov yuav tsum tau ua kom rub tawm.

Tshem tawm

Tam sim no, txhua yam koj yuav tsum ua yog desolder lawv! Nws yog qhov yooj yim dua yog tias koj muaj lub twj tso kua mis soldering lossis cov raj txuas thiab tus txhuam hniav los pab.

Kauj Ruam 4: Kev Sib Piv Ntawm Cov Tshuaj

Bi-Directional Logic Level Converter (LLC)

Pros:

Tsis tas yuav muaj cov cuab yeej siv los yog muaj peev xwm

Cons:

Tshaj tawm ntau cov kab hluav taws xob thiab LLC rau koj cov npe cov npe khoom

Messier kev sib txuas nrog cov khoom siv ntxiv

Me ntsis kim dua

Desolder LCD rub-up Resistors

Pros:

Qhov ua kom huv huv qhov kawg

Tej zaum koj tuaj yeem ua tam sim ntawd, tsis tas yuav tos rau LLC

Tshwj xeeb tshaj yog yog tias koj xav txo ntau yam ntawm cov khoom sib dhos thiab sib dhos ua ke hauv txoj haujlwm nyuaj lossis koj xav rov ua dua

Cons:

Hloov kho lub LCD Circuit (Yog tias koj xav tau nws "npaj siv" nrog Uno, twb muaj 4K7 rub tawm, koj tuaj yeem thim qhov kev hloov pauv rov qab rau lawv)

Kauj Ruam 5: Kev Txiav Txim Kawg

Kuv vam tias qhov kev qhia no tso qee lub teeb ntawm qhov teeb meem sib xws no thiab qee qhov nws tuaj yeem daws tau.

Yog tias koj muaj cov tswv yim txhim kho, piav qhia zoo dua, daws teeb meem tshiab, lossis pom ib qho yuam kev hauv kab ntawv, thov qhia rau kuv hauv cov lus!:)

Pom zoo: