Mundarija:

Waveshare elektron siyoh displeyi aniq voltmetr (0-90v DC) Arduino Nano bilan: 3 qadam
Waveshare elektron siyoh displeyi aniq voltmetr (0-90v DC) Arduino Nano bilan: 3 qadam

Video: Waveshare elektron siyoh displeyi aniq voltmetr (0-90v DC) Arduino Nano bilan: 3 qadam

Video: Waveshare elektron siyoh displeyi aniq voltmetr (0-90v DC) Arduino Nano bilan: 3 qadam
Video: Waveshare 1.8inch LCD Display Module for Raspberry Pi Pico, 65K Colors, 160×128 2024, Noyabr
Anonim

Ushbu yo'riqnomada men Arduino Nano, kuchlanish bo'luvchi va ADS1115 bilan jihozlangan 2,9 dyuymli elektron qog'oz displeyidan foydalanaman.

Bu ko'rsatma oldingi ikkita loyihani birlashtiradi:

-Arduino volt o'lchagich (0-100V DC)-2-versiya-https://www.instructables.com/Arduino-Volt-Meter-0…

-Arduino yordamida elektron qog'ozni qisman yangilash-https://www.instructables.com/E-Paper-Display-Part…

Ta'minotlar

Ishlatilgan materiallar:

1 x Arduino Nano -

1 x Waveshare displeyi -

Non paneli va simlar -

USB quvvat banki -

1 x ADS 1115 - 16 bitli ADC -

1 x 1/4 Vt (men 1 Vt rezistorlardan foydalanishni taklif qilaman) 1% rezistorlar - 690k ohm -

1 x 1/4 Vt (men 1 Vt rezistorlardan foydalanishni taklif qilaman) 1% rezistorlar - 10k ohm -

Astro AI DM6000AR -

9V batareyalar -

CanadianWinters Amazon.com MChJ Associates dasturining ishtirokchisi bo'lib, Amazon.com va unga aloqador saytlarga havola qilish orqali saytlar uchun pul ishlash vositalarini taqdim etish uchun mo'ljallangan sheriklik reklama dasturidir. Ushbu havolalarni ishlatib, Amazon Associate sifatida, agar siz boshqa narsa sotib olsangiz ham, sotib olishdan daromad olaman va bu sizga hech qanday xarajat qilmaydi.

1 -qadam: Keling, komponentlarni ulaymiz

Keling, komponentlarni ulaymiz
Keling, komponentlarni ulaymiz

Men komponentlarni quyidagicha uladim:

Waveshare displeyi:

Arduino -ni ko'rsatish

BUSY D7

RST D8

DC D9

CS D10

Din D11

CLK D13

GND GND

VCC 3.3V

ADS1115:

ADS1115 Arduino

VCC 5V

GND GND

ADDR GND

SCL A5

SDA A4

AIN0 kuchlanish bo'luvchi

Voltaj bo'linishi uchun men bu safar 680Kohm va 10Kohm rezistorlardan foydalandim. Men har doim aniqlik uchun qarshilik qiymatlarini o'lchayman.

Voltaj bo'linishi uchun hisob -kitoblar turli xil qarshilik qiymatlaridan foydalanmoqchi bo'lsangiz, hisob -kitoblarni avtomatlashtiradigan ushbu jadvalda mavjud: Google Sheet -ga havola. E'tibor bering, faylni tahrirlash mumkin emas, uni o'zgartirish uchun uni yuklab olish yoki diskdan nusxa ko'chirish kerak.

2 -qadam: kod

Kod
Kod

Displey va ADC kodi juda katta va agar men ekranda katta belgilar ishlatsam, arduino -da xotira etarli bo'lmaydi.

Buni hal qilish uchun men matnni o'z ichiga olgan tasvirni yaratish orqali matnni kodga aylantirdim, so'ngra ushbu onlayn asbob yordamida tasvirni arduino tomonidan o'qiladigan kodga aylantirdim:

Men hali ham ba'zi shriftlar va belgilarni ishlatardim, lekin xotirani saqlash uchun batareya quvvati va zaryadlanish foizini ko'rsatish uchun faqat raqamlardan iborat shriftdan foydalanaman.

Bu kod batareya zo'riqishini ko'rsatadi va zaryadlanish foizini ko'rsatadi, agar 90vda batareya zaryadlangan bo'lsa va 0vda batareya to'liq bo'sh bo'lsa. Bu sizning ehtiyojlaringizga mos ravishda o'zgartirilishi mumkin.

