Thingiverse
Atmega8A-PU filament monitor with optical encoder for Marlin firmware by stinguc
by Thingiverse
Last crawled date: 3 years ago
Atmega8A-PU filament monitor with optical encoder for Marlin 1.1.0-RC8 firmware
The second version can be found at https://www.thingiverse.com/thing:2838776
Having a cheap chinese hotend, from time to time i had filament filament grinding & clogging so naturally i searched for a filament monitor. None of them fulfilled my needs so i created one. Having some spare Atmega8A-PU microcontrollers and some phototransistors (http://www.tme.eu/en/details/ll-304ptc4b-1ad/phototransistors/lucky-light/) and using as inspiration 2 projects available on the internet:https://github.com/leuconoeSH/avr-exampleshttps://sites.google.com/site/tunelldev/home/filamentmonitor
i created a simple filament monitor which fullfilled my needs and is working without any issue for 1.5 months already.
The desing is simple and cheap to implement: 2 phototransistors, 2 leds, an atmega8 microcontroller and some 0.25w resistors & capacitors is all you need for electronics. Also 2 small pieces of ptfe tubes are nice to have, but not strictly required, in order to facilitate filament movement.
I used the PORTC of Atmega8A-PU microcontroller to sense and control the program logic.
PC5 is used for emitter led (the led which is used to detect the filament movement)
PC4 is used for the first phototransistor
PC3 is used for the second phototransistor
PC2 is used to display operation mode
PC1 is used to signal filament stoppage
PC0 is used to start the operations
The filament monitor uses, to monitor the filament movement, an optical encoder created by EMITTER_LED, A_RECEIVER, B_RECEIVER & wheell_alt.
After power on the default timeout to signal filament stoppage is set to 8 seconds.
There are 2 modes of operation:
1) If you short press the start button the default timeout (or the last timeout set) is used to detect filament stoppage
2) If you long press (at least 2 seconds) the start button, the filament monitor enters an mode where you can change the default timeout for filament stoppage detection. To set a new timeout you should keep the start button pressed until the desired timeout is set. The new timeout is indicated by OP_MODE_LED which blinks once at every second if the start button is pushed. So to set a timeout of 10 seconds proceed like that: press and hold the start button, wait 2 seconds (still holding the start button) and the OP_MODE_LED starts to blink, now count each blink and when 10 is reached release the start button. After each new timeout set the OP_MODE_LED displays the new timeout blinking for each second in the new timeout. So if you set 10 seconds as a new timeout, after start button release the OP_MODE_LED will blink for 10 times before start.
At any time, after start, you can stop the filament monitor by pressing the start button.
The OUT_PIN (pin 1 of PORTC) has a value of 0V on start and normal operation mode and will raise to 5V (for 2.5 seconds) on filament stoppage. Also on filament stoppage the OP_MODE_LED will blink.
After signalling a filament stoppage the monitor will stop so in order to restart it you will need to press the start button again. Also after a (re)start, without power off, the filament monitor will use the last timeout set.
To flash the microcontroller you can use the FilamentMonitor.hex file from filament_monitor.zip archive, also you can recompile the project from filament_monitor subfolder and use the recompiled hex file.
Fuses: LOW: 0xFF, HIGH: 0xC9
Any AVR programmer can be use to program the microcontroller. I used the one from Open Programmer (https://sourceforge.net/projects/openprogrammer/)
The monitor was designed for Marlin firmware & RAMPS 1.4 board but should be easilly adaptable to other configurations.
To connect the monitor to RAMPS 1.4 , please check the corresponding image. The signal provided by filament monitor will be connected to D44 on AUX-2.
The needed modifications of Marlin 1.1.0-RC8 firmware are available in marlin.patch from filament_monitor.zip archive.
When the filament monitor signals the error condition an M600 command is added to the current queue and previous and current enqueued commands are sent to the connected PC (if any), so if you use a program like Printrun (http://www.pronterface.com/) you will see in console something like:
M600 triggered.
Previous command: G1 X164.957 Y136.368 E4.70389
Enqueued commands: M600
Also you should activate M600 command in Configuration_adv.h (marlin firmware), uncomment the line:
// #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too)
and change FILAMENT_CHANGE_X_POS, FILAMENT_CHANGE_Y_POS, FILAMENT_CHANGE_UNLOAD_LENGTH & FILAMENT_CHANGE_EXTRUDE_LENGTH accordingly to your printer settings.
wheell_alt.stl should be made from a non-transparent filament. I made all pieces from green non-transparent PLA. For EMITTER_LED i used a bright green one and for OP_MODE_LED i used a red one.
Optional components are presor_wheel.stl & arm.stl
The second version can be found at https://www.thingiverse.com/thing:2838776
Having a cheap chinese hotend, from time to time i had filament filament grinding & clogging so naturally i searched for a filament monitor. None of them fulfilled my needs so i created one. Having some spare Atmega8A-PU microcontrollers and some phototransistors (http://www.tme.eu/en/details/ll-304ptc4b-1ad/phototransistors/lucky-light/) and using as inspiration 2 projects available on the internet:https://github.com/leuconoeSH/avr-exampleshttps://sites.google.com/site/tunelldev/home/filamentmonitor
i created a simple filament monitor which fullfilled my needs and is working without any issue for 1.5 months already.
The desing is simple and cheap to implement: 2 phototransistors, 2 leds, an atmega8 microcontroller and some 0.25w resistors & capacitors is all you need for electronics. Also 2 small pieces of ptfe tubes are nice to have, but not strictly required, in order to facilitate filament movement.
I used the PORTC of Atmega8A-PU microcontroller to sense and control the program logic.
PC5 is used for emitter led (the led which is used to detect the filament movement)
PC4 is used for the first phototransistor
PC3 is used for the second phototransistor
PC2 is used to display operation mode
PC1 is used to signal filament stoppage
PC0 is used to start the operations
The filament monitor uses, to monitor the filament movement, an optical encoder created by EMITTER_LED, A_RECEIVER, B_RECEIVER & wheell_alt.
After power on the default timeout to signal filament stoppage is set to 8 seconds.
There are 2 modes of operation:
1) If you short press the start button the default timeout (or the last timeout set) is used to detect filament stoppage
2) If you long press (at least 2 seconds) the start button, the filament monitor enters an mode where you can change the default timeout for filament stoppage detection. To set a new timeout you should keep the start button pressed until the desired timeout is set. The new timeout is indicated by OP_MODE_LED which blinks once at every second if the start button is pushed. So to set a timeout of 10 seconds proceed like that: press and hold the start button, wait 2 seconds (still holding the start button) and the OP_MODE_LED starts to blink, now count each blink and when 10 is reached release the start button. After each new timeout set the OP_MODE_LED displays the new timeout blinking for each second in the new timeout. So if you set 10 seconds as a new timeout, after start button release the OP_MODE_LED will blink for 10 times before start.
At any time, after start, you can stop the filament monitor by pressing the start button.
The OUT_PIN (pin 1 of PORTC) has a value of 0V on start and normal operation mode and will raise to 5V (for 2.5 seconds) on filament stoppage. Also on filament stoppage the OP_MODE_LED will blink.
After signalling a filament stoppage the monitor will stop so in order to restart it you will need to press the start button again. Also after a (re)start, without power off, the filament monitor will use the last timeout set.
To flash the microcontroller you can use the FilamentMonitor.hex file from filament_monitor.zip archive, also you can recompile the project from filament_monitor subfolder and use the recompiled hex file.
Fuses: LOW: 0xFF, HIGH: 0xC9
Any AVR programmer can be use to program the microcontroller. I used the one from Open Programmer (https://sourceforge.net/projects/openprogrammer/)
The monitor was designed for Marlin firmware & RAMPS 1.4 board but should be easilly adaptable to other configurations.
To connect the monitor to RAMPS 1.4 , please check the corresponding image. The signal provided by filament monitor will be connected to D44 on AUX-2.
The needed modifications of Marlin 1.1.0-RC8 firmware are available in marlin.patch from filament_monitor.zip archive.
When the filament monitor signals the error condition an M600 command is added to the current queue and previous and current enqueued commands are sent to the connected PC (if any), so if you use a program like Printrun (http://www.pronterface.com/) you will see in console something like:
M600 triggered.
Previous command: G1 X164.957 Y136.368 E4.70389
Enqueued commands: M600
Also you should activate M600 command in Configuration_adv.h (marlin firmware), uncomment the line:
// #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too)
and change FILAMENT_CHANGE_X_POS, FILAMENT_CHANGE_Y_POS, FILAMENT_CHANGE_UNLOAD_LENGTH & FILAMENT_CHANGE_EXTRUDE_LENGTH accordingly to your printer settings.
wheell_alt.stl should be made from a non-transparent filament. I made all pieces from green non-transparent PLA. For EMITTER_LED i used a bright green one and for OP_MODE_LED i used a red one.
Optional components are presor_wheel.stl & arm.stl
Similar models
thingiverse
free
Atmega8A-PU filament monitor with optical encoder for Marlin firmware v2 by stinguc
...ired, their are just examples of how the filament case can be used.
also sensor_wheel should be adjusted to your particular case.
thingiverse
free
Manneken Peace - 22/03/2016 by esteevens
...just barely works. (jozef prusa has totaly rewritten the m600 command support in his firmware, so i need to take a look at it).
thingiverse
free
Cura Script for Filament Change M600 command by Coramvaar
...working change filament script for cura, with the m600 marlin command.
tested on monoprice select mini v2 / maylan m200 printer.
thingiverse
free
XT60 Caps by OsiViper
...using a pause command or filament change (varies from machine to machine).
tested prints with pla, nylon and both of them worked.
thingiverse
free
RepRap Touch TFT LCD (mini pronterface style) by MarcoAntonini
...picaso firmware send commands through the gcode protocol to reprap main board.
the communication is done by a second serial port.
thingiverse
free
Drunk Domo Beer Bottle Opener - Multi Color by lukki15
...in the firmware and add m600 before and after the teeth and before the saliva. if you want to print it in three different colors.
thingiverse
free
Discrete 7 Segment LED Clock by KiwiGrinder
...set the minutes
press the mode button and the normal time mode is shown. (denoted by the colon separator flashing once a second).
thingiverse
free
Panda magnet bicolor
... is a hole on the back to glue a 8mm*3mm magnet. i recommend to rub the magnet a little with sandpaper to ease the glue to stick.
thingiverse
free
ISSF 10m AirPistol Timer by Trierscheid
...ady for the next competition shot.
this is very useful for training purposes, it makes fun and it made a lot of fun, building it.
thingiverse
free
Paste extrusion with pressure regulation by LolloHirsch
...in firmware). to insert these gcode commands before and after each travel move i used a postprocessing python script with slic3r.
Stinguc
thingiverse
free
LM8UU bearing case by stinguc
...lm8uu bearing case by stinguc
thingiverse
lm8uu bearing case & holder
thingiverse
free
Laptop 50mm fan case by stinguc
...laptop 50mm fan case by stinguc
thingiverse
case for a 50mm laptop fan
thingiverse
free
Laptop 54mm fan case by stinguc
...laptop 54mm fan case by stinguc
thingiverse
case for a 54mm laptop fan
thingiverse
free
FinePix S9500 lens cover by stinguc
...finepix s9500 lens cover by stinguc
thingiverse
lens cover for fujifilm finepix s9500.
printed in abs
thingiverse
free
TAL2 Telescope - Polar Axis Handwheel by stinguc
...scope - polar axis handwheel by stinguc
thingiverse
russian tal-2/tal-2t telescope - handwheel of micrometer screw of polar axis
thingiverse
free
Commodore Amiga 500 Power Connector by stinguc
...to around 20 mm length or you can use the pins from a din 5/6/7/8/9 connector.
the metal shield was cut to size from a tin can :)
thingiverse
free
D-SUB 25 Male/Female Connector Case by stinguc
...modified the d-sub 25 connector and i removed the last pin from each row in order to fit the original amiga d-sub 23 connector :)
thingiverse
free
Atari ST DIN14 floppy disk drive connector by stinguc
... need at least 3 donor din 5.
also, you may find easier to insert the pins if you will use an solder iron heated to 200 degree c.
thingiverse
free
Commodore Amiga 500 PC Floppy Mount and Eject Button by stinguc
... replacement eject button for this specific floppy drive.
the mounting brackets should be compatible with other pc floppy drives.
thingiverse
free
Z-probe with optical switch and Op-amp comparator by stinguc
...curacy. on my probe, without too much fiddling:
mean: -0.017500 min: -0.029 max: -0.006 range: 0.023 standard deviation: 0.008385
Pu
turbosquid
$35
Rooble Pus
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
turbosquid
$2
ATmega328P-PU
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
3ddd
$1
KRAUS, KEF-15100-PU-10CH
...kraus, kef-15100-pu-10ch
3ddd
kraus
смеситель для раковины kraus kef-15100-pu-10ch
turbosquid
$5
Atmel Atmega 328p-pu
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
turbosquid
$10
Upholstered Dining Chairs PU Leather
...ed dining chairs pu leather for download as max, max, and obj on turbosquid: 3d models for games, architecture, videos. (1674737)
turbosquid
$12
ARMCHAIR DIVANO ROMA FURNITURE ARM39-PU
...ir divano roma furniture arm39-pu for download as max and obj on turbosquid: 3d models for games, architecture, videos. (1364411)
turbosquid
$45
M91 30 Mosin Nagant with PU Scope
... mosin nagant with pu scope for download as 3ds, max, and obj on turbosquid: 3d models for games, architecture, videos. (1301085)
3d_export
$40
M9130 Mosin Nagant with PU Scope 3D Model
...on firearm weapon world war ii low poly game ussr wwi wwii gun
m9130 mosin nagant with pu scope 3d model plutonius 26834 3dexport
3d_export
$5
md table design- veneer with white pu
... file attached here. .3ds file .stl file. .mtl file. .obj file autocad .dwg file. sketchup .skp file. image file. video mp4 file.
turbosquid
$49
Chair Chrissy Pu by Richmond and aged table with table setting
...ed table with table setting for download as max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1281514)
Marlin
3d_export
$35
Marlin
...s : zbrush 3ds max ztool obj fbx dae 3ds stl properties : 8*14*6 production time : 15 hours 52 gram models are drawn with zbrush.
3ddd
$1
Faro Marlin pendant
...mpara colgante blancohttp://www.faro.es/es/productos/marlin-lampara-colgante-blanco/
polyrate: 14107
в архиве fbx+obj
3ddd
$1
Faro Marlin bra
...
marlin black wall lamphttp://www.faro.es/en/productos/marlin-lampara-aplique-negro/
polyrate: 15491
в архиве fbx+obj
turbosquid
$19
Blue marlin
...e 3d model blue marlin for download as max, obj, fbx, and dae on turbosquid: 3d models for games, architecture, videos. (1341037)
3d_export
$60
Marlin Blue 3D Model
...marlin blue 3d model
3dexport
fish sea 3ds marlin mental ray textured animals
marlin blue 3d model ojoalperro 57644 3dexport
3ddd
free
Brass Marlin
... винтаж , марлин
статуэтка марлина из латуни. винтаж.
3d_export
$60
martin p5m marlin
...d states navy performing naval patrols. it also served with the united states coast guard and the french navy. 285 were produced.
humster3d
$15
AMC Marlin 1965 Blueprint
...65 blueprint 3d model in the format you need. all our 3d models was created on real car base and maximally close to the original.
humster3d
$75
3D model of AMC Marlin 1965
...y a detailed 3d model of amc marlin 1965 in various file formats. all our 3d models were created maximally close to the original.
turbosquid
$20
Cartoon fish - Xiphias gladius - marlin
...phias gladius - marlin for download as max, 3ds, fbx, and obj on turbosquid: 3d models for games, architecture, videos. (1673408)
Encoder
3ddd
free
Zippo
...ысокополигональная модель культовой зажигалки zippo. выполнена 1:1 по реальному образцу до винтика. бе
3ddd
free
SMANIA Chic DeLuxe
...оригинальной картинки. 2 файла, со слитым и не слитым стэком. юзайте!xml version='1.0' encoding='%soup-encoding%'
thingiverse
free
Encoder knob
...encoder knob
thingiverse
for encoder without thread, as in the photo
3dfindit
free
Encoders
...encoders
3dfind.it
catalog: abb low voltage & systems
thingiverse
free
Encoder wheel by kaspwip
...encoder wheel by kaspwip
thingiverse
wheel for encoder
thingiverse
free
Encoder Wheel by mmsparky
...is the model for the encoder wheel. push fit onto bourns encoder with 6mm flat shaft. encoder type e.g. bourns pec11r-4215f-s0024
thingiverse
free
Encoders by SciJoy
...m structure.
we'd love to see what you do with these encoders. you can send us messages on twitter or tumblr.
keep exploring.
thingiverse
free
Wheel encoder spacer
...raises the height of the encoder by 1mm. useful if the encoder you want doesn't come in the height you need for your project.
thingiverse
free
Encoder KNOB by dgTECH3D
...encoder knob by dgtech3d
thingiverse
knob for rotary encoder 6mm diameter
thingiverse
free
Customizablee Encoder by makeitBana
...customizablee encoder by makeitbana
thingiverse
customizable encoder for barrier style optical sensors
Firmware
3d_export
$5
Pepe stool by Opinion Ciatti Italian
...design provides a special slope. additional decor - manual firmware<br>32 x 48 x h58...
3d_export
$5
LENNY BED by Felis
...removable. an additional decor of the headboard is a firmware that imitates the capitonne technique. the bed can be...
thingiverse
free
sidewider x1 firmware by Xavierart26
...sidewider x1 firmware by xavierart26
thingiverse
firmware for sidewider x1
thingiverse
free
Sailfish Firmware by jetty
... created with omnomnom creator:http://www.thingiverse.com/thing:24639.
note: this is not an official makerbot firmware release.
thingiverse
free
Jetty Accelerated Firmware by jetty
...y-firmware#toc66
any updates will be placed here, so check back often.
note: this is not an official makerbot firmware release.
thingiverse
free
Sigma Türkçe firmware (marlin1.1) by Paarthurnax
...sigma türkçe firmware (marlin1.1) by paarthurnax
thingiverse
sigma türkçe firmware (marlin1.1)
thingiverse
free
firmware for orca 040 by sellemann
...y sellemann
thingiverse
firmware and settings for orca 040 with 025 nozzle
i had trubble getting it to work but now its working.
thingiverse
free
Gen4 Interface Firmware by jetty
...-firmware#toc66
any updates will be placed here, so check back often.
note: this is not an official makerbot firmware release.
thingiverse
free
cl-260 standard firmware (outdated!) by renoisenoir
...re is not for 2018 or higher version of cl-260!
this firmware is for 2016-version of cl-260
it can be used for reference purpose.
thingiverse
free
Firmware Tronxy XY2 Pro Titan by droidlex
...flashed your printer with marlin firmware, this should help restore the factory firmware, including the boot screen and interface
Optical
design_connected
$9
Optic
...optic
designconnected
alessi optic computer generated 3d model. designed by colombo, joe.
3ddd
$1
обои OPTIC
...обои optic
3ddd
в архиве текстуры и фото обоев из коллекции optic.
archive3d
free
Optics 3D Model
...optics 3d model
archive3d
optics
optics - 3d model (*.gsm+*.3ds) for interior 3d visualization.
turbosquid
$49
optical eyewear
...id
royalty free 3d model optical eyewear for download as max on turbosquid: 3d models for games, architecture, videos. (1592243)
3d_ocean
$5
optical mouses
...al mouses
3docean
3d models computer electronics mouse
optical mouses 3d models. realistic mouse model. custom and unique design.
turbosquid
$10
Optic cross
...yalty free 3d model optic cross for download as sldas and ige on turbosquid: 3d models for games, architecture, videos. (1683403)
turbosquid
$7
OPTIC Mirror
... free 3d model optic mirror for download as max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1223927)
turbosquid
free
Fiber optics
...d model fiber optics for download as 3ds, obj, fbx, and blend on turbosquid: 3d models for games, architecture, videos. (1211912)
turbosquid
$8
Mouse optical
...3d model mouse optical for download as 3ds, obj, c4d, and fbx on turbosquid: 3d models for games, architecture, videos. (1504476)
turbosquid
free
Optical puzzle
... optical puzzle for download as max, ige, fbx, stl, and sldas on turbosquid: 3d models for games, architecture, videos. (1405925)
Monitor
3d_ocean
$5
Monitor
...monitor
3docean
computer desktop monitor screen
a computer monitor
3d_export
free
monitor
...monitor
3dexport
monitor
archibase_planet
free
Monitor
...monitor
archibase planet
monitor lcd monitor pc equipment
monitor - 3d model (*.gsm+*.3ds) for interior 3d visualization.
3d_export
$5
monitor
...monitor
3dexport
monitor or pc.
3d_ocean
$5
Monitor
...monitor
3docean
computer desktop monitor screen windows work
a monitor with windows desktop
archibase_planet
free
Monitor
...r
archibase planet
monitor lcd monitor pc equipment
monitor mouse n120614 - 3d model (*.gsm+*.3ds) for interior 3d visualization.
archibase_planet
free
Monitor
...archibase planet
monitor lcd monitor pc equipment
monitor samsung n090714 - 3d model (*.gsm+*.3ds) for interior 3d visualization.
archibase_planet
free
Monitor
...r pc equipment
monitor samsung 27'' led monitor 7 t27b750 n200315 - 3d model (*.gsm+*.3ds) for interior 3d visualization.
archibase_planet
free
Monitor
...monitor
archibase planet
monitor apple
monitor-apple - 3d model for interior 3d visualization.
archibase_planet
free
Monitor
...monitor
archibase planet
monitor display
monitor sony - 3d model for interior 3d visualization.
Filament
3ddd
$1
Filament Cage
...filament cage
3ddd
лофт , filament cage
модель бра, делалась по фото!
turbosquid
$3
FILAMENT COUNTER
...d
royalty free 3d model filament counter for download as stl on turbosquid: 3d models for games, architecture, videos. (1563049)
3d_export
$5
Filament lamp 3D Model
...filament lamp 3d model
3dexport
filament lamp 3d model kevin 54161 3dexport
3d_export
$5
Filament bulb candle 3D Model
...filament bulb candle 3d model
3dexport
filament bulb-candle
filament bulb candle 3d model kevin 54163 3dexport
3d_export
$5
Filament led light bulb
...filament led light bulb
3dexport
realistic 3d model of filament light bulb with v-ray materials.
3d_export
$5
Filament led light bulb
...filament led light bulb
3dexport
realistic 3d model of filament light bulb with v-ray materials.
3d_export
$5
Filament led light bulb
...filament led light bulb
3dexport
realistic 3d model of filament light bulb with v-ray materials.
3d_export
$5
Filament led light bulb
...filament led light bulb
3dexport
realistic 3d model of filament light bulb with v-ray materials.
3d_export
$5
Filament led light bulb
...filament led light bulb
3dexport
realistic 3d model of filament light bulb with v-ray materials.
3ddd
$1
Factory filament metal shade
...factory filament metal shade
3ddd
restoration hardware
restoration hardware. 20th c. factory filament metal shade.