. .
Page 1 of 4 123 ... LastLast
  1. #1
    Good afternoon,

    I need help in trying to run my 3018 CNC purchase on Banggood.

    I installed 5 micro switches (2 X, 2 Y and 1 Z) to act as end stops and used for homing.

    The homing cycle works fine. I home and zero my machine in the lower left corner of the table, however, when I want to carve, using Easel, it gives me a hard limit alarm as soon as I try to turn on the spindle.

    After hours of reading, I changed all my limit switch wiring to shielded wires……..Nothing still same issues.

    After homing,
    • my machine positions are X = -284, Y = -2, Z = -2
    • my work position is X = 0, Y = 0, Z= 0

    If, after homing, I remove the limit switches using $21=0 and try to start a carve, my spindle will start but then, my table moves (Y axis) moves a few mm into the back frame (I have a 2 mm homing pull-off). It should move towards the front?????

    Please help, thank you.

    Jean
    Attached Files Attached Files

  2. #2
    JAZZCNC's Avatar
    Lives in wakefield, United Kingdom. Last Activity: 14 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 7,783. Received thanks 1,338 times, giving thanks to others 87 times.
    Sounds like you have a noise issue if only happens when spindle starts. Does the control software have an option to apply De-bounce filtering to the inputs.?

  3. #3
    Thank you for your reply.

    Yes, there is a de-bounce setting and I have it at $26=250 which is the maximum..... it seems I can go. I tried various settings, as suggested by the pocket GRBL guide, but still nothing.

    Do I need to change all the wiring to shielded cable? I already changed all the micro switch cable to shielded cable?

  4. #4
    Doddy's Avatar
    Lives in Preston, United Kingdom. Last Activity: 2 Hours Ago Has been a member for 7-8 years. Has a total post count of 1,182. Received thanks 163 times, giving thanks to others 54 times. Referred 1 members to the community.
    Complete guesswork here (without seeing your controller board - but you're suggesting some local controller, likely a microcontroller GRBL - complete guess, like I say), IF (guesswork again) the limit switches are couple to the ucontroller discrete inputs then you might be suffering with the intrinsic high-z inputs from the uC device with internal pull-up or pull-downs.

    Are the microswitches wired to 0V/Ground? If so, is the switched input (the non-ground wire) floating at around 5V?, if so then you could try reducing the internal pull-up resistance by wiring a 1k resistor from the microswitch input to a local 5V pin. The point here to provide a low impedance path for noise introduced from the spindle to clamp onto the supply lines - by default the high-impedance input to the microcontroller is highly sensitive to signal voltage (and therefore induced noise)... If that makes sense?

    If there's any joy with this a more practical solution would be to introduce opto-couplers on the input to the controller - they'd provide good noise immunity.

    EDIT:

    Can you provide any details of the controller card?, even a picture?

  5. #5
    JAZZCNC's Avatar
    Lives in wakefield, United Kingdom. Last Activity: 14 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 7,783. Received thanks 1,338 times, giving thanks to others 87 times.
    Quote Originally Posted by JeanB View Post
    Thank you for your reply.

    Yes, there is a de-bounce setting and I have it at $26=250 which is the maximum..... it seems I can go. I tried various settings, as suggested by the pocket GRBL guide, but still nothing.

    Do I need to change all the wiring to shielded cable? I already changed all the micro switch cable to shielded cable?
    Ok well if De-bounce allowed it to work then you are obviously suffering from noise issues so now you need to lower the de-bounce back to Zero, the reason for this is because it slows the switch response time so can be unsafe, and go with a solution like Doddy mentions where you pull the input high or low to stop it floating.

    If after this you still get noise issues then there are other methods, like Opto's and Capacitors, etc but won't get into that now because I'm 99% sure fixing the floating input will work.

  6. #6
    Good Morning Doddy,

    Thank you for your reply. Just to inform you I am not very proficient in electronics, so it may be difficult for me to answer your questions.

    My CNC works with GRBL and I use the free version of Easel at this time in order to practice……..not much practice has been done at this time.  

    My switches are wired as NO and when I check the voltage across the + and - pins, I get ~2 volts and if press the micro switch, I get 0 volts. From all the information I gathered, the bottom row of pins are all to ground???? Before changing my switch wiring to shielded wires, I tried, as suggested on the internet, to add a .47µF capacitor across the micro switch………nothing.

    Please find attached a picture of my board. It says: Developower V2.0

    ThanksClick image for larger version. 

Name:	IMG_0453.jpg 
Views:	141 
Size:	343.5 KB 
ID:	27575

  7. #7
    Good morning JazzCNC,

    I just tried the debouched at 0, as soon as I try to carve and start the spindle, I get an alarm. As I said to Doddy, I already tried the capacitors and that did not work.

  8. #8
    Doddy's Avatar
    Lives in Preston, United Kingdom. Last Activity: 2 Hours Ago Has been a member for 7-8 years. Has a total post count of 1,182. Received thanks 163 times, giving thanks to others 54 times. Referred 1 members to the community.
    JeanB - okay, that's fine. I'm just about to head out for a last night of drunken debauchery before our government clamps down on that - I'll get some detail to you tomorrow morning.

  9. The Following User Says Thank You to Doddy For This Useful Post:


  10. #9
    Doddy's Avatar
    Lives in Preston, United Kingdom. Last Activity: 2 Hours Ago Has been a member for 7-8 years. Has a total post count of 1,182. Received thanks 163 times, giving thanks to others 54 times. Referred 1 members to the community.
    EDIT: I've reread my post and realise that I've thrown a number of names into the equation: The "MEGA" or "AT-MEGA" or "ATMEGA328" is the micro-controller chip that sits on the "Nano" or "Arduino" - which is the small board about the size of two postage stamps. That board is the daughter board that sits on the larger "Developower" controller card. [END OF EDIT]

    Cheers for the photo - that's confirmed pretty much what I've found on Banggood. I've tried to find a schematic of the board - there's a few people working on this but from what I've seen - if to be believed - it's pretty much confirmed my suspicion. I've yet to find a manual for the board but from what I can tell the 6x2 header for the limit switches presents the X/Y/Z axis inputs on two pins (total 6 for 3 axis) - presumably for up to two switches - one on each end of travel, and the other parallel pin header provides the ground "return" signal. The X/Y/Z input pairs are each commoned (shorted-together) for three separate signals that are passed to the micro controller - a generic Arduino Nano board.

    The best I can work out is that the limit switches are wired something like this...

    Click image for larger version. 

Name:	Screenshot 2020-03-15 at 07.44.49.png 
Views:	88 
Size:	23.0 KB 
ID:	27581

    Now from what I can see physically on the board image, and from other people's attempt at schematics, I see no pull-up resistors on the board. The Arduino (the ATMEGA 328 microcontroller chip) can be configured to provide a weak-pullup that is required to set a logic "1" on the input - and then the limit switches, if active, pull that to ground (a logic "0"). That's the principle of operation. And, in a low-noise environment that works.

    As soon as you get any induced electrical noise on the limit input, if the input resistance is very high (as it is with the internal pull-up resistors on the ATMEGA) then the signal will be superimposed on the silly-low current signal on the input with the result that a voltage of only a few volts will swamp the behaviour of the internal pull-up and present a false reading to the ATMEGA. Signals above and below the supply voltage of the MEGA would be clamped through internal protection diodes to the supply lines - so these are unlikely to damage the device, but you are still able to get spurious readings.

    You've said that there are recommendations to add a 0.47uF capacitor from ground to the input pin. This is a bit daft - the idea with this solution is to attenuate a fast-changing signal - lets say a voltage spike lasting no more than a few hundreds of microseconds. But a capacitor used in this way is acting on rate-of-change of input voltage, not a static input voltage, and the effect quickly dimities over time as the capacitor charges (or in this case, discharges). Then the silly-high-resistance of the internal pull-up resistance will make the RC time constant stupidly long and the behaviour of the input presents a poorly defined and slow acting switch.

    Best to get rid of the capacitors.

    So, my recommendation - and this is a bit of an experiment but it makes sense to me at least - is to reduce the pull-up resistance, which has the impact of, in the case of induced noise, providing a much lower resistance to the power-supply, which is a convenient low-resistance path to ground (at least for the AC-analysis). This means in practical terms you can dissipate a lot of the induced noise into the PSU and not into the input pin of the MEGA.

    But, we cannot change the internal pull-up resistor - that's internal to the MEGA, but we can add a resistor in parallel - and the effect is the same. So, what I suggest is adding three resistors, one to each of the axis inputs, pulled up to the MEGA's 5V supply line. Something like this...

    Click image for larger version. 

Name:	Screenshot 2020-03-15 at 08.02.10.png 
Views:	81 
Size:	28.3 KB 
ID:	27582

    The only problem is sourcing a 5V supply from the controller board - this is not present on the axis-limit switch inputs to the board, but is available elsewhere. Looking at another image of a (different) board...

    Click image for larger version. 

Name:	Screenshot 2020-03-15 at 08.06.16.png 
Views:	74 
Size:	210.4 KB 
ID:	27583

    There's a clear silkscreen label of "5V" on a header pin next to the axis-limit switch inputs. Use that to export a 5V line to the choc-block that you have all your limit switches wired to.

    From there, buy 3 resistors - I've said 1k but the actual value isn't particularly important. The lower the value (e.g. 470 Ohm, or 220 Ohm.... common values) would give better noise immunity, but at the expense of higher current draw. At 1k, the current through each resistor will be 5mA and power dissipated would be 25mW (this means you can order 1/8W, 1/4W, 1/2W etc, resistors without fear - to be honest, that 25mW is not going to overload any resistor that you'll be able to buy). A 220 Ohm would be drawing 25mA per resistor and I'd be worrying about the thermal impact this has on the local 5V regulators on the Arduino board). So, for now, I'd stick with 1k values.

    Wire a resistor from the 5V line that you've just added, into the X axis input. Repeat for Y and Z. So, you'll have three resistors.

    Test.

    If you still have problems, try the software debounce as before. If you still have problems then try wiring two resistors in parallel for each of the 3 axis (so, a total of 6 resistors). This would have the result of lowering the 1k value to 500 Ohms, and improving the clamping on the induced noise, but hold a finger over the regulators (the big black rectangular things on the controller board) to make sure these don't get too hot.

    If you still have problems, then I'm an idiot and I've wasted your time, and about $1 of resistors.

    Let us know how you get on.

    Mike
    Last edited by Doddy; 15-03-2020 at 09:46 AM.

  11. Quote Originally Posted by JeanB View Post
    My switches are wired as NO and when I check the voltage across the + and - pins, I get ~2 volts and if press the micro switch, I get 0 volts.
    Thanks
    2v strongly suggests a lack of pull-up resistors which leaves the inputs floating as Doddy has suggested. The inputs are hovering in an indeterminate state and susceptible to every light switch and cosmic particle in the vicinity. No input to any electronics should be left like this and many devices include the pull-up resistors internally, typically 10 Kohms. Some microcontrollers allow inputs to be selected as floating or pulled-up from software.
    Engineering is the art of doing for ten shillings what any fool can do for a pound.
    Wellington.

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 3018 Pro has no connectivity on A5 pins.
    By deepcut66 in forum Chinese Machines
    Replies: 0
    Last Post: 29-02-2020, 10:48 AM
  2. 3018 3 Axis Mini DIY CNC Router ONLY Ł125 with free shipping !!!
    By Lee Roberts in forum Marketplace Discussion
    Replies: 6
    Last Post: 09-01-2020, 09:00 PM
  3. 3018 problem
    By bazbalz in forum Machine Discussion
    Replies: 8
    Last Post: 17-12-2019, 12:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •