585,729 active members*
4,797 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 9 of 25 789101119
Results 161 to 180 of 490
  1. #161

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

    Quote Originally Posted by punisher454 View Post
    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.
    thanks for info ,but i think hall sensor we can not do positionting as encoder correct me if i am wrong

    - - - Updated - - -

    Quote Originally Posted by punisher454 View Post
    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.
    thanks for info ,but i think hall sensor we can not do positionting as encoder correct me if i am wrong

  2. #162

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

    Quote Originally Posted by tivoidethuong View Post
    to Mihai, what is pin for USB conect?
    thanks you
    hi tivoidethuong
    check these out for usb connection

    File:STM32-sch.png - ElectroDragon

    File:STM32-sch 02.png - ElectroDragon

    good luck with pcb desining

  3. #163

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

    see con5 in schematics

  4. #164
    Quote Originally Posted by punisher454 View Post
    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.
    Actally i was thinking using encoder and hallsensor both as hall sensor for driving motor and encoder for positioning and I was planning to use two avr microcontroller one for driving motor with hall sensor and one for position controll with encoder reading and pid stuff but mihai has done really great by using only encoder that makes this project effective and cheap for us so my heartly thanks to mihai ! Thanks mihai my guru! One cool guy has really cool example on driving bldc with hall sensor (not position controll ! But we can use that in over project if you going for hall and encoder both )

    http://elecnote.blogspot.in/2014/11/cd-rom-3-phase-sensored-bldc-motor.html?m=1


    I used his code and made power bridge with ir2110 and used mc33035 datasheet for other commutation info

  5. #165
    Hey please if anybody has experience with elm chan based servo then please help me with this
    This is what I am using

    http://sufnicnc.com/SMC.html

    : max232 for serial
    Attiny2313a-pu
    putty serial terminal

    I think he has hex of smc mode 3(position control)

    Currently what is happening:
    I get nothing on serial terminal bu
    When ever I reset I am getting some crazy character on serial terminal and error led remais on always I had not connected motor yet because first I want to creat successful connection with serial terminal and then I will connect motor and di tunnig and if you guys have videos or any other good info wil be appreciated on how to tune and enter parameter but currently I am stuck at this crazy character thanks hope you guys help

  6. #166
    Join Date
    Mar 2005
    Posts
    303

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

    Quote Originally Posted by tandel View Post
    Hey please if anybody has experience with elm chan based servo then please help me with this
    This is what I am using

    SMC dc servo hajtás

    : max232 for serial
    Attiny2313a-pu
    putty serial terminal

    I think he has hex of smc mode 3(position control)

    Currently what is happening:
    I get nothing on serial terminal bu
    When ever I reset I am getting some crazy character on serial terminal and error led remais on always I had not connected motor yet because first I want to creat successful connection with serial terminal and then I will connect motor and di tunnig and if you guys have videos or any other good info wil be appreciated on how to tune and enter parameter but currently I am stuck at this crazy character thanks hope you guys help
    i think you chose wrong baurate, try agian with other baurate

  7. #167
    Quote Originally Posted by tivoidethuong View Post
    i think you chose wrong baurate, try agian with other baurate
    Thanks for reply I have tried all baud rate in arduino terminal but same crazy character as you see in my attatchements of previous reply
    I am using attiny2313a-pu and in schematics it is
    attiny2313-20pu so is it because of different attiny ?
    If have success in elmchan (mode3) then please share you video and files and please suggest me what to do next I can meet u here :

    http://www.cnczone.com/forums/open-source-cnc-machine-designs/288074-software.html

    because this stm32 forum not elmcha so ..or my mail:[email protected]

    so this will retain this forum's linearity

  8. #168
    Quote Originally Posted by dwalsh62 View Post
    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
    Why u say it has bug? What is the bug in this driver? I think This project now totally ready to ROCK!!

  9. #169
    Join Date
    May 2006
    Posts
    190

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

    Quote Originally Posted by tivoidethuong View Post
    to Mihai, what is pin for USB conect?
    thanks you
    PA11 and PA12. I suggest you play a little with STM32CubeMX software... It will give you lots of clues, even source code if you know how to use it...

  10. #170
    Join Date
    May 2006
    Posts
    190

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

    Quote Originally Posted by dwalsh62 View Post
    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
    There is an eagle schematics. Please check my previous posts, you will find it. but there is no finished board (pcb) from my side. I have no interest in building this servo yet. so no PCB... sorry

  11. #171
    Join Date
    May 2006
    Posts
    190

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

    Quote Originally Posted by tandel View Post
    Hey please if anybody has experience with elm chan based servo then please help me with this
    This is what I am using

    SMC dc servo hajtás

    : max232 for serial
    Attiny2313a-pu
    putty serial terminal

    I think he has hex of smc mode 3(position control)

    Currently what is happening:
    I get nothing on serial terminal bu
    When ever I reset I am getting some crazy character on serial terminal and error led remais on always I had not connected motor yet because first I want to creat successful connection with serial terminal and then I will connect motor and di tunnig and if you guys have videos or any other good info wil be appreciated on how to tune and enter parameter but currently I am stuck at this crazy character thanks hope you guys help


    I think you got the right baud rate in putty... but the MCU is not running at the right speed. The fuse bits of the AVR do that. They configure how the internal clock of the MCU works. Out of the box the tiny2313 comes with internal oscillator selected and ck_div8 checked... so I think it runs at 1Mhz. if you uncheck ck_div8 it will run at 8 mhz. If you manage to select an external oscilator (do not remember fuse bits for that but there are plenty of softs on the net for that) it will run at the speed of the crystal.
    The software itself is not adaptive. Does not know at what frequency the MCU works. From here the baudrate problem...

  12. #172
    Quote Originally Posted by mcm_xyz View Post


    I think you got the right baud rate in putty... but the MCU is not running at the right speed. The fuse bits of the AVR do that. They configure how the internal clock of the MCU works. Out of the box the tiny2313 comes with internal oscillator selected and ck_div8 checked... so I think it runs at 1Mhz. if you uncheck ck_div8 it will run at 8 mhz. If you manage to select an external oscilator (do not remember fuse bits for that but there are plenty of softs on the net for that) it will run at the speed of the crystal.
    The software itself is not adaptive. Does not know at what frequency the MCU works. From here the baudrate problem...
    I have setted fuses as same like this :

    http://sufnicnc.com/SMC/SMC%20doksi/attiny2313_config%20bitek.jpg

    I am using attiny2313a-pu instead of attiny2313-20pu so does this a problem ?

  13. #173
    Quote Originally Posted by mcm_xyz View Post
    Hello again!

    Using l6203 as driver is possible. You will have to alter the code a little. You will have to use only channels TIM1CH1 and TIM2CH2 (forget about the complementary channels) and do something like this in PWM_Set_Duty

    void PWM_Set_Duty_DC(int16_t duty)
    {
    duty = Check_Max_Current(duty); // this is current limiting do not remove

    if(duty > 0)
    TIM1->CCR1 = duty;
    else
    TIM1->CCR2 = - duty;
    }

    Mihai.
    Hi mihai I have successfully (I think) installed eclipce and arm setup and I have also succesfully get hex of blink example which comes with arm plugin and I have can make some changes in programme and buid hex file many as I wish but when I use your files and imported and buid it and it gives me around 200 warning and I get hex but it makes hex only one time . If I remove hex from hex containing folder and try to buid hex again but hex is not created as in case of led blink programme it is again created.and my hex has more size then yours I cant figure out what is the problem ! Check your mail also
    answer it if you feel to do else dont worry its ok because I think you have lots of work so I dont wanna bother you .thanks

  14. #174
    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 successfully (I think) installed eclipce and arm setup and I have also succesfully get hex of blink example which comes with arm plugin and I have can make some changes in programme and buid hex file many as I wish but when I use your files and imported and buid it and it gives me around 200 warning and I get hex but it makes hex only one time . If I remove hex from hex containing folder and try to buid hex again but hex is not created as in case of led blink programme it is again created.and my hex has more size then yours I cant figure out what is the problem ! Check your mail also
    answer it if you feel to do else dont worry its ok because I think you have lots of work so I dont wanna bother you .thanks
    elf and hex file is regenerated if you make some modifications. If you wish to regenerate the hex file do the folowing:

    Delete all contents of Release or Debug folder (depending on what are you building)
    Right click on project in the left side - > Clean Project
    Right click on project in the left side - > Build Project

    You should get a new map, elf and hex file.

    Mihai

  15. #175

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

    Quote Originally Posted by mcm_xyz View Post
    elf and hex file is regenerated if you make some modifications. If you wish to regenerate the hex file do the folowing:

    Delete all contents of Release or Debug folder (depending on what are you building)
    Right click on project in the left side - > Clean Project
    Right click on project in the left side - > Build Project

    You should get a new map, elf and hex file.

    Mihai
    hi mihai you are really great it works only elf file and map file has little differnt file size in realease folder and hex are same size as you have given in realease and i checked hex codes and compares they are little different..but ..cool !
    now what should i made change in code for l6203( i think i can also use ir2184 based h bridge wich is simmilar to l6203/l298)

    void PWM_Init_Motor_DC(void)
    {
    //DC Motor statrtup code.
    Duty_Limit = Zero_Duty_P;
    Reset_Encoder_Position();
    Requested_Position = 0;
    TIM1->CCR1 = Zero_Duty_P;
    TIM1->CCR2 = Zero_Duty_P;
    HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
    HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
    }

    sorry for again asking this but i am little confused with this
    and also give me some direction on why Zero_Duty_P ?
    thanks for reply

  16. #176

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

    to Mihai
    should i worry about 226 wanrnings in eclipce ?

  17. #177

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

    Quote Originally Posted by mcm_xyz View Post
    PA11 and PA12. I suggest you play a little with STM32CubeMX software... It will give you lots of clues, even source code if you know how to use it...
    hi Mihai this is suggested to tivoidethuong but i am also playing with St6m32cubex after your sugestion and i am playing with this i think this software generates code for initiallization gpio ,adc,usb and thats pretty cool thing ..thanks for your suggestion .

  18. #178
    Join Date
    Dec 2009
    Posts
    8

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

    Hi everyone,

    I have a question to forum members, is anyone who did a BLDC servo drive and run correctly ? and want to share experience ? I have still problem with the start motor.

    Thank you

  19. #179
    Join Date
    Jan 2010
    Posts
    6

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

    Hi,Mihai,
    I've just inform to U by private message,pls, can you check?

  20. #180
    Quote Originally Posted by kamilkamil1 View Post
    Hi everyone,

    I have a question to forum members, is anyone who did a BLDC servo drive and run correctly ? and want to share experience ? I have still problem with the start motor.

    Thank you
    Hi kamil I tried it with brushed dc and I run a motor with good result like it shows me tunning graph I can use move command and everything else on tuner software but I was shocked and become sad whrn realize I cant tun the servo with help of tuner software and it became useless to me and also can use it without connect it with pc via usb cable to servo tuner sofware....I am really when I see my motor is also not capturing position proparly ....by the way I found that I can not use it as stand alone after tunning done .

    I have to still use pc for turning on pid loop ...why???
    Please tell me if you have any idea what is happening to me and I think Mihai (my respected teacher ) will help us !
    Mihai (Genius) we will wait for your reply

Page 9 of 25 789101119

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
  •