Hi again, thank you so much for your help with the previous retractable lightsaber! I am working on the next version of the lightsaber and I had a few questions. How the new lightsaber works is:
1 linear micro servo serves as a mechanical clutch, upon activation it releases the blade (blade extends with magician’s cane propulsion)
2 motors reel in 2 LED strip spools to retract the blade
1 additional motor rotates the magician’s cane while retracting for a smoother retraction
The entire inner hilt chassis is rotated with an external motor (not controlled with Proffie)
So the components we need to control with Proffie are:
2 non-addressable LED strips
2 N20 retraction motors
1 cane rotation motor
1 linear micro servo motor
For turning on the saber, I was thinking that once the Proffie senses that it is spinning, it activates. And to turn off the saber, I was thinking that once the Proffie senses that it is spinning slower, it retracts and turns off. (I can externally control the rotation speed)
So this is the order of operations that I’m thinking:
Detect when hilt chassis is spinning = turn on saber, shift linear micro servo motor right 5mm, then after 500 milliseconds shift micro linear servo motor back left 5mm while turning on both retraction motors with PWM (SABER ON STATE)
Detect when hilt chassis spinning is slowed = turn on cane rotation motor, full PWM power to both retraction motors, after 2000 milliseconds turn off saber, current sense when stall is reached and stop retraction, OR stop retraction after _____ milliseconds (SABER OFF STATE)
A few questions I had were:
Would the above order of operations work with Proffie?
When the saber is on and spinning, I need to have the retraction motors powered a little bit, but not so much that it retracts the blade. This is because if there is no retracting force when the blade is spinning, the LED strips will look like a globe instead of a tight line. Can I do this with PWM by having the motors linked to LED pins?
Are the LED pins current sensing? To stop the retraction, is it possible to detect when it reaches the stall current of the motor and then shut it off?
Would the wait ____ milliseconds be a problem with Proffie? If I’m understanding correctly, Proffie can’t wait for things exactly, it has to do things in small quick increments.
To turn off swing, clash, and smoothswing sounds, is it just changing the CLASH_THRESHHOLD_G and others to a really high value?