Welcome to Our Community

Some features disabled for guests. Register Today.

Smoothieboard with DQ542MA

Discussion in 'Controller Boards' started by yarnairb, Mar 4, 2017.

  1. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    Hi Everyone,
    I'm a newbie who just ordered a bunch of parts to get my feet wet and gain some experience with the build-your-own world. I got the smoothie board and a couple of the linear motion kits to play around with. I got the smoothie with the onboard driver to work with my NEMA 17 but I'm having issues with the external driver and the NEMA 23. I soldered on the pin header and wired everything for the common anode, open-drain configuration with the 5v coming off of one of the limit switch pins. I have metered everything for continuity and voltage but get an alarm LED on the driver as soon as I power everything up. I also set the config file to the open-drain mode with appended 'o'. When I power up just the 24v and leave smoothie off I get a green light on the driver and the stepper locks up tight. So far so good. But once I power up smoothie I lose the green light and the alarm comes on. I've reviewed this a dozen times and lost a bunch of hair so would really appreciate if anyone has any tips or clues. Thanks!
     
  2. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    BTW I should add that I set grbl mode so I could use bCNC and I'm running the cnc firmware.
     
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    42
    Likes Received:
    53
    Hi @yarnairb

    1) In open collector mode, you also need to invert the pin by adding "!"
    2) As a quick test, the DQ542MA does work OK with 3.3v signals (ie not open collector mode) if the wiring is nice and short. (I wouldnt recommend it as the final installation, but this would afford you an opportunity to test your setup it a little better, without the complication of open collector. Can always go there later - lets just get it working first)
    3) The alarm coming on as soon as you apply power, to me, usually indicates a wiring issue.
    3.1 Using (2) above, wire GND (from Smoothieboard) to DIR- and PUL- on the driver
    3.2 Wire P2.0 (STP1) to PUL+ on the driver
    3.3 Wire P0.5 (DIR1) to DIR+ on the driver
    3.4 Leave Enable floating. On the DQ542MA Enable is inverted (ie 0v = enabled, 5v = disabled) - skip the EN wiring for now as a first test as with nothing connected, the motor should be enabled
    3.5 Check your Smoothieware config to make sure P2.0 and P0.5 is alpha_step_pin, and alpha_dir_pin respectively
    3.6 Test again and post here how it went


    It would be helpful if you post pictures of your wiring for me to check, as well as a dump of your smoothie config file :) - makes troubleshooting just a little easier than working in the dark




     
    yarnairb, Paul Stoller and Mark Carew like this.
  4. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    Peter,
    Thanks for the help! I wired it up as you described (I hope) and changed my settings to the following:
    I have the alpha channel configured for the NEMA17 which is currently disconnected.

    beta_step_pin 2.1 # Pin for beta stepper step signal
    beta_dir_pin 0.11 # Pin for beta stepper direction
    beta_en_pin 0.10! # Pin for beta enable
    beta_current 1.5 # Y stepper motor current
    beta_max_rate 3000.0 # mm/min
    beta_steps_per_mm 800
    grbl_mode true

    I was able to get the board to power up without a fault on the driver but got no motion. I then connected enable from the board to ENB - and can now get slight movements of the axis. For example G91G0Y1 moves the stepper slightly. But if I try a larger move like G91G0Y10 I get another slight move but nothing close to 10 times the first one. It also makes a different high pitched sound. I'm sure I probably jumped the gun and did something wrong with my ENB wiring but here are the pics. The white wire in the block is the jumper from DIR - to PUL -

    I also posted the DIP switch settings which according to the guide printed on the driver are set to 2.37A and 800 on the pulse/rev. I'm suspicious of that 800 value though. Please excuse my crazy colored wiring. I used what I had.

    20170306_112519.jpg 20170306_112535.jpg 20170306_112552.jpg
     
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    42
    Likes Received:
    53
    Dip Switch: Half Current

    SW4 is still in the off position. in that position it is "half current" - that switch provides you with a little more fine control (for example, if you need 1.5A, there is no preset directly. But you can set it to 3A, + half current = 1.5A )
    So in your example, you are now set to 2.37A / 2 = 1.185A. Which may not be enough for a big nema23

    The step DIP switches can be confusing, I agree. Remember that they ASSUME 200steps/rotation steppers (but you do get different steppers. OpenBuilds stock are all 200 though so if you bought from OpenBuilds you can safely work off the table printed on the driver)

    1/4 microstep mean 4 pulses per step * 200 steps = 800 steps to make one rotation

    Default smoothie configs are for 1/16th drivers, so maybe easier to bring that closer in line. Set SW5=ON, SW6=ON, SW7=OFF, SW8=ON (3200 steps per rotation - aka 1/16th microstepping). In 1/4 your acceleration may be too high (4x too high?) and thus not get the motor spinning. Telltake sign is a high pitched noise from the motor

    On your current wiring, the ENBL+ isnt hooked up to anything. Those drivers have optocouplers, and none of the terminals are shared. So you have to make sure that you hook up + and - signal on both (take your gnd jumper over to ENBL-, move the red wire to ENBL+, and remove the invert "1" from the enable pin in the smoothie config.

    Holding thumbs, I think we are getting close :)
     
    #5 Peter Van Der Walt, Mar 6, 2017
    Last edited: Mar 6, 2017
    yarnairb likes this.
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    42
    Likes Received:
    53
    As a sidenote: Awesome pictures! Makes checking out what it could be a pleasure! Thanks!
     
  7. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    Glad you like the pics ;^)

    OK I flipped the switches, rewired and changed the config per your note. Now I'm back to getting an alarm when I power up the smoothie....argggh.

    beta_step_pin 2.1 # Pin for beta stepper step signal
    beta_dir_pin 0.11 # Pin for beta stepper direction
    beta_en_pin 0.10 # Pin for beta enable
    beta_current 1.5 # Y stepper motor current
    beta_max_rate 3000.0 # mm/min

    BTW on this page cnc-mill-guide [Smoothieware]
    It says "Smoothieboard V1.1 always divides steps into 32 microsteps. (16 for older smoothieboards)."
    Mine is a 1.1 so does that mean I should set the driver to pulse/rev 6400?
    Also, is the beta_current in the config used since I'm connecting an external driver? I just left that at the default but I did set it to 1.68 for my NEMA 17. Which by the way worked perfectly.

    Thanks!

    20170306_112519.jpg 20170306_140148.jpg
     
  8. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    One more thing. I measured the voltage across the +- pins on the driver while idle (and with the driver powered off) and got around 2.8v on the ENBL pins and zero for the other two.
     
  9. openhardwarecoza

    Staff Member Moderator Resident Builder Builder

    Joined:
    Aug 9, 2014
    Messages:
    132
    Likes Received:
    101
    IWe'll we'd have to fix the alarm condition first... But yeah, if its needs to be 1/32 then it would help (at least with default configs it just rules out one variable)

    The current setting in smoothie config is not applied when using external drivers (external driver has dip switches. Onboard drivers can have their VREF set from the onboard softpots)

    The DQ542MA manual says Alarm is only dealing with input power. Measure voltage in, and maybe post pics of the power setup?

    Motor is from where? OpenBuilds?
     
  10. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    Peter,

    First, your patience and helpfulness is making my day.

    I decided to be brave, trust the docs at smoothieware.org and set the driver to pulse/rev 6400. Since it was faulting with ENB - connected I removed the jumper, crossed my fingers (and held my thumbs ;^) then powered up. Woo hoo! I got nice clean travel with long moves of 500mm and no odd noises.
    I'm assuming that while this works with my short cable I will still want to get the 5v open-drain stuff to work so any other advice you have to offer would be VERY much appreciated.

    Thanks
     
  11. openhardwarecoza

    Staff Member Moderator Resident Builder Builder

    Joined:
    Aug 9, 2014
    Messages:
    132
    Likes Received:
    101
    Testing with my DQ542 here on the bench, I can reliably trigger Alarm LED by powering it from 12-16v. As soon as I adjust my PSU to 18v before powering on, no alarm. You mention 24v in your first post, but are you sure its a 24v PSU? Sufficient current?
     
  12. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    @openhardwarecoza

    Thanks for chiming in! Everything is from OpenBuilds. I got myself a sampler to familiarize myself with the offering and get my feet wet with the DIY CNC scene.
     
  13. openhardwarecoza

    Staff Member Moderator Resident Builder Builder

    Joined:
    Aug 9, 2014
    Messages:
    132
    Likes Received:
    101
  14. openhardwarecoza

    Staff Member Moderator Resident Builder Builder

    Joined:
    Aug 9, 2014
    Messages:
    132
    Likes Received:
    101
    Glad you are running. Now you can test the open collector later again. For initial test, unplug enable.
     
  15. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    24v on the money at the driver. Could the alarm be for the fact that we're trying to troubleshoot with the 3.3v from the smoothieboard which is actually only 2.88v measured at the driver?

    So just to double check.
    No wires on enable
    beta_step_pin 2.1o # Pin for beta stepper step signal
    beta_dir_pin 0.11o # Pin for beta stepper direction
    beta_en_pin 0.10o # Pin for beta enable
    beta_current 1.5 # Y stepper motor current
    beta_max_rate 3000.0 # mm/min

    Do I also need to invert them? And back to the reversed wiring described here general-appendixes [Smoothieware]

    Please forgive my ignorance and my hesitation. I don't want to burn anything up ;^)
     
  16. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    Progress is being made. I ran the 5v from the end stop pin to PUL+ then jumped that to DIR+. Smoothieboard STP and DIR go to the PUL- & DIR- respectively. Nothing wired to ENBL.
    beta_step_pin 2.1o # Pin for beta stepper step signal
    beta_dir_pin 0.11o # Pin for beta stepper direction
    beta_en_pin 0.10o # Pin for beta enable
    beta_current 1.5 # Y stepper motor current
    beta_max_rate 3000.0 # mm/min

    No alarms and good movement as before. At idle get ~4v across PUL and .25v across DIR. During a move I get ~4v across DIR and ~3.65 across PUL.

    Now here's my ignorant newbie question: What does ENB do since this all seems to work without it?

    The light green wire coming from the 5v pin is the same wire on PUL+ in these pictures even though it looks different 20170306_140148.jpg 20170306_154512.jpg
     
  17. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    42
    Likes Received:
    53
    Think of ENBL as a "disable" - when you apply 5v between the two pins, it "disables" the driver.

    It defaults to enabled to allow for easier wiring. But its nice to go into CNCweb and hit the 'motors off button' when you need to move a carriage out of the way by hand like when you are loading material. Therefore, worth wiring up. Sending M84 / clicking Motors off in hosts that support it, will definately help
     
  18. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    So I jump my +5v to the ENBL + and EN2 on the smoothie to ENB- ? Is this then the pin that I invert as well?

    beta_en_pin 0.10o! # Pin for beta enable
     
  19. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    I tried what I described with the ! and it alarms as soon as I power up smoothie. I took it out and it comes up green but as soon as I issue a move it alarms again. When I send an M18 (motorsOff) the alarm clears but I still can't make any moves without alarming again. Also, the motor is still engaged and I can't freehand the stepper.
     
  20. yarnairb

    yarnairb New
    Builder

    Joined:
    Feb 14, 2017
    Messages:
    12
    Likes Received:
    0
    I hope I'm not just rambling, but wanted to share what I'm finding out. This was pure SWAGing on my part but what I did was connect GND to ENB- and and EN2 to ENB+ with no modifiers in the config i.e no 5v just the 3.3v from smoothie.

    beta_en_pin 0.10

    Now what happens is my moves work just fine with no alarms. When I issue an M18 the motor stops, turns freely by hand and the alarm light comes on. When I issue another move the alarm goes off, the green light comes back on and the axis moves as expected.

    So the question is: do I need to worry about the alarm light being on? Is there something bad going on despite things seemingly working as expected?
     
  21. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    42
    Likes Received:
    53
    If I read correctly, "alarm" comes on when you have the driver disabled in other words? In that case it is correct, a disabled driver is an "alarm" condition, as it wont move if disabled. Which is fine, as when you issue a move, Smoothie will enable the driver, and away you go
     
    yarnairb likes this.

Share This Page

  • About Us

    The OpenBuilds Team is dedicated helping you to Dream it - Build it - Share it! Collaborate on our forums and be sure to visit the Part Store for all your Building needs!
  • Like us on Facebook

  • Support Open Source FairShare Program!

    OpenBuilds FairShare Give Back Program provides resources to Open Source projects, developers and schools around the world. Invest in your future by helping others develop theirs!

    Donate to FairShare!