Hollow shaft extruder
-
@pakar
The magnetic filament monitor sold by Duet3D sends angle data via i2c. One turn equals 1024 pulses. They aren't send continuosly but every 40ms.
Although I think the mag. sensor is the same as on the MKS SF2804 motor/encoder combo, I wonder if simpleFOC would be happy with this data protocol?It would be cool to use Duets filament sensor for both usecases. Filament_runout switch for Duet-trigger and i2c-pulses/rev for simpleFOC.
I'm pretty sure, we can't use the i2c data channel with both receivers? Maybe in a daisy chain manner?
(I'm fishing for an official statement here)//edit
In general it's possible to use multimaster mode and have more than one receiver communicate with the same slave.
If we had a RRF toolboard for BLDC, the problem wouldn't occur, if the filament sensor would be connected to the same MCU as the BLDC-extruder. -
@o_lampe I2C is polled by the MCU, so it's up to the MCU to decide when to read. If using interrupts from a encoder the cpu would be forced to handle every pulse when it pulses. This is why i previously stated that a high interrupt count may be problematic for the MCU.
The I2C standard do support multiple masters on the same bus, but that depends on all masters listening for the clock and not trying transfers when another master is communicating. They would also need to handle collisions on the I2C bus.
If the Duet FW has strict timing of when it needs data that might also be an issue. Second issue would be to figure out how fast the FOC algo needs to get feedback after moving the motor, and 40ms is only 25 updates per second. If reading the filament sensor there would also be quite a large lag between moving the motor and the filament moving but not sure if that's a huge problem at the speeds needed here. (25 updates per second at 1rpm = 14 degrees)If we get to a point of a working PoC i might do a spin of the simplefoc-mini and embed a tiny MCU that can do CAN-bus and/or i2c to keep all the motor-control/monitoring in the same place.
I'm running my smarteffector together with a Manta M8P on a DIY delta so have a bit more freedom myself.
My main knowledge related to this subject is in electronics and embedded development.
I'm not affiliated with Duet3D so cannot make any official statement, just interested in the extruder.
-
@pakar I agree, the lag could be a problem if the sFOC needs the encoder pulses to mimic a stepper motor. (*)
An STM32 or SAMMY-C21 toolboard sure has some headroom for reading encoder pulses faster. It just wasn't necessary for filament slip detection, I guess.*) sFOC can work in open loop (eg. velocity control), but I haven't figure out how the motor would be started. (reading backEMF would require a spinning motor and doesn't work well in low-rev scenarios.
-
@pakar said in Hollow shaft extruder:
If you are really wanting to cut down on weight you could probably go with something like:
https://www.aliexpress.com/item/1005004559035047.htmlThe page doesn't show anything. The article is not available...
Do you have a product name, I can google? -
This post is deleted! -
Just a free-standing optical disk and reader.
Search for "optical encoder disc" to get some more details.This was just the first one on ali i found.
-
I just registered on simpleFOCs own forum and asked some questions.
There is a guy, who has build his own screw-extruder, his own (tiny!!) hotend and designed an STM32 based simpleFOC driverboard with encoder. Awesome guy!
Check out his video
He, amongst others, voted against building a toolboard with BLDC driver, but instead provide basic step/dir interface and use simpleFOC on a standalone board. -
@o_lampe
That was exactly what i was thinking of, but with a external counter.
Give me a shout if you are thinking about ordering some of those boards. Can do all the soldering/flashing if needed. Don't have a resin-printer myself to print the extruder so maybe we can do a colab.Would probably be possible to use something existing like this instead of printing that disc. (steps and size would of course need to be matched with the extruder/motor/pcb)
-
@pakar
I'm not through with reading all the interesting stuff over there and they seem to be very active.
The sFOC-mini I've ordered is not the best solution (but it's the official PCB).
I'm sure we find a way to colab. I live in Germany, BTW.The slotted disk wouldn't work with his reflective sensor. I thought of making my own disk from black anodized and laser engraved aluminum. Or spray-paint/engrave a lighter plastic disk. My CO2 laser could then do both, cutting the shape and engrave.
-
@pakar said in Hollow shaft extruder:
12 coils and 14 magnets would get you to ~8.5°. The more coils/magnets you have the more "steps" you will have. This is why a encoder is "required" for anything with high accuracy.
Thanks @pakar. I have not explored the topology of BLDC motors so I have no idea how 12 coils and 14 motors would result in 8.5°. Part of me thinks wow, that's intriguing tell me more and part of me just wants to take it as read!
Anyway, with my VDE-100 that represents 0.035mm of extruder travel and I am pretty happy with that. More to the point, though, I think the most important thing with the extruder is speed, not absolute position.
-
@tombrazier said in Hollow shaft extruder:
the most important thing with the extruder is speed, not absolute position.
That's what they said, too. You could live with open loop, then it runs in velocity control,but the starting sequence is a lottery (my words). Not sure how well it behaves when changing direction for retract/unretract. Will there be a hiccup every time, or will the motor sync once and stay synced while powered?
-
@o_lampe I really like the stand alone board with the step/dir interface. Looks like it has not yet become mass produced by China.
-
Not sure how well it behaves when changing direction for retract/unretract. Will there be a hiccup every time, or will the motor sync once and stay synced while powered?
@o_lampe Same dynamics here as with stepper motors, I would think. M201 and M205 will need tuning.
-
@tombrazier The best about these boards (there is also a similar mosquito board):
they only use parts that are/were in stock! Quite a challenge, I can tell from my own experience. -
@tombrazier said in Hollow shaft extruder:
Thanks @pakar. I have not explored the topology of BLDC motors so I have no idea how 12 coils and 14 motors would result in 8.5°. Part of me thinks wow, that's intriguing tell me more and part of me just wants to take it as read!
14 pole, 12 stator = 7 * 6 = 42 steps = 8.571 degrees.
I of course assume that it's a 3-phase motor and the number of stators need to be a multiple of the number of the number of phases.I tried looking for a good introduction but only found this, and that may be a bit too much as a introduction.
https://what-when-how.com/electric-motors/stator-winding-design-considerations-electric-motors/ -
@o_lampe Of course. I'm fully booked with work right now so it won't happen in at least 2-3 months. I live in Sweden so fairly close
The one i posted was stainless steel as a reflector. Only a non-reflective background would be needed.
Other option is a non-reflective slotted disk with a reflective background.
But not sure what field of depth the sensor has so using a non-reflective disk with a reflective background may be problematic.Either way i would recommend using a disk-material that won't wobble too much with the vibrations.
If you got a laser that would be perfect, and cheaper!
-
Had my first simpleFOC project running today. It was an old brushless gimbal controller without encoders and with 8bit mcu.
I was able to control two motors independently and relatively smooth (USB power only)
The atmega328 was also at it's limit, but I'm now confident it will work well with the right mcu. -
@o_lampe What motor driver did you use?
-
@tombrazier The drivers on the old gimbal controller are L6234D.
Not the same type as the current DRV8301, but they were used to develop simpleFOC at the beginning. -
Today I had the first test with the step-dir interface of simpleFOC.
It was a bit of a learning curve to get it working with the magnetic sensor I had.
Running the motor in open loop is no option, the motor gets pretty hot.
In closed loop the motorcurrent is reduced to the actual required torque.
I wanted to give it a real-world extruder-test and ran a typical gcode, but with the XYZ steppers absent, I got tons of errors. (motorphase disconnected)
I wonder how I can get rid of those messages?