L9110 up in smoke

Hi, this may be a similar issue to http://forum.arduino.cc/index.php?topic=381699.0

I'm trying to drive a 6V motor with specs:
.06A no load
.4A max load
2A stall

I've got a 7.2V NiMH RC battery, which starts at 8.5V when fresh, going in to my "power supply" which has a L4940 5V voltage regulator feeding the Arduino (with plenty of capacitors before and after)

I'm using code at the bottom of this post: I'm feeding PWM signals to A1A and B1A for speed, and digitalwrite to A1B and B1B for forward/reverse (inverting PWM value when switching direction)

My plan was to power the motors straight from the 7.2 supply... At 8.5V it is pulling about .09A no load (testing without the 9110 hooked up). The gnd and vcc pings on the 9110 are pretty much straight from the battery, with 1000uF capacitor in there.

POP goes the L9110... hmm maybe I made a mistake soldering my arduino shield... wired directly without a shield POP goes another L9110.

Tried running the motors straight from the arduino 5V pins: that worked fine, but low PWM signal (when i had low speed to 50) wasn't enough to turn motor... squeeked at me... thought to myself "maybe if the PWM signal is too low it's generating extra current which is blowing up the chip when i'm at 8.5V?"... Change my lowest PWM signal to 128 as below. Tried again. Went for longer this time at least! Then POP goes the L9110...

So I'm down to my last L9110 and thought i'd better try find people who know what they're doing (as it would seem I don't ha!)

So my low no load current, at most is 90mA, well below the rated 800mA of the chip... And 8.5V would seem low enough below 12V...That thread I posted at top was talking about the "brake" between PWM signals causing current spikes with each transition?

Can I fix this or should I try to find a more suitable motor driver? I COULD just drive them from 5V i guess... would preferable put another voltage regulator on my power supply to try to keep my motor supply separate from the arduino... But I figured i'd rather go 7.2V straight to motor, over power but reduce through PWM opposed to running at 5V and always under powering the motors...

Thanks for your help, this is my code (modified with thanks to http://www.bajdi.com)

const int AIA = 3;  // (pwm) 
const int AIB = 7;  
const int BIA = 5; // (pwm) 
const int BIB = 8;  

byte sp1 = 128;  
byte sp2 = 196;
byte sp3 = 255;

void setup() {
  pinMode(AIA, OUTPUT);
  pinMode(AIB, OUTPUT);
  pinMode(BIA, OUTPUT);
  pinMode(BIB, OUTPUT);
}

void loop() {
  forward(sp1); 
  delay(1000);
  forward(sp2); 
  delay(1000);
  forward(sp3);
  delay(1000);
  backward(sp1);
  delay(1000);
  backward(sp2);
  delay(1000);
  backward(sp3);
  delay(1000);
  left(sp1);
  delay(1000);
  left(sp2);
  delay(1000);
  left(sp3);
  delay(1000);
  right(sp1);
  delay(1000);
  right(sp2);
  delay(1000);
  right(sp3);
  delay(1000);
}

void backward(byte Speed)
{
  stopmotors();
  analogWrite(AIA, 255-Speed);
  digitalWrite(AIB, HIGH);
  analogWrite(BIA, 255-Speed);
  digitalWrite(BIB, HIGH);
}

void forward(byte Speed)
{
  stopmotors();
  analogWrite(AIA, Speed);
  digitalWrite(AIB, LOW);
  analogWrite(BIA, Speed);
  digitalWrite(BIB, LOW);
}

void left(byte Speed)
{
  stopmotors();
  analogWrite(AIA, 255-Speed);
  digitalWrite(AIB, HIGH);
  analogWrite(BIA, Speed);
  digitalWrite(BIB, LOW);
}

void right(byte Speed)
{
  stopmotors();
  analogWrite(AIA, Speed);
  digitalWrite(AIB, LOW);
  analogWrite(BIA, 255-Speed);
  digitalWrite(BIB, HIGH);
}

void stopmotors()
{
  digitalWrite(AIA, LOW);
  digitalWrite(AIB, LOW);
  digitalWrite(BIA, LOW);
  digitalWrite(BIB, LOW);
  delay(1000);
}

Please provide a circuit diagram so we can see how it is connected. Drawn freehand and photographed will do.

Weedpharma

This link here reckons not much heat dissipation capability.... perhaps that is the main issue. Eg... no heatsink or heatsink fins.

LINK here

If your pwm is applying the correct average voltages to your motor.... then power handling limit could be the culprit. Looks like your motor was at least turning when things overheated.

Use a motor driver that is sized for the task and has thermal protection, like this one.
There is no need for the undersized regulator.

In electronics, a good plan is to not exceed half of the maximum rating.

8.5V into a 6V motor means the stall current will be more like 2.8A, not 2A, which
is plenty to fry that driver. However that chip has significant voltage losses, about 2V,
so stall current will be about 2A I believe.

A chip that size cannot dissipate 4W (2A x 2V) for more than a few milliseconds without
frying, and at its rated load of 800mA isn't very credible either, 2V x 0.8A = 1.6W, which
would need a good heatsink in that package size.

I suspect the datasheet figures are assuming an unrealistic amount of cooling. The 2A maximum
is probably only good for millisecond timescales. I would derate the device and treat as 0.5A
maximum with cooling, 0.25A otherwise.

Thanks all for the great advice. I guess I didn't realise that the stall rating was the same as the 'start' current... Makes sense: it starts stalled huh!... Really shows me i should invest in an oscilloscope of some sort.

I'll check out that recommendation jremington thanks for that. Was also thinking i'll look in to what RC cars use... e.g. traxxas and ilk... grunty motors, lots of stalling/high-load, full speed control from crawl up to 'nuts'-RPM...

Quick update: thanks again jremington, that motor driver BD65496MUV works perfectly! Doesn't even get warm...

Got it sitting on bench right now cycling through PWM 50,100,150, and 255 in 1 second cycles to test how long my battery lasts. Love it! Sets me up for a fun weekend of building.

Plus very impressed with Pololu & FedEx for processing and shipping from Las Vegas to Melbourne Australia in 4 days :slight_smile:

Would it then be possible to connect a 12v motor which has a stall max current of 1.06 A (therefore 12v/1.06 A = 11.32 ohms) to connect it to a 9v battery not to exceed max of 0.8 A (9v/11.32 ohms =0.795053A) of driver?

Late to the party, but yes, copper wire obeys Ohm's law.