<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>
0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

如何設計一個基于ESP32的微控制器開發板

科技觀察員 ? 來源:Electro BOY ? 作者:Electro BOY ? 2022-05-25 16:28 ? 次閱讀

最近我設計了一個基于 ESP32微控制器開發板。我用不同的程序和 Wi-Fi 共享測試了該板?,F在我將在本文展示原理圖、電路組裝并對這個 DIY 板進行全面審查。

ESP32開發板:

ESP32 WiFi 和藍牙芯片最新一代的樂鑫產品。它有一個雙核32位MCU,內部集成了WiFi HT40和藍牙/BLE 4.2技術。

poYBAGKN5_iALwPZAAUl4TwJi-4074.png

arduino ESP8266(上一代)相比,ESP32 wifi 和藍牙芯片(也稱為 ESP wroom 32)具有顯著的性能提升。它配備了高性能雙核 Tensilica LX6 MCU。一個核心處理高速連接,另一個用于獨立應用程序開發。雙核MCU頻率為240 MHz,計算能力為600 DMIPS。

ESP32芯片(ESP wroom 32)集成了豐富的硬件外設,包括電容式觸摸傳感器、霍爾傳感器、低噪聲傳感器放大器、SD接口、以太網接口、高速SDIO/SPI、UART、I2S和I2C等。

特征:

pYYBAGKN6AqANSmzAAfJOvo0xuk367.png

時鐘頻率高達 240 MHz 的單核或雙核 32 位 LX6 微處理器。

520 KB 的 SRAM、448 KB 的 ROM 和 16 KB 的 RTC SRAM。

支持速度高達 150 Mbps 的 802.11 b/g/n Wi-Fi 連接。

支持經典藍牙 v4.2 和 BLE 規范。

34 個可編程 GPIO。

多達 18 個 12 位 SAR ADC 通道和 2 個 8 位 DAC 通道

串行連接包括 4 x SPI、2 x I2C、2 x I2S、3 x UART。

用于物理 LAN 通信的以太網 MAC(需要外部 PHY)。

1 個用于 SD/SDIO/MMC 的主控制器和 1 個用于 SDIO/SPI 的從控制器。

電機 PWM 和多達 16 通道 LED PWM。

安全啟動和閃存加密

電路設計

poYBAGKN6BWAfI88AALKw8CHexE834.png

我在 EasyEDA 中制作了原理圖。我把USB轉串口編程芯片改成了CH340g,方便又便宜。該 IC 需要兩個晶體管,以便在程序編譯完成時將 ESP32 的一般模式更改為編程模式。

所需組件:

pYYBAGKN6CiAGCrpAAfZZSJKPvY871.png

1) ESP32 Wi-Fi 模塊

2) Ch340g編程器IC

3) 10K、5k、1K電阻

4) 100nf電容

5)BC547晶體管

6) USB C 型

7)定制PCB

PCB設計

如果您想使用設計,那么這里是下載鏈接,所有 3 個文件 Gerber、BOM 和 CPL 都是共享的。因此,您可以嘗試JLCPCB的 SMT 服務。

pYYBAGKN6DKALtYcAAO6Sspn21s408.png

這里我使用藍色,HASL 表面處理,1.6mm 雙層 PCB。我調整了組件以匹配市場上可用的原始 ESP32 板的參數。

測試:

我用 7 段顯示器測試了這個 ESP32 模塊,我從 Instructables 上的朋友那里得到了 7 段顯示器的文件。該程序用于在 LCD 上顯示數字。

poYBAGKN6FGAQX7JAAX2O1gwIrI598.png

注意:我注意到我的設計可能存在問題,上傳草圖編程器時不會自動切換到編程模式。因此,我們必須通過按下 BOOT 和 FLASH 按鈕來給外部觸發。

7段顯示代碼:

#include

#define PIXELS_PER_SEGMENT 2 // Number of LEDs in each Segment
#define PIXELS_DIGITS 1 // Number of connected Digits
#define PIXELS_PIN 2 // GPIO Pin

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXELS_PER_SEGMENT * 7 * PIXELS_DIGITS, PIXELS_PIN, NEO_GRB + NEO_KHZ800);

//Pixel Arrangement
/*
a
f b
g
e c
d
*/

// Segment array
byte segments[7] = {
//abcdefg
0b0000001, // Segment g
0b0000100, // Segment e
0b0001000, // Segment d
0b0010000, // Segment c
0b0100000, // Segment b
0b1000000, // Segment a
0b0000010 // Segment f
};

//Digits array
byte digits[10] = {
//abcdefg
0b1111110, // 0
0b0110000, // 1
0b1101101, // 2
0b1111001, // 3
0b0110011, // 4
0b1011011, // 5
0b1011111, // 6
0b1110000, // 7
0b1111111, // 8
0b1110011 // 9
};

//Clear all the Pixels
void clearDisplay() {
for (int i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(0, 0, 0));
}
strip.show();
}

void setup() {
strip.begin();
}

void loop() {
//disp_Seg(200); // Cycle through all segments (DelayTime)
disp_Digits(1000); // Show digits from 0-9 (DelayTime)
//disp_Animation(); // Show some Animations with the segments
//disp_CountUP(500, 450); // Count numbers in Ascending order (NUMBER, DelayTime)
// disp_CountDOWN(500, 250); // Count numbers in Descending order (NUMBER, DelayTime)
}

void disp_Seg(int wait) {
clearDisplay();
for (int d = 0; d < 5; d++) {
for (int i = 6; i > 0; i--) {
for (int n = 0; n < PIXELS_DIGITS; n++) {
writeSegment(n, i);
}
strip.show();
delay(wait);
}
}
}

void disp_Digits(int wait) {
clearDisplay();
for (int i = 0; i < 10; i++) {
for (int n = 0; n < PIXELS_DIGITS; n++) {
writeDigit(n, i);
}
strip.show();
delay(wait);
}
}

void disp_CountUP(int num, int wait) {
clearDisplay();
for (int i = 0; i <= num; i++) {
writeDigit(0, (i / 100) % 10);
writeDigit(1, (i / 10) % 10);
writeDigit(2, (i / 1) % 10);
strip.show();
delay(wait);
}
}

void disp_CountDOWN(int num, int wait) {
clearDisplay();
for (int i = num; i >= 0; i--) {
writeDigit(0, (i / 100) % 10);
writeDigit(1, (i / 10) % 10);
writeDigit(2, (i / 1) % 10);
strip.show();
delay(wait);
}
}

void disp_Animation() {
clearDisplay();
//UP-DOWN
for (int i = 0; i < 7; i++) {
for (int n = 0; n < PIXELS_DIGITS; n++) writeSegment(n, 5);
strip.show();
delay(100);
for (int n = 0; n < PIXELS_DIGITS; n++) writeSegment(n, 0);
strip.show();
delay(100);
for (int n = 0; n < PIXELS_DIGITS; n++) writeSegment(n, 2);
strip.show();
delay(100);
for (int n = 0; n < PIXELS_DIGITS; n++) writeSegment(n, 0);
strip.show();
delay(100);
for (int n = 0; n < PIXELS_DIGITS; n++) writeSegment(n, 5);
strip.show();
delay(100);
}
//LEFT-RIGHT
for (int i = 0; i < 5; i++) {
for (int n = 0; n < PIXELS_DIGITS; n++) {
writeSegment(n, 6);
strip.show();
delay(150);
}
for (int n = PIXELS_DIGITS - 1; n >= 0; n--) {
writeSegment(n, 3);
strip.show();
delay(150);
}
clearDisplay();
for (int n = 0; n < PIXELS_DIGITS; n++) {
writeSegment(n, 1);
strip.show();
delay(150);
}
for (int n = PIXELS_DIGITS - 1; n >= 0; n--) {
writeSegment(n, 4);
strip.show();
delay(150);
}
clearDisplay();
}
//ZIG-ZAG
for (int i = 0; i < 5; i++) {
for (int n = 0; n < PIXELS_DIGITS; n++) {
writeSegment(n, 6);
strip.show();
delay(125);
clearDisplay();
writeSegment(n, 1);
strip.show();
delay(125);
clearDisplay();
writeSegment(n, 4);
strip.show();
delay(125);
clearDisplay();
writeSegment(n, 3);
strip.show();
delay(125);
clearDisplay();
}
}
}

