Skip to content

13. Skin Electronics

Research

First step, understanding what we are working with throught this video. The RFID = Radio Frequency IDentification shield.

From the class :

inspector gadget

Hairware : connects chemically metallised hair extensions to a microcontroller : you can send a message, take a picture, record a conversation (omg), send your location...

As I lost - and refound - my phone friday night, I don't feel secure giving it all my informations. But, maybe if I had these chip coded nails, I would have been able to localise it, or activate the torch lamp or make it shine in the dark ? I dont't know, but it wouldn't have change the fact the screen is damaged. Anyway, I liked the ideas around this subject, as much as I hate integrated electronics. It's so complicated to make it work, then if it works, so complicated to hide it. Makes me feel I am Inspector Gadget.


References & Inspiration

aqua DJ Id Sound Tattoos

  1. From the lecture : interesting set up for data tags that make music.
  2. Reference given by Anastasia : cashless payment bracelet.
  3. Circuit tattoos.

As I've been interested in working with sounds, I took this reference of this band who shows we can sing every pop/rock music from the last 40 years with 4 music chords only : chords

Journey - "Don't Stop Believing"
James Blunt - "You're Beautiful"
Black Eyed Peas - "Where Is the Love"
Alphaville - "Forever Young"
Jason Mraz - "I'm Yours"
Train - "Hey Soul Sister"
The Calling - "Wherever You Will Go"
Elton John - "Can You Feel The Love Tonight" (from The Lion King)
Akon - "Don't Matter"
John Denver - "Take Me Home, Country Roads"
Lady Gaga - "Paparazzi"
U2 - "With Or Without You"
The Last Goodnight - "Pictures of You"
Maroon Five - "She Will Be Loved"
The Beatles - "Let It Be"
Bob Marley - "No Woman No Cry"
Marcy Playground - "Sex and Candy"
Men At Work - "Land Down Under"
Theme from America's Funniest Home Videos
Jack Johnson - "Taylor"
Spice Girls - "Two Become One"
A Ha - "Take On Me"
Green Day - "When I Come Around"
Eagle Eye Cherry - "Save Tonight"
Toto - "Africa"
Beyonce - "If I Were A Boy"
Kelly Clarkson - "Behind These Hazel Eyes"
Jason DeRulo - "In My Head"
The Smashing Pumpkins - "Bullet With Butterfly Wings"
Joan Osborne - "One Of Us"
Avril Lavigne - "Complicated"
The Offspring - "Self Esteem"
The Offspring - "You're Gonna Go Far Kid"
Akon - "Beautiful"
Timberland featuring OneRepublic - "Apologize"
Eminem featuring Rihanna - "Love the Way You Lie"
Bon Jovi - "It's My Life"
Lady Gaga - "Pokerface"
Aqua - "Barbie Girl"
Red Hot Chili Peppers - "Otherside"
The Gregory Brothers - "Double Rainbow"
MGMT - "Kids"
Andrea Bocelli - "Time To Say Goodbye"
Robert Burns - "Auld Lang Syne"
Five for fighting - "Superman"
The Axis of Awesome - "Birdplane"
Missy Higgins - "Scar"

Here is the longer explanation of this music rule.

Arduino classes with Emma

Matrix 1

ATtiny85

What is important to know with the ATtiny : How to connect to use the Arduino board like a programmer, to transfer a programm to the ATTiny. programmer

In the end, we can clean the board and keep only the ATTiny with the led (if what we want is a led blinking).

Process and workflow

Programming

Struggles with Arduino, I had to uninstall and reinstall two times and the connexion was still bad.

Tools

Arduino UNO Adafruit NFC data pack Arduino IDE

We got two classes of NFC Chips, however the blink ones are not able to store data (they are designed to blink), we can only used the round ones.

data tags


PN_532

PN_532 shield

For the esthetic part, as we were working on skins, I decided to dig up my week 03's gauntlet of power which is like a second skin and consider the integration of the chips at each fingerprint.

try

I can't get now, satisfaction

As a team, I worked with Mélanie on the nail chips track and you could find many details.

1 - Fix the Adafruit onto the Arduino board

This necessite welding, on every pin. Hard work, that has been done in multiple times to get the correct connexion. weld pins It was a disaster : our connexions were not successful due to a bad welding. Mélanie reworked on it, and it's fixed now we have the lights on : good

2 - Install Adafruit_PN532 library

installation des librairies More infos on Mélanie's page.

3 - Plug the Arduino/Fruit on the computer

Mélanie worked a lot on the code "ReadMiFare" which reads the chips, so we can collect contact details of each chip, in order to include in the second code "Twinkle nails" (from Katia1). Unfortunately, we had different types of wrong messages, putting us in a dead end for the next steps. problem lecture tag problem lecture tag

  • This 9600baud selection was not good, we changed for 115200baud, thanks to Diane who inspected the code with Mélanie.

