• I want to thank all the members that have upgraded your accounts. I truly appreciate your support of the site monetarily. Supporting the site keeps this site up and running as a lot of work daily goes on behind the scenes. Click to Support Signs101 ...

Reading data from EcoSol Max3 Ink DS2431 chip

tb25

New Member
After a new head install some of our brand new cartridges were reporting low ink and long runtime in the service report.

This got me wondering how they stored the data.

Taking the chip out I saw an EEPROM chip, and looked to read the data off it.

Its uses the DS2431 which has a great Arduino library. https://docs.arduino.cc/libraries/ds2431/

Wiring diagrams are attached.

I used the example sketch (removing the write functions) to read out 128bytes although it only uses 32.

This was the result:

49,1,F,3,0,0,1,B8
2A,3,31,0,0,7,8E,CE
0,AD,18,EE,0,C,0,0
0,0,0,0,0,0,FB,6A
49,1,F,3,0,0,1,B8

I wasn't able to work out all the encoding

-49,1,F appears to be Ink type, but I don't have more data to compare
-2A,3,31 appears to be LotNo, as this matched on ink of the same LotNo
-FB,6A may be expiry or manufacture date

All the data I was able to work out is in the sketch and prints it out in a readable manner (Consumption may need adjusting for low values)

I haven't included any write functions to prevent our engineer friends getting calls from people with hacked cartridges, but if you've followed this far you can figure it out pretty easily.

I also noticed Smoke_Jaguar has done similar work recently with the Mimaki DS2430 and had some of it removed, so hopefully this doesn't upset anyone.

I'm not a machine engineer or programmer, just someone who likes a puzzle.
 

Attachments

  • arduino_wiring.jpg
    arduino_wiring.jpg
    426.8 KB · Views: 21
  • circuit_wiring.jpg
    circuit_wiring.jpg
    91.5 KB · Views: 7
  • ds2431_pins.jpg
    ds2431_pins.jpg
    60.9 KB · Views: 6

tb25

New Member
#include <DS2431.h>
#include <OneWire.h>

const int ONE_WIRE_PIN = 5; // One Wire pin, change according to your needs. A 4.7k pull up resistor is needed.

OneWire oneWire(ONE_WIRE_PIN);
DS2431 eeprom(oneWire);


void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial to come up on USB boards

// Search the 1-Wire bus for a connected device.
byte serialNb[8];
oneWire.target_search(DS2431::ONE_WIRE_FAMILY_CODE);
if (!oneWire.search(serialNb))
{
Serial.println("No DS2431 found on the 1-Wire bus.");
return;
}

Serial.print("Serial No: ");
printSerialNo(serialNb, 8);

//ink colour
byte inkColour = eeprom.read(3);
String inkColourString;

Serial.print("Ink Colour: ");

switch ((int)inkColour){
case 1: inkColourString = "Cyan"; break;
case 2: inkColourString = "Magenta"; break;
case 3: inkColourString = "Yellow"; break;
case 4: inkColourString = "Black"; break;

}
Serial.println(inkColourString);


//these appear to be the LotNo but I cant work out the encoding
byte lotArr[3];
eeprom.read(8, lotArr, sizeof(lotArr));

Serial.print("Lot No: ");
Serial.print(lotArr[0], HEX);
Serial.print(lotArr[1], HEX);
Serial.print(lotArr[2], HEX);
Serial.print("\r\n");


//might only be 2 bytes starting at addr 6
byte capacityArr[3];
eeprom.read(5, capacityArr, sizeof(capacityArr));

uint32_t capacityInk;

capacityInk = capacityArr[0];
capacityInk <<= 8;
capacityInk |= capacityArr[1];
capacityInk <<= 8;
capacityInk |= capacityArr[2];

Serial.print("Capacity: ");
Serial.print(capacityInk);
Serial.print("cc\r\n");


byte consumedArr[3];
eeprom.read(13, consumedArr, sizeof(consumedArr));

uint32_t consumedInk;

consumedInk = consumedArr[0];
consumedInk <<= 8;
consumedInk |= consumedArr[1];
consumedInk <<= 8;
consumedInk |= consumedArr[2];

//untested with low usage eg. 10.6cc
//probably needs padding and storing in a char array
Serial.print("Consumed: ");
Serial.print(consumedInk * 0.001 , 3);
Serial.print("cc\r\n");

//time in use
byte usageArr[3];
eeprom.read(17, usageArr, sizeof(usageArr));

uint32_t usageTime;

usageTime = usageArr[0];
usageTime <<= 8;
usageTime |= usageArr[1];
usageTime <<= 8;
usageTime |= usageArr[2];

//convert seconds into readable format
unsigned int days, hours, minutes, seconds;
convertTime(usageTime, days, hours, minutes, seconds);
String formattedElapsedTime = String(days) + "days " + String(hours) + "hrs " + String(minutes) + "mins " + String(seconds) + "secs";

Serial.print("Usage Time: ");
Serial.print(formattedElapsedTime + "\r\n");

//how many times the ink has been inserted
Serial.print("Inserted Count: ");
Serial.print( eeprom.read(21) , DEC);
Serial.print("\r\n\r\n");

}

void loop()
{
// Nothing to do
}

void printSerialNo(const uint8_t *buf, uint8_t len)
{
for (int i = 0; i < len-1; i++)
{
Serial.print(buf, HEX);
}
Serial.println(buf[len-1], HEX);
}


//thanks to mvrinaldi for this function
//https://forum.arduino.cc/t/conversion-of-seconds-to-days-hours-minutes-seconds-with-problems/1150779

void convertTime(unsigned long timeInSeconds, unsigned int &days, unsigned int &hours, unsigned int &minutes, unsigned int &seconds) {
seconds = timeInSeconds % 60;
timeInSeconds /= 60;
minutes = timeInSeconds % 60;
timeInSeconds /= 60;
hours = timeInSeconds % 24;
days = timeInSeconds / 24;
}
 
Top