Friday 14 October 2011

Stepper motors 2

At the beginning of this post it would be necesary to mention the basics of MOSFET transistors. Although the WIKI site contains all important info, for some of the amatours (like me in some way) it is to much. I will try to provide the most important information about this transistor using one example.

The schema presented below (Image 1) shows a circuit with one IRF540Z transistor, two resistors and a red LED (btw, a very good site about LEDs).

Image 1. Circuit presenting the work of the MOSFET. Created with TinyCad.




Please note that in this image the model of the transistor IRF540Z differs from the one presented in the catalogue. This occured because TinyCad does not have all available transistors in its database. Still the circuit remains correct.

The inputs in this circuit show 5V and GND which is usual, but the PIN13 refers to the 13-th PIN on the arduino board. Then, loading the Simple Blink example You will blink with the LED. One could ask why to buy a transistor and make all this simply to blink, but there is a very good reason for it. The gate of this transistor can be turned OFF and ON by a Voltage VGS(th), and this is below 2V for OFF and above 4V for ON. But this is not the benefit here. The most valuable thing this transistor does is to allow a hudge current to flow through it. Using the gate You can manipulate with high voltage, allowing it to flow, or not. The max parameters of this transistor are shown in the mentioned catalogue, and these are in fact very good: VDSS = 100V and ID = 36A.

In this simple example we are working with a simple LED diode. But the previous article shows the main target, the KT42JM06 hybrid stepper.

So having worked with a transistor now, we can get to the motor driver.
I have slightly modified the schema placing some resistors and input pin numbers. The image 2 shows the almost final driver circuit.
Image 2. Proposed driver schema. Created with TinyCad.
 This seems to be a little more complicated than the original one, and the transistors again differ to the used IRF540Z, but still it is not a problem to understand the whole concept.

Combining it all together with a software (Fritzing is a very good one) and a virtual breadboard gives something like the image 3. Please note, that the Stepper Motor there has got one winding left, this has been made on purpose, because the KT42JM06 has 4 outputs, and one of them is a fake one. As You will soon see the one left is not needed to allow the motor to work.
Image 3. Circuit plan, created using Fritzing.
I have not mentioned it earlier, but my assumptions at the beginnig where strictly connected to the Exciting Sequence I have presented earlier (image 1). I thought the following:
  1. in every little step, one winding of the motor has to be isolated
  2. in every little step, one winding conducts the current in one direction, and the secont in a different one.
So considering these points our circuit has to do the following, (talking about the first step for the motor):
  1. the winding W should be isolated and we will achieve that when the transistors T1 and T2 will NOT conduct the current, so the state on PIN2 and PIN3 will both be LOW,
  2. the winding U should have the +, so we conduct the current through the T3 turning the T4 OFF, on the other hand the last winding V should have -, so we will conduct the current through it in a different direction: via T6, having turned the T5 OFF.

So having all this it is time to present the effects of the whole work.

Additional Note:

In this video I have used a 12V, 1.5A power suply, which was in fact not enough (though it still worked :)). You may encounter circuits in which the power consumption is higher, and the transistors operate with that high power all the time. So in order not to destroy them one has to provide a cooling system. Radiators are a good idea. To check if a transistor needs a radiator one has simply to calculate the power that will be lost on the transistor: P=R*I*I => 26.5*10^-3 * 1.5 * 1.5 = 0.059625W so this is a lot less than 1W. The transistor used here can survive working with about 1W of power loss without getting destroyed.

4 comments:

  1. nice! i designed something very similiar for my motors ;)

    ReplyDelete
  2. Witam
    Wspaniale że podjąłeś się tej pracy. Byłeś dla mnie jedyną inspiracją. Czytałem wszystko kilka razy, aż nagle ...koniec.
    Posiadam takie silniki (przypadkowo kupione jako dwufazowe) i miałem nadzieję że twój blog poprowadzi mnie (za rączkę) do samego finału. Gdzie dalszy ciąg twoich zmagań?
    A może zrealizowałeś do końca swój plan, a jedynie zaniechałeś blogowania?
    Chętnie odkupię sterownik do tego silnika wraz z układem redukującym przyłącza. Zamierzam go zastosować w budowanej właśnie frezarce CNC, sterowanej MACH3.

    ReplyDelete
  3. Hej, sprawa sie skomplikowala, z uwagi na fakt, ze w sterowniku zle dobralem polaryzacje tranzystorow (dolne 3 sztuki). Zakladajac stan sterownika jak na schematach - nie bylem w stanie uzyskac przez ta zla polaryzacje duzych predkosci obrotu - mimo ze specyfikacja mowila ze silnik umie w duze predkosci.
    Po przeszukiwaniu internetu zostalo mi zasugerowane uzycie dedykowanych mostkow H (h-bridge). Najczesciej dostepne sa one w wersji na 2 fazy (jeden kawalek krzemu, obslugujacy 2 fazy), ale wydaje mi sie, ze moznaby uzyc 2 mostkow laczac je tak, zeby razem obslugiwaly 3 fazy. Tego wariantu jednak nie sprawdzilem, a los chcial, zebym bardziej zaangazowal sie jako ojciec niz jako "hobbysta maszynista"
    Dodatkowo uzywajac wlasnych sterownikow do silnikow juz na starcie stawiam sie w problematycznej sytuacji w ktorej trzeba dodatkowo:
    - pomyslec o wylacznikach krancowych, najlepiej aby byly one wlaczone w sterownik z powodow bezpieczenstwa
    - skoro na mojej glowie jest wszystko za sterownikiem, to trzeba ogarnac jaka magistrala bede wszystko integrowac.
    -...

    Aktualnie - od 11 lat - brakuje mi na to przestrzeni i czasu wolnego

    ReplyDelete