<blockquote>
<p>I am interested in finding out if it is possible to get access to the image data coming from that sensor? And I was interested in seeing if the image data could be used to measure the filament width?</p>
</blockquote>
<p>No. The sensor is the <a href="https://web.archive.org/web/20180920104941/https://www.pixart.com/upload/PAT9125EL_GDS_V1.2_31052017_20171011150843.pdf" rel="nofollow noreferrer">PAT9125EL</a>. The only output it provides is the movement in the X and Y directions. There is no way to get image data out of it.</p>
<blockquote>
<p>Could I add a rgb led and interpolate the filament color by comparing pixel intensity under different lighting conditions</p>
</blockquote>
<p>No. The sensor uses laser light of a specific wavelength. It's likely not sensitive to any other wavelengths. On a positive note, there is an &quot;average frame brightness&quot; register that can be read from the chip, but I don't think it's likely to work with RGB LEDs.</p>

CC BY-SA 3.0
2017-12-09T07:33:16.903Z
Well few years ago I saw an article that its possible to get de image or video from the mouse sensor; the RGB arrangement can help only to define a better gray scale. However I think is better to use a caliper to monitor continously the width. I´ve had problems with some reels that have joints of 1.85mm
Fernando Baltazar
CC BY-SA 4.0
2023-11-10T13:23:44.350Z
@FernandoBaltazar Early optical mice used separate optical and image recognition modules, later the chips were integrated but still had optical output on unused pins. With the race to the bottom cost-wise, modern mice don't expose the image data any more.
SF.
CC BY-SA 4.0
2017-12-08T09:54:34.503Z
2023-11-06T17:45:58.540Z
2023-11-06T17:45:58.540Z
Tom van der Zanden
<p>I have seen that the new Prusa Mk3 design has a optical mouse sensor that can be used to detect if the filament jams. Optical mouse sensors are just a really low resolution camera with no color.
I am interested in finding out if it is possible to get access to the image data coming from that sensor? 
Could I add a rgb led and interpolate the filament color by comparing pixel intensity under different lighting conditions?
And I was interested in seeing if the image data could be used to measure the filament width?</p>

<prusa-i3><firmware>
Prusa Mk3 filament detection sensor, can you access the image data?
user802599
# Prusa Mk3 filament detection sensor, can you access the image data?

(Asked by: username_0 on 2017-12-08)

I have seen that the new Prusa Mk3 design has a optical mouse sensor that can be used to detect if the filament jams. Optical mouse sensors are just a really low resolution camera with no color.
I am interested in finding out if it is possible to get access to the image data coming from that sensor?
Could I add a rgb led and interpolate the filament color by comparing pixel intensity under different lighting conditions?
And I was interested in seeing if the image data could be used to measure the filament width?

**Tags:** prusa-i3, firmware


---

## 1 answers

### Answer by username_1 on 2017-12-08. Score: 3 | Accepted answer

> I am interested in finding out if it is possible to get access to the image data coming from that sensor? And I was interested in seeing if the image data could be used to measure the filament width?

No. The sensor is the [PAT9125EL](https://web.archive.org/web/20180920104941/https://www.pixart.com/upload/PAT9125EL_GDS_V1.2_31052017_20171011150843.pdf). The only output it provides is the movement in the X and Y directions. There is no way to get image data out of it.

> Could I add a rgb led and interpolate the filament color by comparing pixel intensity under different lighting conditions

No. The sensor uses laser light of a specific wavelength. It's likely not sensitive to any other wavelengths. On a positive note, there is an "average frame brightness" register that can be read from the chip, but I don't think it's likely to work with RGB LEDs.

> **Comments:**
> **username_2**: Well few years ago I saw an article that its possible to get de image or video from the mouse sensor; the RGB arrangement can help only to define a better gray scale. However I think is better to use a caliper to monitor continously the width. I´ve had problems with some reels that have joints of 1.85mm  
> **username_3**: @username_2 Early optical mice used separate optical and image recognition modules, later the chips were integrated but still had optical output on unused pins. With the race to the bottom cost-wise, modern mice don't expose the image data any more.  

---

