No output on Motor 1 & 2 (M1/M2) Orion board


#1

I am testing the output on the motor outputs (M1 and M2). I have connected a small 12v fan to the output. Unfortunately I do not get any power output. I have also checked it with a voltmeter. Both M1 and M2 stay at 0v.

This is the code I am using to test it, it should set power to both outputs (M1 and M2):

#include <MeOrion.h>

// Test routine for the DCMotors M1 & M2.

MeDCMotor motor1(M1);
MeDCMotor motor2(M2);

void setup() {
  Serial.begin(115200);
  Serial.println("Start test: Send a number between -255 en 255 to set motorspeed:");
}

int iMotorSpeed = 0;

void loop() {

   // Read serial input:
  while (Serial.available() == 0) { }  
  int iMotorSpeed = Serial.parseInt();
  if (iMotorSpeed>255) iMotorSpeed=255;
  if (iMotorSpeed<-255) iMotorSpeed=-255;
  Serial.print("Motor speed = ");
  Serial.println(iMotorSpeed);
  motor1.run(iMotorSpeed);
  motor2.run(iMotorSpeed);

}

Some answers you may have to my setup:

  • The 12V adapter is connected and the switch is ON
  • The fan is rated 12V 0.15A (should be no problem at all, and does work)
  • The plotter is working well, X-Y steppen motors work as they should.
  • Software like mDraw v1.21 works fine. Is has already created some nice drawings.
  • I my second idea was using the laser setting (in mDraw) to set power to M2. Unfortunately same result, does not work either)

I am a bit in doubt now if my board is broken. Is the test code I am using correct?
Any other suggestions?

Any help is highly appreciated.
Kind regards, Klaas


#2

Hi Klaas,

I’d suggest that you test the M1, M2 with our DC motor with simple program maybe mBlock grphical program which is much easier.

Besides, are you sure the motor in your fan is DC motor and does it fit the motor port interface on the me Orion board, also, we cannot make sure if the motor in the fan can works with the motor port on the me Orion and our example program.


#3

Hello tec_support,

The programming part is not difficult for me, also I am familiar with electronics. The motor I am using is a DC motor and it is well connected to Orion board using breadboard cables. I am 100% sure the motor should work well. Therefore I do not see the need to buy an additional motor only for testing.
The code I am using is based on the example code present in the Makeblock Library (Makeblock-Libraries-master.zip) downloaded from https://github.com/Makeblock-official/Makeblock-Libraries. I believe this should be ok.
I will try mBlock later today and see if that works.


#4

Hello tec_support,

I have done some additional testing. Like you suggested I have used mBlock to control the motor on ports M1 and M2. Unfortunately no success. To make sure I was using mBlock correct, I have also tried a servo on port 6, this worked perfectly.
Secondly I have measured the voltage on the M1 and M2 connectors. At all times the voltage was 0v.


#5

Hi Klass,

From your description, the M1, M2 may not work but we still cannot definitely judge it is faulty since it is seldom that both motor interfaces are broken.
Did you buy the XY plotter from local re seller? If it is possible, you may take it to the local shop and test it with makeblock DC motor directly.


#6

@Klaas,

I tested you code and think I found a problem. I noticed that in the Serial Monitor that the ‘Motor speed’ is being reset to 0 (zero) shortly after another value is entered.

Below is a modified copy of your code with some diagnostic added.

#include <MeOrion.h>

// Test routine for the DCMotors M1 & M2.

MeDCMotor motor1(M1);
MeDCMotor motor2(M2);
int iMotorSpeed;

void setup() {
  Serial.begin(115200);
  Serial.println("Start test: Send a number between -255 en 255 to set motorspeed:");
}

void loop() {
  // Read serial input:
  while (Serial.available() == 0 ) { }  // change it to == 2 and try again
  Serial.print("Serial.available() = ");
  Serial.println(Serial.available());
  iMotorSpeed = Serial.parseInt();
  if (iMotorSpeed>255) iMotorSpeed=255;
  if (iMotorSpeed<-255) iMotorSpeed=-255;
  motor1.run(iMotorSpeed);
  motor2.run(iMotorSpeed);
  Serial.print("Motor speed = ");
  Serial.println(iMotorSpeed);
}

After you test it, apply the comment at the end of the while statement. Let me not what your results are.

Mike


#7

Hello tec_support and Mike,

I now know for sure the board is broken. I have bought an other Orion board to validate. This one works with the program I have written. My original Orion board does not. Secondly I have also tried to code update suggested by Mike. Same result. Original board does not work, new board works perfectly.

Not happy that my original board is not functioning of course… this now needs to be replaced.

@Mike: Thanks for testing my code and the suggested update! On both of my Orion boards the speed is not set to zero once set.

Kind regards, Klaas


#8

Hi Klass,

Okay, then you can contact the shop where you bought it for the replacement procedures.

Feel free to contact me if there is any issue.
Best Regards!


#9