#BTT SFS
1 messages Β· Page 1 of 1 (latest)
Yes, I built 2, and have one in constant use on my CC to catch spool "knots."
I'm getting my SFS's today 
There are 2 alternatives to connect the device - did u choose 1 or 2?
Mine seems to work when connect it on USB power - doing bench-tests, but not when I connect it to the CC-connector - so for now I'm on alternative 2...
did you change the layout of the wires when doing cc-connector?
theres a different layout of the wires/connectors you need to do
As far as I can see there is only 1 and that is to connect sensor to 3v compared to the 5V from CC
And of course the power to the ESP boards.
I did it simple by relocating the black wire on that connector from sensor - moved it over to far end
So from CC there is 3 wires that I connect to a 4 row parallel striped PCB
1 stripe/ pin and easy to connect the sensor and ESP.
The 4th stripe is green coming from sensor.
it works for me, connecting it directly to the cc
I ordered the same ESP32 as in vid so I will try that and see what result is. should arrive tomorrow.
i need to try and redo mine on an electrocookie as i finally figured out how to wire it
sometimes the ESP32 stops, dunno why, so pressing the button on the board restarts it
take 5V from the CC red wire to ESP32 's 5V pin, run the 3.3V from the ESP32 as per above, to the SFS red wire.
NO 5V ON THE SFS AS IT WILL OUTPUT 5V LOGIC DAMAGING THE ESP32 !!!
what are you talking about
CC to SFS wiring
is the sfs the smart filament sensor
yessir
The Elegoo red wire puts out 5V
all of the wires on mine are black :(
are you talking about these
uhu
mines been runnin for a month or so fine, so i assume i wired it righy lol
most likely π
i dont see any smoke so thats good
I used the loong wires provided by SFS to a pin header on my board
my wonderful setup
I fried one ESP32 Xiao by putting 5V to the SFS
I often edit, grammar misspellings etc
my only mistakes are spelling
i usually use commas and colons/semi-colons, no periods though
I run my filament dryer boxes while printing. I suspect the inner parts of spools have little chance of drying
How are you feeding four filaments into one? Manually?
ya, its just so i dont need to rewind all the way
With the new ESP it was quite easy to get it working, but it is picky having USB-C cable to my computer, it did not like my USB-A -> USB-C cable at all...
New firmware, new sensor - great job
Here is my mess on the ESP...
I had some connectors lying around so I glued them to the bottom
Elegooners cable connects to the left, sensor to the right
USB was while programming the firmware.
Looks better!
I had some issues with the board disconnecting after some hours, and restarting on out-of-filament sensor. The green LED was on 100% , not blinking, and not logging, then stating blinking on restart.. The log file keeps running as long as you don't switch tabs in the webUI.
Could be a local networking issue. I have two subnets on this PC
I tested by printing the case and lid for the ESP, but for some reason it paused, I just pressed resume and print was finished. not sure why...I wish logging saved some stuff
check if there's a Color swap or anything
The log file keeps running as long as you don't leave that tab. If you switch tab it truncates.
thx, didn't know that
There were several differences how my 2 ESP boards worked with the online programmer so I'm not sure about compatibility.
This dev board requires you to log on to the supplied wifi and change SSID and so on.
With my D1 Mini I get that option in the online configurator so you instantly can connect to correct wifi.
I can keep trying but now it works and I leave it this way
I used the same board as @Jrowny used. To save time
Mine is weird - pausing filament, I click resume and it finishes.2 times today at the very end of print where yes - filament stopped moving as you are only moving parts down and head to home - you muppet.
I will try to tweak the settings for jams or filament not moving - or remove it completely as there is no need to pause a print as it happened to me yesterday mid print...the filament is nice and not jammed in any way feeding from a dryer.
Yeah, good luck. I had mine set up to 35000 and it was still pausing randomly with no filament issues. At least now I know someone else had the same issues as I. Still waiting to see if the author does any meaninful changes now that the OC firmware has been released.
I'll work on a new ESP32 implementation of filament runout motion detection this week, but I will probably require HA
or an HA pseudoscript, but ideally HA
as well as an OC patch
I got HA running at home, but can also set up a dedicated Ha on a unused rpi4 for testings
no need, I can give you an addon
Why would it require home assistant? I don't run it, so what you create won't be useful to me? This damned thing is even pausing when I have the pause on filament stoppage turned off. I had to fully disable it. (I reinstalled it in hopes of testing new ESP32 code... LOL)
Sorry I was conflating two things. The spool manager will require HA - the filament motion sensor should not
It will just need to query the JSON data from the printer.
Oh. ok. Is the spool manager something involved with the motion sensor too? Or just posted in the wrong area? I'd be interested in a spool manager... I'm currently using SimplyPrint's and it's pretty good, but a lot more funtionality there than I need.
It's this - I've been doing a few things simultaneously and keep getting wires crossed on comms. But essentially yes, the patch that reports actual filament usage allows spool management in HA
Sorry for the confusion - I'm just doing this in my free time because I enjoy it and haven't been providing the best documentation
Well, if you could let me know when you have a solution ready to test for the BTT SFS2.0 without having to use HA, I'd love to give it a whirl. π
Mine is ready.
which fork?
Where do I get it. I can try it out almost immediately.
I'm all setup on two machines if you need any testing done. Only able to test the runout sensor, don't/won't have HA setup at work. Both are currently running the jrowny version as I can't get the mikeleet version to work.
Exactly the same boat... π I wish I knew how to program stuff... And I'm too old to learn new tricks!
I'm pretty far into coding this up
Though at this point it won't be a fork most likely it will just be an entirely new project
And won't require HA, will just use native SDCP
Smart device control protocol
getting there
Oh, even better. The esp32c3 has 4mb of flash allegedly
And it's a super small board
I might mess with this. Once you have the code populated, I know just enough to maybe make some changes and try it out. Shrink the package of this BTT mod down quite a bit
Where's >>MY<< DM? π Hopefully this will work on an esp32 s3 n16r8!
exactly what I've been using so that will work
I should be sending out instructions today - tried to run an overnight print because I was afraid my logging would kill the memory eventually - and it crashed at some point
so I'm going to fix that and then should be good to go
I have several 8266 and esp32's lying around
D1 mini esp32 for example, we only need to find out the correct pins to use.
I'm assuming your code is only for printers with OC on them? Or would this work with stock firmware?
OC only
Cool, ok so I'll have to make that upgrade as soon as I get my printer setup. After that, I definitely want to see if we can run your code on the esp32c3 tiny. Shrink the package down a bit more
Maybe print a nice enclosure for it that can attach to the btt. That would be cool
#2 is already done π
for #1 I don't even think it needs to be shrunk tbh, just run headless
Fair π I'm just personally not a fan of the full sized esp32 boards, they are pretty large and clunky imo
Lol yeah, getting the controller down to 21x17.5mm would be nice
Super small package
Well once you release the instructions I'll patch my ECC with OC since I haven't bothered to do it yet... Finally will have a reason to do it.
Yeah, that's my plan as well
busy day, didn't have a ton of time
I ended up scrapping the original + klipper model to go with a hard snag plus underextrusion dual detection setup that should be way more accurate and precise
nice. Let me know how it goes, I should have my sfs and esp32C3 tiny on Sunday. OC installed, so I'm ready for some shenanigans
which flavor of board did you buy? can you send me a link? I'm trying to make a minified version without losing anything but need to know what specs I'm working with
4mb flash
400kb sram
oh perfect I have one of those lol, I already have it in my unit tests for bounds
Lol oh perfect. Yeah, can't beat the price, and the size
I definitely think we can do something with it to make a nice little package that just sits on the sfs
Waiting with baited breath, Harpua... π
Hard Jam:
Ratio of seen vs expected < 10% for 5+ seconds
Soft Jam
Ratio of seen vs expected < 25% for 10+ seconds
At least 0.5mm total deficit
Physical Runout
No filament
you good with these criteria? If so I'll box it up and dm you the very not thoroughly tested alpha
Sounds good to me
Anyone have one of the esps with a build in screen
Damn, I wish. That would be sick
I might have an external screen I might be able to toss on my tiny for diag purposes.
yeah I have some screens too but with the webui its not worth having a screen so I haven't coded it at all. that being said, with an integrated screen it could be cool to show two meters
Right that's true. I'm just excited to give it a go.
Was thinking of buying one of those esp32 with a screen, but I haven't pulled the trigger on one.
I have 0.96 oleds available if u want to play around with that?
Got the SFS, esp32c3 tiny is ready to go, let's get this party started
Will we need to be running the patched firmware in order to run with your SFS solution? Or just have the printer in Dev Mode?
yes to both
Alright I know everyone has been patient which I appreciate, just wanted to give an update.
I have DMed with most/all of you that have asked to alpha test this, but nobody has either the app or the ESP32 firmware yet. Here's an update:
- The firmware is basically good to go, I am just polishing. Can't promise a release today, but it may happen.
- The app binary you will all need is ready. You can all flash this over whenever. I will provide instructions.
What you need to do at this point:
- enable dev mode and install the latest release of OpenCentauri (I believe it is 0.2?)
- once you have this installed (will see a different bootlogo on the screen, webUI will show OpenCentauri, etc), establish both ssh and sftp access. This is system dependent, but on windows, cmd and winscp are what I use (if you are very comfortable with ssh, you do not need winscp - it is just a nice UI way to move files if you aren't super familiar with CLI)
- Once you are able to ssh into the CC (you will see an OpenCentauri header in the ssh terminal) and establish a session in your file transfer method of choice if being used, navigate to /app.
- Take a screenshot of both the ssh session with the OC header and a screenshot of the contents of /app (or ls -lash /app if not using a file transfer program) and DM me both screenshots. Make sure to de-identify anything sensitive in these screenshots you don't want me to see (IPs, usernames, etc) - I will do nothing with these, but this is just a good practice to get into for anything like this
Once I have those two screenshots, I will DM back the instructions to proceed and provide the files (as well as the source if you want to review before spinning up an unknown device on your network)
(cc @agile surge just FYI - and to sanify check/make sure I didn't say anything dumb in the instructions above)
@here
Sweet, I'll do this in a little bit
Sure, sounds good
And 0.2 is the current release yeah
If everything works we can release 0.3 ig
Crap, just started an 11hr print. Will have to do this after the print is done.
Esp32c3 tiny board soldered, and mount designed/printed. Just waiting on the last piece of the puzzle, then this will be ready to rock
I might need to adjust the press fit tolerances just a bit more so it's a tighter engagement, but a piece of double stick tape behind the esp32 seems to work fine as well
Mine isn't so elegant. LMAO. I've got my ESP32 S3 plugged into a development board with screw terminals which is then tethered to the BTT via the plug. And I have the board powered by USB which in turn powers the BTT.
I did all this because I was under the impression I was going to have to do some testing - but when the original author pretty much disappeared, I never bothered to do anything "nice". The BTT is attached to the printer and the ESP 32 is just dangling from that in mid air. LOL
lol, makes sense. I am a bit of a neat freak, so I have to do things above and beyond lol
Oh, if this starts working properly, I will do a neater install. I just got tired of screwing with it previously and gave up. I will properly solder connections, get rid of the development board, print a decent mount/case for the whole shebang.
If you ever have to reset the ESP32S3-Xiao, the button is microscopic, JRowny's "big" board has accessible buttons. Every so often the board hangs, a need a slow dog kick in the ass. The Xiao C3 may have better buttons
if the buttons are unreachable and the board won't boot at all, you can also look up the pin to short to ground to enter boot mode - and make your own external button if needed
its going to depend on the board, its typically taking one pin to ground and power cycling with it grounded
some are pull-up though so definitely read your own SBCs microcontroller's documentation if that becomes needed
Ok, what are the creds to log into the printer via ssh? I googled it and got mks/makerbase, but that's not getting me in.
NM, got it.
@here a few people are alpha testing right now - hope to have a stable-ish release out for beta next week
Woo! Alpha testers! We break code so you don't have to!
It's been a journey for sure
I'm still waiting for the info in order to test... π
He's had his hands full dealing with me π
I've been doing a great job breaking things
LOL Yeah we were chatting last night after I got the access all set up and sent him the screenshots. Then he... sniff sniff disappeared on me.
Damn, that means there will be less for me to break.
Or I'll just break it harder. π
oh don't worry I break plenty of stuff on my own
FYI for anyone testing, this is what a 'normal' print can look like:
expected and actual roughly equal, the two lines trending up together on the graph
deficit is also not expected minus actual, it is expected in the last X seconds minus actual observed over the last X seconds with some additional hysteresis and sanity checking math applied
so it may spike momentarily as the planner says give me 12mm of filament for this one long gcode move but then catch back up as the filament is extruded (since no more is being requested while the move completes)
I'm working on retooling all the verbiage for metrics and settings tonight to make it more userfriendly and less dev-friendly
Nice! It's looking pretty good. I got my filament per pulse pretty dialed in now, so I'm pretty happy with it so far. We just need to get the failure cases to stop the printer
I'd like to test it...
Do you have an esp32 and a BTT SFS 2.0 filament sensor?
Nice. Yeah, I have a seeed esp32c3. I like how small it is, I made a bracket for it. I might make some adjustments so the more square esp32c3s also can fit
the original code has too many false positives, stopped using it
My xiao S3 I fried because it did not like the 5V wired in to it, much happier with using the 3.3V regulated output to power the BigTree
where can I find the code for it?
It's still very much in alpha, he said he's going to try to release the beta on Monday
It beta be nice
Lol it should hopefully
It's very nice UI. Very pleased with it so far.
@here Sorry for the delay - holiday season
For anyone already testing - the first 'alpha' release of the firmware is now available.
Visit https://esptool.harpua555.dev
- Initial flash over USB with 'Flash Firmware' option (wifi credentials optional)
- OTA update files provided by selecting a board and clicking 'Download OTA files'
Access details for this site will been sent via DM if you are already alpha testing.
Once we reach the beta stage, I will drop the access requirement so that this firmware is accessible to anyone
Reminder that this is very much an alpha. I am still doing limited testing in my own environment when I have time. Expect plenty of bugs, some builds to not work at all, etc. I break things more often than I fix things
Current known bugs:
- Soft jam does not appear to evaluate as expected when it is right around (+/- 5%) the underextrusion threshold. Visually - it looks like it will trip and then resets at 99% - need to update the visualizations.
Hello,
I could compile your last program version using Visual Code (I am not a programmer but I know how to follow a software setup procedure like the one you proposed π
) and I flashed my Esp32 S3 with it. When I finally got access to the web server, I noticed that your software was needing Open Centauri version >0.3: my version being only 0.2, will it work?
Thank you in advance
HI- Thanks for checking out the project! The current version of OC (0.2.0) will not work for this project.
Any github run after this https://github.com/OpenCentauri/cc-fw-tools/actions/runs/19688442397 one (aka after commit 8af2359) should work, as the filament reporting feature is active.
That being said - these artifacts are not officially tested (only tested by github build tools, so only known to compile), so no guarantees on safety or functionality. They are public, but not officially released, so very much use-at-your-own risk.
If you are comfortable with that, then running opencentauri and updating to one of the current artifacts should work for you
@here new versions (S3, seeed C3, supermicro C3) are available at https://esptool.harpua555.dev
- Jam logic refined
- Jam graphs added to Status page - Jam meters moved to debug tab
- Debug tab added
- Pause and Resume buttons added to Settings tab
- Logs now accumulate in browser and are no longer limited to 100 entries (logs tab must be open to capture).
- Log downloads redact personal information
- OTA updates now correctly sequentially flash firmware.bin and littlefs.bin if dropped together
- OTA updates re-enabled for ESP32-C3 (seeed [untested] and supermicro [tested])
Guess I'm going to have to check the seeed for you later π
I get a login prompt on that website...?
I don't think he publicly released the username/password where this is still in alpha form. I think he wants to control access. Probably to keep his sanity from too many people asking questions/having problems.
Though I'd be willing to help him out - outside of programming issues. LOL
^ that
the filament sensor requires an unreleased version of OC
I don't want people getting confused
But once it's fully released, I think people are going to love it - and AliExpress will sell out of BTT SFS2.0 and ESP32s... LMAO
@here:
- Does anyone have a Seeed S3? I don't have this board so can't validate it
- Does anyone have a board other than S3/C3/C3supermini/WROOM/seeedC3/seeedS3 that you would like to use for this project?
Working on the next RC, just want to make sure I have full coverage
I'm waiting for my S3 mini to ship, but I'll definitely validate it for you once I have it
@here with the public release of OC v0.3.0, I have updated https://esptool.harpua555.dev
- New version (0.5.1) available with a few bugfixes, and extended browser-side logging (100k lines, must leave browser window open)
- Password protection removed
Reminder - this is still very much in alpha, so expect bugs
Can jammed nozzle be detected with extruder motor current draw? Not sure if it will lock like the X,Y, Z motors, or just slip, giving a weak (current draw) signal to the drive chip?
EDIT: Chip supposedly can detect 50mA with the 0.1 ohm resistors.
tmc2209_datasheet.pdf page58
Looking at printer.cfg I don't think the data is readable
at first glance not seeing anything on the extruder that would put out actionable data
@here
v0.7.1-alpha is available now at https://esptool.harpua555.dev/
There should be almost no difference from the previous two versions for jam detection outside of edge-case handling for very slow prints. Most of the changes in this release are stability / diagnostic / QOL / infrastructure etc.
Logs now go up to 1000 lines in the browser window and up to 100,000 entries for download. The browser window must be kept open for them to accumulate. On crashes, the logs should persist for download (hopefully)
I am also going to be a bit more aggressive with releasing builds now that I have an actual versioning system in place. Each release will have passed all the unit tests and be known to compile and flash successfully, but may introduce some bugs. The distributor now serves all old versions starting from 0.7.0 so if one of the new releases is buggy you can always roll back
also for anyone still experiencing seemingly random jams - I ran some testing this morning with four ESPs all hooked up to the same BTTSFS. I found two pretty critical bugs, one releated to homeassistant proxy vs direct SDCP, and one related to network stability. Working to patch both of them today and get 0.7.4 released
So far so good. I've even done some manual multicolor prints and the SFS hasn't been falsely triggered
The code in the extruder STM32F402RCT6 may not include any external communication on the USB (to the mainboard CPU) of the motor current SG-RESULT , which may only be used internally to control the motor, or just ignored by the mainboard MCU if comm present.
"...StallGuard can be used for stall detection, as well as other uses at loads below those which stall the motor..."
Normalization of typical motor current would need to calibrated, perhaps while purging some filament, where motor feedback and control stepper data can be correlated with the SFS 2.88mm. Current draw may need to account for extruder wheel tension adjustment.
grins and nods as if he totally understands what MIX just said
how is the calibration done after a print?
expected divided by pulses
Expected length of filament from the print file? Maybe replace the NTC resistor with a fixed value indicating some suitable temp, remove the nozzle, cut the filament with that built-in blade, run extruder thru 1 meter of filament, cut it again, pull it out and measure how close to 1 meter, input that data, compare with number of clicks on the SFS?
No back-pressure on the extruder. Good enough?
To be honest, as an end user, I would appreciate it if things were kept as simple as possible while keeping the main things we need tracked. I live by the KISS principle... The simpler it is, the easier to trouble shoot, the less to have go wrong.
What he has set seems to be working more than good enough honestly
Absolute accuracy without any added cost.
Another way to do it would be to use a measured length of filament and manually pull it thru the SFS without it feeding the printer...
Not going to lie - I really am not following
I just did a 45 minute print that ended up with 99.98% accuracy
feels like a solution in search of a problem. You can definitely do this manually if desired, just not worth the added complexity and overhead for the compiled project
OK
It could be a separate function of the program, not part of the main "thing", a way to get 3 decimals of accuracy on the SFS
Maybe a debug mode in your GUI that would report "movement pulses", without requiring interaction with the CC mainboard.
The distance from the blue tube entry to the filament hitting the gears on the extruder is 843mm. That should be 292.7 pulses.
870mm from SFS blue tube inlet to hot end melt-zone.
Right now I cannot get pulse output from the GUI.
@here
New version is available, see GitHub for release notes
https://github.com/harpua555/centauri-carbon-motion-detector/releases/tag/v0.7.3-alpha
nevermind, I had it hooked up wrong
OK I got the old board reflashed
I flashed with ESP32-S3 (generic) not ESP32 (WROOM)
not sure if it is correct...
v0.7.3-a GUI does not report "movement pulses" during print, is it dependent on the OC 0.3.0 FW?
Yes, OC 0.3.0 is required for all releases
OTA update worked flawlessly, Harpua! Awesome work, again. π
Looks like I picked the correct ESP32
The missing feature is just Expected Filament and Deficit, otherwise not dependent on OC FW?
Oh sorry - movement doesn't require OC 0.3.0, expected does
Yeah exactly - you need the extrusion data from the CC
Which requires OC
flashing thru the JTAG port on the board was fast but did not work. WROOM had more errors than -S3 generic
Failed to connect to wifi, reverted to AP mode (first connection attempt)
It would be great to set the wifi details thru serial port
Which esp32 do you have?
WiFi patching was working through the USB flashing method, though I may have broken that at some point
Use the s3 generic then
I think I know what went wrong : blind typing *********
...of password
redid it 3 rd time now connected
I tried OTA, but then I got problems
GUI filament status says "moving", but it is not. Maybe printing ? It changed color when I started printing, before any filament movement
Ok its good now
Yeah I changed it to idle/moving/stopped
So during printing, even if it isn't moving, it says moving
Also a couple quick notes. Hopefully nobody is seeing this yet, but there is now a check for new releases which will display a banner if found:
And a link to the web flasher / update page etc:
Should help reduce the need to check Discord
(the 'Update Now' button is currently does nothing, and the disable update checks setting also does nothing. I'll actually activate those in the next release)
@here one more quick update. v0.7.4-alpha is out now so you will likely see the update banner.
This update doesn't change any functionality, it is a rename and polish update:
Project has been renamed to OpenFilamentSensor, with lots of verbiage / link updates to go with it
Repo is at https://github.com/harpua555/OpenFilamentSensor
Redir repo at the old link created to avoid (some) confusion
Flash/Update Distributor now lives at https://ofs.harpua555.dev - old https://esptool.harpua555.dev will redirect there for now, removed eventually
AP WiFi name and local DNS hostname are now OFS.local instead of centaurifilament.local
wanted to do the rename as a separate release from any actual firmware changes to make sure nothing breaks
- ) I disconnected the Teflon tube from the SFS2.0 and put in a ~80cm piece of filament, until the red and blue lights went out on it, then until it turned blue again.
2.) I marked the filament here with indelible ink, as the starting point.
3.) Then I started a (20minute) print without any filament, and slowly pushing the filament thru the SFS, while the GUI noted the pulses and accumulated the total length of filament.
4.) After doing this twice I got the same numbers 292 pulses and 880.38mm both times
5.) I then measured the length from the mark to the end.
6.) not a precision tool, but a mm graded carpenter wood rule I got 828 mm Β±2mm. (I checked my old folding wood rule against an a steel tape measure and got 0.99956 ratio, so pretty close)
This means of course the SFS would average 2.835mm / pulse, and the GUI got 3.015mm. ( Updated the software 0.7.4a, and saw a mm setting for pulse increments at 3.0550 mm) With the advertised "2.88mm" should have been 841mm .
I updated the pulse increment distance to the above 2.835mm.
like so
I'd be interested to know if that setting over a 15+ min print holds or if it drifts low.
I know on my sensor, it does not always pulse after two clicks of the optowheel. I'm guessing that while these are meant to be precision, there is probably some variance
Also - remember that
- This is a bidirectional sensor. If you trigger a mechanical end stop on a retraction it will count as a pulse and therefore add to the total
- The detection of jams is both windowed and derived - anything that happened more than 10 seconds ago doesn't matter, and only rates of change really trip the detection. If you slowly accumulate a mismatch at a steady rate, that won't slowly increase your jam potential as the print progresses
Essentially it's an imperfect system with an imperfect sensor, which is why I left the mm per pulse configurable instead of set to the 2.88 that BTT specs
hmmm I'm getting a "20 - bed leveling" during a print...
To make the sensor unidirectional it would need some phase sensitive detector, like in the old mouse.
I'm also interested in material use, as to when to expect to change the 1kg spools, and plan it not be 4AM
the print used 101 clicks, or 286.34mm. I measured between two marks 299mm.
How is the runout supposed to be handled when the pause is disabled on OFS vs when itβs enabled? So far it seems it doesnβt disable the movement sensor when runout is detected so it pauses within a few mm when the runout is detected.
I believe that the pulses stop as soon as the runout is detected, but the webui, as well as the esp32 takes a few moments to update, and pause the printer. So the calculations should still be pretty accurate.
ah yep thats a bug. I haven't put anything in to kill motion once runout is tripped now that it is delayed. I'll add that
I saw you released a new version but didn't see anything in the patch notes about the runout detection were you able to get that added?
whoops - yes it was added - I'll add it to the notes