How to use PI4J with a brushless motor?

Raspberry Pi Asked by cy8berpunk on November 27, 2020

I have a Raspberry Pi 2 model B. I would like to be able to control a motor with a regulator and PI4J.

I put the black cable to a ground pin and the PWM pin to pin 26. I’ve worked with servos before, so I tried to start the motors like a servo. It didn’t work.

The ESCs: Kontronik CYBEC 40-6-12

The motors are Brushless: I’m sorry but I don’t know what make.

public static void move(int power) throws InterruptedException
    SoftPwm.softPwmCreate(26, 0, 50); 
    SoftPwm.softPwmWrite(26, power); 

One Answer

If I understand correctly you want to control a brushless motor which is being driven by an ESC (Kontronik CYBEC 40-6-12).

ESCs are controlled in a very similar way to servos. However they often require a particular start sequence for safety reasons (you don't want your model plane to fly off when the ESC is energised).

I suggest you try something like

one second at 1000 µs pulse width

followed by

one second at 2000 µs pulse width

That may initialise the ESC. You can then send pulse widths in the range 1000 (stop) to 2000 (full throttle) to control the speed.

If you are planning to do this seriously you'll need to use something like my pigpio or servoblaster to send the pulses, or buy external PWM hardware,

Answered by joan on November 27, 2020

Add your own answers!

Related Questions

Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP