Results 1 to 8 of 8

Thread: EMC2 and PWM MESA 5i20

  1. #1
    Registered
    Join Date
    Oct 2009
    Location
    Indonesia
    Posts
    14
    Downloads
    0
    Uploads
    0

    EMC2 and PWM MESA 5i20

    I tried to drive dc motor with H-bridge,,, I used mesa's pwm as signal to dc motor,, but the motor didn't move,,

    when I check the signal voltage of PWM with oscilloscope,, It's pick value is around 3.6 Volt,,I suspect that the signal is too low to drive the motor,,
    I wonder,,,what must I do to get the signal with 5 volt pick value?? Do I need additional circuit to do that??


  2. #2
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    134
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ferdi_mcrohl View Post
    I tried to drive dc motor with H-bridge,,, I used mesa's pwm as signal to dc motor,, but the motor didn't move,,

    when I check the signal voltage of PWM with oscilloscope,, It's pick value is around 3.6 Volt,,I suspect that the signal is too low to drive the motor,,
    I wonder,,,what must I do to get the signal with 5 volt pick value?? Do I need additional circuit to do that??
    The 5I20 default high level output value is 3.3V, Normally this should be OK for driving TTL level inputs, but is is possible to get more output swing by setting the outputs into open-drain mode. the output will swing up to 5V in open drain mode but only have a 3.3K pullup. If a 3.3K pullup is too weak (too slow risetime would be a symptom) you may need to add an external pullup resistor to the pin (around 270 ohm minimum)

    open drain mode is a HostMot2 HAL setup option (man hostmot2)


  3. #3
    Registered
    Join Date
    Oct 2009
    Location
    Indonesia
    Posts
    14
    Downloads
    0
    Uploads
    0
    how to set it to opendrain mode? with hal or jumper W4?
    I read the manual, it said we can use .is_opendrain in PWM,, but when I check the PWM parameter in terminal, I didn't see .is_opendrain parameter.


  4. #4
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    134
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ferdi_mcrohl View Post
    how to set it to opendrain mode? with hal or jumper W4?
    I read the manual, it said we can use .is_opendrain in PWM,, but when I check the PWM parameter in terminal, I didn't see .is_opendrain parameter.
    Its not a PWM option, its a I/O pin option (it is selectable individually on all I/O pins) So the first step is to determine which I/O pins you need to change, you can determine this by reading the .PIN file or dmesg, these will show you which I/O pins the PWM outputs are connected to. Once you know which I/O pins to change you set the is_opendrain parameter for each selected pin.


  • #5
    Registered
    Join Date
    Oct 2009
    Location
    Indonesia
    Posts
    14
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by PCW_MESA View Post
    Its not a PWM option, its a I/O pin option (it is selectable individually on all I/O pins) So the first step is to determine which I/O pins you need to change, you can determine this by reading the .PIN file or dmesg, these will show you which I/O pins the PWM outputs are connected to. Once you know which I/O pins to change you set the is_opendrain parameter for each selected pin.
    thanks...

    I have another question,,,
    when I run EMC2 with Mesa 5i20, sometimes there is an error. It says
    "hm2-servo.hal:46arameter or pin 'hm2_5i20.0.pwmgen.pwm_frequency' not found 8091". but sometimes, it doesn't occur. why is this error happen??


  • #6
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    134
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ferdi_mcrohl View Post
    thanks...

    I have another question,,,
    when I run EMC2 with Mesa 5i20, sometimes there is an error. It says
    "hm2-servo.hal:46arameter or pin 'hm2_5i20.0.pwmgen.pwm_frequency' not found 8091". but sometimes, it doesn't occur. why is this error happen??
    It probably means that the firmware did not load for some reason, You can get more details by using dmesg to find the exact driver complaint.

    Reasons for occasional firmware misloads that we've seen:

    1. Dirty edge connector --> Clean MB edge connector and 5I20 edge connector with with 99% isopropal alcohol

    2. Bad or damaged 5I20 --> call us for a replacement, its probably under warranty.

    3. External overload on multiple I/O pins --> remove overload

    4. Flaky motherboard --> (replace)

    5. Flaky software (most likely if you are compiling EMC yourself and some bug has been introduced) --> use standard distribution


  • #7
    Registered
    Join Date
    Oct 2009
    Location
    Indonesia
    Posts
    14
    Downloads
    0
    Uploads
    0
    if we configure the EMC2 for position control with hal

    net motor.00.pos-fb hm2_5i20.0.encoder.00.posistion => pid.0.feedback
    net motor.00.pos-fb => axis.0.motor-pos-fb
    net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
    net motor.00.command pid.0.output => hm2_5i20.0.pwmgen.00.value

    how does EMC2 differ two Gcodes with different feed rate?
    for example :
    G01 X5.0 F5
    and
    G01 X5.0 F2


  • #8
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    134
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ferdi_mcrohl View Post
    if we configure the EMC2 for position control with hal

    net motor.00.pos-fb hm2_5i20.0.encoder.00.posistion => pid.0.feedback
    net motor.00.pos-fb => axis.0.motor-pos-fb
    net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
    net motor.00.command pid.0.output => hm2_5i20.0.pwmgen.00.value

    how does EMC2 differ two Gcodes with different feed rate?
    for example :
    G01 X5.0 F5
    and
    G01 X5.0 F2
    This is actually a general EMC question so you might want to change the title to get a better answer but if I understand your question, the answer has little to do with your HAL file fragment, that portion of the HAL file just sets up a normal PID loop so that the actual position follows the commanded position

    The commanded position: emcmot.00.pos-cmd axis.0.motor-pos-cmd is what controls the actual axis movement. It comes from EMCs trajectory
    generator, and so is controlled by your feed rates


  • Similar Threads

    1. EMC2+mesa 5i20+automatic tool changer
      By visky in forum LinuxCNC (formerly EMC2)
      Replies: 6
      Last Post: 06-12-2010, 04:01 PM
    2. Mesa 5i20 PCI card
      By karl1 in forum General Electronics Discussion
      Replies: 0
      Last Post: 03-06-2010, 12:17 PM
    3. Mesa 5i20 + Boot Up Sequence
      By TZak in forum LinuxCNC (formerly EMC2)
      Replies: 2
      Last Post: 12-11-2008, 12:55 AM
    4. Spindle Encoder to Mesa 5i20
      By RogerN in forum LinuxCNC (formerly EMC2)
      Replies: 3
      Last Post: 10-17-2008, 08:55 AM
    5. Mesa 5i20 and EMC
      By daedalus in forum LinuxCNC (formerly EMC2)
      Replies: 6
      Last Post: 06-27-2007, 03:19 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.