After reconsidering a lot of details, Mélanie extracted the codes we needed to continue :

  {0x04, 0x08, 0x80, 0x52, 0x9E, 0x11, 0x91} 
  {0x04, 0x31, 0x81, 0x52, 0x9E, 0x11, 0x90}
  {0x04, 0x21, 0x80, 0x52, 0x9E, 0x11, 0x90}
  {0x04, 0xEB, 0x66, 0x8A, 0xA9, 0x11, 0x90}

4 - Copy/Paste

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_PN532.h>

#define NOTE_B0  31
#define NOTE_C1  33
#define NOTE_CS1 35
#define NOTE_D1  37
#define NOTE_DS1 39
#define NOTE_E1  41
#define NOTE_F1  44
#define NOTE_FS1 46
#define NOTE_G1  49
#define NOTE_GS1 52
#define NOTE_A1  55
#define NOTE_AS1 58
#define NOTE_B1  62
#define NOTE_C2  65
#define NOTE_CS2 69
#define NOTE_D2  73
#define NOTE_DS2 78
#define NOTE_E2  82
#define NOTE_F2  87
#define NOTE_FS2 93
#define NOTE_G2  98
#define NOTE_GS2 104
#define NOTE_A2  110
#define NOTE_AS2 117
#define NOTE_B2  123
#define NOTE_C3  131
#define NOTE_CS3 139
#define NOTE_D3  147
#define NOTE_DS3 156
#define NOTE_E3  165
#define NOTE_F3  175
#define NOTE_FS3 185
#define NOTE_G3  196
#define NOTE_GS3 208
#define NOTE_A3  220
#define NOTE_AS3 233
#define NOTE_B3  247
#define NOTE_C4  262
#define NOTE_CS4 277
#define NOTE_D4  294
#define NOTE_DS4 311
#define NOTE_E4  330
#define NOTE_F4  349
#define NOTE_FS4 370
#define NOTE_G4  392
#define NOTE_GS4 415
#define NOTE_A4  440
#define NOTE_AS4 466
#define NOTE_B4  494
#define NOTE_C5  523
#define NOTE_CS5 554
#define NOTE_D5  587
#define NOTE_DS5 622
#define NOTE_E5  659
#define NOTE_F5  698
#define NOTE_FS5 740
#define NOTE_G5  784
#define NOTE_GS5 831
#define NOTE_A5  880
#define NOTE_AS5 932
#define NOTE_B5  988
#define NOTE_C6  1047
#define NOTE_CS6 1109
#define NOTE_D6  1175
#define NOTE_DS6 1245
#define NOTE_E6  1319
#define NOTE_F6  1397
#define NOTE_FS6 1480
#define NOTE_G6  1568
#define NOTE_GS6 1661
#define NOTE_A6  1760
#define NOTE_AS6 1865
#define NOTE_B6  1976
#define NOTE_C7  2093
#define NOTE_CS7 2217
#define NOTE_D7  2349
#define NOTE_DS7 2489
#define NOTE_E7  2637
#define NOTE_F7  2794
#define NOTE_FS7 2960
#define NOTE_G7  3136
#define NOTE_GS7 3322
#define NOTE_A7  3520
#define NOTE_AS7 3729
#define NOTE_B7  3951
#define NOTE_C8  4186
#define NOTE_CS8 4435
#define NOTE_D8  4699
#define NOTE_DS8 4978

int notes[] = {
  NOTE_E4, NOTE_C4, NOTE_G4, NOTE_D4
};

// If using the breakout with SPI, define the pins for SPI communication.
/*#define PN532_SCK  (2)
#define PN532_MOSI (3)
#define PN532_SS   (4)
#define PN532_MISO (5)*/

// If using the breakout or shield with I2C, define just the pins connected
// to the IRQ and reset lines.  Use the values below (2, 3) for the shield!
#define PN532_IRQ   (2)
#define PN532_RESET (3)  // Not connected by default on the NFC Shield

Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET);

#if defined(ARDUINO_ARCH_SAMD)
// for Zero, output on USB Serial console, remove line below if using programming port to program the Zero!
// also change #define in Adafruit_PN532.cpp library file
  #define Serial SerialUSB
#endif

const int numCards = 4;
uint32_t cards[numCards][7]= { 
{0x04, 0x08, 0x80, 0x52, 0x9E, 0x11, 0x91}, 
{0x04, 0x31, 0x81, 0x52, 0x9E, 0x11, 0x90},
{0x04, 0x21, 0x80, 0x52, 0x9E, 0x11, 0x90},
{0x04, 0xEB, 0x66, 0x8A, 0xA9, 0x11, 0x90}
};

void setup(void) {
  #ifndef ESP8266
    while (!Serial); // for Leonardo/Micro/Zero
  #endif
  Serial.begin(115200);
  Serial.println("Hello!");

  nfc.begin();

  uint32_t versiondata = nfc.getFirmwareVersion();
  if (! versiondata) {
    Serial.print("Didn't find PN53x board");
    while (1); // halt
  }
  // Got ok data, print it out!
  Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 
  Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 
  Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);

  // configure board to read RFID tags
  nfc.SAMConfig();

  Serial.println("Waiting for an ISO14443A Card ...");
}

void loop(void) {
  uint8_t success;
  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
  uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
  // 'uid' will be populated with the UID, and uidLength will indicate
  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);

  if (success) {
    // Display some basic information about the card
    Serial.println("Found an ISO14443A card");
    Serial.print("  UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
    Serial.print("  UID Value: ");
    nfc.PrintHex(uid, uidLength);

    lookForCard (uid);
  }


}

void lookForCard(uint8_t cardID[7])
{
  for (int i =0; i<numCards;i++)
  {
    int count =0;
    for (int j =0; j<7;j++)
      {
        //Serial.print("cardid: ");Serial.print(cardID[j],HEX);
        //Serial.print(" cards: ");Serial.println(cards[i][j],HEX);
          if (cardID[j]== cards[i][j])
          {
            count++;

          }
      }
      Serial.print("count: ");Serial.println(count);

      if (count == 7) 
      {
        Serial.print("i: ");Serial.println(i);
        if (i==0 || i==5) {tone(8, notes[0], 325); Serial.println("MI");return;}
        if (i==1 || i==6) {tone(8, notes[1], 325); Serial.println("DO");return;}
        if (i==2 || i==7) {tone(8, notes[2], 325); Serial.println("SOL");return;}
        if (i==3 || i==8) {tone(8, notes[3], 325); Serial.println("RE");return;}

        //if (i==4 || i==9) {tone(8, notes[4], 325); Serial.println("SOL");return;}//
      }
  }  
}

I struggled to understand what was corresponding to my habits in music. Letters are for chords, like in guitar, but we don't have the augmented, minors, 7th renversements. So, letters are for chords and numbers are for octaves.

Don't know why but this angle bracket helps the menu setting like it should.


5 - Programm each note to each chip

The choices resid in two iteratives : First, define the notes you want to use.

int notes[] = {
      NOTE_E4, NOTE_C4, NOTE_G4, NOTE_D4
    };
Second, tell it to call them by their name :
if (count == 7) 
          {
            Serial.print("i: ");Serial.println(i);
            if (i==0 || i==5) {tone(8, notes[0], 325); Serial.println("MI");return;}
            if (i==1 || i==6) {tone(8, notes[1], 325); Serial.println("DO");return;}
            if (i==2 || i==7) {tone(8, notes[2], 325); Serial.println("SOL");return;}
            if (i==3 || i==8) {tone(8, notes[3], 325); Serial.println("RE");return;}

            //if (i==4 || i==9) {tone(8, notes[4], 325); Serial.println("SOL");return;}//
          }

6 - Now the board is ready to read the chips nearby

scotch

First, we just taped the chips to my fingers and tested it at different levels /octaves.

So, as we cannot play two notes at the same time on the board, we can't have harmonies, only single notes. I wanted to programm bases notes of each chord, so I could sing along with my bases. Unfortunately, the notes library doesn't consider sharp and flat (# & ♭), there is only sharps and for a chord, it's not the same thing.

I programmed E / C / G / D.

chip note designation correspondence in TonePitch's library
0 MI E NOTE_E5 659
1 DO C NOTE_C5 523
2 SOL G NOTE_G5 784
3 RE D NOTE_D5 587

7 - Inserting the chips in the gauntlet of power (work from week 03)

hidden tag

Twinkle nails 2

AD: "No need to know how to read a score anymore: the notes are at your fingertips!

As a keyboard player, it's giving me mixed feelings to see I can reach such a way to play music.

Dressing

With all the modules I had left from week 03, we dressed the board to have a nice finish. dressing

Videos

Final concerto in C major

That's why we choose to just play a very simple song with 3 notes, or just random melody :

Original theme

I can get now, satisfaction

chip note designation correspondence in TonePitch's library
0 SI B NOTE_B5 988
1 DO# C# NOTE_CS5 554
2 RE♮ D♮ NOTE_D5 587

Extra

4 fingers player

Some would dare to ask why we play without the little finger ? We lost one chip. 19th december update : Mélanie found back the last chip !

Infinity gauntlet shining


NFC Tool reader

On the phone, this application let us read the chips and control them. We added a small text that gives the reference of the note programmed on it. Impossible to create a full contact fiche because the memoire is too small for that. 135bytes

nfc tool read nfc tool read 2


As I was still wearing the gauntlet, I touched my phone and the application readed the infos.


Diane's resume

Resume on notion.


Fabrication files


Last update: 2023-04-27