Strange noice (beebing sound) mShield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
chisburg
 
Posts: 6
Joined: Wed Jan 09, 2013 5:24 am

Strange noice (beebing sound) mShield

Post by chisburg »

Hi,
i installed a dc motor on the mShield. It works good. But when setting the speed to below 200 it starts to giva a beeping sound, lack of power?

the same sound occurs when turning the pot to the blow.

Code: Select all

  if  ( val >= 450 && val <=550 ){
    //Serial.print("middle");
  motor.run(RELEASE);
  }
How can i solve?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Strange noice (beebing sound) mShield

Post by adafruit_support_bill »

The sound is from the PWM used to control the motor speed. You can use a higher frequency, specified in the motor constructor. See the library reference for details: http://learn.adafruit.com/afmotor-library-reference

chisburg
 
Posts: 6
Joined: Wed Jan 09, 2013 5:24 am

Re: Strange noice (beebing sound) mShield

Post by chisburg »

Thanks for fast answer.

I tried to change the Frequencies
Frequencies for channel 1 & 2 are:
MOTOR12_64KHZ
MOTOR12_8KHZ
MOTOR12_2KHZ
MOTOR12_1KHZ
Frequencies for channel 3 & 4 are:
MOTOR34_64KHZ
MOTOR34_8KHZ
MOTOR34_1KHZ

But it didnt help.

Code: Select all

#include <AFMotor.h>

AF_DCMotor motor(1, MOTOR12_64KHZ); //

int potPin = 8; 
int val= 0; 
int motorSpeed = 0; 


void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");
   

}

void loop() {
   
   Serial.println( motorSpeed );

   val = analogRead(potPin);  
   motor.setSpeed(motorSpeed);       // set the speed to 200/255

  if (val <= 450){
    motor.run(FORWARD);
   motorSpeed = map(val, 0, 450, 255, 80);

  }

  if (val >= 550){
     motor.run(BACKWARD);      // turn it on going forward
        motorSpeed = map(val, 550, 1020, 80, 255 );

   Serial.print(" BACKWARD ");

  }

  
  if  ( val >= 450 && val <=550 ){
  motor.run(RELEASE);
  motorSpeed = 0; 
  }
}

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Strange noice (beebing sound) mShield

Post by adafruit_support_bill »

What kind of motor is it?
What are you using to power it?

intheframe
 
Posts: 1
Joined: Sat Jan 19, 2013 6:15 pm

Re: Strange noice (beebing sound) mShield

Post by intheframe »

I am also new to Arduino and the Motor shield from Adafruit and had a similar problem. The Motor test example supplied has the following in the "include" section:

AF_DCMotor motor(4);

Reading the tutorial it indicates that to increase the PMW frequency you need to use outputs 1 or 2, which allows an increase in frequency, and to change the above as follows:

AF_DCMotor motor(2, MOTOR12_64KHZ);

This doesn't work and luckily I have an oscilloscope which proved that this didn't work. Copying this to the setup section however works.

This is most confusing to a newcomer so please update your example.

Mike

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Strange noice (beebing sound) mShield

Post by adafruit_support_bill »

Thanks for the heads up. We'll look into it.

chisburg
 
Posts: 6
Joined: Wed Jan 09, 2013 5:24 am

Re: Strange noice (beebing sound) mShield

Post by chisburg »

Hi,

just saw the last post, I havent managed to get it to work yet, dont know it it will provide any help but ill attach a picture of the motor im using — it comes from a printer.
Attachments
image.jpeg
image.jpeg (97.97 KiB) Viewed 1094 times

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Strange noice (beebing sound) mShield

Post by adafruit_support_bill »

Try the suggestion from intheframe and let us know how it works.

Also, be careful using that motor with the shield. Although the normal running current (0.46A) is within the capabilities of the L293D H-Bridge chips, the stall current (3A) is enough to burn out the chip.

chisburg
 
Posts: 6
Joined: Wed Jan 09, 2013 5:24 am

Re: Strange noice (beebing sound) mShield

Post by chisburg »

Ive started to play around with this again, is it possible to see what current the motor iss made for?

Im powering the shield with a external 12v current. When running the motor it runs slow, when attaching the motor straight to the 12v it runs much faster. Would it be an idea to power it with 24v? I dont understand the numbers printed on the motor — or if it's possible to read anything from it.

Id like to drive 4 of these motors, would that be possible or are they to big for the shield, if so is there any other shield i could use?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Strange noice (beebing sound) mShield

Post by adafruit_support_bill »

The first number printed on the motor is the model number. A google search turns up the specifications here: http://www.mabuchi-motor.co.jp/cgi-bin/ ... D=rs_545ph
It looks like it will handle up to 24v. But the stall current is 3A. What do you want to do with these motors? Do you need both direction and speed control?

chisburg
 
Posts: 6
Joined: Wed Jan 09, 2013 5:24 am

Re: Strange noice (beebing sound) mShield

Post by chisburg »

sorry, i realize that i could have googled the number myself, but i now understadn what stall current is. The idea is that each motor should winch a fishing line with a flourocent light tube attached. So i only need the direction. SHould i try find another shield or look for other motors? I dont want to burn the bridge.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”