Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: moodydog on Feb 03, 2016, 04:46 pm

Title: Motors work with arduino UNO, don't work with 101
Post by: moodydog on Feb 03, 2016, 04:46 pm
Hi,

Currently have two parallel motors connected to digital pin 9 on UNO. Works perfectly, have the same electrical configuration, swapped the board to a 101, same connections, motor doesn't work. Have tried on a number of digital pwm pins (I'm controlling via a MOSFET so I can alter the speed).

Any ideas as to why it doesn't work? Is the code slightly different for the 101 to control motors?

Code: [Select]


#include <Servo.h>

Servo myservo;

int pos = 50;

const int motorPin = 9;

void setup() {
  // put your setup code here, to run once:
  myservo.attach(5);
  pinMode(motorPin, OUTPUT);
}

void loop()
{
 
  digitalWrite (motorPin, HIGH);
   
  for (pos = 50; pos <= 120; pos += 1){
    myservo.write(pos);
    delay(30);
  }
  for (pos = 120; pos >= 50; pos -= 1){
    myservo.write(pos);
    delay(30);
  }

}

Title: Re: Motors work with arduino UNO, don't work with 101
Post by: CrossRoads on Feb 03, 2016, 04:47 pm
What's the MOSFET?
Uno has 0/5V level outputs. What does 101 have? 0/3.3V perhaps?
Title: Re: Motors work with arduino UNO, don't work with 101
Post by: moodydog on Feb 03, 2016, 04:52 pm
It does :)

I am using ths;

Minimum gate thresh' is 1V ; Max 2V

http://uk.rs-online.com/web/p/mosfet-transistors/5411196/?searchTerm=541-1196&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E2C5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D4245522677633D4E4F4E45267573743D3534312D3131393626
Title: Re: Motors work with arduino UNO, don't work with 101
Post by: CrossRoads on Feb 03, 2016, 05:02 pm
"The board operating voltage and I/O is 3.3V but all pins are protected against 5V overvoltage."
So you need a logic level MOSFET with a gate voltage < 3.3V.
You may need to go to a surface mount part
http://www.digikey.com/product-search/en/discrete-semiconductor-products/fets-single/1376381?k=n-channel%20mosfet (http://www.digikey.com/product-search/en/discrete-semiconductor-products/fets-single/1376381?k=n-channel%20mosfet)
Or change your design to bring the 3.3V level up to 5V level and let that switch a part like AOI514:
http://www.digikey.com/product-search/en?keywords=aoi514 (http://www.digikey.com/product-search/en?keywords=aoi514)

Got a datasheet for IRL520NPBF?
http://www.irf.com/product-info/datasheets/data/irl520npbf.pdf (http://www.irf.com/product-info/datasheets/data/irl520npbf.pdf)
At 2V Vgs, it barely turns on. 
Title: Re: Motors work with arduino UNO, don't work with 101
Post by: DrAzzy on Feb 03, 2016, 05:07 pm
IRF3708PBF works pretty well at 3.3v on gate. It's not rated for that, but per the graphs in the datasheet, it's pretty good at 3.3v - it's the best through-hole MOSFET I was able to find for 3.3v gate voltages and a decent amount of current.
Title: Re: Motors work with arduino UNO, don't work with 101
Post by: moodydog on Feb 03, 2016, 05:16 pm
Aah, OK

So I've swapped the transistor around, as I also had a couple of IRF520NPBF, and it seems to work so I'll use it for the while. I'll look into the IRF3708PBF!

Thanks,