584,871 active members*
5,294 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Open Source Controller Boards > DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)
Page 8 of 25 67891018
Results 141 to 160 of 490
  1. #141
    Join Date
    Nov 2005
    Posts
    111

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Hi Mihai,
    later I read that you use Eclipse and gcc. Dont be afraid about my question. Now I install Eclipse, but its very difficult.

    Thanks

    Hans

  2. #142
    Join Date
    May 2006
    Posts
    190

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    New firmware 1.2 (Zip contains source and hex file, bootloader binary file, and dfu firmware update file for those who want to upgrade via Servo Drive Tuner program)
    Thanks to Pekkas suggestion, PID calculation is moved on a timer (10kHz). As he said, the I and D part from the PID should be more stable like this as PID calculation happens at predefined intervals.

    Mihai

  3. #143
    Join Date
    Nov 2005
    Posts
    111

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Hello,
    yesterday I get the isolated current sensors. I will see what happend when the IC gets 30Ampere.
    Attachment 298534

    Hans

  4. #144
    Join Date
    Apr 2013
    Posts
    2

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Mihai,
    just a thought, I was wondering if the brushless motors like the kind used on the R/C planes (equipped with a proper encoder mounted in the motor shaft), can be driven by your DIY BLDC / DC Motor Servo Drive ?

    Max

  5. #145
    Join Date
    May 2006
    Posts
    190

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Yes, RC brushless motors can be used... However I've seen they are basically build for high rpm speeds...

    Mihai

  6. #146
    Join Date
    Jul 2007
    Posts
    67

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Hi Mihai, I'm still waiting for delivery of the ST32 module and currently sorting the pcb design, I see that your schematic shows current sensing off of R25, What's the max current threshold capability? I am confused as Hans is using a current sensing module and wondered whether I'd need one also.

    While i'm asking, Does the firmware also send a fault signal if the encoder count gets too far behind the required position?

  7. #147
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by cjmerlincnc View Post
    Hi Mihai, I'm still waiting for delivery of the ST32 module and currently sorting the pcb design, I see that your schematic shows current sensing off of R25, What's the max current threshold capability? I am confused as Hans is using a current sensing module and wondered whether I'd need one also.

    While i'm asking, Does the firmware also send a fault signal if the encoder count gets too far behind the required position?
    Teoretically 33A. Vmax that can be measured is 3.3V multiplied by 0.1 ohms. You do not need any additional current convertor.

    The max error parameter does what you asked for. When encoder counter minus desired position counter is bigger than max error parameter the servo stops and the error led is set to on.

    Mihai

  8. #148
    Join Date
    Jul 2007
    Posts
    67

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Quote Originally Posted by mcm_xyz View Post
    Teoretically 33A. Vmax that can be measured is 3.3V multiplied by 0.1 ohms. You do not need any additional current convertor.

    The max error parameter does what you asked for. When encoder counter minus desired position counter is bigger than max error parameter the servo stops and the error led is set to on.

    Mihai
    Sweet! Just what I need. Cant wait to build it..

    Thanks
    John

  9. #149
    Join Date
    Dec 2009
    Posts
    8

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Hi Mihai,

    I have a problem with motor commutation, my motor have six magnets on the rotor and 500 lines encoder so in servo tuner I set "motor poles = 6 and Encoder PPR = 2000" I checked power and logic side and everything is ok but still dont works. Should I change commutation table in your firmware ?

    Thank you

    Kamil

  10. #150

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    hi mihai i have uploaded bootloader and hex file via this :

    great video on how to do connection

    https://www.youtube.com/watch?v=Ze6q6NidS5w

    Flashing programs to STM32. Embedded Bootloader | Do It Easy With ScienceProg

    step 7 from below page how to connct

    and used this things

    Ftdi FT232RL FT232 USB TO TTL 5V 3 3V Serial Adaptor FOR Arduino BE0027 | eBay

    STSW-MCU005 STM32 and STM8 Flash loader demonstrator (UM0462) - STMicroelectronics

    this is my reasult
    Attachment 299186

    if some have still problem with how to do it exactly i can make blog for it so everybody can understand exacty how to do it comment below if need blog on it by the way thanks mi hai currenty i have no h bridge but i am going to buid one ..what should be the value of cboot capacitor in bridge as iam using irz44 /irf540 ..should i use electrolytic or ceramic disk type capacitor ? and i have image of my tunning software after connected stm board so by this image do i have successfully installed every thing in my stm32?
    i will tell you my result after completting my h bridge work ..please correct me if ihave done something wrong .

    and it is very useful if you explain how to count encoder pulses and direction with timer instead of external inturrpts....i have some experience with external inruppts based encoder with arduino but never try timer for this task so what is logic behind how to count with timer ? isnt we miss some count with it ?

  11. #151
    Join Date
    May 2006
    Posts
    190

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Quote Originally Posted by tandel View Post
    hi mihai i have uploaded bootloader and hex file via this :

    great video on how to do connection

    https://www.youtube.com/watch?v=Ze6q6NidS5w

    Flashing programs to STM32. Embedded Bootloader | Do It Easy With ScienceProg

    step 7 from below page how to connct

    and used this things

    Ftdi FT232RL FT232 USB TO TTL 5V 3 3V Serial Adaptor FOR Arduino BE0027 | eBay

    STSW-MCU005 STM32 and STM8 Flash loader demonstrator (UM0462) - STMicroelectronics

    this is my reasult
    Attachment 299186

    if some have still problem with how to do it exactly i can make blog for it so everybody can understand exacty how to do it comment below if need blog on it by the way thanks mi hai currenty i have no h bridge but i am going to buid one ..what should be the value of cboot capacitor in bridge as iam using irz44 /irf540 ..should i use electrolytic or ceramic disk type capacitor ? and i have image of my tunning software after connected stm board so by this image do i have successfully installed every thing in my stm32?
    i will tell you my result after completting my h bridge work ..please correct me if ihave done something wrong .

    and it is very useful if you explain how to count encoder pulses and direction with timer instead of external inturrpts....i have some experience with external inruppts based encoder with arduino but never try timer for this task so what is logic behind how to count with timer ? isnt we miss some count with it ?
    Hello Tandel

    If you got the board to communicate via USB with the Servo Tuner Program it's all ok. Of course it seems there are several methods to flash the stm32. But you did just fine!
    In the software provided by me, the Encoder pulsed are counted by hardware using timer and the step / dir pulses are counted using ext interupts. It would be great if we could count step / dir pulses using another hardware timer (and the pins are in fact linked to another timer) but I did not managed to do that in code... so... For now step / dir is counted using exti. But my guess is that the MCU is fast enough to count all exti pulses up to a few hundred kHz. So I guess we wont miss any...

    Mihai

  12. #152
    Join Date
    May 2006
    Posts
    190

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Quote Originally Posted by kamilkamil1 View Post
    Hi Mihai,

    I have a problem with motor commutation, my motor have six magnets on the rotor and 500 lines encoder so in servo tuner I set "motor poles = 6 and Encoder PPR = 2000" I checked power and logic side and everything is ok but still dont works. Should I change commutation table in your firmware ?

    Thank you

    Kamil
    Hello

    Checking the right PPR is easy. Reset mcu, connect to servo tuner software, rotate the motor shaft about 1 complete rotation and you will see the PPR (or a pretty close value there)
    The motor poles you will need to find from the motor specification sheet. 6 sounds to me like a strange number anyway, my wild guess is to try 12...

    You may need to change 2 motor phases between them (do not matter what phases) in order to get the right commutation sequence. You do not need to change the commutation table in code.

    Mihai

  13. #153

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    hi thanks now i know that its working so ican go for next step so i have these qutions in my mind :
    >should i join all ground ? specially both side of optocoupler
    >am i getting 3.3v from onboard regulator of stm32board ?
    >which value and which type of "c boot " capcitor do i use for ir2101 ?is it ceramic disc type or electrolytic?
    >which four pins used for brushed dc motor?
    >you suggest me to write duty and -duty for l6203
    but i am little confused with that
    Zero_Duty_P + duty;
    Zero_Duty_P - duty;

    and should i also made some change in
    PWM_Init_Motor_DC function ?

    i have pc817 optocoupler so is it suitable for this task?

  14. #154
    Join Date
    Dec 2009
    Posts
    8

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Mihai,

    I checked PPR 2000imp, I changed motor to Elcom 5172N002 it has four magnets so I set 4 motor poles. I don't found a documentation for this motor. I try to find correct configuration but still don't work, I change a phases, set motor poles to 3,6,8,12 and switched encoder cable. I connected oscilloscope to PWM outputs and I observed PWM signal in 3 low outputs and only 2 PWM signal in high outputs, this is a normal commutation procedure ? I don't have ideas what should I check yet.

    One more question,
    Do you have plan to add some option which will be give a possibility to use hall sensor ?

    Thank you

  15. #155

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Quote Originally Posted by kamilkamil1 View Post
    Mihai,

    I checked PPR 2000imp, I changed motor to Elcom 5172N002 it has four magnets so I set 4 motor poles. I don't found a documentation for this motor. I try to find correct configuration but still don't work, I change a phases, set motor poles to 3,6,8,12 and switched encoder cable. I connected oscilloscope to PWM outputs and I observed PWM signal in 3 low outputs and only 2 PWM signal in high outputs, this is a normal commutation procedure ? I don't have ideas what should I check yet.

    One more question,
    Do you have plan to add some option which will be give a possibility to use hall sensor ?

    Thank you
    hey kamilkamil1 ,
    i think you should consider your motor coil pole not magnet pole . About hall sensor , i think that is waste of hallsensor for this servo because we have already encoder for driving and controlling position ..if we only use hall sensor instead of encoder we can not controll position as by my knowledge ...are you trying to use both ?encoder and hall sensor ? corrct me if i am wrong or misundersood something

    this is michrochip app note on drive bldc with hallsensor

    http://ww1.microchip.com/downloads/e...tes/00857a.pdf

    this my mtor photo i think it six pole :
    Attachment 299612

    hey kamil if you some experience with coding this stuff and eclipce with arm stm32 plese tell me thanks

    tandel

  16. #156
    Join Date
    Dec 2009
    Posts
    8

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Hi, Tandel

    I will count motor coils and I try once again.
    I would like to use both, hall sensors and encoders such as in project VB's Projects Home

    I dont have experience with coding stm32 but Mihai wrote a few opost before it will be easy to modify code. But on this time I can't do this.

    Thank you

  17. #157
    Join Date
    Mar 2005
    Posts
    303

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    to Mihai, what is pin for USB conect?
    thanks you

  18. #158
    Join Date
    Jan 2006
    Posts
    115

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    About hall sensor , i think that is waste of hallsensor for this servo because we have already encoder for driving and controlling position ..if we only use hall sensor instead of encoder we can not controll position as by my knowledge ...are you trying to use both ?encoder and hall sensor ?
    you cant get precise positioning from hall sensors alone, thats what the encoder is for. By adding hall sensors you just simplify determining the commutation of the motor. The benefit to adding hall sensors is that you can start the motor from a dead stop and automatically be in the right commutation phase.

  19. #159
    Join Date
    Oct 2010
    Posts
    448

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    While this is one of the more complete projects I've come across, it's a shame the schematic and board files are not in eagle format making it easy for others to make layout changes as it is the most commonly used PCB software.

    When the project is completed and the bugs worked out I'd be interested in details regarding the reliability of a production board and the specific motor this driver targets.

    -- Dale

  20. #160
    Join Date
    Dec 2003
    Posts
    24216

    Re: DIY BLDC / DC Motor Servo Drive - ARM MCU (STM32F103C8T6)

    Rather that discrete hall effect sensors, the use of commutation tracks on the encoder itself is more accurate and virtually no extra cost in the encoder.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

Page 8 of 25 67891018

Similar Threads

  1. Replies: 3
    Last Post: 02-11-2015, 06:07 AM
  2. Replies: 0
    Last Post: 10-21-2014, 09:29 PM
  3. Servo Drive AC + servo motor for car steering wheel simulator
    By yusukeand in forum Servo Motors / Drives
    Replies: 6
    Last Post: 01-10-2014, 09:06 AM
  4. VCE-750 with BLDC Servo - X Axis Servo fault
    By kostner in forum Haas Mills
    Replies: 6
    Last Post: 10-23-2011, 08:09 PM
  5. Sell Servo Motor, Servo Drive by GSKcnc.com from China
    By salecnc@hotmail in forum News Announcements
    Replies: 0
    Last Post: 06-03-2008, 08:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •