Cov txheej txheem:

Uber I2C LCD Controller Module: 6 Kauj Ruam
Uber I2C LCD Controller Module: 6 Kauj Ruam

Video: Uber I2C LCD Controller Module: 6 Kauj Ruam

Video: Uber I2C LCD Controller Module: 6 Kauj Ruam
Video: Введение в LCD2004 ЖК-дисплей с модулем I2C для Arduino 2024, Hlis ntuj nqeg
Anonim
Uber I2C LCD Controller Module
Uber I2C LCD Controller Module
Uber I2C LCD Controller Module
Uber I2C LCD Controller Module
Uber I2C LCD Controller Module
Uber I2C LCD Controller Module

Zaj lus piv txwv

Cov lus qhia ntxaws no yuav ua li cas thiaj tsim HD44780 LCD raws tus tswj hwm tus qauv (daim duab 1 saum toj no). Tus qauv tso cai rau tus neeg siv los tswj txhua yam ntawm LCD programmatically dhau I2C, suav nrog; LCD thiab zaub, sib piv thiab siv lub teeb rov qab. Txawm hais tias Arduino Uno R3 tau siv los ua qauv rau nws, nws yuav ua haujlwm zoo ib yam nrog txhua lub microcontroller uas txhawb nqa I2C.

Taw qhia

Raws li tau hais los saud kab lus no tsim cov I2C LCD Controller Module, nws yog thawj lub hom phiaj tsim los siv los txiav txim siab tias nws yuav siv sijhawm ntev npaum li cas los tsim PCB kev ua haujlwm.

Tus qauv hloov pauv tus qauv kev tswj hwm tus qauv (daim duab 3 saum toj no) thiab kos rau ntawm Instructables thiab cov tsev qiv ntawv uas kuv tau tsim ua ntej.

Los ntawm thawj lub tswv yim tsab ntawv (duab 2 saum toj no) kom ua tiav, kuaj PCB tag nrho (daim duab 1 saum toj no) nws siv tag nrho 5.5 hnub.

Kuv xav tau ntu twg? Saib daim nqi ntawm cov ntaub ntawv txuas hauv qab no

Kuv xav tau software twg?

  • Arduino IDE 1.6.9,
  • Kicad v4.0.7 yog tias koj xav hloov kho PCB. Txwv tsis pub cia li xa 'LCD_Controller.zip' mus rau JLCPCB.

Kuv xav tau cov cuab yeej twg?

  • Tsom iav yam tsawg kawg x3 (rau SMT soldering),
  • SMD soldering Hlau (nrog kua flux cwj mem thiab flux cored solder),
  • Muaj zog tweezers (rau SMT soldering),
  • Pliers zoo (taw tes thiab hnia qhov ntswg),
  • DMM nrog lub suab txuas mus txuas ntxiv.

Kuv xav tau txuj ci dab tsi?

  • Ua siab ntev heev,
  • Ib qho zoo ntawm phau ntawv dexterity thiab tes zoo/sib koom tes,
  • Kev txawj ntse zoo heev.

Cov ncauj lus npog

  • Taw qhia
  • Txheej txheem cej luam
  • Kev Tsim Khoom PCB
  • Software Txheej Txheem
  • Kuaj Qhov Tsim
  • Xaus
  • References Siv

Kauj Ruam 1: Txheej Txheem Txheej Txheem

Txheej txheem cej luam
Txheej txheem cej luam

Daim duab qhia tag nrho ntawm txhua lub tshuab hluav taws xob tau muab hauv daim duab 1 saum toj no, nrog rau PDF ntawm tib yam hauv qab no.

Lub Circuit Court tau tsim los hloov pauv rau tus qauv PCF8574A I2C LCD Controller Module nrog rau kev txhim kho hauv qab no;

  • I2C tus neeg siv xaiv tau 3v3 lossis 5v sib xws,
  • Kev tswj qhov sib txawv digital lossis teeb tsa lub lauj kaub ib txwm muaj,
  • Hloov pauv lub teeb pom kev siv lub zog xaiv nrog Quartic txo kev ua haujlwm kom ua tiav qhov ua kom du.

LCD Zaub Tswj

