585,758 active members*
4,402 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 11 of 25 91011121321
Results 201 to 220 of 490
  1. #201
    Join Date
    Apr 2006
    Posts
    3498

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

    Hi Guys,
    Guys this is a great thread and great minds working together. I need an advice though. I am using Arduino UNO ATMEGA328P chip to control a DC motor using Hbridge. The encoder signals will directly read by the microcontroller and based on SERVOSTRAP code i will control the DC motor using Hbridge. Now someone guide me please can i use the Hbridge shown in below link. It can controll two DC motor with Break function. I am asking this because it is only 20US dollar with free shipment.


    3 36V 10A Peak 30A Dual Motor Driver Module board H bridge DC MOSFET IRF3205-in Integrated Circuits from Electronic Components & Supplies on Aliexpress.com | Alibaba Group
    It is 3-36V 10A Peak 30A Dual Motor Driver Module board H-bridge DC MOSFET IRF3205.
    Details are given below:
    The drive performance of these non-L298 motor driver chip can be compared, the driver focus on current and efficiency, effectively motor power and battery life. Can withstand high current overload, the maximum current up to 30A.

    This drive also has a brake function can be quickly stopped the motor, brake quickly, braking obvious, easy to implement this feature

    The drive uses the full two half-bridge driver chip + low resistance N-channel MOSFET components. Complete two half-bridge driver chip reliable drive mode, the MOSFET switching losses to a minimum. Improve power utilization. MOSFET driver chip comes with hardware brake function and power feedback.

    This drive is superior integrated low power chip solution and the other half-bridge power margin in the coordinated combination of programs and complex issues and complementary drive problems

    N-channel MOSFET IRF3205 MOSFET, use two dedicated half-bridge driver chip on the top tube using the bootstrap capacitor, so that the tube has enough drive voltage of the MOSFET channel can be opened quickly, improve motor acceleration curvature, but also quickly for the motor brake. This allows the trolley can quickly start can quickly kill the car.

    The driver can operate at 0% -99% of the duty cycle of the PWM modulation, the motor driving voltage can be obtained sufficiently.
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  2. #202
    If want to replace l298 for higher power you may use l6203 or if you still need more power you can buy but remember you have to mimic l298 so you need schematic of this driver if u want make this driver use can make it with ir2184 or if you want to use ir2110 or ir2101 but I think u will need some gates to mimic l298 so great you can make your own are you using pure servostrap or misans work? I am also working on ..good to see that someone working on it... mihai has really great thing that he has developed this both for bldc and dc

  3. #203
    Mihai we need you!!!

  4. #204
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by _ID_ View Post
    Few days ago I ordered a set of PCB's. It should arrive in a couple of days. I still have to source some components but the majority of it I have allready. I went for SMD type and changed some components. I'll test the design and if all is well then I will have some PCB's to spare. The design can nbe seen on attached pictures. There are two options for mounting transistors.

    Attachment 305492
    Attachment 305494
    I programed the MCU's allready and they connect with Servo Drive Tuner. Programing was quite a challange for me. It was first time for me.
    Mihai did not use the best pin configuration in his driver layout, STMicro engineers gave me a better pinout (and long-winded explanation) which I passed along to Mihai and I have modified his code to use the new pinout as a test which gave a significant improvement in performance and response.


    My minimum recommendations is to drop the opto-couplers for encoder inputs and use a line-receiver, minimal changes to your circuit and better results.

    While you 're using the piggyback board, why didn't you use the LQPF48 package on the board instead?

    Did you do the schematic and layout in Eagle?

    Mihai has been MIA for more than 45days.

  5. #205

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

    Quote Originally Posted by dwalsh62 View Post
    Mihai did not use the best pin configuration in his driver layout, STMicro engineers gave me a better pinout (and long-winded explanation) which I passed along to Mihai and I have modified his code to use the new pinout as a test which gave a significant improvement in performance and response.


    My minimum recommendations is to drop the opto-couplers for encoder inputs and use a line-receiver, minimal changes to your circuit and better results..
    I agree, using a typical optocoupler is a bit too slow for interfacing encoder with high PPR and/or high RPM. SFH617A datasheet says that cutoff frequency is 100kHz even at the most optimum case. That will be exceeded by factor of 2.5 when driving 3000rpm with 1000cpr encoder. Line receiver or a faster optocoupler (like 10MHz specified 6n137 or similar) should work better.

    dwalsh62, I'd be happy to hear more about the STM recommended pinout..? I don't think there is any other way to connect the 3-phase PWM outputs? Or is the recommendation related to inputs or something else? Thanks

  6. #206
    Join Date
    Oct 2005
    Posts
    255

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

    Is this site relevant to you project?
    STM32F4 PWM tutorial with TIMERs - STM32F4 Discovery

    Paul

    oops just saw F1

  7. #207
    Join Date
    Mar 2009
    Posts
    533

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

    Quote Originally Posted by Khalid View Post
    Hi Guys,...Now someone guide me please can i use the Hbridge shown in below link. It can controll two DC motor with Break function....
    Further in the link it says;
    The motor is transferred: DIR = 1 PWM = PWM
    Motor Reverse: DIR = 0 PWM = PWM

    Parking brake: DIR = X PWM = 0

  8. #208
    Join Date
    Apr 2006
    Posts
    3498

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

    KOC62,
    I just ordered following that has 43Amp power:
    BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM
    SPECIFICATIONS:

    Operating Voltage 5.5 to 27V (B+)
    Path resistance of typ. 16 mOhm at 25°C
    Low quiescent current of typ. 7 uA at 25°C
    PWM capability of up to 25 kHz combined with active freewheeling
    Switched mode current limitation for reduced power dissipation in overcurrent
    Current limitation level of 43 A typ.
    Status flag diagnosis with current sense capability
    Overtemperature shut down with latch behaviour
    Overvoltage lock out
    Undervoltage shut down
    Driver circuit with logic level inputs
    Adjustable slew rates for optimized EMI
    74AHC244 Schmitt-trigger Octal buffer/ line driver for ESD protection (Inputs accepts voltages higher than VCC)Click image for larger version. 

