Elm-Chan smc servo controller programming and tuning - Page 4


Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 98

Thread: Elm-Chan smc servo controller programming and tuning

  1. #61
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    I did some quick googling, and here is a quote from one of the sites :

    EEPROM corruption from brownouts
    Brownouts can cause the first location of the on-board EEPROM to be overwritten.

    In addition to the precautions elsewhere on this Wiki, consider not using the first EEPROM location.

    Brownout fuses
    If the voltage on your chip goes too low it can start executing random instructions, or corrupt the flash/eeprom (see above) so just always set the BOD unless there’s some good reason not to!

    Food for thought, it may be worth using the BOD, and see if that helps, I know I haven't enabled it on my boards...

    Russell.



  2. #62
    Registered
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    215
    Downloads
    0
    Uploads
    0

    Default

    It just occurred to me, we may want to have BOD enabled (brown out detection)...

    And set it at the highest level under 5v...

    I have prep'd a couple of AVRs with some different settings, will test them shortly when I get home...



  3. #63
    Registered
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    215
    Downloads
    0
    Uploads
    0

    Default

    Well, I changed a couple of things, so I'm not exactly sure what fixed it...

    I tried two different AVRs... The common changes were:

    1) fixed the compiler warning: .cseg .db misalignment - padding zero byte
    This line
    m_error: .db 10, "???", 0
    I changed to
    m_error: .db 13,10, "???", 0
    2) changed the initial parameter bank to 3...

    The difference between the two AVRs, one had brown out detection enabled and the other didn't...

    Now... both of them are working ok, there is no corruption of ANY of the parameter banks...

    With the addition of BOD enabled, the board no longer spits put a bunch of garbage on the rs232 port when it powers up...

    Anyway, according to Atmel's papers on eeprom, BOD should be enabled to prevent corruption, it holds the chip in reset until the voltage is sufficient ...

    Give it a try and see how it works for you...



  4. #64
    Registered
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    215
    Downloads
    0
    Uploads
    0

    Default

    Oh... how did I miss post #61 ...

    hehe.. same solution...



  5. #65
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by krazatchu View Post
    Oh... how did I miss post #61 ...

    hehe.. same solution...
    Ha, thats funny, I will give it a go as well, seems like an easy fix

    Russell.



  6. #66
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    121
    Downloads
    0
    Uploads
    0

    Default Warnings

    Quote Originally Posted by krazatchu View Post
    Allrighty, I tried the 2313 which had both the hex and the epp loaded...
    However the result was the same...

    On first turn on, the values came up as they were in the source code...
    I changed them to match the motor and saved with w0...
    After a few power cycles they changed...

    A bit of testing indicates that parameter bank 0 and 1 change but 2 and 3 don't... may try loading from 2 or 3 instead of 0

    I will have to take a look at the warnings WINAVR produced during compilation...

    10 of the warnings are from registers being defined twice, once in the avr.inc file and once in the smc3a.asm file. You can go into the avr.inc file and comment out these lines

    ;.def T6H = r7
    ;.def T8L = r8
    ;.def T8H = r9
    ;.def T10L = r10
    ;.def T10H = r11
    ;.def T12L = r12
    ;.def T12H = r13
    ;.def T14L = r14
    ;.def T14H = r15

    because the are define in the smc3a.asm as

    .def _0 = r15 ;Permanent zero register

    .def _PvEnc = r14 ;Previous encoder signal A/B
    .def _PvDir = r13 ;Previous direction
    .def _CtDiv = r12 ;1/83 divider

    .def _PosH = r11 ;Current position (circular counter)
    .def _PosL = r10 ;/
    .def _CmdH = r9 ;Commanded position (circular counter)
    .def _CmdL = r8 ;/
    .def _CmdF = r7 ;Gear fraction


    The last warning comes from the length (wants it to be a multiple of 2) of the strings and the end of the main file. Inserting or deleting a space will take care of that.

    Jon



  7. #67
    Registered elchip's Avatar
    Join Date
    Aug 2009
    Location
    Republic Serbia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default SMC3 terminal

    Here is my little terminal for these servo ;-)
    You need VB6 runtime files and no need to setup.
    It work on COM1 and 38400 baud.
    Any comment is welcome but remember it's amateur.
    Regards to all
    Robert
    SMC3 terminal.zip
    Presentation on YOUTUBE : [nomedia]www.youtube.com/watch?v=NFAegIl2e_c[/nomedia]

    Sorry comment is on my language - Serbian
    contact : szrelchip@gmail.com

    Last edited by elchip; 11-23-2009 at 02:13 AM.


  8. #68
    Member
    Join Date
    May 2006
    Location
    www.coolcnc.com
    Posts
    47
    Downloads
    2
    Uploads
    0

    Default Please share the source code if possible ..

    Please share the source code if possible ..

    Thanks !

    Emil

    http://www.bg-cnc.com/wordpress/
    http://www.dailycnc.eu/


  9. #69
    Registered
    Join Date
    Apr 2004
    Location
    Canada
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by elchip View Post
    Here is my little terminal for these servo ;-)
    Thanks this works great for me.

    I am driving a very small motor for a camera mount I first tried a TC4424 to drive them but there was no torque, now I have a L6203 driver with LM393 for current limiting and the unit resets every time I try to make a move in step/direction mode. The motor will run in the free mode. I have tried reversing the motor leads but same result. Any hints on this one? I'm a machinist not an electronics guy.

    Greg Nuspel


  10. #70
    Registered elchip's Avatar
    Join Date
    Aug 2009
    Location
    Republic Serbia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Like2Trike View Post
    Thanks this works great for me.

    I am driving a very small motor for a camera mount I first tried a TC4424 to drive them but there was no torque, now I have a L6203 driver with LM393 for current limiting and the unit resets every time I try to make a move in step/direction mode. The motor will run in the free mode. I have tried reversing the motor leads but same result. Any hints on this one? I'm a machinist not an electronics guy.
    You need to post your schematic - we dont have magic eye .. ;-)



  11. #71
    Registered
    Join Date
    Apr 2004
    Location
    Canada
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by elchip View Post
    You need to post your schematic - we dont have magic eye .. ;-)
    Sorry I figured it out, I was driving the serial at ttl levels so I just had to jumper out the 74HC14.

    Greg Nuspel


  12. #72
    Member moghul's Avatar
    Join Date
    Apr 2006
    Location
    PAKISTAN
    Posts
    85
    Downloads
    4
    Uploads
    0

    Default

    hello all
    i have also made elm dc servo drive but some special problem is harae. some time after power failer eeprm data erased and drive o. please any one tell me how can i put p0 to p6 permanently in code?
    thanks
    moghul40@yahoo.com



  13. #73
    Registered elchip's Avatar
    Join Date
    Aug 2009
    Location
    Republic Serbia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Wink

    Quote Originally Posted by moghul View Post
    hello all
    i have also made elm dc servo drive but some special problem is harae. some time after power failer eeprm data erased and drive o. please any one tell me how can i put p0 to p6 permanently in code?
    thanks
    moghul40@yahoo.com
    Redefine P0 to P6 variables to constant and give permanent number to every constant.



  14. #74
    Registered
    Join Date
    Dec 2006
    Location
    serbia
    Posts
    1
    Downloads
    0
    Uploads
    0

    Cool Reseting problems - further...

    Quote Originally Posted by elchip View Post
    Redefine P0 to P6 variables to constant and give permanent number to every constant.
    Definitely not way i'll go.Eeprom corruption points on some serious instabilities which may apear later in exploatation of driver.If BOD level is set to 4.3V and you are still losing eeprom settings,board layout is first to blame.My last board is totally minimalistic (no max chip,pcb 100x75 mm singlesided,uses ir2110 + cheepest buz11) and works with 12V 250w motors with HUGE inrush currents...all eeprom troubles dissapeared after setting bod level.

    p.s. nije ti los programcic za komunikaciju,lakse nego kuckati komande



  15. #75
    Registered elchip's Avatar
    Join Date
    Aug 2009
    Location
    Republic Serbia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Wink

    Quote Originally Posted by cida View Post
    p.s. nije ti los programcic za komunikaciju,lakse nego kuckati komande
    Inace UHU je cista prevara ... i osnov mu je bas ovaj kontroler.
    Ja sam takodje prepravio ovaj izvorni kod za ATTINY2313 koji potpuno menja UHU u UHU ploci...
    A VB6 program je cisto da zaintrigiram ljude ovde...hehe
    Nemislis valjda da nemam i komercijalnu varijantu ?
    A sto se tice SMC3 - takav kakav je sa izlanim stepenom sa IR2184 x 2 radi besprekorno i sa PMDC motorima od 500W.
    Stvar je u ploci a ne u mirokontroleru!

    Masta moze svasta..... :rainfro:
    Here is some protoboard of these controller :
    http://elchip.net/eshop/popup_image.php?pID=29



  16. #76
    Registered
    Join Date
    Jan 2009
    Location
    serbija
    Posts
    32
    Downloads
    2
    Uploads
    0

    Default

    dali neko ima iisprogramiran cip za servo 3
    hvala



  17. #77
    Registered
    Join Date
    Jan 2009
    Location
    serbija
    Posts
    32
    Downloads
    2
    Uploads
    0

    Default

    if someone has a chip programmed for servo 3 and which is checked at
    thanks



  18. #78
    Registered
    Join Date
    Sep 2008
    Location
    India
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Hello guys , I have my controller is running.
    And I have to tune it properly.
    My dc motor is 2.2 amp and 24V with optical encoder 2000 ppr.
    I am using original smc3a code.
    I tried to tune it myself, but no success. When I power up the controller it didn't move the motor in mode0 and mode1. But when I put the motor in mode2 sometime it spins erratically or don't at all. When I put it in mode3 it just jerk off
    and resets. Sometime spins at full speed. Each time motor behaves unexpected.

    What can I do to tune my motors ? Any tuning utility or step by step instruction ? Pls help me in tuning process.

    PLz mention how I can enter commands for each mode.

    Have a nice day



  19. #79
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    Mode 3 is the one you want, it is position mode, if it is running away at startup then it is possible that your encoder is wired in reverse. Try swapping the encoder A and B signals, leave everything else as it is and try again.

    The drive will revert to mode 0 at error, and you will have to send it a mode 3 command to fire it up again, you will probably do this a lot while tuning.

    I set my drives code to default to mode 3 at startup, so when I fire up my machine it is all good to go.

    Try that and see how you go, also there are some more settings that will affect tuning dramatically, p5 (from memory) caused me some grief for a while tuning my drives.

    Cheers.

    Russell.



  20. #80
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    Also check p6 is set to 256, this is the step multiplier, if it is 0 bad things happen, I know all about that...

    256 means a step multiplier of 1, therefore no multiplier as such. Remember to read the smc3a txt file, not the smc3 (original) as the different firmware works differently.

    Russell.



Page 4 of 5 FirstFirst 12345 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Elm-Chan smc servo controller programming and tuning

Elm-Chan smc servo controller programming and tuning