Pages: [1] 2   Go Down
Author Topic: Dual H bridge L298N  (Read 12100 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello in here and first off sorry for my English.

I'm in a bit of trouble, to say it simple, I have chosen a project to one of my final exam at the ending of this month. The project is about motor controlling to a bigger sun-tracker device (Around 20 kg). 

What i have:
Motor - Phidgets inc. 3319
http://www.phidgets.com/documentation/Phidgets/3319_0_Product_Manual.pdf

Dual H bridge L298N
http://www.ebay.com/itm/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-L298N-for-arduino-/251080674810?pt=LH_DefaultDomain_0&hash=item3a75930dfa

Arduino uno R3

12V power supply

Now to the problem. I've found the phases of the motor and connected them to the output (A,B), on the module. Uploaded the code "One Revolution" to the Arduino, with some changes, so it only runs in one direction. Power supply from external power and power from the Arduino board.
http://i.imgur.com/Rm8df.jpg
Nothing happens, the motor makes an "tik tik" sound, but don't rotate?
Can someone help me out here pleas smiley

Oh, by the way, the pins from the Arduino is connected this way:
8=in1
9=in2
10=in3
11=in4
And yes I've tried the upper set direction smiley-wink

From Simon
« Last Edit: January 02, 2013, 07:38:57 am by bomlee » Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to post your circuit diagram and the code (in code tags- select the code and use the # button above the smilies)
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
                                     // for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,9,10,11);           

void setup() {
  // set the speed at 60 rpm:
  myStepper.setSpeed(600);
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one revolution  in one direction:
   Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(50);
 
}

circuit

I changed the order of the input pins, so it was less confusing
« Last Edit: January 02, 2013, 10:32:10 am by bomlee » Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the manual you posted....

Quote
This motor is a bipolar-hybrid and must be driven by a chopper drive controller such as the 1063 - PhidgetStepper
Bipolar 1-Motor

Now, I have no clue what that means, but is the 298 a chopper drive controller?

It also says in the manual:

Quote
The acceleration of a stepper motor is an important consideration when driving a load.  Setting the acceleration too
high can result in the motor stalling, especially with a heavy load.

So that might be why it's not moving?

Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31448
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
// set the speed at 60 rpm:
This is way too fast.
Try dropping it to 1 RMP.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the manual you posted....

Quote
This motor is a bipolar-hybrid and must be driven by a chopper drive controller such as the 1063 - PhidgetStepper
Bipolar 1-Motor

Now, I have no clue what that means, but is the 298 a chopper drive controller?

It also says in the manual:

Quote
The acceleration of a stepper motor is an important consideration when driving a load.  Setting the acceleration too
high can result in the motor stalling, especially with a heavy load.

So that might be why it's not moving?



What I've found out, is that an chopper driver slowly turns on the current, so the motor gets and slowly "on". I talked to my teacher about it, and he says it's not that important.
The motor by the way, haven't any load on yet.

Quote
// set the speed at 60 rpm:
This is way too fast.
Try dropping it to 1 RMP.

I tried to change it to 1 RPM, but nothing happens yet? Anyway, on the datasheet, there is written
Quote
Max Motor Speed (with 1063 controller) 614RPM
, so I would not say that 60 RPM isn't to high.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31448
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What I've found out, is that an chopper driver slowly turns on the current, so the motor gets and slowly "on".
I don't know where you found that but it is wrong. What a chopper does is to turn on the current very quickly and then when the current reaches the required value it turns it off. It allows you to use a higher voltage for your motor so the current is in the coils quickly, but that current is limited so the motor does not overheat.

Quote
I talked to my teacher about it, and he says it's not that important.
Teachers are not what they used to be. Is the motor getting hot? It should be and if it is not it implies you have not got it or the driver connected correctly.

Quote
so I would not say that 60 RPM isn't to high.
So if you are that smart how come you haven't got the motor moving yet then?

A real schematic would really help, what you posted is next to useless as it doesn't tell anyone anything. Show a schematic with the connections you have used on the module. Post a photograph of what you have so we can check it against the schematic.
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so I would not say that 60 RPM isn't to high

Maybe not, but the part I highlighted also talks a bout stalling if the acceleration is too high and I surmise that 0 to 60 in one go is too much acceleration.

@GrumpyMike, I have no idea what a chopper thingy is, and it doesn't matter here, but is a 298 one of those or not? The OP's post to the motor's documentation says pretty clearly that they recommend a particular driver. (Although I guess that could be marketing-speak?)
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy_Mike
I may then have miss read something.  smiley-roll-blue .
The motor is not running or getting hot. It only says that "tick tick" sound, as before.
It was not to play smart or anything? I'll take a picture as soon as possible smiley

JimboZA
I haven't thought of it, in that way. I don't think the 298 is an chopper driver.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://i.imgur.com/donQ5.jpg
http://i.imgur.com/uB2Hr.jpg
http://i.imgur.com/KHIYA.jpg
http://i.imgur.com/Rm8df.jpg
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you would prevent yourself a huge amount of mental effort and stress by just using the driver the motor manufacturer says you should be using.

From an interest and experience point of view, the experimenting is cool and great in the long run and kudos to you for your tenacity.  In the short run you have a project to submit and you don't know the chance of success with your home-grown solution, which might in fact be a non-solution.

I'd be inclined to go with what the manufacturer says you should be doing, in the interests of getting your project in on time.....
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31448
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but is a 298 one of those or not?
No no by itself. You have to add a L297 to make it a chopping regulator.

The wiring looks fine as far as you can see. I am not sure about the enable signals at each end of the inputs.
The motor is on a quite big gear so make sure you are giving it enough time to see any movement.
Generally stepping motors tick like this when it is either wired wrong or there is not enough power to move it.
Does the frequency of the tick change with you changing the speed in the software?
Check that the motor coils are the right ones by testing that there is continuity between the two wires on each side. Remove any connection to the controller before checking the continuity.
Try swapping one or more motor wires around.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well now. I think I owe you an update on how it's going.

First off, I changed the H-Bridge to an Big easy driver instead and I can now control the motors, which I could not before.
When my project is done, I will upload some pictures of the product.

thanks for the help smiley

From
Simon
 
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Driving 2 motors using the same H-Bridge you mentioned was easy enough smiley

http://blog.pennybuying.com/down/f/F815A.pdf
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31448
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Driving 2 motors using the same H-Bridge you mentioned was easy enough smiley

http://blog.pennybuying.com/down/f/F815A.pdf
Yes but the motor we were talking about here was a stepping motor, you can not controll two of those with this chip. Only DC motors.
Logged

Pages: [1] 2   Go Up
Jump to: