584,841 active members*
4,543 visitors online*
Register for free
Login
IndustryArena Forum > Other Machines > PCB milling > CNC 3020T-DJ Spindle Control, JP-382A JP-1482
Page 1 of 2 12
Results 1 to 20 of 47

Hybrid View

  1. #1
    Join Date
    Sep 2014
    Posts
    123

    CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Ok, i got tired of having to flip the Spindle switch all the time and decided it was time to get Mach3 doing its job!

    I have a newer version of the Chinese CNC 3020T-DJ with a black controller box and the controller board is model JP-382A and the spindle board is JP-1482.

    The controller has a PWM output and the spindle board has a PWM input but they are not connected. Here is some pictures i included on another post..

    Attachment 250510 Click image for larger version. 

Name:	2014-09-16 13.28.42.jpg 
Views:	116 
Size:	80.4 KB 
ID:	250512

    After i got done adding home switches to the controller i also started to trace out the boards to figure out the Spindle control.

    You need two JST-XH connectors to make the interconnect cable, also if you want to add limit/home switches its the same 4 pin JST-XH connector, look on eBay for LiPo balancing cables and connectors as they are used in the LiPo battery packs.

    Note... I don't yet have the PWM speed control working, still finishing up how to set that up, but i DO have Spindle On/Off control now from Mach3! The PWM control just wasn't as big of a concern for me as i generally run it full speed all the time for PCB milling.

    Ok, on the controller board the jack marked PWM i numbered them from the back panel forward, pins 1-4.

    1. LPT Port Pin #17 to Spindle Controller PWM Input
    2. +5v from Spindle Controller to the EL817 labeled DDO, This is Spindle On/Off
    3. Ground from Spindle Controller
    4. Spindle On/Off

    On the Spindle Controller board i labeled the pin numbers Left to Right looking at it from the front panel, pins 1-4.

    1. PWM
    2. +5v
    3. Ground
    4. Spindle On/Off

    The front panel Spindle switch only switches a ground on the Spindle Controller and its in parallel with an Optocoupler, part number EL817, on the Spindle Controller board. So you can leave the front panel switch for manual control and leave it in the OFF position to allow Mach3 to turn it on and off.

    You need to make a cable so that its matching 1-1, 2-2, 3-3, 4-4, using the pinouts as i described them. The plug orientation is flipped, so pin 1 on plug on one end of the cable would be the opposite side of the plug on the other end. You will understand what i mean when you look at the jacks, the controller board has its jack going front to back with the keyway to the left and pin 1 towards the back, but the spindle board has its jack going left to right and keyway to the back and pin one on the left. So the cable is a flipped crossover config.

    Set Mach3 for Active Low on Pin #1 to turn the Spindle On/Off.
    Set Mach3 to control the Spindle PWM using pin #17

    Now, as i said i haven't hooked up and configured the PWM control to pin 17 yet, so all i wired up was three pins between the boards, i didn't install the wire from pin #1 on the controller to pin #1 on the spindle controller, thats the PWM control. You need pins 2-4 for On/Off control as the Spindle controller board feeds +5v back to the controller board via pin #2 to run the Optocoupler labeled DDO, the output of which toggles another EL817 optocoupler on the Spindle board that then enables the spindle motor, the front panel switch is wired in parallel across the Optocoupler on the Spindle controller board which gives manual control and can be left in place.

    Here is some schematics i drew up quickly... Notice that pins i didn't continue to trace out for PWM on the Spindle board or the ENO Opto on the Controller board are marked unknown. Also in the case of the EL817 marked ENO on the Controller board note that Pin 1 of the component was clipped and bent back at the factory, ENO looks to have something to do with the A-Axis as its connected to one of the pins of the four pin header marked A-Axis, i didn't continue tracing that out as it wasn't necessary. Also pin 2 of ENO dead ends at a set of open pads on the back side of the board, i would guess there should be a 330 Ohm resistor there as they kept the same basic design across the boards, using a 4.7k pullup resistor to 5v on pin 1 and a 330 ohm resistor on pin 2 on the others for what i would assume is current limiting through the optocoupler.

    Attachment 250418 Attachment 250420

    Anyway, with a three pin jumper you can make the Spindle On/Off control work with Mach3, or whatever software you use, but i haven't got the PWM config working just yet. I would assume it requires removing the front panel trimpot from the circuit, either just unplugging it or installing a jumper as in the other versions of these boards but i don't have that info yet.

  2. #2
    Join Date
    Sep 2014
    Posts
    123

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Milled a few PCB's today, the on/off control from Mach3 works great after getting the settings done.

    All you have to do is go to ports/pins, spindle control, uncheck the box labeled Disable Spindle Relays, then put in the output you want to use in BOTH boxes. Now note this is not the pin number but the output number that you assign to the pin. I used 1 in both boxes just to keep everything organized in my notes, click apply, then you go to the output signals tab, find Output #1 or which one you assigned and set it for the port your using, in my case 1, and the pin you want assigned, in the case of this controller you need pin 1.

    Now again apply and ok and then go to the diagnostics screen, click spindle on/off and you should see the Output #1 light up and your spindle should run. Also on the Spindle Control tab in ports and pins you should set the spinup delay under General Parameters. I set all four to 5 seconds, just to give the spindle some time to come up to full speed before the program advances into the material and also a bit of spin down time before it would happen to move after an M5 command in the GCode.

    Works perfectly!!

    Now i can open my GCode hit cycle start and it spins up, makes the cuts, spins down, and i generally add some GCode to move the spindle out of the way after the end of the cut, jogs to the top left corner of the table out of the way to cleanup and remove the piece i just made, etc. Now i am VERY happy with my setup!

    I might have to take the Spindle Control Board back out and finish tracing it out for the PWM control. Other versions of this controller have a switch on the back to set either manual or software control of the spindle speed, but this board doesn't have any additional switch inputs for that, so i am guessing that something has to be done with the trimpot connection. The main reason i am thinking so is that the connector the trimpot plugs onto is just a set of header pins like you would put a PCB jumper on, otherwise i don't see why they didnt put a JST-XH socket there instead, that leads me to believe that you have to put a jumper on it to bypass the manual speed control.

    More to come!

  3. #3
    Join Date
    Jun 2014
    Posts
    16
    Thanks for sharing this information with the rest of the community, I'm sure that it will be greatly appreciated. I've been trying out your method and unfortunately not had much luck. I can't quite find out why yet, but I'm beginning to suspect that I might have a hardware problem. To that end, I was wondering if you would be kind enough to repost the schematics you mentioned in post 1. When I click on the links I get taken to a forum error page (Invalid Attachment specified).

    Many thanks,

    Bob (G8GFA)

  4. #4
    Join Date
    Jun 2014
    Posts
    16
    I've now got this mod working. Originally, when I carried out the alteration, the spindle would be rotating all the time no matter what the position of the spindle on/off switch or how Mach3 was configured. Removing the parallel cable from the controller box caused the spindle to stop, but as soon as it was placed back in position off the spindle went again. To cut a long story short, what I discovered was that logic 1 (spindle off) on pin 1 of my desktop PC parallel port is only 3.4 volts! It seems that this is too low to turn off the led on the DDO opto-isolator with the consequence that the spindle rotates continuously. I confirmed the problem using an old laptop which has a parallel port logic 1 represented by 4.8V. Result - the mod works perfectly! In all other respects the desktop port controls my miller perfectly. A new parallel port card is required I think.
    Last edited by Mellbreak; 09-24-2014 at 07:28 PM.

  5. #5
    Join Date
    Sep 2014
    Posts
    123

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Interesting! I was just about to post that it might be too low of a pullup voltage on the computer side. What you could do is if your running a parallel port card now instead of an onboard parallel port is to trace out the DB25 from pin 1 until you find a pullup resistor to 5v, shouldn't be too hard to find, and measure that resistor and replace it with a lower value to increase the voltage on pin 1. Would be a lot harder to find if it was an onboard port on a motherboard just because of board density, but on a card it shouldn't be too hard to do. I used to do that all the time on parallel port cards back in the days of parallel port printers that would stop working because they weren't getting anywhere near 5v on an enable line from the port. Always made you think the port was bad or the printer was bad until you tried another parallel port and it worked again.

    I just tried clicking on the schematics and they work fine, are they still not working on your end? If not feel free to drop me a PM on here and i can email them to you instead.

    I worked on the PWM speed control tonight, not possible, at least on my board. The PWM input on the spindle board dead ends to some unpopulated pads and there is no connection to the MCU's digital input to control the PWM output. This board unlike the previous version doesn't use a simple 555 timer in the circuit, it has a one shot MCU programmed for the application. It reads the resistance on the analog input from the trimpot and adjusts the PWM output to an optocoupler that then controls the IRF740.

    Oh well not a big deal to me, i just wanted it turn the spindle on and off and i accomplished that at least!

  6. #6
    Join Date
    Jun 2014
    Posts
    16
    Hi,

    Thanks for taking the time to reply. I've obtained a new parallel port card and all is well. Having Mach3 turn the spindle off/on is really useful. At least I find it so.

    Your comments are on using PWM are equally interesting. I too have been having a play and unfortunately been equally unsuccessful. However, I have had another idea. What about replacing the the 5K manual pot with a digital one and a bit of control circuitry? Suppose a 256(ish) step, 5k digital pot is connected to a micro-controller. The PWM signal could be integrated to produce a DC level, which in turn would then be read by an analogue to digital converter on the same micro-controller. The digital value of the DC could then be used to set an appropriate level on the pot.

    An alternative might be to time the length of the positive part of the PWM signal and use that value to control the digital pot. On the plus side this would allow a simpler (and therefore cheaper) micro controller to be used. I wonder if the down side might be that this method is more prone to noise problems. I guess it depends on how clean the PWM signal is.

    The additional hardware involved should not be too complex or costly. Anyway, I think I'm going to have a go at this.

    Any thoughts or comments gratefully received!

    Thanks once again for all your efforts.

  7. #7
    Join Date
    Jan 2015
    Posts
    4

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Thank you both kbOnly and Mellbreak for sharing your progress. I also wanted to use more of the Mach3 controls for my 3040Z-DQ machine.
    Mellbreak, would you mind sharing your source for the connector and plugs? I'll see if I can cross reference to Mouser or DigKey here in the US.

    Louie

  8. #8
    Join Date
    Jun 2014
    Posts
    16

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Hi Louie,

    All the connectors are standard JST parts from eBay....


    For example:

    Mini Micro 1 25mm T 1 4 Pin JST Connector with Wire x 10 Sets | eBay

    and


    ww.ebay.com/itm/10set-2-5-XH-4-Pin-JST-Connector-plug-Male-Female-Crimps-/171346705559?pt=Radio_Control_Parts_Accessories&ha sh=item27e50f3c97

    If there's anything else I can help with, shout up.

    Bob

  9. #9
    Join Date
    Jan 2015
    Posts
    4

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Thanks for the connector info Bob. Was able to locate locally at Mouser. (catalog page)
    I happened to find an unused one in an old computer in the mean time but my main controller is a little different from the 3020, the spindle controller is the same though.

    Now I have to trace the signalling on the controller. Which control on Mach3 can I use to turn the spindle ON/OFF without running a program?

    Louie

  10. #10
    Join Date
    Jun 2014
    Posts
    16

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Louie,

    Have a look at post 1 of this thread by kbOnly. You'll find the information you need there along with a circuit diagram of the spindle controller on-off circuit - at least the bits that you need. You'll need to pick up the Mach3 spindle on/off signal from pin 1 of the parallel port and +5V form your MAIN controller board (i.e. NOT the spindle controller). If you need further clarification, please ask and I'll try to help.

    What equipment are you running Louie and does it already have PWM control?

    Bob

  11. #11
    Join Date
    Sep 2014
    Posts
    123

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Thats along the lines of what i was thinking, digitally controlling the resistance input to the MCU's analog input from the computer. Entirely possible.

    I probably won't have time to tinker on that until i get some spare time this winter, the fall season is busy season for me. If you make any progress be sure to post about it!

    I think having Mach3 being able to turn the spindle on and off is more useful then controlling the speed, at least from a safety standpoint. Its nice to hit the emergency button and everything shuts down! Can't believe they didn't do that from the start. But it would also be handy to be able to control the spindle speed when changing materials.

  12. #12
    Join Date
    Nov 2014
    Posts
    5

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    I have been working on another issue when I ran across a 3020Z-DQ manual which has a setup for Mach3 controlling the spindle. It give the setup for it and this CNC system has the switch on the back of the back of the control box for the spindle. Don't know if it will help.

    Thanks Terry

  13. #13
    Join Date
    Jun 2014
    Posts
    16

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    I don't know if there is anyone still reading this thread, but I've made some progress on this front. I can now control the spindle speed from Mach3. I have to say that its not been too easy. The spindle controller has some interesting quirks!

    I'm now working to get a better relationship between the speed indicated by Mach3 and the actual spindle speed. If there's any interest I'll consider posting the details.

  14. #14
    Join Date
    Sep 2014
    Posts
    123

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Still watching here! Post the details, would be interested to see how you got this working.

  15. #15
    Join Date
    Jun 2014
    Posts
    16

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    In short I've built a small board which has on it an opt-isolator, micro controller (PIC16F628) and a digital rheostat. The micro controller measures the length of the PWM period and produces a numerical value. Software takes the PWM number and performs some simple calculations on it. The result is value which is then fed to the digital rheostat. In theory the number on the Mach3 display should have a relationship to the actual spindle speed - which it does.

    However, it is not without its problems. As you will know, the power supply is unregulated and so the motor speed varies with fluctuations in the mains voltage. Also what speed are you actually measuring - it's going to vary with load.

    The actual controller board (JP-1482) also has some interesting quirks - try marking a position on the spindle control pot. Start from the minimum setting and rotate the knob to the marked position. Note the spindle speed. Next rotate the knob until you get maximum speed and then move it back to your marked point. Measure the speed once more. You'll find there is a several thousand rpm difference!!!!

    Anyway, I've managed to sort most stuff out in software. I just need to do some more work on the mapping between the speed indicated on Mach3 and actual spindle speed.

    Any progress your end?

  16. #16
    Join Date
    Jan 2015
    Posts
    4

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Bob,
    My unit is a 3040Z-DQ and have purchased the CamBam/Mach3 bundle for it. All running on a dedicated PC with Win7 32bit.

    I did print out the schematics from kbOnly and managed to confirm that shorting pins 3 and 4 on the JP-1482 will start/stop the spindle.
    It doesn't have the JP-382A controller so I need to find which relay or opto-coupler pin1 controls so I can interface it like you all have done.

    I found a relay with an unterminated output terminal block that I hope is connected to pin 1 of the serial connector but have not taken the board out to trace it.
    I also deciphered the Chinese text next to an LED indicating "Spindle" control, but triggering it is inconsistent.
    If I can manually control from the Mach3 program without running a short G code sprinkled with some M3's and M5's too toggle it, tracing would be grand.

    Thanks,

    Louie

    By the way... I don't have PWM control or the HW/SW switch on back of the controller.

  17. #17
    Join Date
    Nov 2014
    Posts
    5

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    Same here still watching would love to get it working too.

  18. #18
    Join Date
    Jun 2014
    Posts
    16

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    My intention is to do a bit more work on the software (hardware seems fine) and then offer it to those who might be interested. More details will follow, I just want to make sure that there's nothing unforeseen happening in the software. What part of the world are you in Terry?.

  19. #19
    Join Date
    Nov 2014
    Posts
    5

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    I'm in Idaho USA. I do have one question and that is did you look at the 4 pin connector on the motor control board JP-1482 that the pot goes too? I was wondering if the switch that is on the back of some units switch the third pin (Red Wire) from the pot to pin 4 to enable the PWM to be controlled by the mach 4 software? Could it be that simple? Thanks Terry

  20. #20
    Join Date
    Sep 2014
    Posts
    123

    Re: CNC 3020T-DJ Spindle Control, JP-382A JP-1482

    First off let me apologize for being AWOL from this thread for so long!! Things have been CRAZY busy here the last few months.

    Anyway...

    Bob, great work! Did you post up the schematic of that board you built? I would like to try and duplicate your work and install it on mine to play with it!

    And next some bad news, my computer that was controlling the CNC crapped out. It was an OLD computer running XP. First the IDE hard drive started rattling to death, then after chucking in a 40gb from the junk box i started having bluescreens, probably a failing stick of memory or who knows what, i don't want to put the time and effort into troubleshooting it when i have some other computers at my disposal. But then i started having control issues thanks to the Parallel port on the newer machines... BUT i solved it! And this could relate to quite a few people using these chinese CNC's and adding the spindle on/off control so i wanted to post back on this!

    I swapped the dying computer for a newer Dell Optiplex 755, yeah not a spring chicken either but running Windows 7 Home Premium 32bit and the best part of all its SATA instead of IDE for the drives, which brings it up to the current generation of computers in that category at least. And it has an SSD so it boots lightning fast and its much more power efficient then the old beast of a desktop that i was using on the machine.

    The problem though was pin 1 of the parallel port was sitting around 3.2v for its high disabled state. The old computer wiggled around at 4.1-4.2v, so as soon as i turned the CNC controller on the spindle spun up and Mach3 couldn't control it whatsoever. If you go back to the first page of this discussion and look at my schematic for the JP-382A Controller you will see that from the four pin header labeled A-Axis there is a 4.7k resistor which goes to the one side of another 4.7k resistor and then to pin 1 of the parallel port. This is the pullup from 5v on that A-Axis connector pin to keep pin 1 of the parallel port at a high state when the spindle isn't enabled.

    The problem is they used it wrong. There should be a 4.7k resistor from 5v to the one pin of the EL817 labeled ENO and another 4.7k resistor from 5v to pin 1 of the parallel port. But they have them in series, i assume to try and cut corners and feed both from one trace over to the A-Axis header. This places a total of 9.4k from 5v to pin 1 of the parallel port. There isn't enough of a pullup to pin 1 with this arrangement for some computers parallel ports!!

    Now there is two ways to fix this.. one is to remove the 4.7k resistor between DDO and ENO, the problem is this requires removing the controller board from the enclosure and the heatsink to get to the components on the bottom of the board, big pain in the rear...

    So here is option two... take a 1k resistor and place it from pin 4 of the A-Axis header, thats the rear most pin of this header, and the other end goes to the left rear pin of the EL817 labeled DDO. This puts the 1k resistor in parallel with the two 4.7k resistors, using some quick math a 9.4k resistance in parallel with 1k of resistance is 904 ohms. So close enough to 1k for me which is what i always use for pullup resistors on logic signals like this.

    This allowed the new computer to once again turn the spindle on and off and no problems!! I just did it quick and dirty by taking a 1k resistor covering it with heatshrink tubing and tack soldering it to the two points and went back to milling PCB's with the new computer after copying the Mach3 directory over from the old computer to maintain all the settings. Quick and easy fix and it should make it work with any computer now regardless of the parallel port's average voltage. If you get one which even the 1k tacked on isn't enough i would go down to a 680 ohm resistor instead, that would be around 630 ohms parallel and should bump up the pullup enough to compensate while still keeping the low state around 2.4-2.5 volts when the spindle is enabled by Mach3, and jumping up to just over 4v when disabled.

    Attachment 263478

Page 1 of 2 12

Similar Threads

  1. Need help with eBay 3020T-DJ
    By morbidmind6 in forum Chinese Machines
    Replies: 2
    Last Post: 06-20-2016, 05:15 AM
  2. It's Alive! 3020T-DJ
    By kb0nly in forum PCB milling
    Replies: 0
    Last Post: 09-21-2014, 06:46 AM
  3. 3020t Size and specs
    By tracyaf_2 in forum Chinese Machines
    Replies: 0
    Last Post: 09-07-2014, 05:33 AM
  4. No Movement Cnc 3020t-dj
    By seriousman in forum Chinese Machines
    Replies: 3
    Last Post: 09-03-2013, 02:35 PM

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
  •