Qhov no yog lub fsimile ntawm tus txheej txheem I2C LCD Tus Tswj Xyuas Qauv siv lub PCF8574A (IC2) rau I2C kom hloov pauv mus ib txhis.

Lub neej ntawd I2C chaw nyob rau qhov no yog 0x3F.

3v3 lossis 5v I2C sib xws

Rau 3v3 kev ua haujlwm haum Q1, Q2 ROpt1, 2, 5 & 6, IC1, C2 thiab C2.

Yog tias yuav tsum tau ua haujlwm 5v ces tsis haum rau 3v3 cov khoom, hloov lawv nrog 0 Ohm resistors ROpt 3 thiab 4.

Kev sib piv ntawm digital

Kev tswj qhov sib txawv ntawm digital tau ua tiav los ntawm kev siv lub zog digital digital U2 MCP4561-103E/MS thiab C4, R5.

Yog tias yuav tsum tau siv lub tshuab ua kom muaj zog zoo ib qho tuaj yeem ua tau rau PCB, RV1 10K, tsis yog U2, C4 thiab R5. Saib BoM rau cov potentiometer sib xws.

Los ntawm kev txuas jumper J6 I2C chaw nyob yog 0x2E. Nws tau kwv yees rau kev ua haujlwm ib txwm muaj qhov txuas nrog.

Qhov txawv txav teeb pom kev zoo xaiv

Qhov sib txawv ntawm lub teeb rov qab siv tau yog tswj los ntawm PWM kev hloov pauv ntawm LCD LED rov qab lub teeb ntawm U1 tus pin 6 ntawm ATTiny85. Txhawm rau khaws tag nrho kev sib raug zoo nrog tus qauv I2C LCD Tus Tswj Tus Qauv R1, T1 R7 thiab T2 tau siv los hloov kho +ve muab cov tsheb nqaj hlau.

Qhov default I2C chaw nyob rau qhov no yog 0x08. Qhov no yog tus neeg siv xaiv tau, ntawm lub sijhawm suav ua ntej ua haujlwm U1.

Kauj Ruam 2: Kev Tsim PCB

Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB
Kev Tsim Khoom PCB

Raws li tau hais ua ntej cov lus qhia no yog kev tawm dag zog, feem ntau yog xav txiav txim siab tias nws yuav siv sijhawm ntev npaum li cas los ua kom tiav tus qauv (uas muaj lub hom phiaj siv tau).

Hauv qhov piv txwv no kuv xav txog thawj lub tswv yim nyob rau hnub Saturday yav tav su thiab tau ua tiav cov qauv ua ntej hnub Saturday yav tsaus ntuj daim duab 1 saum toj no. Kuv lub tswv yim raws li tau hais, yog los tsim kuv tus kheej qhov sib txawv ntawm I2C LCD tswj hwm tus qauv, nrog tus hneev taw zoo ib yam, muab tag nrho txoj haujlwm tswj hwm ntawm LCD dhau I2C.

Daim duab qhia chaw thiab txheej txheem PCB tau tsim nrog Kicad v4.0.7 pics 2 thiab 3. Qhov no tau ua tiav rau hnub Sunday yav tav su thiab ntu tau xaj los ntawm Farnell thiab PCB tau muab xa mus rau JLCPCB thaum yav tsaus ntuj hnub Sunday.

Cov khoom tuaj txog ntawm Farnell hnub Wednesday, ua raws los ntawm PCBs los ntawm JLCPCB rau hnub Thursday (Kuv siv DHL kev pabcuam xa khoom kom nrawm dua) pics 4, 5, 6 & 7.

Txog rau hnub Thursday yav tsaus ntuj ob lub rooj sib tham (3v3 thiab 5v sib txawv) tau tsim thiab ua tiav ntsuas ntawm 4 ntawm 20 LCD zaub. Cov duab 8, 9 & 10.

Ib qho txaus ntshai 5.5 hnub los ntawm thawj lub tswv yim dhau mus kom ua tiav.

