Motorcontroller board [FIXED] (2999347Bytes)


I am trying to build a segway, I know how I am going to make it, but I have been struggling to get the motorcontroller to work for days now.

I attached an accelerometer and a motorcontroller to an arduino uno. When I tilt the accelerometer 2 indicatorlights on the motorcontroller change, so this signal must be right. But when I measure the voltage at the motor output I get only 10-60 mV.

I tried using more and using less Volt (5-15 V) on the m.c. board itself. (I attached it to an old model train transformator)

Please Help


Datasheet motor controller:


Accelerometer adxl335 :


Arduino tutorial on adxl335:



const int ypin = A2;                  // y-axis

 int s;

// motor A

int dir1PinA = 2;

int dir2PinA = 3;

int speedPinA = 9;

//motor B

int dir1PinB = 4;

int dir2PinB = 5;

int speedPinB = 10;

unsigned long time;

int Speed;

int dir;


void setup(){

  pinMode(dir1PinA, OUTPUT);

  pinMode(dir2PinA, OUTPUT);

  pinMode(speedPinA, OUTPUT);

  pinMode(dir1PinB, OUTPUT);

  pinMode(dir2PinB, OUTPUT);

  pinMode(speedPinB, OUTPUT);

  time = millis();

Speed = 255;



void loop(){

analogWrite(speedPinA, Speed);

analogWrite(speedPinB, Speed);

  s = analogRead(ypin);


  //set direction


    digitalWrite(dir1PinA, LOW);

    digitalWrite(dir2PinA, HIGH);

    digitalWrite(dir1PinB, HIGH);

    digitalWrite(dir2PinB, LOW);

  } else if(s<490){

    digitalWrite(dir2PinA, LOW);

    digitalWrite(dir1PinA, HIGH);

    digitalWrite(dir2PinB, HIGH);

    digitalWrite(dir1PinB, LOW);

  }else if(490<=s<=520){             

    digitalWrite(dir2PinA, LOW);

    digitalWrite(dir1PinA, LOW);

    digitalWrite(dir2PinB, LOW);

    digitalWrite(dir1PinB, LOW);



Its probably the board itself

I have purchased 4 of these L298 boards in the past and 3 of them did not work. Before you do anything else or make yourself crazy, take a meter and check each connection on the board --go from the male header pin, follow the trace, then to where ever that trace leads (best to touch the probe to the leg of the component itself, not the solder).

I would put money on the fact that one (or a few) ugly solders are getting you. --Flux the crap outta 'em and reflow them with some fresh solder, you should be all set.

Thanks I will try that

Thanks I will try that

I haven’t found any bad

I haven’t found any bad connections (maybe I am doing something wrong), but i did find that a component is turned around.

the 103 ar U4 is upsidedown while the 103’s at U1,U2 and U3 are right side up

That is a resistor that you

That is a resistor that you are pointing out and it does not matter what orientation it has in the circuit.

oke thanksI didn’t think

oke thanks

I didn’t think that was a resistor

For reference

If you look at the last page of the pdf for the motor driver, you will see a schematic. You will see that there are only two possibilities for the type of comoponent. They have to be either diodes, or, resistors. Given that there are only 8 diodes, and, they are all the same size, the only possibility is resistors. If you look even closer, you will note that the 4 components are tied to jumpers, and, there are an extra pair of jumpers that go to SA, and, SB which on the schematic connect to Sense A, and, Sense B. That pretty much leaves the 4 jumpers on the left in the schematic as the parts you are looking for with the resistors.

After all that typing I noticed on page 3 of the pdf that the resistors are called out as U1 - U4. They are even called pull up resistors. The 103 on the component means 10 000 or 10k

I find the same issue with them.

The red ones almost always give me issues with cold joints, but the green ones seem ok.  Now I have never had any problems with the L9110 boards (I use more of them in my work), but they are lower amp handlers.


oke thanks

oke thanks

I think we need to talk…

Alrighty, lets get some basics out of the way so we can check them off the list.

First off, a 9v battery will not work and should not be used. It can not put out the current you need. With the exception of a few instances, you will never use a 9v battery. Do not use a 9v battery.

Second, your transformer is a bad idea as well. Train transformers (at least the ones I had as a kid) had an adjustable output (speed control) of around 0-20v which would reverse its polarity if the speed control knob went past the zero-point. The also had a 12 or 24v AC “accessory” output. Both of these connections should not be used. First, the AC connection is well, AC. The variable output (while probably DC) can have it polarity reversed by a simple bump of a control knob (not good). Finally, we have no idea as to the current output of this transformer.

One more quick one:  Don’t shove 15v into your arduino. I suppose ‘technically’ some of the arduino boards have voltage regulators that can handle an input that high, but you would be max’ing everything out and really doing nothing more than making heat and overworking your volt reg.


Before you do anything else, get some batteries. There is no need to waste your time worrying about code or connections if you have no juice to run anything. Go and get yourself a nice, 7.2v pack (6 aa’s would be great) and be done with it. The batteries must be rechargeable.


I vuagely remember something about the current sense pins… I think they need to be pulled up or down. Might be worth a google.

You guys should get together

I suppose great minds think alike (and the minds here do to)…

The “current sense” thing I sorta remember is being talked about as we speak over here:

…and I think both you guys have the same problem.


I followed chris the carpenters advice and ordered a 7.2V battery. I will probably get it in a few days, I really hope it works.

Thanks in advance, when I have the battery I will let you know,


Hi, (sorry for the wait)I

Hi, (sorry for the wait)

I bought a 7.2V 3000mah batterypack (

And I made a adapter with 1A fuse just to be sure.


Unfortunately it doesn’t work jet!




I fixed it! Thanks for the tips you gave.

I used an other code, from the ardumotor shield and changed it a little to fit the board I used.