PRUSA Mk3 Filament Detector: short study

in printing3d •  7 years ago  (edited)

Hi ! This is a short post from a study of the PRUSA Mk3 Filament Detector.

It is using a specific IC : PAT9125EL : Optical Tracking Miniature Chip
Datasheet here: http://www.pixart.com.tw/upload/PAT9125EL_GDS_V1.2_31052017_20171011150843.pdf
It has a small laser that allow to follow the direction of a moving surface.
From the datasheet: "It is based on PixArt’s optical navigation technology of LASER which measures changes in position by optically acquiring sequential surface images (frames) and mathematically determining the speed, the direction and the magnitude of motion. The displacement X and Y information are available in registers."
The chip is available for SPI or I2C communication.
Prusa is using I2C for communication.

Prusa made available the KiCad PCB/Schematic here:

Firmware integration:

  • PAT9125EL specific parts here: https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/pat9125.cpp
    It uses only an axis for the detection of the flow of the filament. It contains a few list of commands that are sent to the PAT9125EL for the configuration (need to check out the datasheet and application notes for all the details)
  • Filament detection integration here: https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/fsensor.cpp
    an interrupt is used, autoload of the filament, some specific gcode for saving a print and the remaining for update and so on.
    The source code is really easy to follow and the integration straightforward, if it is not already in the Marlin main repository it will be super easy to integrate it.
    There is some code to handle a small error counter and it triggers the specific gcode sequence to save a print, however I did not see a direct link to the gcode planner, probably I miss something in the code, may be the cost is too high, I2C too slow and the PAT9125EL is missing precision to perform a reliable filament jam detection.
    Still it is a nice little IC this PAT9125EL, I like the absence of mechanical stuff, I wonder also how reliable is this IC with transparent filament and this laser scheme.

It is a pretty nice upgrade, I think we will see more this kind of stuff in the future. The ability to monitor and control position on X,Y,Z and the extruder is going to become mainstream it will help for the reliability and the ease of use.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

You got a 0.94% upvote from @postpromoter courtesy of @boucaron!

Want to promote your posts too? Check out the Steem Bot Tracker website for more info. If you would like to support the development of @postpromoter and the bot tracker please vote for @yabapmatt for witness!