Chips: 1-Wire iButton overview

See the latest version in the documentation wiki.

Reliq sent a 1-Wire iButton demo using the Bus Pirate:

I work in an engineering firm, and the large format color printer we have uses iButtons on the ink tanks to tell the machine what has been plugged in. These particular buttons are write-only. As you can see in the pic, I have the body connected to GND, and the cap connected to MOSI. The +5v is jumpered to the Vpullup pin.

More demo goodness after the break.


Bus Pirate iButton
MOSI 1-Wire data (cap)
Ground Ground (body)
+5volt->vpullup n/c

The table above shows the connections between the Bus Pirate and the iButton. The Bus Pirate’s 5volt supply powers the on-board pull-up resistors through the Vpullup pin. The iButton is powered by the pull-up resistors on the 1-Wire data line, it doesn’t need a separate supply.


HiZ>m <<<select mode
1. HiZ
2. 1-WIRE

10. LCD
(1) >2 <<<1-wire
Mode selected
1WIRE routines Copyright (C) 2000 Michael Pearce
Released under GNU General Public License
1-WIRE>p <<<enable pull-up resistors
1. Pull-ups off
2. Pull-ups on
(1) >2
Pull-up resistors ON
1-WIRE>W <<<power supplies on
1-WIRE>v <<<check voltage levels
Voltage monitors: 5V: 4.8 | 3.3V: 3.3 | VPULLUP: 4.8 |

First, put the Bus Pirate in 1-Wire mode (m). Enable the pull-up resistors (p) and turn on the power supplies (W). Press ‘v’ to check the voltage levels. If the Vpullup voltage is 0, make sure the Vpu pin is connected to a power supply (5volts in this demonstration).

1-WIRE>(240) <<<1-Wire search ROM command
Macro     1WIRE address
1.0×89 0xCE 0x42 0x03 0x00 0xA0 0x00 0xDB
*Unknown device
Device IDs are available by MACRO, see (0).

1-Wire device addresses are located using a special 1-Wire search ROM procedure. The Bus Pirate automates this in with macro (240). Every device address located is printed to the terminal.

The first byte of the address (0x89) is the device family code, the Bus Pirate didn’t know this particular code. According to this 1-Wire device command table, 0x89 corresponds with a 48 bit node address chip. That seems appropriate given the use.

The remaining bytes are a unique ID code that’s used for various purposes, these were used to identify ink tanks. It would be fairly difficult (expensive) to create an actual 1-Wire device clone with an identical ID number, but it would be really easy to extract the number from a chip and emulate the device on a microcontroller.

Join the Conversation


  1. As it turns out, this is how they corner their market on ink tank replacement. You can go buy all the ink you want and refill the tanks, but the unique serial number is stored somewhere in the actual printer along with how much ink was used, the size of the tank, and the color slot the tank was initially inserted into. The tank slots are keyed to prevent plugging the wrong color into the wrong slot. My next plan is to use the 4k read/write iButton that I just got in the mail to be able to refill the tanks and then just give the iButton a new number and see if it registers a new tank.

    The machine has a separate WinXP Embedded tower to control everything you need to run it. The machine itself has a solid state 6 gig hard drive in it, Ive managed to clone the drive using Ubuntu Linux to copy the drive bit for bit to a USB flash drive. However, I have yet to find the location of log files containing the serial numbers.

    More information as I get it.

  2. hi, I’m an absolute beginner in the area 1button, but I’m also such a problem with the ink tanks!
    I have a reading device for the 1-Wire iButton (DS9490R USB 1-wire adapter DS1402D-DR8 +)! Who can help me, that I can fill my ink tanks themselves?
    my tanks are mounted 1buttons DS1982!

    please, please, help me;)

    christian from Austria

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.