Name:	Untitled.jpg 
Views:	21 
Size:	86.3 KB 
ID:	307064
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  9. #209
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by roivai View Post
    I agree, using a typical optocoupler is a bit too slow for interfacing encoder with high PPR and/or high RPM. SFH617A datasheet says that cutoff frequency is 100kHz even at the most optimum case. That will be exceeded by factor of 2.5 when driving 3000rpm with 1000cpr encoder. Line receiver or a faster optocoupler (like 10MHz specified 6n137 or similar) should work better.

    dwalsh62, I'd be happy to hear more about the STM recommended pinout..? I don't think there is any other way to connect the 3-phase PWM outputs? Or is the recommendation related to inputs or something else? Thanks
    I like many didn't think it mattered which compliment timers were used but according to the STMicro engineers there is a significant difference where one is more suited to ESC type 3-phase motor driver applications and the alternate is more suited for 3-phase servo motor driver applications.

    The pinout is based on delays from the complimentary outputs, by using the alternate compliments you will have reduced delays increasing response and performance as the motor is constantly changing directions quickly you don't want the PWM channel to lag on a direction change as this reduces achievable torque.

    Had to remove my initial query from the e-mail due to size but basically I asked why I had low performance and torque, I couldn't achieve a 65% saturation rate and the motor had no balls but would hit 4.3K RPM with little trouble, here's the e-mail reply:
    On Dec 29, 2015, at 13:37 PM, ST-Micro Technical Support wrote:

    Hi Dale,

    I have reviewed your Mihai schematic and consulted with my colleagues regarding this matter and the only advice I can tell you is that while your concept is sound, your choice of pins could have used more research and testing to avoid these types of problems.

    The low performance you are experiencing is an OEM (you) design flaw which resulted from the lack of testing/knowledge/experience and while you have acknowledge, your limited knowledge of STM32 line of products seem to be falling into the same performance issue that all other designer are experiencing and this is mostly in part based on IO selection for convenience rather than optimal performance.

    LeadShine is a China based company who produces a commercial motor and driver based on the STM32F103C8T6 and the driver has the same low performance issue which they have attempted to overcome by adding encoder hall sensors and index signals and they are still unable to achieve more than 72% field saturation which makes the product acceptable to the low end hobbyist who is unaware of the poor performance of the product which is due to the overall design.

    Using the STM32F103C8T6 as a 3-PH ESC driver does not rely on positioning or phasing to manage the motor but instead drives each coil into full saturation regardless of the amount of field angle in respect to the rotor as it's basically driving the rotor by voltage/current in constant velocity and varying the speed by voltage so a small delay in the complimentary outputs has minimal effect and the motor never achieves maximum torque.

    A Servo Driver should be configured as a constant torque device and rightly so, the data sheet and application notes don't go into specific details or all possible scenarios of use regarding the STM32F103C8T6 and while using PB13, PB14 and PB15 as the complimentary PWM signals will work it's not the best option for your servo driver application.

    Do not mistake the driver driving the motor in constant torque for operating the driver in constant velocity, you can drive the driver in constant velocity to traverse to a specific position but the driver needs to control the motor with maximum torque to prevent stalling under heavy loads which is why they are suitable for CNC machine applications.

    Due to layer isolation and separation there is a 163 nsec delay on port pins PB13, PB14 and PB15 opposed to a 28 nsec delay using the alternate complimentary port pins PA7, PB0 and PB1 and using a single current sense channel will not provide the correct current results in respect to the non phasing field current due to the delay and performance will never exceed 75% of it's capabilities provided your code can achieve it which we have estimated with some minor code correction you should be able to achieve greater than 92% by utilizing different pins and streamlining your inputs to ANALOG pins (except the encoder inputs).

    Using PB6 as your enable line is a poor choice as your POWER_STAGE is tied to port B and all access to this line generates a maskable interrupt which will cause your application to pause until it receives a STEP or DIR signal from the controlling device based on the software configuration of your POWER_STAGE GPIO's, we recommend switching to a non port B ANALOG line such as PA6 for ENABLE and using PB6 as your encoder B channel signal.

    Another issue of concern is the use of a dual channel quadrature encoder (A/B) which has no separate index signal, this requires adjusting the encoder to the rotor to obtain the correct phasing, this can be easily achieved by using a low DC voltage on the A coil to lock the rotor and then adjusting the encoder which does have the index signal on the A channel and can be detected due the the different signal pattern of the index position which requires an oscilloscope to detect and correctly set.

    We believe this can be corrected by using a triple channel encoder (A/B/Z) making alignment significantly simple as you only need to detect the index position which is a single signal and also allow you to accurately track the rotor position relative to the encoder signal.

    You can continue to use the dual channel quadrature encoder and you should still be able to effectively drive your motor into the 90+ saturation region with reasonable torque but we advise the addition of the index signal to help with field orientation and improve motor performance and response and perhaps you should consider adding F.O.C. capabilities to your driver code as you pretty much have all the hardware to support it.

    PB2 is a good choice for the encoder index signal as it uses a maskable interrupt which will allow you to zero the encoder counter in forward or set to max value in reverse regardless of the current status/activity of your application code without causing any delay.

    It is our professional conclusion you should be using the following pinout to achieve optimal performance in your drive and these pin changes alone will make your drive reach much more acceptable performance levels.

    Optional pins have been noted and it is recommended you consider adding them, the dual channel current sense give you the off field current and using something like 0.01ohms as your shunt resistor is better than the 0.1ohms you are currently using and it is a common mistake to use a target voltage of 1v based on 10A which does not take into account a surge of 20A or 30A at startup and 0.01ohms means you working in 0-0.500mv range and less likely to damage the MCU from over-voltage as most ANALOG lines are not five volt tolerant.

    As a side note, you might wish to consider using the STM32F103T8U6, STM32F103TBU6 or STM32F103TBU7 as these specifically target motor and inverter applications and have even less delay allowing you to achieve a 98% PWM frequency efficiency.



    Code:
    ++++++++++++++++++++++++
    + STM32F103CxTn PINOUT +
    ++++++++++++++++++++++++
    
    FUNC			NEW_PINOUT
    --------------------------------------------------------------------------------------------------
    ENABLE			ADC12_IN6/PA6		(tim1 break pin, max 3.3V!!!)
    STEP			SPI1_MOSI/PB5		(5v tollerant)
    DIR			SPI1_MISO/PB4		(5v tollerant)
    ENCODER_A		SDA/PB7			(5v tollerant)
    ENCODER_B		SCL/PB6			(5v tollerant)
    ENCODER_Z		BOOT1/PB2		(Optional, 5v tollerant)
    B_EMF			ADC12_IN1/PA1		(Optional, need C_EMF)
    C_EMF			ADC12_IN0/PA0		(Optional, need B_EMF)
    DC_LINK			ADC12_IN2/PA2		(Optional for stabilization)
    B_SENSE			ADC12_IN3/PA3		(Single current sense)
    C_SENSE			ADC12_IN4/PA4		(Optional for FOC, need B_SENSE)
    TIM1_CH1		TIM1_CH1/PA8
    TIM1_CH1N		TIM1_CH1N/PA7		(Better choice than PB13 due to minimal delay)
    TIM1_CH2		TIM1_CH2/PA9
    TIM1_CH2N		TIM1_CH2N/PB0		(Better choice than PB14 due to minimal delay)
    TIM1_CH3		TIM1_CH3/PA10
    TIM1_CH3N		TIM1_CH3N/PB1		(Better choice than PB15 due to minimal delay)
    STATUS_LED		JTDO/PB3		(PC13 should not be used for LED)
    ERROR_LED		JTDI/PA15		(PC14 should not be used for LED)
    USB_DM			USB_DM/PA11		(Obvious)
    USB_DP			USB_DP/PA12		(Obvios)
    SW_DIO			SWDIO/PA13		(USE SWD WHERE POSSIBLE)
    SW_CLK			SWCLK/PA14		(USE SWD WHERE POSSIBLE)

  10. #210
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by Khalid View Post
    KOC62,
    I just ordered following that has 43Amp power:
    BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM
    SPECIFICATIONS:

    Operating Voltage 5.5 to 27V (B+)
    Path resistance of typ. 16 mOhm at 25°C
    Low quiescent current of typ. 7 uA at 25°C
    PWM capability of up to 25 kHz combined with active freewheeling
    Switched mode current limitation for reduced power dissipation in overcurrent
    Current limitation level of 43 A typ.
    Status flag diagnosis with current sense capability
    Overtemperature shut down with latch behaviour
    Overvoltage lock out
    Undervoltage shut down
    Driver circuit with logic level inputs
    Adjustable slew rates for optimized EMI
    74AHC244 Schmitt-trigger Octal buffer/ line driver for ESD protection (Inputs accepts voltages higher than VCC)Click image for larger version. 

