Cov txheej txheem:

DIY LCD Keypad Shield rau Arduino Uno: 6 Cov Kauj Ruam (nrog Duab)
DIY LCD Keypad Shield rau Arduino Uno: 6 Cov Kauj Ruam (nrog Duab)

Video: DIY LCD Keypad Shield rau Arduino Uno: 6 Cov Kauj Ruam (nrog Duab)

Video: DIY LCD Keypad Shield rau Arduino Uno: 6 Cov Kauj Ruam (nrog Duab)
Video: PROT AND ARD TUTORIAL 03:ARDUINO COUNTER USING SERIAL MONITOR 2024, Hlis ntuj nqeg
Anonim
DIY LCD Keypad Shield rau Arduino Uno
DIY LCD Keypad Shield rau Arduino Uno

Kuv tau tshawb nrhiav ntau yam los ua DIY LCD Keypad daim thaiv thiab kuv pom tsis muaj yog li kuv tau ua ib qho thiab xav qhia rau koj paub.

Kauj Ruam 1: Qhov Yuav Tsum Tau

Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
  • ib Arduino Uno
  • 16 x 2 po char
  • txiv neej thiab poj niam Header pins
  • Zero pcb
  • ob peb ntawm resistors
  • 10k lauj kaub (tau txais ib tus phooj ywg zoo)
  • 5 laub khawm
  • qee qhov me me ntawm cov xov hlau
  • TOOLS YUAV TSUM TAU
  • lub tshuab txiav (rau txiav xoom pcb)
  • ib qho hlau txuas
  • qee cov xov
  • ib tug hlau clipper
  • yog tag nrho

Kauj Ruam 2: Theory Part (imp)

Qhov Theory Part (imp)
Qhov Theory Part (imp)

Lub LCD keypad cov ntaub thaiv npog siv cov txheej txheem ntse heev thiab zoo uas yog nyeem cov nyees khawm los ntawm Analog nyeem tus pin A0

qhov ntawd yog qhov txias.

tab sis YUAV UA LI CAS?

Qhov zais cia yog VOLTAGE DIVIDERS

yog li dab tsi yog qhov faib hluav taws xob.

Qhov faib hluav taws xob yog ib qho yooj yim Circuit Court uas hloov qhov hluav taws xob loj rau hauv ib qho me me. Siv tsuas yog ob txoj hauv kev tiv thaiv thiab qhov hluav taws xob nkag, peb tuaj yeem tsim qhov hluav taws xob tso tawm uas yog ib feem ntawm cov tswv yim.

yog, kuv luam nws los ntawm google;-)

yog li tam sim no peb yuav tsum ua qhov faib hluav taws xob ntawm 5v thiab A0 ntawm arduino

thiab yuav muaj 4 qhov sib faib hluav taws xob sib txawv thiab txhua tus yuav los rau lub neej thaum peb nias lub pob

thiab yog li ntawd peb tau txais cov tswv yim sib txawv ntawm ib tus pin.

Kauj Ruam 3: LIBRARY thiab RESISTOR CALCULATION

LIBRARY thiab RESISTOR CALCULATION
LIBRARY thiab RESISTOR CALCULATION

Tam sim no peb paub tias yuav siv cov tswv yim li cas

tab sis dab tsi tus nqi ntawm resistors rau voltage faib peb xav tau

peb lub hauv paus hluav taws xob yog 5v.

raws li LCD Keypad lub tsev qiv ntawv sau los ntawm dzindra ntawm GitHub

qhov txuas yog:-

github.com/dzindra/LCDKeypad

hauv LCD Keypad.h

// koj tuaj yeem hloov qhov chaw pib txhawm rau txheeb xyuas qhov tseem ceeb nias

#define KEYPAD_TRESHOLD_NONE 1000

#define KEYPAD_TRESHOLD_RIGHT 50

#define KEYPAD_TRESHOLD_DOWN 380

#define KEYPAD_TRESHOLD_UP 195

#define KEYPAD_TRESHOLD_LEFT 555

#define KEYPAD_TRESHOLD_SELECT 790

yog li cov thresholds tuav yog analog nyeem ntawm tus pin A0

accrding rau kuv nyeem ntawv

peb xav tau

150k ua lub hauv paus tiv thaiv (txhua lwm yam yog ua raws nws)

250k - xaiv

82k: ua

150k- sab laug

15k ua

2ohm -yog

# yog tias koj tsis muaj qhov txiaj ntsig koj tuaj yeem nce me ntsis lossis qis dua vim tias peb xav tau tsuas yog nyob hauv qhov pib ntawd.

Kauj Ruam 4: Pib Ua LCD (Txuas)

Pib Ua LCD (Txuas)
Pib Ua LCD (Txuas)
Pib Ua LCD (Txuas)
Pib Ua LCD (Txuas)

Tam sim no lob cov khoom thiab cov resistors koj suav thiab pib ua

KAUJ RUAM 1.

txiav qhov xoom pcb rau qhov loj ntawm Arduino uno

tam sim no

KAUJ RUAM 2.

ntxiv txiv neej headers rau board

* tus pin txuas nrog lcd yog

#define KEYPAD_LCD_PINS 8, 9, 4, 5, 6, 7

mount txiv neej headers

Cov pins analog zoo nrog xoom pcb wholes

TAB SIS koj xav tau me ntsis khoov tus pin (kho nws)

LCD RS tus pin rau tus lej digital 08

LCD Pab tus pin rau tus lej digital 09

LCD D4 tus pin rau tus lej digital 4

LCD D5 tus pin rau tus lej digital 5

LCD D6 tus pin rau tus lej digital 6

LCD D7 tus pin rau tus lej digital 7

Ib qho ntxiv, xaim 10k lauj kaub rau +5V thiab GND, nrog nws lub wiper (tso zis) mus rau LCD cov ntxaij VO pin (pin3). 220 ohm resistor tau siv los ua lub teeb rov qab thiab nws tswj los ntawm tus pin 10

Kauj Ruam 5: Txhim Kho Lcd thiab Khawm Khawm

Mounting Lcd thiab Cov Khawm Khawm
Mounting Lcd thiab Cov Khawm Khawm
Mounting Lcd thiab Cov Khawm Khawm
Mounting Lcd thiab Cov Khawm Khawm
Mounting Lcd thiab Cov Khawm Khawm
Mounting Lcd thiab Cov Khawm Khawm

Kuv xav kom kuv lub lcd tshem tawm tau yog li kuv siv tus poj niam lub taub hau

cia li khoov tus pin txuas kom lawv tuaj yeem raug muab tso rau ntawm pcb

ntxiv lub lauj kaub raws li

Kauj Ruam 6: Soldering Cov Khawm ntawm Zero Pcb

Image
Image
Soldering Buttons ntawm Zero Pcb
Soldering Buttons ntawm Zero Pcb
Soldering Buttons ntawm Zero Pcb
Soldering Buttons ntawm Zero Pcb

kuv soldered 4 tus yuam sij thiab xaiv rau lwm sab.

koj tuaj yeem muab nws txhuam rau txhua qhov chaw koj xav tau thiab nws tau npaj siv

Tus PIN-NTAWV NTAWV NTAWM HAUV QAB NO YOG:

* --------------------

| |

| |

| |

--------------------*

THE * cim cov ces kaum yog ib txwm qhib thiab nias lub pob lawv tau txuas nrog

Pom zoo: