Sonntag, 17. Januar 2016

How to reset the toner chip of a CLP-510, or learning I2C with Arduino

Some weeks ago I have got a laser printer Samsung CLP-510 for free. It replaced my old laser printer with an damaged transfer belt(At this point I didn't know I just refilled the wrong toner what caused the bad printing quality, but that's another story). Of course it didn't take long till I got the message of empty cartridges.

Well, we all know it's not the problem to refill the catridges, but to make the printer believe you have done it. It's about resetting the counter chip on each catridge. Google brought some old articles with broken links to DOS programs and a Raspberry project. Because we are not makers when consuming other peoples work and because of christmas vacation and spare time, I desided to play with it. On top of that it gave me the opportunity to settle two tasks I had in mind for a long time, but never had an opportunity for it. Firstly I wanted to work with the I2C-Bus and secondly I wanted to have a serial monitor with a command history.

My plan was to write an arduino sketch to read and write the chips and a serial monitor which allows to dump the chip content to a file and to write it back.

For all visiters really wanting to refill the CLP-510 I cover the whole process.

1. Open cover


First of all we need to remove 4 screws to open the cover of the chip and the refill opening .
Remove 1 screw from the ride side of the catridge(On the foto the catridge is upside down.).

Remove 4 screws from the bottom side of the catridge.


 2. Refill powder


Next to the chip you can see the round opening. You have to remove the cap with pliers.

Pull the rubber cap to remove it. Hold it with pliers at the rim.
After removing the cap, refill the catridge and put the cap back on the catridge to close it. Be carefull and don't breath this ;-) Finally put the cover back on the catridge and fix it with the 4 screws.

That was the boring part, but now it's getting interessting.

3.Connecting the Chip to the arduino


On the circuit board you find three connection points marked as SDA-CRUM, DGND and SCL_CRUM. It didn't take long to find out this is about I2C and this is where arduino and the wire library comes into play.

Connecting the chip to the arduino is really simple, it just takes two pull-up resistors and some wires.

Pull up the pins SDA and SCL to 3.3 V power source. I am using an Arduino Mega where SCL is port 21 and SDA is port 20. Than connect SDL_CRUM from the toner chip to SDL from the Arduino and SDA_CRUM from the toner chip to SDA to the Arduine. And finally connect DGND from the toner chip to GND from the Arduino. That's it. You don't have to remove the chip from the tomer catridge, I just had one laying round and it's more comfortable to take pictures from it.

We have connected the chip to the Arduino and now we can start to communicate with it.

4. Finding devices on a I2C bus


I never used the wire library before and I was surprised by the small number of methods it has.
On Wikipedia I read each device on a I2C-Bus has it's own 7-bit address and to communicate with it you have to know this address. So firstly I wrote a function to scan for devices on the bus. My idea was to try to read from each possible address and to listen for answers. This worked excelently I found the chip at the first try.


 5. Dumping the chip


This is the point I was excited about and why I did all this. Reading the whole chip and check if received data makes sense in any way. I wrote a dump function which takes the device address and the number of bytes to read. The output is formated as usally. On the left block there is a hex dump and on the right side there is the ascii representation of the data.

Oh boy, I am so glad! I saw "SAMSUNG", "CLP510" and something, that could be a production date "2006.03". This was a real success.

6. Finding the Page counter


Somewhere in this dump there must be the number of pages that has been printed with this catridge. To find the position I printed a page and did a second dump. Comparing these two dumps showed all changing positions when the printer counts pages. There are three position of them. In the next step I printed a configuration report of the printer and luckily it says how many pages has been printed with each catridge. This is a helpful information because now I know what to look for.

Et voila! One of these three positions contained exactly a number from the report.
The printer configuration report shows the page count of each catridge

Dump of the magenta catrigde showing the page counter marked


7. Resetting the counter


Till now I worked with the serial monitor from the arduino IDE. But now I needed something to write the chip content to a file and to write it back to the chip. This is the main reason, why I wrote my own serial monitor. After writing the basic functionality like connectiing to the arduino, sending a string and receiving the response, I started to add the functionality for the dump file.

Writing the dump file back to the chip is done byte by byte and the commands to manipulate a small number of memory positions could have been done by hand without dumping the whole file. This made my serial monitor not nesasary anymore for this small project. But, hey, it was nearly finished at this point and dumping a file can be helpful for other projects too, so of course, I finished it anyway. :-)

Setting the red marked bytes to 00 resets the page counter.

For this project I wrote a Serial monitor which is some kind of a I2C-Console when used with a special Arduino sketch and I want to share it with you. So I uploaded all sources to my Git-Repository.

In one of the next post, I'll demonstrate the capabilities and functions of the tores console.



Serial monitor:
Arduino sketch:


Anonym hat gesagt…

Hi! Thank you for this Blog-Post - it helped a lot. We are trying to reset a HP-Toner Chip (CF280X - For use in HP LaserJet Pro 400 M401, MFP M425 Serie) but we can't get the chip to be recognized by IC2-Scanner. We have wired the arduino mega like you did with 10k pull-up resistors but we can't get a signal. Thats out Output from I2C-Scanner:

Arduino I2C Scanner - 0.1.06

s = single scan
c = continuous scan - 1 second delay
q = quit continuous scan
d = toggle latency delay between successful tests. 0 - 5 ms
p = toggle printAll - printFound.
h = toggle header - noHeader.
a = toggle address range, 0..127 - 8..120
0 = 50 - 800 Khz
1 = 100 KHz only
2 = 200 KHz only
4 = 400 KHz only
8 = 800 KHz only

? = help - this page

TIME DEC HEX 50 100 200 250 400 500 800 [KHz]

0 devices found in 254 milliseconds.

We have measured the cables with a multimeter and all seems properly. Can you give us a hint or advise, how we can get a signal? Many Thanks!

Anonym hat gesagt…

same promblem too, please help.

mlueft hat gesagt…


Thanks for your feedback.

The contacts of your chip I found on google image search are not labeled. You propably have contected the chip in the wrong order.

The voltage level could be the problem too. You have to know the voltage your chip is working with. I luckily found it for my chip on the web.

Using a wrong voltage level can distroy your chip, so pay attention!



mlueft hat gesagt…
Dieser Kommentar wurde vom Autor entfernt.
Anonym hat gesagt…

I have followed these instructions for the Samsung chip mlt-d116L.
How many bytes should I read in the dump command?
Why do you read 512 bytes?

Is there a possibility that my cheap has read protection?

mlueft hat gesagt…


I am reading 512 Bytes, because after 512 it is starting over, so I asume the chip just has 512 Bytes.

I don't think there is a read protection because the printer has to read it too. Are you sure, your chip is accessable via I2C?



Moe hat gesagt…

Hey, thank you for your blog post!
I have a question. I am trying to reset a chip of a Dell 1250c toner following your post and could successfully scan the bus and found one device. When I try to dump the bytes I only get 0's:

Scanning for devices ...
Device found at address:112
Scanning finished.
received command:dump 112 128

0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
32: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
48: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
64: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
80: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
96: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
112: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

How can this be? What could be the problem?