Go Down

Topic: Controlling a Stepper Motor through an L6208 controller  (Read 261 times) previous topic - next topic

joseto

Hello!
Im trying to control a bipolar stepper motor (17HS58401) through a dip24 L6208 H bridge.

I made the same circuit they use for the Arduino Shield:



With the following difference:

-Both Vref are connected to 5V
-Reset, enable and half/full are connected to 5V
-Enable is connected to 5V and ground though a capacitor.
-Control is connected to ground.

I'm using the following code:
Code: [Select]

const int dirPin = 10;
const int stepPin =9;
 
const int steps = 200;
int stepDelay;
 
void setup() {
   // Marcar los pines como salida
   pinMode(dirPin, OUTPUT);
   pinMode(stepPin, OUTPUT);
}
 
void loop() {
   //Activar una direccion y fijar la velocidad con stepDelay
   digitalWrite(dirPin, HIGH);
   stepDelay = 250;
   // Giramos 200 pulsos para hacer una vuelta completa
   for (int x = 0; x < 200; x++) {
      digitalWrite(stepPin, HIGH);
      delayMicroseconds(stepDelay);
      digitalWrite(stepPin, LOW);
      delayMicroseconds(stepDelay);
   }
   delay(1000);
 
   //Cambiamos la direccion y aumentamos la velocidad
   digitalWrite(dirPin, LOW);
   stepDelay = 150;
   // Giramos 400 pulsos para hacer dos vueltas completas
   for (int x = 0; x < 400; x++) {
      digitalWrite(stepPin, HIGH);
      delayMicroseconds(stepDelay);
      digitalWrite(stepPin, LOW);
      delayMicroseconds(stepDelay);
   }
   delay(1000);
}


When I start using the circuit the motor isn't able to move, and the GND cable that goes to the power supply, the resistance R1 and R2 gets really hot. In the case of the 2 resistance I'm using 0.375 [Ohm] instead of the 0.3 [Ohm].

Anyone that may know the reason I'm having this problem?


Thanks!!!


Robin2

Post links to the datasheet for your motor and for the L6208 H bridge.

Also give details (volts and amps) of your motor power supply.


You may find some useful stuff in Stepper Motor Basics


...R
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

TomGeorge

Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?


Not everyone has access to the "same circuit they use for the Arduino Shield"


Also the IC you are using is 24pin.

Thanks... Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

MarkT

Vref definitely should not be connected to 5V.

Checkout fig 25 in the datasheet, "Typical application"
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

joseto

Hi!
This is the circuit I'm working in:



Here is a link for the datasheet of the Arduino Module:
http://www.st.com/content/ccc/resource/technical/document/user_manual/group0/11/bb/df/1d/8b/ee/46/7b/DM00216741/files/DM00216741.pdf/jcr:content/translations/en.DM00216741.pdf

I'm woking with a Dip24 chip; not with a Dip36, but in this datasheet you can see the pin equivalence:
http://www.st.com/content/ccc/resource/technical/document/datasheet/ad/2a/fe/cf/69/a0/47/b0/CD00002294.pdf/files/CD00002294.pdf/jcr:content/translations/en.CD00002294.pdf

Here is the motor Datasheet:
http://www.svaltera.ua/catalogs/knowledge-base/brands/motionking/HB_Stepper_Motor_E.pdf

And the power supply specification are:

12V- 1.8A

Thanks!

TomGeorge

Hi,
Suggested circuit.


Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hello!
Im trying to control a bipolar stepper motor (17HS58401) through a dip24 L6208 H bridge.

  • Why does you schematic show a L6208 with pins numbered higher than 24?
  • Is the gnd of the UNO connected to the gnd of the L6208?
  • Do the resistors get hot if you power-up without the stepper motor connected?
  • Do the resistors get hot if you remove the drive signal that comes from the UNO?
  • Can you post a picture of your project please so we can see your component layout?
  • Did you see that Vref can only be in the range 0 -1V.


Thanks..  Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

MarkT

You want Vref as small as you can get away with - the circuit presented has 1.93V on Vref and 0.3ohm
sense resistors, so they will be dissipating upto 12 watts and programmed for 6A.  That's just crazy.

Try 0.3V on Vref and 0.15 ohm 1W sense resistors, which will give 2A setting at only 600mW peak per resistor.

Why is the enable tied into the Vref network? - lose that.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up