Skip to the content
2 layers63 × 28 mmBf-028, the printed circuit board in 3D

a PCB converts 5 buttons into 1 analog output

Size
63 × 28 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
9
Pads
53
Tracks, vias
67, 54
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
22 May 2021
Updated
18 Dec 2021

Overview

Bf-028 is an open-source printed circuit board by botanicfields, from the botanicfields/PCB-ADC-Buttons-for-M5 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 63 × 28 mm with 22 parts on 9 nets, routed with 67 tracks and 54 vias.

It is built around the XC6206P332MR. Its parts include 6 resistors, 5 switches, 3 capacitors, 1 IC and 1 transistor. It belongs with the ESP32 boards of this library.

Main components

1

README

README.md

PCB-ADC-Button-for-M5

a PCB converts 5 buttons into 1 analog output

M5 用光センサ・押しボタン 5 基板

Ambient Light Sensor and 5 Buttons for M5

委託販売: スイッチサイエンス

https://www.switch-science.com/catalog/7227/

1. 特徴

  • 周囲の明るさをアナログ電圧で出力します
  • 押しボタン 5 個の操作を、1 本のアナログ電圧で出力します
  • GROVE コネクタで接続します
  • 出力レベルは 0 ~ 3.3V で、M5(ESP32) の GPIO に合わせています
  • 電源は 5V で、M5シリーズの GROVE コネクタに合わせています
  • JC_Button と同等の判定を可能とするプログラムを用意しています
  • 手に持つことを考慮し、スルーホール部品を使用していません
  • センサーへの影響を考慮し、パイロットランプはありません。

2. 注意

  • 押しボタンスイッチのチャタリングや接触抵抗による誤動作が皆無とは言えません。時刻の設定など、結果を確認しながら操作し、やり直しを可能とするなど、運用でカバーできる範囲でご利用ください。

  • 複数ボタンの同時押しの判定はできません。

  • M5Stack Basic の GROVE コネクタに直結して使用することはできません。 「GROVE-ジャンパケーブル」などを用いて、アナログ入力の GPIO および 5V, GND に接続する必要があります。

「GROVE - 4ピン - ジャンパオスケーブル(5本セット)」

https://www.switch-science.com/catalog/6245/)

「GROVE - 4ピン-ジャンパメスケーブル (5本セット)」

https://www.switch-science.com/catalog/1048/

M5Stack Basic で、G35, G36, 5V, GND に接続した例

M5 シリーズの GROVE ポート

 M5 シリーズ (ESP32) では、アナログ入力として一般に G32 ~ G39 が使用されます。 G2, G4, G12 ~ G15, G24 ~ G26 のアナログ入力機能は、Wi-Fi 等が使用しますので 一般には使いづらいです。G0 はプルアップがあるなどアナログ入力には向きません。

モデルGROVE主な用途
M5Stack BasicG22, G21I2C
M5Stack Core2G33, G32I2C, I/O, UART
M5StickCG33, G32I2C, I/O, UART
M5AtomG32, G26I2C, I/O, UART

3. 内容

光センサ

Everlight ALS-PT19

https://jp.everlight.com/wp-content/plugins/ItemRelationship/product_files/pdf/ALS-PT19-315C-L177-TR8_V8.pdf

ソフトウェア

(1) BF_AdcButton.h, BF_Adc_Button.cpp

光センサの出力を読み出すプログラム、および 5 個の押しボタンの状態を読み出すプログラムです。JC_Button を流用・改変しています。

https://github.com/JChristensen/JC_Button

(2) BF_AdcButtonTest.h, BF_Adc_ButtonTest.cpp

上記コードを呼び出すテスト用のプログラムです。

(3) BF-028.ino

上記テストプログラムのメインプログラムです。

4. 解説

Qiita 「ESP32 のアナログ入力で、押しボタン 5 個を判別する」

https://qiita.com/BotanicFields/items/15d8d45836a4d2f6c87a

5. 接続例

「RGB LED 276 for M5Atom」への接続例です。

Parts

22
QtyValueFootprintReferences
21kbf:BF_R_0603_1608MetricR2, R3
21ubf:BF_C_0603_1608MetricC1, C2
10.1ubf:BF_C_0603_1608MetricC3
11.5kbf:BF_R_0603_1608MetricR4
110kbf:BF_R_0603_1608MetricR6
13.3kbf:BF_R_0603_1608MetricR1
15.1kbf:BF_R_0603_1608MetricR5
1ALS-PT19bf:BF@ALS-PT19_0603_1608MetricQ1
1AnalogOPL_Connector:HW4-SMD-2.0-90DJ1
1DOWNbf:BF@K2-6639SPSW3
1LEFTbf:BF@K2-6639SPSW4
1LOGObf:BF@logo4G***
1RIGHTbf:BF@K2-6639SPSW1
1SELECTbf:BF@K2-6639SPSW5
1UPbf:BF@K2-6639SPSW2
1XC6206P332MRPackage_TO_SOT_SMD:SOT-23U1

The 18 most common of 22 parts.

Similar boards

  • 4 layers21 × 51 mmEasyduino RP2040, the printed circuit board in 3D

    Easyduino RP2040

    Hanqaqa/Easyduino

    Easily dive into different PCB KiCad designs of the most popular microcontroller devboards

    65 parts755CERN-OHL-P-2.0
  • 2 layers26.5 × 34.4 mmPicoLoaderNSB, the printed circuit board in 3D

    PicoLoaderNSB

    makeo/PicoLoader

    A cheap and easy to install modchip for the Nintendo GameCube!

    45 parts320GPL-2.0
  • 2 layers35.9 × 62.7 mmRp2040-memcard, the printed circuit board in 3D

    Rp2040-memcard

    sd2psx/pcb

    The PCB must be produced in 0.8mm thickness. Production files are provided under the "Releases" tab. These do not include the through-hole OLED module.

    60 parts241
  • 2 layers285 × 94.6 mmKeyboard, the printed circuit board in 3D

    Keyboard

    Lotlab/Lot60-BLE-Keyboard

    A 60% bluetooth keyboard (Hardware)

    211 parts167CC-BY-SA-4.0
  • 2 layers405.8 × 127.3 mmOOTstag, the printed circuit board in 3D

    OOTstag

    Skycode22/HIDs

    HID projects

    321 parts132
  • 2 layers165.8 × 130.8 mmYAEMK, the printed circuit board in 3D

    YAEMK

    KarlK90/yaemk-split-kb

    5x8 Split keyboard with thumb-clusters, rotary encoders and oleds.

    218 parts128GPL-3.0
  • 2 layers382 × 160 mmE80-1800-pcb universal, the printed circuit board in 3D

    E80-1800-pcb universal

    ebastler/E80-1800

    QMK compatible PCB replacement for Cherry G80-1800

    451 parts86BSD-2-Clause
  • 2 layers41 × 36 mmSimpleTM32, the printed circuit board in 3D

    SimpleTM32

    pms67/STM32F1-Breakout-Board

    USB-powered STM32F1-based breakout board.

    26 parts82MIT

Questions

How big is the Bf-028 PCB?

It measures 63 × 28 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Bf-028 use?

22 parts, built around the XC6206P332MR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Bf-028 KiCad files?

From the botanicfields/PCB-ADC-Buttons-for-M5 repository on GitHub, at the commit this page was made from: the board is PCBV02L01/KiCad/bf-028.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bf-028 design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).