Skip to the content
2 layers95.6 × 95.5 mmPanel, the printed circuit board in 3D

USB to I2C bridge using an Atmel AVR ATtiny85V and even more tiny than I2C-Tiny-USB.

Size
95.6 × 95.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
492
Nets
170
Pads
1,152
Tracks, vias
1,680, 330
Pours
12
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
15 Mar 2020
Updated
2 Apr 2022

Overview

Panel is an open-source printed circuit board by ansemjo, from the ansemjo/pi2co-usb repository on GitHub, published under the GPL-2.0 licence. It is a 2-layer board of 95.6 × 95.5 mm with 492 parts on 170 nets, routed with 1,680 tracks and 330 vias.

It is built around the ATTINY85-20PU, ATTINY85-20SU and MIC5504-3.3YM5, with the BSD840NH6327XTSA1 among its other parts. Its parts include 80 resistors, 40 connectors, 30 capacitors, 30 ICs and 30 diodes. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

4

README

README.md

pi2co-usb

This project is based on i2c-tiny-usb by Till Harbaum and the V-USB stack by Objective Development. It uses the fact that you can implement a low-speed USB device with the IO pins on an Atmel AVR chip to create a very simple I2C bridge.

Hardware

In the original i2c-tiny-usb implementation, an Atmel AVR ATtiny45 was used with an external oscillator. Unfortunately this also meant that you needed to use all six pins on the chip – including the RESET pin. Should anything ever go wrong you would need a high-voltage serial programmer (HVSP).

On more recent Digispark devices, which use an ATtiny85, a modified version of the V-USB stack is used. They use only the internal PLL oscillator calibrated to 16.5 MHz. No external crystal is required, ISP remains available and you can even connect an indicator LED on the remaining pin!

In 2020 I soldered a protype with a DIP ATtiny85 and a small leftover piece of protoboard – enough to build myself an I2C bridge! This year I updated the design and created a custom PCB in KiCad. It brings an additional voltage regulator for 3.3V, a selection slider between the two available voltages, a bidirectional level shifter based on two N-channel MOSFETs and a standard JST-SH connector; the latter is used by a number of different maker vendors under the names Qwiic (SparkFun) or STEMMA QT (Adafruit). Note: for interoperability with Qwiic devices always use 3.3V!

The schematic and the KiCad project can be found in hardware/.

Since the ATtiny85 is basically the same, you can use the exact same bootloader and firmware as I used for the prototype; the rest of this README thus still applies.

Software

The firmware is almost fully plucked from Till Harbaum's i2c-tiny-usb project, so most credit goes to him. I converted the directory to a PlatformIO project, updated the vendored V-USB stack and modified the configuration header to use a different pinout.

It is meant to work together with a current micronucleus bootloader, which allows loading new firmware over the same USB port that is used in the userspace firmware. This implementation also relies on the oscillator calibration included in the bootloader to achieve a stable 16.5 MHz clock.

Flash the Bootloader

At first I used a default release for the ATtiny85 that I flashed with an ISP programmer and later changed a few options to enable the indicator LED, enter the bootloader only after shorting the RESET pin and disable the timeout. The configuration can be found in bootloader/t85_pi2co and can be linked or copied to a micronucleus project under firmware/configuration/.

For example, to compile the firmware with the config profile above and flash it with an Adafruit FT232H breakout:

sh
make clean
make CONFIG=t85_pi2co
make CONFIG=t85_pi2co PROGRAMMER="-c ft232h" flash
make CONFIG=t85_pi2co PROGRAMMER="-c ft232h" fuse

After that you should be able to speak to the chip with the micronucleus commandline application if you connect a USB breakout appropriately. To enter the bootloader later, you'll need to reset the chip by briefly shorting the RESET pin to ground.

To allow normal users to speak with the bootloader, apply the udev rules found in 49-micronucleus.rules.

Flash the Firmware

Now that the bootloader works, install PlatformIO and go to the firmware/ directory. You can now compile the firmware simply by running pio run. PlatformIO should handle all framework and platform dependencies for you.

Afterwards flash the firmware by running:

sh
pio run -t upload

Note: PlatformIO currently ships an outdated version of the micronucleus commandline tool, which won't speak to the current bootloader releases. Either update the binary in ~/.platformio/packages/tool-micronucleus/ or use a current binary with the compiled firmware directly:

sh
micronucleus .pio/build/tiny85/firmware.hex

Kernel driver

The i2c-tiny-usb project has been around for a while, so it already has a driver in the mainline Linux kernel. I only needed to modprobe i2c-dev for the device to appear. Install the i2c-tools in your Linux distribution of choice and start talking to I2C devices. You may need to run the tools as root.

As an example I am reading the date and time from a DS3231 RTC clock:

sh
$ sudo i2cdetect -l
[sudo] password for ansemjo: 
/* ... */
i2c-10	i2c       	i2c-tiny-usb at bus 001 device 028	I2C adapter
/* ... */

$ sudo i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --  << this is the rtc
70: -- -- -- -- -- -- -- --                         

$ i=0; for value in seconds minutes hours weekday day month year; do \
> printf '%7s: %s\n' $value "$(sudo i2cget -y 10 0x68 $i)"; : $((i++)); done
seconds: 0x39
minutes: 0x07
  hours: 0x19
weekday: 0x07
    day: 0x15
  month: 0x03
   year: 0x20

The bytes need BCD decoding but you can see the date was 2020-03-15 19:07:39.

Parts

492
QtyValueFootprintReferences
4010kΩResistor_SMD:R_0805_2012MetricR5, R5, R5, R5, R5, R5, R5, R5, R5, R5, R6, R6, R6, R6, R6, R6 +24
201µFCapacitor_SMD:C_0805_2012MetricC2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C3, C3, C3, C3, C3, C3 +4
202.2kΩResistor_SMD:R_0805_2012MetricR1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R4, R4, R4, R4, R4, R4 +4
2027ΩResistor_SMD:R_0805_2012MetricR2, R2, R2, R2, R2, R2, R2, R2, R2, R2, R3, R3, R3, R3, R3, R3 +4
203.3VDiode_SMD:D_SOD-123D2, D2, D2, D2, D2, D2, D2, D2, D2, D2, D3, D3, D3, D3, D3, D3 +4
20LOGOLOGOG***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G***, G*** +4
100.1µFCapacitor_SMD:C_0805_2012MetricC1, C1, C1, C1, C1, C1, C1, C1, C1, C1
10ATtiny85-20PPackage_DIP:DIP-8_W7.62mmU2, U2, U2, U2, U2, U2, U2, U2, U2, U2
10ATtiny85-20SPackage_SO:SOIC-8W_5.3x5.3mm_P1.27mmU1, U1, U1, U1, U1, U1, U1, U1, U1, U1
10AVR-ISP-6Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ3, J3, J3, J3, J3, J3, J3, J3, J3, J3
10BSD840NH6327XTSA1Package_TO_SOT_SMD:SOT-363_SC-70-6Q1, Q1, Q1, Q1, Q1, Q1, Q1, Q1, Q1, Q1
10G***kibuzzard-6233BAEEkibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE, kibuzzard-6233BAEE
10G***kibuzzard-6233C230kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230, kibuzzard-6233C230
10G***kibuzzard-6233B95Akibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A, kibuzzard-6233B95A
10G***kibuzzard-6233B920kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920, kibuzzard-6233B920
10G***kibuzzard-6233B938kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938, kibuzzard-6233B938
10G***kibuzzard-6233B94Dkibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D, kibuzzard-6233B94D
10HeaderConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ4, J4, J4, J4, J4, J4, J4, J4, J4, J4
10I2CConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ2, J2, J2, J2, J2, J2, J2, J2, J2, J2
10LEDLED_SMD:LED_0805_2012MetricD1, D1, D1, D1, D1, D1, D1, D1, D1, D1
10MIC5504-3.3YM5Package_TO_SOT_SMD:SOT-23-5U3, U3, U3, U3, U3, U3, U3, U3, U3, U3
10USB_B_MicroConnector_USB:USB_Micro-B_Amphenol_10118194_HorizontalJ1, J1, J1, J1, J1, J1, J1, J1, J1, J1
10Voltage SelectorButton_Switch_SMD:SW_SPDT_PCM12SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1

The 310 most common of 492 parts.

More from ansemjo/pi2co-usb

1
  • 2 layers37.3 × 14.7 mmPi2co usb, the printed circuit board in 3D

    Pi2co usb

    ansemjo/pi2co-usb

    USB to I2C bridge using an Atmel AVR ATtiny85V and even more tiny than I2C-Tiny-USB.

    31 parts4GPL-2.0

Similar boards

  • 2 layers75 × 40 mmRadio, the printed circuit board in 3D

    Radio

    ansemjo/chronovfd

    hardware project for a clock around a russian ivl2-5/7 vfd and an esp32-wroom module

    38 parts13CERN-OHL-P-2.0
  • 4 layers83.2 × 125.8 mmCrommeter, the printed circuit board in 3D

    Crommeter

    ShawnHymel/crommeter

    SHOW ME WHAT YOU GOT

    57 parts
  • 2 layers66 × 81 mmKabeltester v2, the printed circuit board in 3D

    Kabeltester v2

    luhbots/luhsoccer_electronics

    The eletronics projects of our robots and basestation.

    67 parts2
  • 2 layers40 × 51.5 mmMyFirstPCB, the printed circuit board in 3D

    MyFirstPCB

    tvaala93/PCB-Class

    Files for PCB design class

    31 parts
  • 2 layers65 × 56.5 mmSuperPower RPi KiCAD, the printed circuit board in 3D

    SuperPower RPi KiCAD

    SensorsIot/SuperPower

    Here you should find the best power supplies for your low-power projects

    122 parts600
  • 2 layers18.8 × 8.1 mmDell charger emulator, the printed circuit board in 3D

    Dell charger emulator

    KivApple/dell-charger-emulator

    Emulator of original Dell charger using ATTINY85

    6 parts154
  • 2 layers14 × 17.3 mmSnopf, the printed circuit board in 3D

    Snopf

    snopf/snopf

    snopf USB password token

    18 parts145GPL-2.0

Questions

How big is the Panel PCB?

It measures 95.6 × 95.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Panel use?

492 parts, built around the ATTINY85-20PU, ATTINY85-20SU, MIC5504-3.3YM5 and BSD840NH6327XTSA1. 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 Panel KiCad files?

From the ansemjo/pi2co-usb repository on GitHub, at the commit this page was made from: the board is hardware/panel.kicad_pcb and its schematic hardware/pi2co-usb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Panel design in my own project?

Its repository publishes it under the GPL-2.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).