Name:	Untitled.jpg 
Views:	21 
Size:	86.3 KB 
ID:	307064
    This arduino dual driver will work on a brushed motor, a stepper will require some fancy coding to maintain positioning but as a servo power stage you'll find it's not really suitable for the application and there is no way this will handle 43A, it's 2oz un-stopped copper and a calculator say 8A cont / 16A peak and if you drive it with more than 24V it will shut down as soon as things start to get warm, I tried this product already, it's OK for small motors like the electrocraft E110 servo motor (24V / 100W / 4.17A cont / 19.38A peak) but it was a struggle to hit 3000RPM so it basically serves as a test-bed.

  11. #211
    Join Date
    Apr 2006
    Posts
    3498

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

    Quote Originally Posted by dwalsh62 View Post
    This arduino dual driver will work on a brushed motor, a stepper will require some fancy coding to maintain positioning but as a servo power stage you'll find it's not really suitable for the application and there is no way this will handle 43A, it's 2oz un-stopped copper and a calculator say 8A cont / 16A peak and if you drive it with more than 24V it will shut down as soon as things start to get warm, I tried this product already, it's OK for small motors like the electrocraft E110 servo motor (24V / 100W / 4.17A cont / 19.38A peak) but it was a struggle to hit 3000RPM so it basically serves as a test-bed.
    dwalsh62,
    Thanks for the insight but i only want to drive the Car Wiper Motor and i think the driver will be enough to drive 12VDC 13amp motor.
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  12. #212
    Join Date
    Mar 2009
    Posts
    533

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

    Quote Originally Posted by Khalid View Post
    dwalsh62,
    Thanks for the insight but i only want to drive the Car Wiper Motor and i think the driver will be enough to drive 12VDC 13amp motor.
    What is the upper range of RPM for the wiper motor when running at 12VDC?

  13. #213
    Join Date
    Apr 2006
    Posts
    3498

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

    Quote Originally Posted by KOC62 View Post
    What is the upper range of RPM for the wiper motor when running at 12VDC?
    It has 50:1 wormwheel gears. After removing the gears it can achieve RPM of around 3000.
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  14. #214
    Join Date
    Mar 2009
    Posts
    533

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

    Quote Originally Posted by Khalid View Post
    It has 50:1 wormwheel gears. After removing the gears it can achieve RPM of around 3000.
    That looks promising. It has a better power rating than the typical (non-industrial) sewing machine motor.

  15. #215
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by Khalid View Post
    dwalsh62,
    Thanks for the insight but i only want to drive the Car Wiper Motor and i think the driver will be enough to drive 12VDC 13amp motor.
    A typical wiper motor rotor (armature) runs around 1500 - 1800 RPM, 9A to 16A continuous, 26A to 35A peak with an initial surge current >45A, don't expect long life from this driver with that motor and when braking, it (the motor) will generate about 60A.

    A rear window wiper motor is smaller, higher RPM (2200 - 2600), less current and would fair better.

    I recommend finding a 24V motor from something with lower current ratings.

    Less peak and surge current will make the driver last longer but it will eventually fail, I got about 4 months out of one running a 24V, 8.25A continuous / 23A peak motor, the second is still running but I force-air cool the driver driving a 24V 5.2A continuous / 19.3A peak motor.

  16. #216
    Join Date
    Apr 2006
    Posts
    3498

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

    Quote Originally Posted by dwalsh62 View Post
    A typical wiper motor rotor (armature) runs around 1500 - 1800 RPM, 9A to 16A continuous, 26A to 35A peak with an initial surge current >45A, don't expect long life from this driver with that motor and when braking, it (the motor) will generate about 60A.

    A rear window wiper motor is smaller, higher RPM (2200 - 2600), less current and would fair better.

    I recommend finding a 24V motor from something with lower current ratings.

    Less peak and surge current will make the driver last longer but it will eventually fail, I got about 4 months out of one running a 24V, 8.25A continuous / 23A peak motor, the second is still running but I force-air cool the driver driving a 24V 5.2A continuous / 19.3A peak motor.
    dwalsh62,
    Thanks for sharing your experience. I am also in designing a High Current MOSFET drivers based on IRF840 and IR2110. This wll be drived by Arduino. Can you share the picture of your setup and especially the motor you are talking about. How much torque you get from that motor?
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  17. #217
    Join Date
    Mar 2005
    Posts
    303

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

    Quote Originally Posted by Khalid View Post
    dwalsh62,
    Thanks for sharing your experience. I am also in designing a High Current MOSFET drivers based on IRF840 and IR2110. This wll be drived by Arduino. Can you share the picture of your setup and especially the motor you are talking about. How much torque you get from that motor?
    i think ir2184 bester, because it have build in dead time

  18. #218
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by Khalid View Post
    dwalsh62,
    Thanks for sharing your experience. I am also in designing a High Current MOSFET drivers based on IRF840 and IR2110. This wll be drived by Arduino. Can you share the picture of your setup and especially the motor you are talking about. How much torque you get from that motor?
    It is my experience the IRF840 is a poor choice because it has a high Rds, it will generate a lot of heat and require massive forced-air cooling.

    The IR2110PBF is suitable for small motor applications, there are much better choices, the IRS2101SBFF is such a device, if you use an Arduino then you will need to program in some dead time or use a device like IRS2184SPBF, these are better options than IR2101PBF and IR2184BPF, check the specs and your understand why.

    If you want to use only three lines to drive the bridges (instead of six) then use IRS2103SPBF, it has one inverting and one non-inverting input so tying the inputs together allows you to drive each bridge from a single line and it will not allow both outputs to be active at the same time and will delay only long enough to allow the switch avoiding dead-time propagation and it has a line you can use to enable/disable the driver chip output.

  19. #219
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by tivoidethuong View Post
    i think ir2184 bester, because it have build in dead time
    It's not better, it's for a different application where dead-time is required because it's not available from the PWM source.

  20. #220
    Join Date
    Aug 2005
    Posts
    16

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

    Here are my eagle files if someone is interested in making my version of the board.

Page 11 of 25 91011121321

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
  •