Make 3 phase motorcycle stator as engine starter

IMG_20211116_015138

hello friends, nice to meet you again.
I've been studying this for more than a year.
i want to make a bldc controller to start a motorcycle engine, where the power source from a 12 volt battery is input into the bldc driver and then input to the 3 phase stator of the motorcycle which will turn the crankshaft and start the engine.
on several types of motorcycles in my area (Indonesia), they have this feature embedded in the ECU.
after I did a lot of experimenting, when the no-load position (removed the stator and magnet from the motorcycle, and tested it on the floor) it can rotate and is quite fast in my opinion. but when given a load (stator and magnets are applied back to the motorcycle) it can't rotate, or sometimes it just moves a few degrees and then stops.
can someone give me some input on this case.

information :

  • stator diameter 117 cm
  • wire diameter 1 mm
  • 12 magnets & 18 poles
  • I forgot the number of rolls
  • the type of winding pattern is double star (there are 2 wires in each phase)
  • load: 300cc motorcycle engine
type or paste code here
void setup() {
      // INPUT DIGITAL SENSOR A
 pinMode(3, INPUT);
      // INPUT DIGITAL SENSOR B
 pinMode(4, INPUT);
      // INPUT DIGITAL SENSOR C
 pinMode(5, INPUT);
      // OUTPUT DIGITAL PHASE 1 (-)
 pinMode(6, OUTPUT);
      // OUTPUT DIGITAL PHASE 2 (-)
 pinMode(7, OUTPUT);
      // OUTPUT DIGITAL PHASE 3 (-)
 pinMode(8, OUTPUT);
      // OUTPUT PWM PHASE 1 (+)
 pinMode(9, OUTPUT);
     // OUTPUT PWM PHASE 2 (+)
 pinMode(10, OUTPUT);
      // OUTPUT PWM PHASE 3 (+)
 pinMode(11, OUTPUT);
    }
     void loop() { 
  TCCR1B = (TCCR1B & 0b11111000) | 2; //frequensi 3.9kHz
  TCCR2B = (TCCR2B & 0b11111000) | 2; // frequensi 3.9kHz        

 //step pengaman
if (digitalRead(3)==HIGH){
if (digitalRead(4)==HIGH){
if (digitalRead(5)==HIGH){

digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
                analogWrite(9,0);
                analogWrite(10,0);
                analogWrite(11,0);}}}
      
 //step pengaman
if (digitalRead(3)==LOW){
if (digitalRead(4)==LOW){
if (digitalRead(5)==LOW){

digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
                analogWrite(9,0);
                analogWrite(10,0);
                analogWrite(11,0);}}}
    
    
 //step1 (0)(-)(+) MAJU
if (digitalRead(3)==HIGH){
if (digitalRead(4)==LOW){
if (digitalRead(5)==LOW){

digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,LOW);
                analogWrite(9,0);
                analogWrite(10,0);
                analogWrite(11,250);}}}

    
 //step2 (+)(-)(0) MAJU
if (digitalRead(3)==HIGH){
if (digitalRead(4)==LOW){
if (digitalRead(5)==HIGH){

digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,LOW);
                analogWrite(9,250);
                analogWrite(10,0);
                analogWrite(11,0);}}}


 //step3 (+)(0)(-) MAJU
if (digitalRead(3)==LOW){
if (digitalRead(4)==LOW){
if (digitalRead(5)==HIGH){

digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
                analogWrite(9,250);
                analogWrite(10,0);
                analogWrite(11,0);}}}


 //step4 (0)(+)(-) MAJU
if (digitalRead(3)==LOW){
if (digitalRead(4)==HIGH){
if (digitalRead(5)==HIGH){

digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
                analogWrite(9,0);
                analogWrite(10,250);
                analogWrite(11,0);}}}


 //step5 (-)(+)(0) MAJU
if (digitalRead(3)==LOW){
if (digitalRead(4)==HIGH){
if (digitalRead(5)==LOW){

digitalWrite(6,HIGH);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
                analogWrite(9,0);
                analogWrite(10,250);
                analogWrite(11,0);}}}

        

 //step6 (-)(0)(+) MAJU
if (digitalRead(3)==HIGH){
if (digitalRead(4)==HIGH){
if (digitalRead(5)==LOW){

digitalWrite(6,HIGH);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
                analogWrite(9,0);
                analogWrite(10,0);
                analogWrite(11,250);}}}
    
}// loop ends 

Probably not the answer to your overall question but you seem to be missing a phase as you have phase 1 negative as an input.
[Edit, forget that! Mistake!]

Using autoformat, in the IDE, the shows up like this:

void setup() {
  // INPUT DIGITAL SENSOR A
  pinMode(3, INPUT);
  // INPUT DIGITAL SENSOR B
  pinMode(4, INPUT);
  // INPUT DIGITAL SENSOR C
  pinMode(5, INPUT);
  // OUTPUT DIGITAL PHASE 1 (-)
  pinMode(6, OUTPUT);
  // OUTPUT DIGITAL PHASE 2 (-)
  pinMode(7, OUTPUT);
  // OUTPUT DIGITAL PHASE 3 (-)
  pinMode(8, OUTPUT);
  // OUTPUT PWM PHASE 1 (+)
  pinMode(9, OUTPUT);
  // OUTPUT PWM PHASE 2 (+)
  pinMode(10, OUTPUT);
  // OUTPUT PWM PHASE 3 (+)
  pinMode(11, OUTPUT);
}
void loop() {
  TCCR1B = (TCCR1B & 0b11111000) | 2; //frequensi 3.9kHz
  TCCR2B = (TCCR2B & 0b11111000) | 2; // frequensi 3.9kHz

  //step pengaman
  if (digitalRead(3) == HIGH) {
    if (digitalRead(4) == HIGH) {
      if (digitalRead(5) == HIGH) {

        digitalWrite(6, LOW);
        digitalWrite(7, LOW);
        digitalWrite(8, LOW);
        analogWrite(9, 0);
        analogWrite(10, 0);
        analogWrite(11, 0);
      }
    }
  }

  //step pengaman
  if (digitalRead(3) == LOW) {
    if (digitalRead(4) == LOW) {
      if (digitalRead(5) == LOW) {

        digitalWrite(6, LOW);
        digitalWrite(7, LOW);
        digitalWrite(8, LOW);
        analogWrite(9, 0);
        analogWrite(10, 0);
        analogWrite(11, 0);
      }
    }
  }


  //step1 (0)(-)(+) MAJU
  if (digitalRead(3) == HIGH) {
    if (digitalRead(4) == LOW) {
      if (digitalRead(5) == LOW) {

        digitalWrite(6, LOW);
        digitalWrite(7, HIGH);
        digitalWrite(8, LOW);
        analogWrite(9, 0);
        analogWrite(10, 0);
        analogWrite(11, 250);
      }
    }
  }


  //step2 (+)(-)(0) MAJU
  if (digitalRead(3) == HIGH) {
    if (digitalRead(4) == LOW) {
      if (digitalRead(5) == HIGH) {

        digitalWrite(6, LOW);
        digitalWrite(7, HIGH);
        digitalWrite(8, LOW);
        analogWrite(9, 250);
        analogWrite(10, 0);
        analogWrite(11, 0);
      }
    }
  }


  //step3 (+)(0)(-) MAJU
  if (digitalRead(3) == LOW) {
    if (digitalRead(4) == LOW) {
      if (digitalRead(5) == HIGH) {

        digitalWrite(6, LOW);
        digitalWrite(7, LOW);
        digitalWrite(8, HIGH);
        analogWrite(9, 250);
        analogWrite(10, 0);
        analogWrite(11, 0);
      }
    }
  }


  //step4 (0)(+)(-) MAJU
  if (digitalRead(3) == LOW) {
    if (digitalRead(4) == HIGH) {
      if (digitalRead(5) == HIGH) {

        digitalWrite(6, LOW);
        digitalWrite(7, LOW);
        digitalWrite(8, HIGH);
        analogWrite(9, 0);
        analogWrite(10, 250);
        analogWrite(11, 0);
      }
    }
  }


  //step5 (-)(+)(0) MAJU
  if (digitalRead(3) == LOW) {
    if (digitalRead(4) == HIGH) {
      if (digitalRead(5) == LOW) {

        digitalWrite(6, HIGH);
        digitalWrite(7, LOW);
        digitalWrite(8, LOW);
        analogWrite(9, 0);
        analogWrite(10, 250);
        analogWrite(11, 0);
      }
    }
  }



  //step6 (-)(0)(+) MAJU
  if (digitalRead(3) == HIGH) {
    if (digitalRead(4) == HIGH) {
      if (digitalRead(5) == LOW) {

        digitalWrite(6, HIGH);
        digitalWrite(7, LOW);
        digitalWrite(8, LOW);
        analogWrite(9, 0);
        analogWrite(10, 0);
        analogWrite(11, 250);
      }
    }
  }

}// loop ends

Argh!
Thanks. Ignore my reply #2 then!

Thanks!

1 Like

Nice You are human too.....

2 Likes

How much torque does the "stator" produce at zero RPM?
How much torque is required to turn the engine over?

Hi,
Are you trying to excite the alternator as a motor to start the engine?

Those that do excite the alternators have alternators that are designed to operate as starter motors.
What is the rotor, a winding needing DC or a permanent magnet?

When you do get some rotation how much power is it consuming, Amps, Volts?

Tom.... :smiley: :+1: :coffee: :australia:

Thank you for all

The rotor is a permanent magnet like a motorcycle rotor in general

at that time, with the spark plug in position, the rotor could only rotate at about 20 rpm, the current was 25a, and the voltage dropped to 10.5

What speed have you programmed into your code?
The rotor will only spin at the speed set by the ESC code.

What is the alternator rated at, Amps?
As I said, not designed for what you want to do.

Tom... :smiley: :coffee: :australia:

isn't it if we don't set the speed, it will rotate to the maximum according to the ability of the driver and the motor?
I took the rotor and stator from a motorcycle that has that feature (engine starter)
the problem is that there are no special specifications on the rotor and stator of the motorcycle. it is different from if we buy a bldc motor that has a description of its specifications.

the target, I just want to spin the rotor at 2000 rpm to be enough to start the engine.

my code doesn't have speed control like normal ESC. Honestly I'm still learning in terms of speed control.

someone on my youtube video about this gave feedback like this ->
To make the torque stronger, initially 2 lines were made in parallel for the mosfet power source

  1. battery - step up - capacitor - mosfet
  2. battery - diode - mosfet

maybe it can help to get a bigger starting torque?

Hi,

I took the rotor and stator from a motorcycle that has that feature (engine starter)

Thanks for telling us that...

Can you please post some pictures of your project?
Can you please post a full schematic of your project?

What is "quite fast"

To get good starting torque from a BLDC you need to use one with Hall sensors so you can commutate accurately at low speed - otherwise you only have open-loop drive which is pretty useless if the low involves static friction like an engine.

For driving an air-screw in an RC plane there is no load at low speed (propellers only start to load up at speed), which is why Hall-sensor-less BLDC systems can work fine for that application.

Thank you for coming MarkT
Of course this alternator has a hall sensor. look at my arduino code on pins 3, 4, and 5 are sensor inputs.

The big question is, how do I get more torque while still using a 12v battery, do I have to use a step up to increase the input voltage to the mosfet?

Hi,

Find out how they do it in the other engines.
Have you got a scope to look at the waveform you are using to power the stator?
What waveform are you trying to send to the stator, sinewave, modified sine or square wave?

Have you calculated from your code the maximum speed it is possible to output your signals.

Can you please post some pictures of your project?
Can you please post a full schematic of your project including the stator windings?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Hi,
A hand drawn circuit would be fine.

Well until you know how fast your project works, you won't know where your speed problem is.

Do you have a DMM?
If so does it have a Hz function?

Tom... :smiley: :+1: :coffee: :australia:

where should i put the dmm probe?
at the gate mosfet signal input or on a 3 phase stator input cable?

Hi,

Your DMM has Hz range?

Tom... :smiley: :+1: :coffee: :australia:

my dmm doesn't have it

Do the bikes that use that method of starting also have an automatic compression release?
Paul