// GxEPD2_GFX tayanch klassi parametr sifatida ko'rsatuv misoliga havola yoki ko'rsatgichlarni o'tkazish uchun ishlatilishi mumkin, ~ 1.2k ko'proq koddan foydalaniladi.

// GxEPD2_GFX asosiy sinfini yoqish yoki o'chirish #ENABLE_GxEPD2_GFX 0ni belgilash #qo'shish #qo'shish #qo'shish #qo'shish #qo'shish #qo'shish Adafruit_ADS1115 reklamalari (0x48); // ADC manzili #if aniqlangan bo'lsa (_ AVR) #MAX_DISPLAY_BUFFER_SIZE 800 ni aniqlang // #MAX_HEIGHT (EPD) (EPD:: HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD:: WIDTH:: HEID) / EPD_) EPD:: WIDTH/ 8)) GxEPD2_BW displeyi (GxEPD2_290 (/*CS = 10*/ SS,/*DC =*/ 9,/*RST =*/ 8,/*BUSY =*/ 7)); #endif U8G2_FOR_ADAFRUIT_GFX u8g2Fonts; void setup () {Serial.begin (115200); Serial.println (); Serial.println ("sozlash"); ads.begin (); display.init (); u8g2Fonts.begin (ko'rsatish); // u8g2 protseduralarini Adafruit GFX showbitmaps () ga ulang; kechikish (500); Serial.println ("sozlash tugallandi"); } void loop () {qadriyatlar (); kechikish (1000); } // 'charging-icon-c', 128x40px const unsigned char Bat PROGMEM = {0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00., 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x01, 0xff, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xf, 0xf, 0x00,, 0x07, 0xff, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xf, 0xf0, 0xf8, 0x00,, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0f, 0x87, 0xf7, 0xff, 0xf0, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0x ff, 0xf0, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff 0xf8, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x01, 0xff, 0x0, 0x0f 0x87, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x01, 0xff, 0x80, 0x00, 0x00, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0xf, 0xf, 0xf 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x87, 0xff, 0xff 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00. 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00. 0xff, 0xff}; const unsigned char battext PROGMEM = {// 'logisoso_epaper_volts_simple4, 128x145px 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff. 0xff, 0xf8, 0xff, 0x1f, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0x1f, 0x1f, 0xff, 0xff 0x87, 0xf1, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfe, 0x1f, 0x1f, 0xff, 0xf8, 0xff, 0xff, 0x8f, 0xf1, 0xf8, 0xff, 0xff, 0xff, 0xf. 0x7e, 0x1f, 0x1f, 0xff, 0xf8, 0xff, 0xff, 0x87, 0xf1, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x38, 0x00, 0x1f, 0xff, 0xf7, 0xf8, 0xf7 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0xff, 0xff, 0xc3, 0xc0, 0x61, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0x7f, 0xff, 0xf8, 0xff, 0xff, 0xe0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf0 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf8, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x07, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xfc, 0x03, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x41, 0x07, 0xff, 0xff, 0xe0, 0x38, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x18, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xe3, 0xff, 0xff, 0xf8, 0xf8, 0xf7, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x87, 0x0e, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf., 0xff, 0xff, 0xf8, 0xff, 0xff, 0x87, 0x0e, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x07, 0x ff, 0xff, 0xf8, 0xff, 0xff, 0xc7, 0x0e, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0xff, 0xf, 0xc3, 0xf0 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf, 0xf8, 0xff, 0xff 0xf8, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff. 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xf 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x87, 0xf7. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x8f, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xf8, 0xff, 0xff, 0xcf, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xf. 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff. 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x07., 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x31, 0x87, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xf8, 0x71, 0xc3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xf3, 0xf3, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0x ff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf1, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xf8, 0x71, 0xc3, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x30, 0x07, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x70, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xf. 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff. 0xff, 0xff, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xfc, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xc3, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xf8, 0xf8, 0xf0 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xc3, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf 0 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf 0 0xff, 0xff, 0xff, 0x1f, 0xff, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xf0, 0x03, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0x00, 0x03, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff 0xe0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xf, 0x03, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x87, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x87, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xc7, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x3f., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x ff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xf8, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff. 0xff, 0xf8, 0x3f, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xfc, 0x9f, 0xf. 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0x1f, 0xff, 0xf8, 0xff, 0xff, 0x87, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff 0xc0, 0x3e, 0x3f, 0xff, 0xf8, 0xff, 0xff, 0x8f, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x78, 0x07, 0xff, 0xff, 0xf8, 0xf, 0xf. 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0x00, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0xf 0x3f, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x3f, 0xf8, 0x0f, 0xff, 0xf8, 0xff, 0xff, 0xf, 0xff 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0x0f, 0xff, 0xf8, 0xff, 0xff, 0xe1, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xdf, 0xff, 0xf9, 0xff, 0xff, 0xc1, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x8e, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x0e, 0x1f, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x0e, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xc7, 0x1e, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x18, 0x3f, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xe0, 0x38, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff., 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x ff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; // bu funksiya void showbitmaps () {uint16_t bg = GxEPD_WHITE; uint16_t fg = GxEPD_BLACK; display.firstPage (); qilish {display.fillScreen (bg); display.drawImage (matnli matn, 0, 60, 128, 145, noto'g'ri, 0, to'g'ri); // matn (y pastdan, x chapdan, balandlik y, uzunlik x, teskari_rang (rost/noto'g'ri), aylantirish (0, 1), shaffoflik? (rost/noto'g'ri)) displey.drawImage (Bat, 0, 5, 128, 40, noto'g'ri, 0, to'g'ri); // batareya belgisi} while (display.nextPage ()); } // bu funksiya void qiymatlari ko'rsatiladigan qiymatlarni hisoblab chiqaradi va chop etadi () {float battV; // Batareya quvvati o'zgaruvchan; // Batareya % int calib = 7; // Xatolik suzuvchi kuchlanishni kamaytirish uchun ADS1115 kalibrlash qiymati = 0; // kuchlanish qiymatini saqlash uchun ishlatiladi float Radjust = 0.01437283477; // Kuchlanishni ajratuvchi omil (R2 / R1+R2) R1 ~ 690k va R2 ~ 10k int16_t adc0; // 16 bit ADC A0 kirishini o'qiydi adc0 = ads.readADC_SingleEnded (0); kuchlanish = ((adc0 + kalibr) * 0,1875)/1000; battV = kuchlanish/Radjust; // Batareyani hisoblash % perc = (battV/ 90) * 100; // biz batareyaning maksimal kuchlanishi 90v deb taxmin qilamiz // displey muammolarini oldini olish uchun batareyani % 2-raqamli maxda saqlang, agar (perc> = 100) {perc = 99; } display.setRotation (1); // 0 Burilish yo'q, 1 burilish 90 daraja uint16_t bg = GxEPD_WHITE; uint16_t fg = GxEPD_BLACK; u8g2Fonts.setFontMode (1); // u8g2 shaffof rejimidan foydalaning (bu sukut bo'yicha) u8g2Fonts.setFontDirection (0); // chapdan o'ngga (bu sukut bo'yicha) u8g2Fonts.setForegroundColor (fg); // Adafruit GFX rangini qo'llang u8g2Fonts.setBackgroundColor (bg); // Adafruit GFX rangini qo'llang u8g2Fonts.setFont (u8g2_font_logisoso32_tn); // yoki u8g2_font_logisoso32_tr yoki u8g2_font_logisoso32_tn display.setPartialWindow (203, 0, 100, 128); // (x chapdan, y yuqoridan, uzunlik x, balandlik y) bu qiymatlarni qisman yangilash uchun oynani o'rnatadi display.firstPage (); qilish {display.fillScreen (bg); // Chop etish batareyasining kuchlanishi u8g2Fonts.setCursor (205, 52); u8g2Fonts.print (battV, 1); // Chop etish batareyasi % u8g2Fonts.setCursor (205, 110); u8g2Fonts.print (perc, 0); } while (display.nextPage ()); }

3 -qadam: Sinab ko'raylik:)

Sinab ko'raylik:)
Sinab ko'raylik:)

Men natijalardan juda xursandman.

Haqiqiy kuchlanishdan minimal og'ish (0,2 voltdan kam) bilan taxminan 9v dan 85v gacha bo'lgan bir qator kuchlanishni sinab ko'rdim.

Yaxshi korpusga o'ralganidan so'ng, bu juda yaxshi muhitda o'qilishi mumkin bo'lgan kichik voltli o'lchagichni yaratishi kerak:).

Tavsiya: