Skip to the content
PCBKitNew board
2 layers58.6 × 20 mmMuTag, the printed circuit board in 3D

Repository for PCB and source file of the MuHack NFC Tag keychain

Size
58.6 × 20 mm
Copper layers
2
Thickness
1.6 mm
Parts
30
Nets
21
Pads
72
Tracks, vias
150, 6
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Jan 2023
Updated
27 May 2023

Overview

MuTag is an open-source printed circuit board by MrMoDDoM, from the MrMoDDoM/MuTag repository on GitHub, published under the AGPL-3.0 licence. It is a 2-layer board of 58.6 × 20 mm with 30 parts on 21 nets, routed with 150 tracks and 6 vias.

It is built around the ST25DV04K-IER6S3. Its parts include 9 resistors, 6 capacitors, 5 diodes, 2 ICs and 1 connector. It belongs with the radio and wireless boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

MuTag v2.1

Repository for PCB and source file of the MuHack NFC Tag keychain.

This is a custom printed circuit board featuring an ATTiny44a microcontroller and an ST25 NFC ISO15 tag.

From the MCU is it possible to access the NFC tag using I2C, to modify the tag's configuration and read/write data.

MuTag

Features

  • ATTiny44a MCU
  • ST25 NFC ISO15 tag with 4Kbit memory
  • Energy harvesting
  • Fast transfer memory, 256bytes of Mailbox
  • 4 LEDs of different colors
  • I2C and UART (TBD) interfaces
  • Small form factor: only 20x60mm

Getting Started

In the Hardware folder you can find the PCB design files and the schematics.

text
#define YELLOW_LED 0
#define GREEN_LED 1
#define BLUE_LED 2
#define RED_LED 3

The LEDs are connected to:

  • Yellow led on pin 0 (Port PA0)
  • Green led on pin 1 (Port PA1)
  • Blue led on pin 2 (Port PA2)
  • Red led on pin 3 (Port PA3)

The NFC tag is connected to the ATTiny's I2C bus:

  • SDA on pin 6 (Port PA6)
  • SCL on pin 4 (Port PA4)

The NFC GPO is also connected to the ATTiny's INT0 interrupt port (Port PB2).

Activating Energy Harvesting Mode with the ST25 Android App

By default, the ST25 NFC tag is set to "on demand" energy harvesting mode. To activate energy harvesting mode on the ST25 NFC IC, you will need to use the ST25 Android app (future implementation of the software will automatically activate this through the I2C communication).

