586,608 active members*
3,715 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 13 of 25 3111213141523
Results 241 to 260 of 490
  1. #241
    Join Date
    Feb 2016
    Posts
    7

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

    Quote Originally Posted by dwalsh62 View Post
    Unless you can magically add 6 or 7 IO's with associated hardware to the ESC to handle encoder, step, dir enable, sense I fail to see how you could use it.
    Lets say one wanted to use CAN to control it. Then there would be free:
    -I2C Data and CLK
    -USART RX/TX/CTS
    -PWM in

    So thats 6 IO free to use. Additionally there still would be 2 free LEDs, thats 2 more IO, and youd still have SWD.
    btw, what do you want to sense? For its own current there is already a shunt onboard...

  2. #242
    Join Date
    Mar 2009
    Posts
    533

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

    Quote Originally Posted by dwalsh62 View Post
    ... If I can give some more advise, if you're going to reinvent the wheel, please be heavy on the comments so others can learn from it, current stuff is copy/paste mediocre results because not enough information is in the existing code to make easy alterations and it takes the next guy considerable time to figure it out.
    Yes, thanks for the various options to fall back on to. I do very little building and way too much browsing and collecting articles. So I usually don't get the in-depth understanding of a particular project., like this BLDC project. I need hands-on experience to learn. I have an old 60MHZ analog oscilloscope so I do have some basic tools to further my tinkering.

  3. #243
    Join Date
    Oct 2010
    Posts
    448

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

    In an ESC you want a DC link sense for current compensation.

  4. #244
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by KOC62 View Post
    Yes, thanks for the various options to fall back on to. I do very little building and way too much browsing and collecting articles. So I usually don't get the in-depth understanding of a particular project., like this BLDC project. I need hands-on experience to learn. I have an old 60MHZ analog oscilloscope so I do have some basic tools to further my tinkering.
    You mean you haven't picked up one of those less than $40.00 digital LCD project scopes from ebay??

    I've got a couple complete dual channel in mutlimeter type cases which are perfect for motor development and cost was around $150.00 and came with two X1 and two X10 probes.

  5. #245
    Join Date
    Mar 2009
    Posts
    533

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

    Mine was free because it wasn't digital...

  6. #246
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by volatile666 View Post
    Lets say one wanted to use CAN to control it. Then there would be free:
    -I2C Data and CLK
    -USART RX/TX/CTS
    -PWM in

    So thats 6 IO free to use. Additionally there still would be 2 free LEDs, thats 2 more IO, and youd still have SWD.
    btw, what do you want to sense? For its own current there is already a shunt onboard...
    Good luck with that, let us know how it works out for you.

  7. #247
    Join Date
    Feb 2016
    Posts
    7

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

    Small question: Right now the servo drive only supports position control, right? Do you (mcm) plan to implement speed and torque modes?

  8. #248
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by volatile666 View Post
    Small question: Right now the servo drive only supports position control, right? Do you (mcm) plan to implement speed and torque modes?
    It is well over 60 days since mcm has vanished and I can only speculate that some personal tradegy has caused this.

    At this time there is no one developing improvement or advanced code for his board so positional mode is the best you will be able to achieve.

    His code is not plug'n'play compatible with the pinout offered by the ST-Micro engineers and crinq (from the STMBL team) is working on the changes but is a little busy at the moment so if I can't find someone else who can write/change the code I'm stuck waiting on crinq and my hands are tied.

  9. #249
    Join Date
    Aug 2013
    Posts
    5

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

    How difficult is it to use a SMT version of the processor? Mouser only carries SMT parts - the LQFP-48 package looks like it would be easy to work with. I'd be happy to buy some OSH Park boards to test.

  10. #250
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by jfstockton View Post
    How difficult is it to use a SMT version of the processor? Mouser only carries SMT parts - the LQFP-48 package looks like it would be easy to work with. I'd be happy to buy some OSH Park boards to test.
    The issue is not using an SMD MCU, and I had suggested this earlier.

    The design currently employs a small development board which has a 40pin DIP header, modification of the design to place the MCU on the main board is only a matter of someone taking the time to replace the 40pin DIP header with the associated components and that's it (easier said than done).

    If you're serious about wanting a proper board which does not rely on a piggyback board I would be willing to spend the time updating _ID_'s layout including the swap of a line receiver for encoder inputs if you send me a couple (two or three) boards in return or you can spend the time making the changes yourself and not have to send any boards.

  11. #251
    Join Date
    Aug 2013
    Posts
    5

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

    With OSH Park you normally get 3 boards from a run. I'd happily send you 2 of them for prototyping. I suspect there would be some minor tweaks to the first design so the second pass order could have as many boards as people want. I'm happy get this started. Send me a zip file that OSH can read and I'll do the first order. I'm in Austin, TX, where are you located? My home email is [email protected]. Also, how does the programmer attach to the board? I assume it is through a JTAG port.


    Sent from my iPad using Tapatalk

  12. #252
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by jfstockton View Post
    With OSH Park you normally get 3 boards from a run. I'd happily send you 2 of them for prototyping. I suspect there would be some minor tweaks to the first design so the second pass order could have as many boards as people want. I'm happy get this started. Send me a zip file that OSH can read and I'll do the first order. I'm in Austin, TX, where are you located? My home email is [email protected]. Also, how does the programmer attach to the board? I assume it is through a JTAG port.


    Sent from my iPad using Tapatalk
    Check your e-mail.

  13. #253
    Join Date
    Feb 2016
    Posts
    7

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

    I looked deeper into the code and the ESC32v2 board. Implementing torque mode should be easy, porting the code to ESC32 too - except it doesnt have USB (one could use UART or something, no problem here). The biggest problem lies in the way both projects use the timers for PWM. This one (lets call it F103) uses Timer1 for high and low sides, ESC32 uses different timers (and pins) and does some manual manipulation of low side.
    To make things a little easier I ordered a mini STM32 board, I should then be able to implement torque mode and Ill see from there...

  14. #254
    Join Date
    Oct 2010
    Posts
    448

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

    Quote Originally Posted by volatile666 View Post
    I looked deeper into the code and the ESC32v2 board. Implementing torque mode should be easy, porting the code to ESC32 too - except it doesnt have USB (one could use UART or something, no problem here). The biggest problem lies in the way both projects use the timers for PWM. This one (lets call it F103) uses Timer1 for high and low sides, ESC32 uses different timers (and pins) and does some manual manipulation of low side.
    To make things a little easier I ordered a mini STM32 board, I should then be able to implement torque mode and Ill see from there...
    The ESC32 is not suited to a positional application because it's not using the MCU's tri-phasic PWM drive so unless you plan on writing the code to manually handle tri-phasic PWM including logarithmic delay time management and, it will fit in 64k I fail to see how it will ever work.

  15. #255
    Join Date
    Feb 2016
    Posts
    7

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

    Quote Originally Posted by dwalsh62 View Post
    The ESC32 is not suited to a positional application because it's not using the MCU's tri-phasic PWM drive so unless you plan on writing the code to manually handle tri-phasic PWM including logarithmic delay time management and, it will fit in 64k I fail to see how it will ever work.
    Exactly, thats why I ordered the board. I might prototype my own pcb or wire it to an old ESC to use its power stage.

  16. #256
    Join Date
    Aug 2013
    Posts
    5

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

    Mihai,

    I've started looking at your code (great job, by the way) and wanted to make sure that if I have some questions that I can bug you for some simple answers. I won't bug you with trivial stuff, but it would be useful to ask you questions about your code flow. Here are a few questions that I have currently.

    ABZ Encoder and Pin definitions: My goal would be to add an encoder with an index output to the code and re-arrange the pins according to what the STM apps people said would be a more efficient arrangement. I assume that the index pulse on a shaft encoder could be handled in the PWM_Init_Motor_BLDC routine (doing something like a minimal speed rotation until the index is found), and then adding an interrupt service routine to the ExtInit.c code. That ISR could be used to reset the counter that keeps track of the actual position of the shaft (maybe an option). I also assume that the USB interface would need two kinds of MOVE commands, one for relative move and one for absolute move.

    ADC Current Limit: If I wanted to use a lower value current sense resistor, I assume that I can add more gain by adjusting the multiplication in the ADC ISR to something other than 8. If I wanted to use a 10x lower resistance value, I'd change it to 81. Maybe I'd move this to the adc.h file and make it a constant.

    The commutation table in the PWM.c table looks pretty big, but I assume that it is used to look-up what the duty cycle on the high side and low side drivers should be for a current shaft position (I just started looking at this). I may want to ask more detail on this later.

    Also - what cross compiler did you use? There is a ARM GCC package under Ubuntu, but I don't know if the same thing is available under OSX. I can always run Ubuntu under a VM, so it isn't a big deal.

    Thanks for your efforts on this code.

    John

  17. #257
    Join Date
    Oct 2010
    Posts
    448

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

    Build your own tool chain which is compliant with your path environment, it's an easy build process and I've scripted it in OSX for ppc and there are some downloadable source packages which include the build scripts, try BUILD-YOUR-OWN.

    Mihai is MIA for more than 75 days now, don't expect a response and even then it is doubtful he can help as the code is pretty much how the CubeMX software provided it with minor changes/additions and I don't believe he has that thorough of an understanding of how the whole thing works and I would say at this time you know more.

    You can look at other projects such as the STMBL project which is STM32F1 based if you want to see how encoders with index is implemented.

  18. #258
    Join Date
    May 2006
    Posts
    190

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

    Quote Originally Posted by dwalsh62 View Post
    Build your own tool chain which is compliant with your path environment, it's an easy build process and I've scripted it in OSX for ppc and there are some downloadable source packages which include the build scripts, try BUILD-YOUR-OWN.

    Mihai is MIA for more than 75 days now, don't expect a response and even then it is doubtful he can help as the code is pretty much how the CubeMX software provided it with minor changes/additions and I don't believe he has that thorough of an understanding of how the whole thing works and I would say at this time you know more.

    You can look at other projects such as the STMBL project which is STM32F1 based if you want to see how encoders with index is implemented.
    Hello Dale

    Yes I am stupid and I live in an under developed country where we are all stupid. Please do not download my code as it is stupid, you better write your own.
    Please stop attacking me. You want something done do it yourself. I'm starting to regret I even made this open source.

    Mihai

  19. #259
    Join Date
    Mar 2005
    Posts
    305

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

    Quote Originally Posted by mcm_xyz View Post
    Hello Dale

    Yes I am stupid and I live in an under developed country where we are all stupid. Please do not download my code as it is stupid, you better write your own.
    Please stop attacking me. You want something done do it yourself. I'm starting to regret I even made this open source.

    Mihai
    do not be sad, I enjoyed your project
    thanks you very much

  20. #260
    Join Date
    Aug 2005
    Posts
    16

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

    I'm also at the finish with the project. I just have to fit the heatsink and make tests. Mihai made the drivers the way they suit him and put the whole project on the internet for free. Hi did it alone with minor help. And now youre asking him to make changes and rearange things. I'm not good at programing. If there is someone interested in the project, mihai provided the source code. It is not forbiden to make changes but it is expected to provide the resoults for other that are interested. I can make PCBs so I took the schematic and changed some component. I put the files on the forum for all that want to make my PCB. I'm wery greateful that mihai put the project for public use. Its a simple, low cost project that works realy nice. There can be made some upgrades of couse and nobody is keeping you from doing so. Just share youre works with others. Only so the public project can grow and everybody can benefit from it! Togeather we know more and we have power to make great servo drive!

    Mihai I just can say: thank you for shearing yore knowledge with us!

Page 13 of 25 3111213141523

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
  •