News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

high current stepper motor

Started by kosmdb, Mar 13, 2025, 08:56 PM

Previous topic - Next topic

kosmdb

hello friends
pic16f1827, ir2104 and 8 mosfets with H-brdige bipolar high current stepper motor driver and control, the motor rotates strongly, I can't hold it while rotating but it is noisy and vibrates a lot, it says this problem can be solved with micro stepping but I couldn't do the micro stepping method, is there anyone who can do it? sample code
thx.


arkadaşlar selam
pic16f1827 , ir2104 ve 8 mosfet ile H-brdige bipolar yüksek akım step motor sürücüsü ve kontrolu yaptım, motor güçlü dönüyor , dönerken tutamıyorum  ancak gürültülü  ve çok titriyor ,mikro adımlama ile bu sorun giderilir diyor ama  micro adımlama yöntemini  yapamadım yapan arkadaş varmı ? örnek kod
tşk.

RGV250

Hi,
Why don't you get a stepper driver and then just send pulse and direction.

Bob

Pepe

#2
Test this sequence
' Microcontroller Configuration
Device 16F1827
Declare Xtal = 4 ' 4 MHz crystal

' Set stepper motor pins as output
TRISA.0 = 0
TRISA.1 = 0
TRISA.2 = 0
TRISA.3 = 0

' Half-step (microstepping) sequence
Dim StepSequence[8] As Byte =  0b0001, 0b0011, 0b0010, 0b0110, 0b0100, 0b1100, 0b1000, 0b1001

Dim Index As Byte

' Infinite loop to rotate the motor
Do
    For Index = 0 To 7
        PORTA = StepSequence[Index] ' Apply step sequence to the motor
        DelayMS 2                   ' Adjust speed (higher value = slower movement)
    Next
Loop

' --- Fuse Configuration ---
Config1  FOSC_INTOSC, _       ' Internal oscillator
         WDTE_OFF, _          ' Watchdog Timer disabled
         PWRTE_OFF, _         ' Power-up Timer disabled
         MCLRE_ON, _          ' MCLR enabled
         CP_OFF, _            ' Code protection disabled
         BOREN_ON, _          ' Brown-out Reset enabled
         CLKOUTEN_OFF, _      ' CLKOUT function disabled
         IESO_OFF, _          ' Oscillator switch disabled
         FCMEN_OFF            ' Fail-Safe Clock Monitor disabled

Config2  WRT_OFF, _           ' Write protection disabled
         PLLEN_OFF, _         ' PLL disabled
         STVREN_ON, _         ' Stack overflow/underflow reset enabled
         LVP_OFF              ' Low-voltage programming disabled

Pepe

demo proteus

david

Quote from: RGV250 on Mar 13, 2025, 09:07 PMHi,
Why don't you get a stepper driver and then just send pulse and direction.

Bob
I have to agree.  This removes a lot of the real-time demand off the micro and until you get to 1/4 step the vibration will loosen everything and resonances will appear at certain speeds.

Cheers,
David

kosmdb

Thanks pepe, the half wave you wrote, I tried it but the motor power is weak...

Thanks  friends.
The motor driver is big and expensive, I made a small and cheap circuit.
The pcb, circuit, everything is ready, I'm just trying to make the software more efficient.


motor sürücüsü boyutları büyük ve pahalı , ben küçük boyutlu ve ucuz devre yaptım.
pcb ,devre  herşey hazır, sadece yazılımı daha verimli hale getirmeye çelışıyorum.

Oskar-svr

#6
Hello friend, I use these drivers for STEP motors and they are very economical and do not fail, in this link you can choose the power you need for your motor, in addition, with any of them you can configure the current and the steps to have very fine movements, their connections are very easy to connect, to move, change direction, and enable or disable the driver are with 5v signals, you can connect it directly to the microcontroller without any problem, I hope it works for you, greetings

https://es.aliexpress.com/item/1005004951150940.html?spm=a2g0o.detail.pcDetailTopMoreOtherSeller.12.25e2ZPODZPODBH&gps-id=pcDetailTopMoreOtherSeller&scm=1007.40196.394660.0&scm_id=1007.40196.394660.0&scm-url=1007.40196.394660.0&pvid=123e8cb8-85a8-49cd-9b2a-90169cde15ef&_t=gps-id:pcDetailTopMoreOtherSeller,scm-url:1007.40196.394660.0,pvid:123e8cb8-85a8-49cd-9b2a-90169cde15ef,tpp_buckets:668%232846%238112%231997&pdp_ext_f=%7B%22order%22%3A%22417%22%2C%22eval%22%3A%221%22%2C%22sceneId%22%3A%2230050%22%7D&pdp_npi=4%40dis%21MXN%21133.90%21133.90%21%21%216.53%216.53%21%40210313e917419302339726115e201a%2112000039223637915%21rec%21MX%21122644563%21XZ&utparam-url=scene%3ApcDetailTopMoreOtherSeller%7Cquery_from%3A

kosmdb

thx but ,More than double the price with taxes and shipping..

tşk ama ,vergiler ve gönderimle fiyatı iki katını geçiyor