Categories

Chips: 1-Wire iButton overview

Posted on Monday, November 23rd, 2009 in Bus Pirate, Chips by Ian

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.

Connections

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.

Interfacing

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
READY
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
POWER SUPPLIES ON
1-WIRE>v <<<check voltage levels
Voltage monitors: 5V: 4.8 | 3.3V: 3.3 | VPULLUP: 4.8 |
1-WIRE>

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
SEARCH (0xF0)
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>

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.

This entry was posted on Monday, November 23rd, 2009 at 6:28 am and is filed under Bus Pirate, Chips. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

3 Responses to “Chips: 1-Wire iButton overview”

  1. Reliq says:

    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. Ian says:

    Thanks! Please keep us updated. It would be interesting if you could just swap in a new number to simulate a new tank.

  3. christian says:

    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 Reply

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

Recent Comments

  • Joe Desbonnet: Ya, I can recommend the low melting point solder. I used brand 'ChipQuik' and it's amazingly easy to use.
  • Jerome: I need a new BusPirate for the Fablab ;) Many thanks!
  • Max: Seems like an unexpectedly violent way to remove the chip indeed. A hot air station should of course do the job just fine, but in...
  • jose: Part removal described here is pure butchery, the cheapest hot air station will do a fast and clean job removing the QFP, heat air to...
  • Cody: Yes please