Nws ua rau kuv xav tsis thoob JLCPCB tuaj yeem xaj xaj sai, tsim ob tog PTH PCB thiab xa nws mus rau UK. Lub blistering 2 hnub rau kev tsim khoom thiab 2 hnub kom xa tawm. Qhov no sai dua UK raws li PCB cov tuam txhab tsim khoom thiab ntawm ib feem ntawm tus nqi.

Kauj ruam 3: Software Txheej Txheem

Software Txheej Txheem
Software Txheej Txheem
Software Txheej Txheem
Software Txheej Txheem

Muaj peb ntu tseem ceeb ntawm cov software tsim nyog los tswj I2C LCD tus qauv tswj;

1. LiquidCrystal_I2C_PCF8574 Arduino Library

Muaj nyob ntawm no

Txhawm rau siv hauv koj daim duab Arduino los tswj cov zaub LCD.

Nco tseg: Qhov no ua haujlwm zoo ib yam nrog Generic I2C LCD Module Controller. Tsuas yog nws muab kev ua haujlwm zoo dua li lwm lub tsev qiv ntawv.

2. MCP4561_DIGI_POT Arduino Library

Txhawm rau siv hauv koj daim duab kos kom tswj tau qhov sib piv ntawm LCD

Muaj nyob ntawm no

3. Lub programmatic tswj ntawm LCD rov teeb qib siv PWM thiab Quartic easing muaj nuj nqi kom ua tiav du

Raws li tau hais ua ntej pawg thawj coj muaj ib qho ATTiny85 siv los tswj qhov ua kom ploj zuj zus ntawm lub teeb rov qab.

Cov ntsiab lus ntawm cov software no tau muab qhia ua ntej qhia 'Smooth PWM LED Fading With the ATTiny85'

Hauv qhov no txhawm rau khaws qhov kawg PCB qhov ntev tib yam li cov qauv LCD tswj hwm tus qauv SOIC sib txawv ntawm ATTiny85 tau xaiv. Pics 1 thiab 2 qhia yuav ua li cas ATTiny85 SOIC tau teeb tsa thiab sim hauv cov qauv teeb tsa.

Txoj cai programmed rau hauv ATTiny85 yog 'Tiny85_I2C_Slave_PWM_2.ino' muaj nyob ntawm no

Yog xav paub ntau ntxiv txog yuav tsim koj li ATTiny85 programmer li cas no Qhia 'Programming the ATTiny85, ATTiny84 and ATMega328P: Arduino As ISP'

Kauj Ruam 4: Kuaj Qhov Tsim

Kuaj Qhov Tsim
Kuaj Qhov Tsim
Kuaj Qhov Tsim
Kuaj Qhov Tsim

Txhawm rau sim qhov tsim kuv tsim cov duab kos npe hu ua 'LCDControllerTest.ino' uas tso cai rau tus neeg siv teeb tsa ib qho LCD tshwj xeeb ntsuas ntsuas ncaj qha hla qhov txuas txuas txuas.

Cov duab kos tuaj yeem pom ntawm kuv GitHub chaw cia khoom I2C-LCD-Controller-Module

Daim duab 1 saum toj no qhia txog 5v I2C ua raws lub rooj tsavxwm nias rau 4 los ntawm 20 LCD thiab daim duab 2 lub teeb tsa tsis raug thaum ua haujlwm ntsuas tus lej thawj zaug.

Nws siv cov txiaj ntsig hauv qab no rau lub teeb rov qab thiab sib piv;

  • #define DISPLAY_BACKLIGHT_LOWER_VALUE_DEFAULT ((tsis kos npe ntev) (10))
  • #define DISPLAY_CONTRAST_VALUE_DEFAULT ((uint8_t) (40))

Kuv pom cov no ua haujlwm tau zoo nrog 4 los ntawm 20 LCD zaub kuv tau dag ib ncig.

Kauj Ruam 5: Xaus

Thaum kuv thawj zaug pib siv hluav taws xob/software kev lag luam ntau qee lub sijhawm dhau los tam sim no, muaj qhov cuam tshuam zoo rau kev siv xaim-qhwv lossis veroboard kev tsim qauv rau kev tsim qauv nrog ntau qhov kev tsim vaj tsev nyob hauv qhov kawg hauv Circuit Court yog tias koj tau ua yuam kev, muab tus nqi thiab sijhawm ntawm lub rooj tsav xwm rov tig.