void writeDigit(int index, int val) {
byte digit = digits[val];
for (int i = 6; i >= 0; i--) {
int offset = index * (PIXELS_PER_SEGMENT * 7) + i * PIXELS_PER_SEGMENT;
uint32_t color;
if (digit & 0x01 != 0) {
if (val == 1) color = strip.Color(50, 0, 0);
if (val == 2) color = strip.Color(50, 50, 0);
if (val == 3) color = strip.Color(50, 0, 50);
if (val == 4) color = strip.Color(0, 50, 0);
if (val == 5) color = strip.Color(0, 50, 50);
if (val == 6) color = strip.Color(0, 0, 50);
if (val == 7) color = strip.Color(50, 25, 0);
if (val == 8) color = strip.Color(25, 5, 75);
if (val == 9) color = strip.Color(75, 25, 5);
if (val == 0) color = strip.Color(5, 75, 25);
}
else
color = strip.Color(0, 0, 0);

for (int j = offset; j < offset + PIXELS_PER_SEGMENT; j++) {
strip.setPixelColor(j, color);
}
digit = digit >> 1;
}
}

void writeSegment(int index, int val) {
byte seg = segments[val];
for (int i = 6; i >= 0; i--) {
int offset = index * (PIXELS_PER_SEGMENT * 7) + i * PIXELS_PER_SEGMENT;
uint32_t color;
if (seg & 0x01 != 0) {
if (val == 0) color = strip.Color(50, 0, 0);
if (val == 1) color = strip.Color(0, 50, 50);
if (val == 2) color = strip.Color(0, 50, 0);
if (val == 3) color = strip.Color(50, 0, 50);
if (val == 4) color = strip.Color(50, 50, 50);
if (val == 5) color = strip.Color(0, 0, 50);
if (val == 6) color = strip.Color(50, 50, 0);
}
else
color = strip.Color(0, 0, 0);

for (int j = offset; j < offset + PIXELS_PER_SEGMENT; j++) {
strip.setPixelColor(j, color);
}
seg = seg >> 1;
}
}

可能會遇到的故障:

1) 如果您不使用 SMT 服務,請正確制作焊點。

2) 焊接時不要過度加熱 Wi-Fi 模塊。

3)如果微控制器沒有切換到編程模式,則重新啟動并使用觸覺按鈕閃爍控制器。

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • 微控制器
    +關注

    關注

    48

    文章

    6812

    瀏覽量

    147660
  • 開發板
    +關注

    關注

    25

    文章

    4437

    瀏覽量

    94084
  • ESP32
    +關注

    關注

    13

    文章

    896

    瀏覽量

    15819
收藏 人收藏

    評論

    相關推薦

    【FireBeetle 2 ESP32-S3開發板測評】MicroPython開發體驗

    【FireBeetle 2 ESP32-S3開發板測評】MicroPython開發體驗
    的頭像 發表于 07-23 09:02 ?1239次閱讀
    【FireBeetle 2 <b class='flag-5'>ESP32</b>-S3<b class='flag-5'>開發板</b>測評】MicroPython<b class='flag-5'>開發</b>體驗

    ESP32-WROOM-32開發板教程

    ESP32-WROOM-32是一款功能強大的物聯網開發板,它基于Espressif的ESP32芯片,擁有更多的性能和功能。在本篇文章中,我將為您提供一份詳盡、詳實、細致的教程,以幫助您快速上手
    的頭像 發表于 12-08 13:55 ?3173次閱讀

    怎樣去設計開發板esp32

    前面我們介紹了很多的開發板,比如說51、stm32、fpga、linux soc這些,今天我們再介紹最后開發板esp32。后期我們將通過介紹電路圖設計、打
    發表于 12-21 06:42

    自制Esp32 Adafruit羽毛Pcb

    微控制器編程經驗的制造商推薦這款 Feather,而不是作為第一個開發板。以下是 Espressif 關于 ESP32 的規格:具有 600 DMIPS 的 240 MHz 雙核 Te
    發表于 06-23 06:38

    設計ESP32操縱桿手控制器的教程

    描述ESP32 操縱桿手控制器 ESP-NOW我設計了 ESP32 操縱桿手
    發表于 09-02 06:17

    ESP32-DevKitC有多少spi硬件端口?

    打算購買 ESP32-DevKitCVIE 來開發帶有各種開發板的多微控制器。我有兩疑惑。
    發表于 04-11 06:34

    如何從另一個微控制器更新ESP8266上的閃存?

    我過去在幾個項目中使用過 ESP8266/ESP32(通常在某些 Adafruit 開發板上);但現在我有小項目,將
    發表于 05-11 07:08

    基于esp32開發板

    基于esp32開發板,用于物聯網開發
    發表于 08-07 08:56 ?102次下載

    ESP32開發板驅動下載

    ESP32開發板驅動免費下載。
    發表于 07-28 15:15 ?49次下載

    ESP32 S微控制器開源分享

    電子發燒友網站提供《ESP32 S微控制器開源分享.zip》資料免費下載
    發表于 10-19 11:38 ?0次下載
    <b class='flag-5'>ESP32</b> S<b class='flag-5'>微控制器</b>開源分享

    合宙ESP32-S3開發板特性解讀

    穿越萬水千山,奔赴與工程師朋友的約定——合宙ESP32-S3超值MCU開發板,來了! 1 合宙ESP32-S3開發板簡介 合宙CORE-ESP32
    的頭像 發表于 01-11 18:45 ?8439次閱讀

    新品上市 | 合宙ESP32-S3開發板

    穿越萬水千山,奔赴與工程師朋友的約定——合宙ESP32-S3超值MCU開發板,來了!1合宙ESP32-S3開發板簡介合宙CORE-ESP32
    的頭像 發表于 01-13 15:53 ?1758次閱讀
    新品上市 | 合宙<b class='flag-5'>ESP32</b>-S3<b class='flag-5'>開發板</b>

    基于ESP32S3系列模組的開發板

    基于ESP32S3系列模組的開發板
    的頭像 發表于 04-10 11:25 ?2604次閱讀
    基于<b class='flag-5'>ESP32</b>S3系列模組的<b class='flag-5'>開發板</b>

    ESP32-C2開發板 8684 智能開關例程

    ESP32-C3開發板開發演示
    的頭像 發表于 06-29 14:13 ?496次閱讀
    <b class='flag-5'>ESP32</b>-C2<b class='flag-5'>開發板</b>  8684   智能開關例程

    ESP32-C2 8682芯片開發板開發演示

    ESP32-C2開發板開發演示
    的頭像 發表于 07-06 13:38 ?235次閱讀
    <b class='flag-5'>ESP32</b>-C2  8682芯片<b class='flag-5'>開發板</b><b class='flag-5'>開發</b>演示
    亚洲欧美日韩精品久久_久久精品AⅤ无码中文_日本中文字幕有码在线播放_亚洲视频高清不卡在线观看
    <acronym id="s8ci2"><small id="s8ci2"></small></acronym>
    <rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
    <acronym id="s8ci2"></acronym>
    <acronym id="s8ci2"><center id="s8ci2"></center></acronym>