Proffieboard V3.9 powering extendable/retractable blade design?

Hey everyone, my team and I are working on a saber with an extendable/retractable blade using the Proffieboard V3.9. We’ve done our best to read up the documentation but it seems like what we are doing is a bit of a special case. We had two main questions:

  1. We are using a motor and a driver to power the extension/retraction. Would editing the Arduino code that gets flashed to the Proffie to recognize button input and send a signal to the motor driver to turn on/off the motor accordingly be enough, or would we have to go in and change something with the config files as well?

  2. The LED strip we are using for the blade is a COB LED strip that is not addressable and just has two wires for positive and negative. Looking through the blade config generator, would using the config for the segmented string blade and hooking up the negative wire to the negative pad for LED1 be enough for the LED strip to turn on as planned? (Effectively acting as a single segment of the blade)

Any help would be greatly appreciated and thank you for taking the time to read this!

How does your motor work? Does it have its own controller that intelligently runs it “out” and then stops once the blade is fully extended, and then runs it “in” for retraction and stops when done?
Or is it just fed voltage of one polarity for a period of time, and then reverse polarity to retract?
In other words, how are you currently driving the motor?

1 Like

Thanks for replying! We plan to just use a button hold to run the motor one way, and then after release, button hold again to run it back the other way. Hopefully being able to store the button state (extended or retracted) in the Arduino code. In future versions we definitely want to intelligently stop it once the blade is fully extended and vice versa, but we are just looking to get it working for this version. We are using this driver Adafruit DRV8871 DC Motor Driver Breakout Board - 3.6A Max : ID 3190 : Adafruit Industries, Unique & fun DIY electronics and kits with H-bridge input control to run it one way for extension and then the other way for retraction.

99 times out of a 100, when you want to control something in ProffieOS, you want to use a “blade” to do it. It doesn’t matter if it’s a LED, a rumble motor or whatever, usually having the full expressive power of the styles system is what you want to control it.

If all we want is to run the motor for a set amount of time on extension and retraction, we could do that by hooking up the driver board to Free1 and Free2. Then we can set up a SimpleBlade to control Free1 and Free2 such that “Blue” means “OUT” and “Red” means “IN”. Then all we would need is a style that lights up blue for a few seconds on extension and red for a few seconds on retraction.

If there are endstops and stuff to take into account, that can probably be arranged as well by using ReadPin<> in the style.

However, extension/retraction on every activation might not be what you actually want. Having a separate button for it wouldn’t be particularly difficult, but will require some custom coding in the prop. Basically you would add a button to the code, but make it an unusual button, like “UP”. Then you create a new prop, which inherits from whatever prop you like, then override Event2() to catch the events related to your new button and do whatever digitailWrite() stuff you need. (But make sure to call the inherited Event2 so that it can handle all the other buttons.)

The only tricky part about writing code for ProffieOS compared to regular arduino code is that you can’t wait for anything to finish. ProffieOS has things to do, so everything you do has to be be done in small, quick increments. If you need any help with that, please let me know.

1 Like

Thank you so much for replying! My team and I really appreciate it and this is super helpful. Will try out custom coding in the prop with an unusual button and overriding Event2().

Regarding the non-addressable LED strip with just a positive and negative wire, am I right in assuming we can effectively treat it as the first segment in a string blade and it will light up as planned? For reference this is the LED strip we are using:

Apologies if any of these are obvious questions, I don’t have much experience with firmware but I’d love to learn more.

Ah, sorry, forgot to answer the second question.
For a single-color led strip, you just use SimpleBladePtr<> with a single color.
Documentation here:

1 Like

Great, thanks! Will test the full code tomorrow and see how it goes.

Thank you again for your help! This is our finished project:

We’re still working on improvements and definitely still using the Proffieboard :smiley:

1 Like

oooh that’s nice. I want one :slight_smile:

1 Like

Thank you hahaha!

when will they be available for sale?

1 Like

Uh, wow! Using the magician’s cane is such a great idea!

Great video and I can’t wait to see the final product.

1 Like

Just sharing the design and improving it for now haha!

Thank you!!

Y’all’s video is incredible! I’m glad someone’s finally taking on this challenge and making amazing progress. In the future, are you planning on two spools, possibly one for each side? I imagine this would half the diameter of each spool, as well as allow you to properly take use of addressable LEDs with the way the proffie works. I believe the proffie right now addresses each led strip (two, back to back for a typical neopixel blade) from the bottom up, and the bottoms of the strips are connected to the same output, mirroring it for each side of the blade. With the wrap-around mechanism you developed, it would extend up one side and then down the other. You could also have one spool, go up just one side, and spin it twice as fast.

For spinning the blade, is there a fancy slip-ring mechanism that might allow you to spin only the spool/blade end? spinning the proffie at high speeds could make the motion tracking function poorly.

Something neat to think about would be fitting a micro version of this into a “oversized bladeplug” size apparatus, so it functions with all current hilts. For funding further research, anyone with a neopixel setup people would buy this :slight_smile: You’d need a custom board within this bladeplug that extends the blades when the LEDs are activated, but for power you should be ok if the motor is able to draw from the LED power; The LEDs won’t be in full power until they’re fully extended, at which point the motor won’t need power bc it’s fully extended. Also, you can develop a blade style that dims the LEDs until the blade is fully extended if you need more torque. You might have to create custom pcbs for this, replacing the current design of hilt and blade npxl pcbs. I’m imagining this bladeplug product to be shorter than your average blade, maybe 50%, at least for v1, and meant as a purchasable tech demo to fund a final product. Kind of like what you see on kickstarter. I’m excited to see where this goes :slight_smile:

For legally circumventing anything disney throws at you, I recommend joining the r/lightsaber discord, and communicating with some current vendors about how they navigate that.

1 Like

Thank you so much for the kind words and for the input! Originally we had a two-spool design, one strip for each side - we ran into two problems though. It was hard to tension both sides equally to the tip of the Magician’s cane, which meant one side was always a little loose/floppy haha - and second, we had to use a slip ring for each strip since we couldn’t loop it back and have the side of the strip with the wiring stay put and complete the circuit.

Originally originally we had intended to use one spool up one side and just spin fast - that was actually one of the first prototypes seen on the channel, “Retractable Lightsaber V1.0” is the video name. As we were testing the spinning, we ran into problems with the centripetal force - the faster we span, the more the strip would be pushed out from the cane and it ended up looking more globe-like than a cylinder. Since the centripetal force is dependent on mv^2 / r, we decided that if we could have the strip on both sides and cut down the necessary RPM to achieve the POV effect in half, we would be able to decrease the centripetal force by a square factor and produce a good solid cylinder effect.

You’re totally right about how spinning the Proffie at high speeds could make the motion tracking function poorly. Had not thought about that, half of me is hoping there is some coding we could do to establish the spinning as the zero state for the IMU, however I will be the first to admit I am lacking the knowledge to do that or even know if it’s possible. A slip ring could definitely be implemented, would just require a bit more work.

Awesome idea about the blade plugs! One of the original design goals was for the system we develop to be compatible with all current hilts so that people don’t have to spend extra on a new hilt just for this specific functionality. If we are somehow able to fit all the tech into the blade plug form factor definitely something to think about.

Just joined the Discord, thanks for letting me know about that! Not looking to sell/manufacture anything honestly haha, just want to push this tech as far as it can go and share it with our subscribers :slight_smile:

1 Like