Can you control a motor like a Blade Style?

Building some “Thrawn Hunters” that have a motor in the Crystal Chamber.
:hammer_and_wrench: :crystal_ball: :flashlight:


See it spin: darthunicorn.com/_img/crystal-chamber.gif

I would like to have some level of control over the motor such that it spins on some blade styles, but not others, or no spin when off, and spin when blade is activated.

I’m assuming the (+) side would need to be connected to the Proffie 3.3v connection, but What do I do with the negative connection?

Do I just wire up the motor as if it were an LED? If so would “255” be fastest RPM and “128” be 50% motor speed?

If someone is willing to share a sample config I would be super grateful :pray:

1 Like

Exactly this.
50% speed example with “easing” in and out of motion instead of sudden full/no power.

StylePtr<Layers<
  Rgb<128,128,128>,
  InOutTrL<TrFade<300>,TrFade<500>>>>()

with a blade like
SimpleBladePtr<CreeXPE2WhiteTemplate<0>, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),

2 Likes

Don’t connect to 3.3v unless you have to. Especially not with motors which tends to cause a lot of noise. How much current does this motor draw? Connecting it to BATT+ is probably better/safer, and just like with a LED, you can add a resistor if you need to.

Correct, but you should be aware that at some pont the motor will just stop spinning. Setting the color to “1” will not make it spin super slow, it just won’t spin at all.

1 Like

I reply to this since I’m having some issues with motors.
The used the bladestyle for motor in every preset, but in some it works and in some it doesn’t ( or rotate very slowly in a laggy way ).

First I used this as blade:
SimpleBladePtr<CreeXPE2BlueTemplate<0>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>() ,

I reald that NoSloppy wrote it in White and not in Blue.

Second I wired it on 3.3… can that be the issue?
If I wire it on the positive, which resistor should I use?

Thanks
( I’ll move this to a new thread if necessary )

Starting a new thread is almost always better.
Not sure what is wrong in your particular case, but i would almost always recommend using BATT+ over 3.3v. What resistor you should use depends on the motor.

Here are pastebins to my config file and bladestyle I used to run a CC motor.
Bladestyle: https://pastebin.com/Ur1D42BX (adjust RGB values. Lower numbers spin slower, larger numbers spin faster) Config File in entirety: https://pastebin.com/dC4PRNE7

Tested and demonstrated also in this live video:

1 Like

I’m not sure how to calculate it.
The motor is the one that KR is selling.

I watched the megtooth live video posted above and he goes into how he calculated the speed I believe its 3268 is full power but that video should get you started on how to do it and what values need to be edited.

thanks Afrojedi but I meant the resistor value.
the motor is this one:

If you have the specs for the forward voltage, and desired current, and your power supply, we can help you calculate that with Ohm’s Law. Need specs on the motor.

1 Like

thank you very much. It’s probably not that difficoult but it’s nice to have a confirmation.
These are the specs :
Specs:

Test data at 3.0V:

  • Current: 45mA
  • Stall current: 200mA
  • Motor speed: 32000RPM
  • Output speed: 46RPM
  • Torque: 200g.cm
  • Stall torque: 300g.cm

Test data at 1.5V:

  • Current:25mA
  • Stall current:100mA
  • Motor speed:17000RPM
  • Output speed: 20RPM
  • Torque: 100g.cm
  • Stall torque: 150g.cm
1 Like

27 ohm, if 3v at 45mAh is the spec, but you really need data sheet on that motor. Khal posted test specs.

1 Like