585,975 active members*
4,882 visitors online*
Register for free
Login
Page 10 of 14 89101112
Results 181 to 200 of 264
  1. #181
    Join Date
    Dec 2007
    Posts
    9

    Re: DIY AC Servo Drive - ATMega based

    A not so developed but somehow similar intent, Arduino-based, for brushed DC motors (originally aimed at 3d printers): https://www.youmagine.com/designs/dc...ntrol-software

  2. #182
    Join Date
    Nov 2014
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    Hi Mihai!
    I have problem to find to set the fuses on atmega644
    can you post some pictures or the right value?
    many tnx
    Francesco

  3. #183
    Join Date
    Nov 2014
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    here my configuration
    Attached Thumbnails Attached Thumbnails Immagine.JPG  

  4. #184
    Join Date
    May 2006
    Posts
    190

    Fuse settings

    As many people asked me for it here it is...

    Mihai
    Attached Thumbnails Attached Thumbnails FuseSettings.jpg  

  5. #185
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Fuse settings, as many people asked me for it

    Mihai

    PS: Out of topics: Anyone knows a good cheap USB oscilloscope? Anyone worked with
    BM102 BM102 50MHz 2-CH USB Analog Oscilloscope - Silver + Grey - Free Shipping - DealExtreme
    or Hantek 2-CH Analog 20MHz 48MS/s Oscilloscope - Silver + Black

    Thanks!
    Attached Thumbnails Attached Thumbnails FuseSettings.jpg  

  6. #186
    Join Date
    Jan 2005
    Posts
    1695

    Re: DIY AC Servo Drive - ATMega based

    The sampling rate for those scopes is far too low. The Rigol ds1052e or something similar is better. Or a used scope. I know someone selling a TDS640A (500Mhz, 2G/s) for around $1000.

  7. #187
    Join Date
    Dec 2007
    Posts
    9

    Re: DIY AC Servo Drive - ATMega based

    I recently bought one of these and I am quite happy Rigol DS1054Z 4 Channel Digital Oscilloscope 50MHz Bandwidth 1GSa/s

  8. #188
    Join Date
    Feb 2008
    Posts
    553

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by mcm_xyz View Post
    Fuse settings, as many people asked me for it

    Mihai

    PS: Out of topics: Anyone knows a good cheap USB oscilloscope? Anyone worked with
    BM102 BM102 50MHz 2-CH USB Analog Oscilloscope - Silver + Grey - Free Shipping - DealExtreme
    or Hantek 2-CH Analog 20MHz 48MS/s Oscilloscope - Silver + Black

    Thanks!
    Hi Mihai, congrats for your awsome project !

    As for the scope, I have no idea about the features you require but, did you take a look at this DIY - USB OSCILLOSCOPE IN A MATCHBOX

    Anyone ported the servo code to a different µC ?

    Mihai, do you think that your board can support 2Kw motors ? What's the max power you've tested ?

    Thanks !
    cnc2.

  9. #189
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by cnc2 View Post
    Hi Mihai, congrats for your awsome project !

    As for the scope, I have no idea about the features you require but, did you take a look at this DIY - USB OSCILLOSCOPE IN A MATCHBOX

    Anyone ported the servo code to a different µC ?

    Mihai, do you think that your board can support 2Kw motors ? What's the max power you've tested ?

    Thanks !
    cnc2.
    Yes, I looked at most diy and cheap usb oscilloscopes. They mighy be good for debugging low frequency circuits like this one.

    Regarding max power I do not know... Ive tested with 125W power motors but this circuit works fine in my opinion with up to 500w. Higher than this I think you would need additinal separations between logic and high power Circuits. Like adding optocouplers between the outputs of the mcu and the mosfet drivers and a special circuit for measuring the current.

    Mihai

  10. #190
    Join Date
    Nov 2014
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    Hi Mihai,
    I have a problem to run the pcb,
    I built the last you have designed, program correctily the cpu
    I can connect to pc by Servo Drive Tuner
    but I can't tune the motor, some times the controller correct the position on one side only
    and jump and stall if I try to force to other side,
    is possible to modify the Servo Drive Tuner to have the ability to force to rotate the motor on ccv or cv?
    and I have 2500ppr encoder, but the controller read 5000 in one roud, what number is correct to set on Servo Drive Tuner?
    If you modify the Servo Drive Tuner also to make a specific number of sine I can read hoe many ruond make te motor and know how poles I have!
    in conclusion, i like to have this additional functions for debug, test the power stage and the right wiring setting of motor to pcb
    1) have possibility to force the rotation of motor whitout the reset done
    2) have the possibility to run a total number of sine to know how much poles the motor have
    3) can move the PWM on single phase to check the power stage

    Francesco

  11. #191
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by puntogt4 View Post
    Hi Mihai,
    I have a problem to run the pcb,
    I built the last you have designed, program correctily the cpu
    I can connect to pc by Servo Drive Tuner
    but I can't tune the motor, some times the controller correct the position on one side only
    and jump and stall if I try to force to other side,
    is possible to modify the Servo Drive Tuner to have the ability to force to rotate the motor on ccv or cv?
    and I have 2500ppr encoder, but the controller read 5000 in one roud, what number is correct to set on Servo Drive Tuner?
    If you modify the Servo Drive Tuner also to make a specific number of sine I can read hoe many ruond make te motor and know how poles I have!
    in conclusion, i like to have this additional functions for debug, test the power stage and the right wiring setting of motor to pcb
    1) have possibility to force the rotation of motor whitout the reset done
    2) have the possibility to run a total number of sine to know how much poles the motor have
    3) can move the PWM on single phase to check the power stage

    Francesco
    Hello Francesco

    The software is made to measure Ppr not Cpr, so basically any low or high state change on the encoder signal will count as a step.

    You must tune correctly the poles and ppr of the encoder or else it wont work. I suspect you must add 5000 in the encoder ppr field. It must be exactly how many steps you get when turning the servo one rotation. However because of memory limits it only supports 3000 ppr encoders. There is a matrix there limited to 3072 think. You can easily make it larger if you use Atmega 1284 that has 16k of sraM instead of 4k on 644.
    If you suspect the motor rotates in the wrong way, you can swap the A and B inputs of the encoder.
    There was an older version that had no limit for the encoder, making calculations on every Pid but It was slower, only about 15k for pid calculation. Search the older versions.

    Mihai

    Ps. I am not home for at least a month, i do jot have access to the hardware, so I can not make changes and test them. But if you need something specific I can help you but without tests.

  12. #192
    Join Date
    Nov 2014
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    Many tnx for fast reply!
    at the moment I ike to check my hardware, I need to rotate the motor whitout the motor attached
    then I can scope the output signal on the 3 bridge and I can verify if is all ok,
    My problem is to be sure the power stage work ok and all 3 fases are good!

    Francesco

  13. #193
    Join Date
    Nov 2014
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    Is possible to use this pcb to run the motor whitout the encoder? like a inverter..
    I can remove the 5000ppr encoder end place a 400ppr maybe is betteralso because is a very big
    frequency for optocoupler!!

  14. #194
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by puntogt4 View Post
    Is possible to use this pcb to run the motor whitout the encoder? like a inverter..
    I can remove the 5000ppr encoder end place a 400ppr maybe is betteralso because is a very big
    frequency for optocoupler!!
    Yes I also think that 5000 hz per rotation for the encoder frequency is too high. I am also running my motors with 400 ppr encoders with good results. For free mode running, you will need to apply a sine table to all the outputs each of them with 120 degrees shift from the previous. The actual code does not implement this but this could be done if needed.

    Mihai

  15. #195
    Join Date
    Mar 2014
    Posts
    1

    Re: DIY AC Servo Drive - ATMega based

    I have cleaned up the PCB layout little bit and its attached. Please let me know if its useful.

    Regards,
    Adarsh

  16. #196
    Join Date
    Dec 2014
    Posts
    4

    Encoder pull up or down

    Hi Mihai,
    I have build several DC servo controllers based on Elm Chan design and have a question for you:
    Not having analyzed your code very carefully does it matter if rx and tx lines are pulled up or down such as in your design?
    Also, will there be a need for change in code if my encoder output lines are pulled up instead of down?
    Thanks and congratulations on well designed project, Matt

  17. #197
    Join Date
    May 2006
    Posts
    190

    Re: Encoder pull up or down

    Quote Originally Posted by matt_wiersz View Post
    Hi Mihai,
    I have build several DC servo controllers based on Elm Chan design and have a question for you:
    Not having analyzed your code very carefully does it matter if rx and tx lines are pulled up or down such as in your design?
    Also, will there be a need for change in code if my encoder output lines are pulled up instead of down?
    Thanks and congratulations on well designed project, Matt
    hello Matt

    I think there is no rule here... when connected to a line matching adapter like the one included in the rs232-usb adapter, does not matter. When left unconnected it's important to have a pullup or pulldown not to pick up noise. you can remove the external resistors if you wish and enable internal pullups in the atmega if you wish.

    Mihai

  18. #198
    Join Date
    Dec 2014
    Posts
    4

    Re: DIY AC Servo Drive - ATMega based

    OK Guys,
    here is my take on the ATMega Servo Drive I build following Mihail design:

    Encoder
    Servodrivertuner considers it 1200 PPR while Elm Chan's DC servo controller makes motor spin one revolution following + or (-) 2400 entry in the terminal. (4x600) Same encoder.

    12 pole NIDEC 6236 bldc motor having hard time configuring it's parameters in Servotuner.
    6 pole entry gives more predictable behavior than 12.

    No response whatsoever to step signals from MACH3 though clearly visible pulse trains arriving at pin PB1 can be seen on my scope.
    Checked with oscilloscope for slightest change in output on pins 4,5,18,19,20,21 while sending step signals, none.

    Controller responds to enable reset function. Green diode stops blinking fast and motor engages closed loop.Tests performed under this condition.
    Throws error (red diode) when manually rotated in excess of maxError entry (done with motor power disconnected)

    No response to 'move XXX' command entered in HyperTerminal either.
    Motor only responds to UART commands issued through Servodrivertuner application.

    MCU ATmega644PA.

    Guys, any suggestions welcome and greatly appreciated.

  19. #199
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by matt_wiersz View Post
    OK Guys,
    here is my take on the ATMega Servo Drive I build following Mihail design:

    Encoder
    Servodrivertuner considers it 1200 PPR while Elm Chan's DC servo controller makes motor spin one revolution following + or (-) 2400 entry in the terminal. (4x600) Same encoder.

    12 pole NIDEC 6236 bldc motor having hard time configuring it's parameters in Servotuner.
    6 pole entry gives more predictable behavior than 12.

    No response whatsoever to step signals from MACH3 though clearly visible pulse trains arriving at pin PB1 can be seen on my scope.
    Checked with oscilloscope for slightest change in output on pins 4,5,18,19,20,21 while sending step signals, none.

    Controller responds to enable reset function. Green diode stops blinking fast and motor engages closed loop.Tests performed under this condition.
    Throws error (red diode) when manually rotated in excess of maxError entry (done with motor power disconnected)

    No response to 'move XXX' command entered in HyperTerminal either.
    Motor only responds to UART commands issued through Servodrivertuner application.

    MCU ATmega644PA.

    Guys, any suggestions welcome and greatly appreciated.
    Hello

    'move XXX' command is no longer present. The only way to move the motor from outside STEP / DIR, is via the 'Get Response' command from ServoDriveTuner app.
    Method for testing if connections are good.
    1. set a low current for the motor, like 1A or so...
    2. set a high max error, higher than encoder PPR
    3. enable motor from servo drive tuner (note that also the enable pin must be on high)...
    4. try to move the motor shaft in one direction and other... it should come back to original position...

    If this works, the encoder ppr and motor poles are configured correctly and it's a problem of the pulses. Try using inverted pulses from Mach3. Also try increasing pulse width if possible in Mach3.
    If instead of going back the motor moves further until error, try inverting A and B wires or 2 motor phases.

    Hope this helps...

    Mihai

  20. #200
    Join Date
    Dec 2014
    Posts
    4

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by mcm_xyz View Post
    Hello

    'move XXX' command is no longer present. The only way to move the motor from outside STEP / DIR, is via the 'Get Response' command from ServoDriveTuner app.
    Method for testing if connections are good.
    1. set a low current for the motor, like 1A or so...
    2. set a high max error, higher than encoder PPR
    3. enable motor from servo drive tuner (note that also the enable pin must be on high)...
    4. try to move the motor shaft in one direction and other... it should come back to original position...

    If this works, the encoder ppr and motor poles are configured correctly and it's a problem of the pulses. Try using inverted pulses from Mach3. Also try increasing pulse width if possible in Mach3.
    If instead of going back the motor moves further until error, try inverting A and B wires or 2 motor phases.

    Hope this helps...

    Mihai
    OK Mihai,

    Step and Direction pins got swapped around while editing the Eagle file.
    I have broken your design into 2 parts: Logic and Power section. In the process those 2 input nets got mixed.
    Now everything works like charm. Great design. Thanks

Page 10 of 14 89101112

Similar Threads

  1. Servo module for UHU based drives now available.
    By H.O in forum UHU Servo Controllers
    Replies: 1
    Last Post: 01-24-2022, 03:11 PM
  2. Servo drive with ATMEGA
    By mcm_xyz in forum Servo Motors / Drives
    Replies: 1
    Last Post: 12-15-2014, 01:12 AM
  3. Suggestions on New VSD-Core Based Mains Powered Drive
    By Adamj12b in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 4
    Last Post: 05-05-2009, 08:28 PM
  4. Pic based servo motor drive
    By ahmedrehan in forum PIC Programing / Design
    Replies: 7
    Last Post: 08-08-2007, 01:08 AM
  5. I need help on PC-based for servo control
    By NASR1 in forum Servo Motors / Drives
    Replies: 1
    Last Post: 08-14-2006, 09:43 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
  •