Controling a brushless (drone) motor using the Photon

I have a photon, and trying to connect it to a brushless motor.

I have the black connected to gnd, red to vnc, and the white to D6.

Now when I open the mobile app, and click digital read, and value is on low, the motor starts beeping, and tries to do a small revolution. But no more than that. If i try digital write, nothing happens. How do I get this thing to spin?

Thanks!

Pretty sure you are going to need a motor driver chip to drive the motor because the Photon can only supply a tiny amount of current at 3-5v in the double digit mA range.

To be a bit more specific 3.3V and max 25mA on D6 (and other GPIO pins) and 5V/3A via Vin (when powered via a beefy USB supply).

Do you have an ESC between the photon and the brushles motor? I think you will need one. Also, motor will consume a lot of current. ESC will need to be connected to an external battery too. Depending on the motor, 3S or 4S should be normal.

I did it some years ago so I don’t remember it well but I don’t know if it is as easy as get the digital pin HIGH or LOW. I think I used softwareservo library to move the motor.

From the description of wire colours I think an ESC is being used, in which case its down to using PWM (via SOFTPWM lib) correctly as discussed in this thread. Also need to change pins as PWM is not available on D6.

Yeah, thank all of you guys for your comments.

There is an ESC and external battery involved.

I switch to D0 which happens to have both Analogue and Digital, and somehow (dont understand the logic behind it yet) between switching from the digital read to the analogue value the motor will turn on and run.

So the teeny tiny photon is able to run a brushless motor, I just havent found a consistent way of doing it, right now I do a clicking sequence, and eventually it will get running.

It might also be drawing peak currents in between those switches, potentially damaging the pins involved. Hence, if you’re using motors like that, which are likely to draw A LOT more than 25mA, it’s wise to not power them through the pins.
I mean, a teeny tiny human can stick its finger in an outlet and live, but it’s probably not a good idea to risk it…

I was actually holding the wires to the battery, and still alive to tell the tale :smile:
The ESC wires were welded, and the rest were pin connectors.

Those voltages/currents aren’t harmful to a human, but can seriously damage electronics if they aren’t suited for it. Just a friendly warning :wink: