Connect with us

CNC Plotter with DVD stepper motors

Discussion in 'Sensors and Actuators' started by abuhafss, Sep 8, 2017.

  1. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Hi

    I am building a small CNC plotter using 2 DVD stepper motors for X and Y axis.

    For driving the unit, I am using:

    Main processor: Arduino Nano
    H-Bridge driver: L293D
    Software: BENBOX

    For initial testing I wired Arduino Nano and L293Ds on breadboard as below:
    cN5ZN5Z.png
    For external power I am using a 5V-2A cell phone charger with customized cable.

    Now, the problem is that the motors are not responding to the calibration step provided in BENBOX.
    Please let me know if the wiring is correct. Any idea where am I wrong. BTW, this is my first CNC project and I took help from this video for BENBOX and the firmware

     
    Last edited: Sep 8, 2017
    Ian likes this.
  2. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    In what way? Not moving? Missing steps? Too many steps?

    I don't see any decoupling capacitors on the devices or supply lines either.
     
  3. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Thanks for your response.

    Yes, the motors are not moving.
    I should have mentioned that for driving the motors I followed this video which does not have any decoupling caps:

     
  4. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    Did you check the motor pin out? Does it match the L293 outputs?

    Assuming the motors are correctly wired you need to measure the step signal outputs ot ensure they are both 'therre' and in the correct sequence. Use a ttest meter to measure the step signals for individual step movements.
     
  5. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    I checked with continuity tester, for two pins of one coil. Thus I separated the paired pins and connect them as shown in the 1st post. Even if the paired pins are connected other way around, the motors should response.

    Here I need your further assistance please, how do I measure the step signals. Do you mean, I should check the voltage at pins D2, D3, D4, D5 of Arduino (and then at D8, D9, D10, D11)?

    One click (left or right or up or down) in BENBOX software will transmit signal at D2-D5 (or D8-D11) ----- am I correct?
    Do I need to check the voltages on 4 pins simultaneously?

    Kindly bear with me, I have absolutely no experience of this stuff.
     
  6. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    If you change the 'polarity' of the wiring to only one of the stepper coils you might get the motor to work. Changing the wiring to both coils just reverses the original problem.

    A stepper motor requires a specific bit pattern sequence to be sent to the coils in order for it to rotate -

    full.jpg

    Use a volt meter to measure the voltages at each of the four outputs at the Arduino (D8 to D11 for one motor) to check if the sequence follows properly.

    i.e. write down the voltages at D8 to D11. Apply ONE pulse and measure D8 to D11 again. The bit pattern should change according to the appropriate sequence.

    Sure the steppers don't need a 12V supply?
     
  7. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    I changed the polarity of one coil but no change. These tiny steppers work on 5-12V, I had read about them somewhere.

    What I understand is that I need 4 multimeters to measure the voltages simultaneously at all the 4 pins for one motor. And I don't understand how to measure the voltages when applying one pulse bcz as soon as I release my mouse button after one click the voltage reading at the voltmeter would change.

    However, practically I managed to note down following patterns:

    Pattern.png
    Example: Pin D2,
    In idle state shows 0v.
    When LEFT button is pressed once or continuously shows 1.8v
    When RIGHT button is pressed once or continuously shows 1.8v
    When UP button is pressed once or continuously shows 0v
    When DOWN button is pressed once or continuously shows 0v

    I cannot understand why no voltages at D8-D11 and D4. (I changed the Nano but same results).

    I selected BENBOX bcz it looked easier to understand and play with but, now I am thinking to go for something else. What do you say?
     
    Last edited: Sep 9, 2017
  8. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    The output voltages are far too low. Fit 10k pull-up resistors between ALL the Data pin outputs and the +5V rail (8 resistors needed).
     
  9. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    That +5V rail should be of Arduino (USB) or the external supply; OR it doesn't matter?
    BTW, does the patterns show any sequence?
     
  10. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    Use the external 5V rail for the pull-ups (as it's the L293's that require the input levels).

    There is a 'sort of' sequence appearing but without the pull-up resistors these aren't properly defined - hence the problem both measuring them and getting the motors to work.
     
  11. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    But what about pin D4 and pins D8-D11 ?
     
  12. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Nothing much improved.

    Here are the revised patterns:
    Patterns.png
     
  13. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    I took a chance to test my connections with sample sketch provided in Arduino Examples library. To my delight, both the motors operated perfectly! And that confirmed that there is some issue with "firmware laser.hex" provided with BENBOX.

    Can you recommend me some easy to use Arduino based CNC software?
     
  14. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    Are you microstepping or are the motors driven as 'full step'? Can you switch between the two?

    D10 and D11 seem much more like what I'd expect. In 'full step' mode these voltages should be around +5V and 0V (which is what you have for D8-D11).

    One motor controls up/down, the other motor the left/right motion. Your list should only show D2-D5 and D8-D11.
    There is no 'idle' condition.

    If you apply ONE PULSE to either the up/down motor OR the left/right motor then the conditions at D2-D5 or the conditions at D8-D11 will change. They will be either 0V or 5V (give or take a tenth or two) so the 0.13 (or 0.1) should be noted as '0' and the 4.83 noted as '1'.

    On the chart I showed the labels A, B, C and D correspond to your D2, D3, D4 and D5 (or D8, D9, D10 and D11) and the steps 1-4 are the logic levels for one-thru-four applied pulses (steps).

    If, for example, the motor is 'still' and you measure 1, 0, 0, 1 at D2-D5 then apply ONE pulse, the sequence should change to 1, 1, 0, 0. The next pulse should change it to 0, 1, 1, 0 and the next pulse should change it to 0, 0, 1, 1.

    It doesn't matter what the sequence is to start with, as long as the sequence CHANGES at each step application in the order shown then the motor will move.

    The above only applies if the motor is in FULL STEP mode. If you are using MICRO STEPPING (half step, quarter step, eigth step etc then the sequence will be different and the voltages may also be different. It is important that you know the motor is being driven in FULL STEP mode in order for the 0V and 5V sequence to be measured and understood.
     
    abuhafss likes this.
  15. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    Darn it! I wrote all the above for nothing!
     
  16. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Why would you say that! It is not necessary that your comments may help someone in his project but definitely, it would increase his knowledge which will help him in future. So, cheer up and thanks for your input.

    BTW, can you please recommend me some easy to use Arduino based CNC software?
     
    kellys_eye likes this.
  17. Minder

    Minder

    2,871
    594
    Apr 24, 2015
    If you have managed to put together step/dir drives for the steppers, then you just need the free S/W such as Mach3 etc
    M.
     
  18. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Is it normal that (both) L293D get hot in just 1 minute of operation?
     
  19. kellys_eye

    kellys_eye

    4,281
    1,144
    Jun 25, 2010
    Define 'hot' - but yes, those devices do warm up and quite considerably if the coil currents/voltages are high. Most modern stepper controllers will 'disable' the drive (the motors don't move if the drive voltage is removed but you do need to consider any potential holding torque requirements) which lowers the driver dissipation.

    The better step drivers have MOSFETS with low Rds(on) values as the switching devices. The L293 is a bit 'long in the tooth' these days (although perfectly functional for smaller applications like yours).
     
  20. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    The datasheet revealed that the devices need heatsink as shown below:

    Screenshot 2017-09-13 19.00.19.png
    But since I have already assembled my PCB leaving no space for such heatsinking, can a regular aluminum heatsink, along with thermal compound be used on the body of the IC?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-