Qhov ua yuam kev feem ntau raug nqi koj ob peb lub lis piam ntawm lub sijhawm thiab cuam tshuam cov paj tau paj (thiab tej zaum koj txoj haujlwm).

PCBs raug hu ua 'kos duab ua haujlwm', vim tias lawv yog cov kos duab tiag tiag. Tsim ob zaug kom puv loj siv cov nplaum nplaum dub dub los ntawm tus 'tracer' lossis cov neeg ua haujlwm hnyav thiab txo qis los ntawm lub tsev zoo kom ua rau daim duab tiv thaiv stencils.

Cov duab kos hauv Circuit kuj tau tsim los ntawm cov neeg taug kev thiab kos los ntawm txhais tes los ntawm koj cov ntawv sau tseg. Cov ntawv tau ua tiav daim duab zoo li qub thiab hu ua 'luam ntawv xiav'. Vim tias lawv tsis muaj xim xiav.

Micro-controllers tsuas yog hauv lawv cov menyuam yaus thiab feem ntau nyob hauv kev ua qauv yog tias koj lub tuam txhab tuaj yeem them taus ib qho nrog rau qhov nyuaj thiab kim ib puag ncig kev txhim kho.

Raws li tus tsim lub sijhawm, tsuas yog tus nqi ntawm cov software tsim cov cuab yeej saw tau txwv, koj yuav tsum tsis txhob yuam kom thawb tus lej hex ncaj qha rau hauv EPROM (RAM/Flash yog tias koj muaj hmoo heev) tom qab ntawd siv sijhawm txhais cov lus coj los txiav txim seb dab tsi koj cov cai tau ua yog tias nws tsis ua haujlwm raws li qhov xav tau (me ntsis 'wiggling' lossis cov ntawv luam tawm ua cov txuj ci debug nrov tshaj plaws. Qee yam tsis hloov pauv). Koj feem ntau yuav tsum sau tag nrho koj lub tsev qiv ntawv raws li tsis muaj (tsis muaj qhov tseeb uas tsis muaj qhov zoo li internet).

Qhov no txhais tau tias koj siv sijhawm ntau dhau los nkag siab yuav ua li cas qee yam ua haujlwm thiab siv sijhawm tsawg dua kev tsim khoom tsim.

Txhua daim duab koj tau kos yog txhais tes, feem ntau ntawm A4 lossis A3 thiab yuav tsum tau ua tib zoo xav los ntawm, muab lawv cov ntsiab lus ntawm cov teeb liab khiav ntawm sab laug mus rau sab xis. Kev kho lus feem ntau txhais tau tias koj xav tau pib nrog daim ntawv tshiab.

Rau feem ntau koj qhov kev sib tw zaum kawg tau tsim los siv veroboard rau kev ruaj khov thiab teeb tsa hauv qhov yooj yim ABS lub thawv kom muab qhov ntawd 'kev tshaj lij kov'.

Los ntawm qhov sib txawv ntawm qhov sib txawv, Kuv tsim txoj haujlwm no tag nrho hauv 5.5 hnub siv cov khoom siv dawb zoo uas ua rau muaj txuj ci PCB. Yog tias qhov kev ntshaw tau coj kuv mus, kuv tuaj yeem teeb nws hauv lub thawv 3D luam tawm ntawm kuv tus kheej.

Ib yam uas koj tsuas tuaj yeem ua npau suav txog tsawg dua kaum xyoo dhau los.

Yuav hloov pauv li cas kom zoo dua qub.

Kauj Ruam 6: Cov Lus Qhia Siv

KiCAD Schematic capture thiab PCB tsim

KiCAD EDA

Arduino ORG Software Development Tool

Arduino

LiquidCrystal_I2C_PCF8574 Arduino Library

Ntawm no

MCP4561_DIGI_POT Arduino Library

Ntawm no

Smooth PWM LED Fading Nrog ATTiny85

Ntawm no

Programming ATTiny85, ATTiny84 thiab ATMega328P: Arduino Raws li ISP

Pom zoo: