Cov txheej txheem:

Nano ESP32 BLE Scanner: 14 Kauj Ruam (nrog Duab)
Nano ESP32 BLE Scanner: 14 Kauj Ruam (nrog Duab)

Video: Nano ESP32 BLE Scanner: 14 Kauj Ruam (nrog Duab)

Video: Nano ESP32 BLE Scanner: 14 Kauj Ruam (nrog Duab)
Video: Exploring the Arduino Nano ESP32 | MicroPython & IoT Cloud 2024, Hlis ntuj nqeg
Anonim
Nano ESP32 BLE Scanner
Nano ESP32 BLE Scanner

Cov lus qhia no qhia yuav siv ESP32 li cas los ua wireless BLE teeb liab lub tshuab luam ntawv, txhua cov ntaub ntawv scanned yuav xa mus rau HTTP server ntawm WiFi.

Kauj Ruam 1: Vim Li Cas BLE Scanner?

Vim li cas BLE Scanner?
Vim li cas BLE Scanner?

BLE (Bluetooth Tsawg Zog) lub teeb liab muaj ntau heev rau cov cuab yeej digital tam sim no, xov tooj ntawm tes, dab teg, iBeacon, cov khoom muaj nqis. Lub teeb liab no tsis tsuas yog pab koj sib txuas cov cuab yeej, nws tseem tuaj yeem tshaj tawm cov cuab yeej xwm txheej, xws li qib roj teeb, lub plawv dhia, kev txav (taug kev, khiav, poob), kub, khawm ceeb, tiv thaiv kom poob …

Nws yog cov ntaub ntawv tseem ceeb muaj txiaj ntsig rau kev nrhiav chaw yog tias peb tuaj yeem sau BLE teeb liab ntawm qee tus lej ntawm txoj haujlwm.

Nyob ntev, BLE lub tshuab luam ntawv yuav tsum txhim kho hauv txoj haujlwm xaiv. Txawm li cas los xij, xaiv qhov chaw raug yuav tsum tau sim thiab ua yuam kev. Ib lub tshuab luam ntawv me me wireless BLE tau yooj yim los pab koj txheeb xyuas qhov twg yog qhov chaw raug.

Kauj ruam 2: Kev npaj

Kev npaj
Kev npaj
Kev npaj
Kev npaj

ESP32 pawg thawj coj saib

Kuv tab tom siv ESP-WROOM-32 pawg thawj coj lub sijhawm no.

Lub Thawv Me Me

Ib lub thawv me me yuav tsum ua tau zoo, Kuv muaj qee lub TicTac lub thawv me me hauv tes thiab nws tsuas yog haum ESP32 pawg thawj coj hauv nws, qhov xwm txheej zoo li cas!

Roj teeb Lipo

ESP32 ncov tam sim no nyob ib puag ncig 250 mA. Txhawm rau tsis kos ntau dua 1C tam sim no txhua lub sijhawm, Lipo Roj teeb yuav tsum ntau dua 250 mAh muaj peev xwm. 852025 yog qhov loj tshaj plaws uas tuaj yeem haum rau hauv Tictac lub thawv thiab nws thov nws muaj 300 mAh, nws zoo txaus.

Lub Hwj Huam Tswj Hluav Taws Xob

3.3 V LDO tus tswj hwm, qee tus neeg siv hluav taws xob, Kuv muaj qee tus HT7333A tus tswj hwm, 22 uf thiab 100 uf capacitor hauv tes

Lwm tus

10k Ohm SMD resistor rau rub EN tus pin, ib qho me me ntawm ntau lub hom phiaj PCB, hloov hluav taws xob, qee qhov xaim xaim, 7 tus pin header

ESP32 Dev Dock

Hauv cov txheej txheem txheej txheem, nws tseem xav tau ESP32 Kev Txhim Kho Kev Nkag, koj yuav pom yuav ua li cas thiaj ua nws hauv kuv cov lus qhia yav dhau los:

www.instructables.com/id/Battery-Powered-E…

Kauj Ruam 3: Txiav PCB

Txiav PCB
Txiav PCB

Ntsuas qhov dav ntawm koj lub thawv me me thiab txiav cov PCB kom haum rau hauv nws.

Kauj Ruam 4: Soldering Pin Header

Soldering Pin Header
Soldering Pin Header

Cia peb pib ua haujlwm los ntawm 7 tus pin header thiab PCB.

Kauj Ruam 5: Cov Hluav Taws Xob Hluav Taws Xob

Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob

Nov yog cov ntsiab lus sib txuas:

LDO Vin -> Vcc tus pin header (1) -> hloov hluav taws xob -> Lipo V+, Charge tus pin header (7)

LDO GND -> GND pin header (2), capacitors V- pins, ESP32 GND LDO Vout -> capacitors V+ pins, ESP32 Vcc

Kauj Ruam 6: Soldering Rub Up Resistor

Soldering Rub Tawm Resistor
Soldering Rub Tawm Resistor

Nws yog qhov haujlwm nyuaj tshaj plaws hauv txoj haujlwm no, tus pin dav hauv ESP32 pawg thawj coj tsuas yog 1.27 mm. Hmoov zoo, Vcc thiab EN tus pin nyob ze, nws tuaj yeem ncaj ncaj solder resistor ntawm ob tus pin tsis muaj xaim.

ESP32 Vcc tus pin -> 10k Ohm resistor -> ESP32 EN tus pin

Kauj Ruam 7: Tus Kws Khoos Phis Tawj Pins

Soldering Program Pins
Soldering Program Pins

Nov yog cov ntsiab lus sib txuas:

Tx pin header (3) -> ESP32 Tx pin

Rx tus pin header (4) -> ESP32 Rx tus pin Program tus pin header (5) -> ESP32 GPIO 0 tus pin RST tus pin header (6) -> ESP32 EN tus pin

Kauj Ruam 8: Ntxuav TicTac Box

Ntxuav TicTac Box
Ntxuav TicTac Box
  • Noj tag nrho cov khoom qab zib
  • Tshem cov ntawv nplaum

Kauj ruam 9: Nyem rau hauv lub thawv

Nyem rau hauv lub thawv
Nyem rau hauv lub thawv
Nyem rau hauv lub thawv
Nyem rau hauv lub thawv
Nyem rau hauv lub thawv
Nyem rau hauv lub thawv

Nyeem tag nrho cov khoom siv rau hauv TicTac lub thawv, ceev faj tsis txhob rhuav tshem cov xov hlau.

Kauj ruam 10: Npaj Software

Npaj Software
Npaj Software
Npaj Software
Npaj Software

Arduino IDE Cov

Rub tawm thiab teeb tsa Arduino IDE yog tias tseem tsis tau:

www.arduino.cc/en/Main/Software

arduino-esp32

Nruab kho vajtse txhawb nqa rau ESP32

Cov lus qhia ntxaws rau kev teeb tsa hauv cov txheej txheem ua haujlwm nrov.

Rau Linux: https://www.arduino.cc/en/Guide/Linux (saib kuj Arduino playground page

Rau macOS X:

Rau Windows:

Ref.:

Kauj ruam 11: Program ESP32

Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
Qhov program ESP32
  • Rub tawm Arduino program:
  • Hloov kho tsis:

#define WIFI_SSID "YOURAPSSID"

#define WIFI_PASSWORD "YOURAPPASSWORD" #define POST_URL "https:// YOURSERVERNAMEORIP: 3000/"

  • Xaiv Pawg Thawj Coj: Txhua pawg ESP32
  • Xaiv qhov muab faib: Tsis muaj OTA / Tsawg kawg SPIFFS
  • Upload

Kauj Ruam 12: Tau Txais Cov Ntaub Ntawv

Tau Txais Cov Ntaub Ntawv
Tau Txais Cov Ntaub Ntawv

Yog tias koj tseem tsis tau muaj HTTP server kom tau txais POST cov ntaub ntawv, koj tuaj yeem sim siv qhov yooj yim Node.js program:

Nov yog cov ntaub ntawv piv txwv tau txais:

Tue Mar 20 2018 08:44:41 GMT+0000 (UTC): [{"Chaw Nyob": "6e: 3d: f0: a0: 00: 36", "Rssi": -65, "Chaw Tsim Khoom": "4c0010050b1047f0b3"}, {"Chaw Nyob": "f8: 04: 2e: bc: 51: 97 "," Rssi ": -94," Chaw Tsim Khoom Data ":" 75004204018020f8042ebc5197fa042ebc519601000000000000 "}, {" Chaw Nyob ":" 0c: 07: 4a: fa: 60: dd "," Rssi ": -96," Chaw Tsim Khoom ": "4c0009060304c0a80105"}]

Kauj Ruam 13: Kev Ntsuas Hluav Taws Xob

Ntsuas Hluav Taws Xob
Ntsuas Hluav Taws Xob
Ntsuas Hluav Taws Xob
Ntsuas Hluav Taws Xob
Ntsuas Hluav Taws Xob
Ntsuas Hluav Taws Xob

Qhov kev zov me nyuam scan BLE teeb liab rau 30 vib nas this, tom qab sib sib zog nqus 300 vib nas this thiab tom qab ntawv rov kuaj dua. Rau txhua lub voj, nws haus ib ncig 3.9 mWh.

Kev xav, nws tuaj yeem ua haujlwm: (Kuv yuav hloov kho qhov ntsuas tom qab ntawm kuv li Twitter)

300 mAh Lipo / 3.9 mWh @ 330 vib nas this

= [(300 mA * 3.3 V) mWh / 3.9 mWh * 330] vib nas this ~ 83769 vib nas this ~ 23 teev

2018-04-08 Hloov tshiab:

Kuv tau hloov pauv siv XC6503D331 LDO tus tswj hwm thiab ua 2 ntsuas:

Hloov 1: 12:43:28 - 16:42:10 (~ 20 teev) 210 BLE luam theej duab POST tau txais

Hloov 2: 10:04:01 - 05:36:47 (~ 19.5 teev) 208 BLE luam theej duab POST tau txais

Kauj Ruam 14: Zoo Siab Kuaj

Zoo Siab Luam!
Zoo Siab Luam!

Nws yog lub sijhawm los nrhiav qhov chaw teeb tsa koj BLE taug qab network!

Pom zoo: