Husqvarna AM305 2020 drive motors with BLDC driver only drive backward

pythonmeister

New member
Hello,

sorry for my english when prefferd i could try in german

I'm testing the case to make and DIY mower from and new Husqvarna 305 model year 2020 with a water damaged mainboard anf hu (fried).
I tried to test the wheel motors with a bldc hall driver board and some arduino code. almost the same as from the ardumowershop

Brushless Driver Controller BLDC Motor Driver 12-36V 15A 500W

Problem im facing the motor want de drive in reverse but when switching to forward with the z/f pin it stalled and only want drive forward when i pushed the motor ones.
i've checked the wires all are correct installed.
after testing with some hall sensor switched it only want forward and not in reverse or stalled complete with different pin switchings.

some here with has some expirience with the Husqvarna drive motors?

to power the motors i use a labpower supply on 18v 2a with short protection.
both motors act the same.


Only description on the drive motors:
5823152-01B
1998-1E70008-18vdc
300412J1001419
 
some time ago i did some tests with a similar mower. But it seems the motors are too weak for my hill.
Do you have a second driver to test if one is damaged? One of mine was not working either.
I have used a due with a buffer chip on the control lines for my setup. In the ardumower code the driver was changed to romeo.
How do you test? code example?
 
my mower is a flymo (like Husquarna105)
I tested possible wire connections and used one that worked and had low power consumption.
drive motor was connected blue yellow white. Hall : grey green violet
maybe the colours match your motors.
 
Thank you for your response ive connected the wires to the stepper as marked inside the motor

yellow= MW = C
White= MU = A
Blue = MV = B
Black = GND = 5v gnd
Gray = HU = A
Purple or violet = HW = C
Green = HV = B
Red = VCC = 5v+

I will try another stepper I have three of the same based on the JY01
And i wil give your color combination a try.

the arduino code is very simple to test the setup
i forked this from a other guy

arduino test code
C++:
#include <ArduinoJson.h>
//#######################################
//#######################################
// GPIO mappings for Arduino Mega 2560
//#######################################
int m1_EL_Start_Stop=5;  //EL
int m1_Signal_hall=3;   // Signal - Hall sensor
int m1_ZF_Direction=4;  // ZF
int m1_VR_speed=2;    //VR
//#######################################
//#######################################
int pos=0;int steps=0;int speed1=0;
String direction1;
//#######################################
//#######################################
void plus() {
  pos++; //count steps
  Serial.println(pos);
    if(pos>=steps){
    wheelStop();
    pos=0;
  }
}

void setup() {

// put your setup code here, to run once:
Serial.begin(115200);

//wheel 1 - Setup pin mode
pinMode(m1_EL_Start_Stop, OUTPUT);//stop/start - EL
pinMode(m1_Signal_hall, INPUT);   //plus       - Signal
pinMode(m1_ZF_Direction, OUTPUT); //direction  - ZF
   
    //Hall sensor detection - Count steps
    attachInterrupt(digitalPinToInterrupt(m1_Signal_hall), plus, CHANGE);
}


void drive(){
// {"direction":"forward","steps":"30","speed":"50"}
// {"direction":"backword","steps":"30","speed":"50"}
// {"direction":"stop","steps":"0","speed":"0"}--

      if(direction1=="forward" && pos<steps){
        wheelMoveForward();
      }else if(direction1=="backword" && pos<steps){
        wheelMoveBackward();
      }else{
        Serial.println("Stop");
        wheelStop();
        pos=0;
      }      
}


void wheelStop(){
  digitalWrite(m1_EL_Start_Stop,LOW);
}

void wheelMoveForward(){
      analogWrite(m1_VR_speed, speed1);
      digitalWrite(m1_EL_Start_Stop,LOW);
      delay(1000);
      digitalWrite(m1_ZF_Direction,HIGH);
      delay(1000);
      digitalWrite(m1_EL_Start_Stop,HIGH);
}

void wheelMoveBackward(){
      analogWrite(m1_VR_speed, speed1);
      digitalWrite(m1_EL_Start_Stop,LOW);
      delay(1000);
      digitalWrite(m1_ZF_Direction,LOW);
      delay(1000);
      digitalWrite(m1_EL_Start_Stop,HIGH);
}

void loop() {

  if (Serial.available()>0) {
    String command=Serial.readString();
   
      DynamicJsonBuffer jsonBuffer;
      JsonObject& root= jsonBuffer.parseObject(command);
     
       if (root.success()) {
          direction1 = root["direction"].asString();
          Serial.println(direction1);
          steps = atoi(root["steps"]);
          Serial.println(steps);
          speed1 = atoi(root["speed"]);
          Serial.println(speed1);
          drive();
       }
}


}
 
Thank you thank you very much @gk !!!!
i changed the motor driver but had still the same problems.
when I changed the wire colors as you told the motor works backward and also forward!
and my lab powersupplay shows a much lower ma used.
so it looks like the markings inside the motor and on the controller do not match.

Next step for me wil be the mower engine do you also get the mower engine working and wich wire combination did you use?
 
Oben