Skip to the content
PCBKitNew board
2 layersI2cExplorer, the printed circuit board in 3D

i2cExplorer is a powerful tool designed for exploring I2C devices on the bus using the RP2040 as the MCU within the Arduino framework.

Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
108
Pads
147
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 7 (file 20221018)
Created
23 Jan 2024
Updated
26 Jan 2024

Overview

I2cExplorer is an open-source printed circuit board by Oliver0804, from the Oliver0804/i2cExplorer repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board with 19 parts on 108 nets.

It is built around the RP2040 and S8050. Its parts include 4 connectors, 3 resistors, 3 switches, 2 ICs and 1 diode. It belongs with the RP2040 boards of this library.

Main components

2

README

README.md

i2cExplorer

./pic/demo.png

Introduction

https://www.youtube.com/watch?v=PAolOif3dD0&ab_channel=BashCat ./pic/oled.jpeg

i2cExplorer is a powerful tool designed for exploring I2C devices on the bus using the RP2040 as the MCU within the Arduino framework. It allows users to interact with I2C devices via a serial interface, providing capabilities for scanning, reading, and writing I2C registers.

『I2C Explorer』是一個非常實用的工具,特別適合於解決在使用I2C通訊協議時可能遇到的一些常見問題和場景。以下是幾個典型的使用場景,以及I2C Explorer如何幫助解決這些問題:

  1. 不知道I2C裝置的地址:在開發I2C應用時,常常需要知道連接到I2C總線的裝置地址。如果文檔不清楚或者你正在使用未標記的硬件,I2C Explorer的掃描功能(scana命令)可以掃描總線上的所有裝置,幫助你快速找到每個裝置的地址。
  2. 混淆了SDA和SCL線:有時可能會不小心將SDA(數據線)和SCL(時鐘線)接反。I2C Explorer提供了一個方便的命令(s命令),可以在不重新布線的情況下軟件層面上交換這兩條線,從而糾正連接錯誤。
  3. 探索特定I2C裝置的寄存器:當你需要了解某個特定I2C裝置的內部寄存器結構時,I2C Explorer的寄存器掃描功能(scanr命令)可以讀取並顯示連接到指定地址的I2C裝置的所有寄存器信息。
  4. 讀取或寫入I2C裝置的寄存器:在開發和調試階段,直接從串口讀取或寫入I2C裝置的寄存器是非常有用的。I2C Explorer通過提供讀取(r命令)和寫入(w命令)命令,使這一過程變得簡單快捷。

I2C Explorer is an extremely practical tool, particularly suited for addressing common problems and scenarios encountered when using the I2C communication protocol. Below are several typical use cases, and how the I2C Explorer helps in resolving these issues:

  1. Unknown I2C Device Address: During the development of I2C applications, it's often necessary to know the addresses of devices connected to the I2C bus. If documentation is unclear or you are working with unmarked hardware, the scanning feature (scana command) of I2C Explorer can scan all devices on the bus, helping you quickly find the address of each device.
  2. Confusion between SDA and SCL Lines: Sometimes, you might accidentally reverse the SDA (data line) and SCL (clock line). I2C Explorer offers a convenient command (s command) that swaps these two lines at the software level without the need for rewiring, thereby correcting the connection error.
  3. Exploring the Registers of a Specific I2C Device: When you need to understand the internal register structure of a particular I2C device, the register scanning feature (scanr command) of I2C Explorer can read and display all the register information of the device connected to a specified address.
  4. Reading or Writing to I2C Device Registers: During the development and debugging phases, directly reading from or writing to the registers of an I2C device through the serial port is very useful. I2C Explorer simplifies this process by providing commands for reading (r command) and writing (w command).

Hardware Setup

./pic/Connection.png

Connect any I2C device to your RP2040, using the following pins:

  • SDA (Serial Data Line): Connect to GP0 on the Pico.
  • SCL (Serial Clock Line): Connect to GP1 on the Pico. Ensure that your I2C devices are compatible with the RP2040's voltage levels and properly powered.

Features

  • I2C Bus Scanning: Detect all I2C devices connected to the RP2040.
  • Read I2C Registers: Read values from specified registers of the connected I2C devices.
  • Write I2C Registers: Write data to specified registers of the connected I2C devices.
  • Monitor I2C Registers: Continuously read and print values from a specific register at regular intervals.
  • Serial Interface: Communicate with the RP2040 and I2C devices through a serial connection.
  • Swap I2C bus ( SDA <-> SCL ) ./pic/swap1.jpeg

./pic/swap2.jpeg

Usage

Command List

Execute the following commands through your serial terminal:

text
- `scana`: Scan all I2C devices on the bus.
- `scanr [address]`: Scan registers at the specified I2C address.
- `c [address]`: Connect to an I2C device at the given address.
- `r [register]`: Read from a register on the connected I2C device.
- `w [register] [data]`: Write data to a register on the connected I2C device.
- `m [register] [interval]`: Monitor a register at the specified interval (in milliseconds).
- `s` - Swap SDA and SCL pins if connected incorrectly
- `exit`: Disconnect from the current I2C device.
- `help`: Display available commands based on the connection status.
scana

./pic/scana.png

c 0x68 and r 0x75

./pic/c68.png

Monitoring Interval

For the m command, the interval is optional (default is 500ms). The maximum allowed interval is 3000ms.

Example

text
> scana
> c 0x68
> r 0x1
> w 0x1 0xFF
> m 0x1 1000
> exit

PCB HW(Kicad 7)

./pic/hw/programmingPin.png

./pic/hw/front.png ./pic/hw/back.png

Note

Ensure your RP2040 and I2C devices are correctly connected and configured. This tool is intended for exploration and debugging purposes.

Parts

19
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
3RResistor_SMD:R_0603_1608MetricR1, R2, R3
3SW_PushButton_Switch_SMD:Panasonic_EVQPUM_EVQPUDSW1, SW2, SW3
1CrystalCrystal:Crystal_SMD_2520-4Pin_2.5x2.0mmY1
1GC9A01Display:GC9A01_Extended_FPCJ1
1I2CTestConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_HorizontalJ3
1LEDLED_SMD:LED_0603_1608MetricD1
1RP2040Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mmU1
1S8050Package_TO_SOT_SMD:SOT-23Q1
1SWDIOConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1USB_C_ReceptacleConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J4
1W5Q16JVSSIQPackage_SO:SOIC-8_5.23x5.23mm_P1.27mmU2

Questions

What parts does the I2cExplorer use?

19 parts, built around the RP2040 and S8050. 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 I2cExplorer KiCad files?

From the Oliver0804/i2cExplorer repository on GitHub, at the commit this page was made from: the board is HW/i2cExplorer/i2cExplorer.kicad_pcb and its schematic HW/i2cExplorer/i2cExplorer.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the I2cExplorer 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).

Similar boards

  • 4 layers74 × 104 mmBeepy, the printed circuit board in 3D

    Beepy

    sqfmi/beepy-hardware

    Beepy Hardware

    160 parts348MIT
  • 4 layers98 × 124.4 mmPiberry.beepy, the printed circuit board in 3D

    Piberry.beepy

    CarbonComputers/Piberry-12

    PiBerry v12 marks the final and most refined revision of the PiBerry handheld Linux terminal. Designed with both form and function in mind, this version brings together the best elements of previous iterations while…

    132 parts9MIT
  • 4 layers44 × 44 mmNode pcb, the printed circuit board in 3D

    Node pcb

    marino222/digital-clock72

    Kinetic Art Clock consisting of LCD displays

    55 parts2MIT
  • 2 layers8-ball badge, the printed circuit board in 3D

    8-ball badge

    tylercrumpton/magic-8-badge

    An Open Source CircuitPython-compatible PCB badge that can (maybe) tell the future!

    90 parts2
  • 2 layers223.8 × 240.4 mmNerf target v1 panel, the printed circuit board in 3D

    Nerf target v1 panel

    DIaLOGIKa-GmbH/modular-nerf-target

    A hex-based modular system to build custom nerf gun targets

    346 parts1MIT
  • 2 layers99.1 × 99 mmXDuinoRail Debug, the printed circuit board in 3D

    XDuinoRail Debug

    chatelao/xDuinoRail-Decoder

    The friendly decoder development plattform for model railroad tinkers.

    170 partsAGPL-3.0
  • 2 layersController, the printed circuit board in 3D

    Controller

    dario0603/Hotplate

    Hotplate is a DIY electronics project focused on the design and development of a hotplate and its associated control electronics.

    101 parts
  • 2 layers201.7 × 112.4 mm92pi, the printed circuit board in 3D

    92pi

    hexmaster111/92pi

    229 parts