Follow these steps:

  1. Download the ST25 Android app from the Google Play Store (https://play.google.com/store/apps/details?id=com.st.st25nfc)

  2. Scan the tag with the ST25 Android app and from the left menu go to "Register Management"

  3. Re-scan the tag to update the tag's configuration. You will see a register called EH_MODE. By default, this register is set to 0x01, which means that energy harvesting mode is set "on demand". To enable energy harvesting mode, change the value of this register to 0x00

  4. While maintaining the tag in the field, tap the "Save" button to write the new configuration to the tag (the default password is all zeros, just tap "OK" to continue)

Programming the ATTiny44a MCU

Generally speaking, the ATTiny44a MCU must be programmed using an external ISP programmer. In this case, we will use an Arduino Uno as an ISP programmer (you can use any other Arduino board that can be used as an ISP).

  1. Flash the ArduinoISP sketch (found in the File -> Example menu) to an Arduino (or any other Arduino board that can be used as an ISP)

  2. Add the following line to "Additional Boards Manager URLs" in the Arduino IDE preferences:

http://drazzy.com/package_drazzy.com_index.json

  1. Install the ATTinyCore by Spence Konde board definition (found in the Tool -> Board -> Board Manager menu) and select the following settings:
SettingValue
BoardATTiny24/44/84 (noBootloader)
ChipATTiny44(a) (Note: for v2.0 select 24)
Clock1 MHz internal
BODDisabled
LTOEnabled
EEPROMEEPROM retained
millis()/micros()Enabled
ProgrammerArduino as ISP
  1. Connect the MuTag to the Arduino as follows:
MuTagArduino
VDD5V
GNDGND
SCK13
MISO12
MOSI11
RST10

NOTE: The MuTag through hole ports are of 1.27mm diameter, enough to fit a common jumper wire. So with a little bit of patience you can push the pin rigth into the hole without soldering.

The holes dimension was changed to a standard 2.54mm in the v2.1

  1. Take another jump wire and connect it the RESET pin of the Arduino and leave the other end unconnected

  2. Now the tricky part: to program the MuTag we need to send the Arduino in "reset mode" for a short period of time. To do this, we need to connect the RESET pin of the Arduino to ground (i.e. by touching the USB ground shield with the unconnected end the RESET wire) rigth before we press the "Upload" button in the Arduino IDE. Wait about 2/3 seconds and then release the RESET wire. You should see the Arduino IDE uploading the sketch to the MuTag.

NOTE: Depending on your Arduino IDE version, you might need to use the "Upload using Programmer" option in the Sketch menu instead of the "Upload" button.

Accessing the NFC Tag with the I2C Interface

The internal memory of the ST25 NFC tag can be accessed through the I2C bus as a standard EEPROM memory. The I2C address of the tag is 0x53.

The "Hello_MuHack.ino" sketch is a simple example of how to read and write data to the tag.

TODOS:

  • Add a 3D model of the PCB
  • Find a good bootloader to enable UART programming
  • Evaluate the possibility of removing the diodes
  • Evaluate to move and make bigger pads for programming
  • Evaluate to change the MCU to an ATTiny44/84 to have more memory
  • Evaluate to remove the RESET pad

Notes on the Bootloader

The bootloader is a small piece of code that is stored in the MCU's memory and that allows to program via UART. This is very useful because it avoid the need of an external SPI programmer.

The Optiboot version compiled by Spence Konde uses the pins AIN0 and AIN1, currently connected to the LEDs. This leaves us with two options:

  • Remove the LEDs and use the pins for programming via UART
  • Recompiling the bootloader to use different pins

Since this project is intended to be used as a keychain, which means that is to be programmed only once, I decided to not invest time in the bootloader and leave the LEDs as they are.

License

Copyright (c) 2023 MrMoDDoM

This project is licensed under the GNU AFFERO GENERAL PUBLIC License - see the LICENSE.md file for details

Parts

30
QtyValueFootprintReferences
6LOGOLOGOG***, G***, G***, G***, G***, G***
41.5KResistor_SMD:R_0402_1005MetricR3, R4, R5, R9
4160Resistor_SMD:R_0402_1005MetricR1, R2, R7, R8
3NCCapacitor_SMD:C_0402_1005MetricC1, C2, C3
1100nFCapacitor_SMD:C_0402_1005MetricC6
110KResistor_SMD:R_0402_1005MetricR6
110nFCapacitor_SMD:C_0402_1005MetricC10
11nFCapacitor_SMD:C_0402_1005MetricC7
1ATTinyPackage_SO:SOIC-14_3.9x8.7mm_P1.27mmU2
1DDiode_SMD:D_SOD-123FD3
1LED_BLUELED_SMD:LED_0603_1608MetricD2
1LED_GREENLED_SMD:LED_0603_1608MetricD5
1LED_REDLED_SMD:LED_0603_1608MetricD1
1LED_YELLOWLED_SMD:LED_0603_1608MetricD6
1MuTag_NFC_AntennaMuTag Antenna:mutag_new_antennaA1
1SPI_HeaderConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ1
1ST25DV04K-IER6S3ST25DV04K-IER6S3:SOIC127P600X175-8NIC1

Questions

How big is the MuTag PCB?

It measures 58.6 × 20 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MuTag use?

30 parts, built around the ST25DV04K-IER6S3. 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 MuTag KiCad files?

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

Can I use the MuTag design in my own project?

Its repository publishes it under the AGPL-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

  • 2 layersDc30, the printed circuit board in 3D

    Dc30

    imjollyroger/JollyBadge_DC30

    DC30 JollyBadge

    31 parts1MIT
  • 2 layers89 × 51 mmBusiness Card, the printed circuit board in 3D

    Business Card

    Teehee2/ESP-32-Business-Card

    Personal Business Card with fully functional ESP-32 and NFC

    54 parts1MIT
  • 2 layers52.2 × 52.2 mmBase promicro, the printed circuit board in 3D

    Base promicro

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    30 parts3kApache-2.0
  • 2 layers40.6 × 15.2 mmVr mmm, the printed circuit board in 3D

    Vr mmm

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    30 parts1.2k
  • 2 layers270 × 11 mmDaylight, the printed circuit board in 3D

    Daylight

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    30 parts1.1kGPL-3.0
  • 2 layers65 × 30 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    30 parts1kGPL-3.0
  • 2 layers40.5 × 58 mmInitial v, the printed circuit board in 3D

    Initial v

    tenderlove/initial-v

    It's a BMW shifter converted to a Bluetooth Keyboard that you use with Vim

    30 parts1kApache-2.0
  • 2 layers34.3 × 41.8 mmMotionCubeViewAllForces, the printed circuit board in 3D

    MotionCubeViewAllForces

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    30 parts915