586,075 active members*
3,935 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > PWM controlled surplus spindle motor
Page 2 of 4 1234
Results 21 to 40 of 73
  1. #21
    Join Date
    Aug 2004
    Posts
    2849
    Jroque,
    I think you missed my point on the isolation transformer...if you can measure a potential between 2 metal objects in your shop...then someone could lean across both objects and "sizzle" a bit...I'm not worried about the electrical / electronic stuff working as I am about safety.

  2. #22
    Join Date
    Jun 2003
    Posts
    3312
    Isolation transformers are not the solution. They have a purpose in life, could be used here, but could also induce a bigger problem if not handled correctly. Most likely an special interface consisting of an opto isolator on the PC's pwm, followed by a comparitor to square up the opto output and get a 0 to 12V swing, followed by a precision rectifier circuit. Do not tie the ground of the controller back to the PC in any fashion.

    Phil
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  3. #23
    Join Date
    Dec 2003
    Posts
    24221
    [QUOTE=Jt is that my (and most this type) controller is NOT isolated from AC input. That means that there will be a ~50v differential between the controller's ground and my PC's parallel port ground. I measured this with a VOM between the pot's ground pin and a common ground on my mill frame.[/QUOTE]
    Something to keep in mind when measuring the potential between systems is the high impedance of current VOM's, the best thing is to place a low resistance 500ohms to 1k between the two before measuring, with the old analogue moving coil meters this was not a problem, they had a typically 1000ohms/volt resistance to load the measurement. you may find with the resistance the voltage might have collapsed due to being high impedance which a modern VOM is able to read.
    Al
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  4. #24
    Join Date
    Jun 2004
    Posts
    487
    Hi there. Here's a quick diagram on how to connect the Minarik DC controller to the PC parallel port using an optoisolator and two resistors.

    WARNING: There's significant voltage potential on the ground terminal of that controller. If you connect the ground of the controller to the common ground on your PC you might see sparks fly, blown fuse, burnt brain and your stock portfolio will tank. In other words: BE CAREFUL!

    I chose the optoisolator below after scientifically researching the many options and finally opening my drawer and grabbing the first one I saw. Any number of other optos will work. I'm not even sure what the current potential is on the controller side of the circuit so that 1000 ohm resistor value might need changing. Mine worked good though.

    The setup is as follows:

    1. Config your PC controller (ie: Mach2) to it outputs step and direction or PWM on an output pin. I picked pin 17 on my parallel port

    2. Connect the optoisolator as per diagram while power is OFF, please. If you mount the parts on a PCB and put it inside a little box, better.

    3. Issue a "go spindle" command and set the speed to maximum. In my case with Mach2 I entered S8200 and M3. My motor will spin at 8,200 RPM.

    NOTE: use a plastic tweaker or insulated screwdriver to adjust the board in the following steps.

    4. Set the "Max" potentiometer on the controller board fully CW (max) and slowly move it CCW until the motor starts dropping off speed. Move it back up a bit so the motor reaches max speed again but don't move it beyond that.

    5. Set the spindle speed to 0. In my case in Mach2 I entered S0.

    6. Set the "Min" pot fully CW and slowly move it CCW until the spindle stops. Make sure you give it a hair more in the CCW direction so to be sure the spindle does stop when commanded to do so.

    That's it! My PC now controls the spindle speed via software and it tracks to actual RPM fairly well. My minimum speed is around 80 RPM which is great for drilling tough stuff.

    JR
    Attached Thumbnails Attached Thumbnails OptoIsolator.JPG  

  5. #25
    Join Date
    Jun 2003
    Posts
    1365
    Wow that sounds great! you still have the regular pot hooked up parallel to the circut?

    On my axxus technologies board, I have a relay on one output(12v output) and thers 2 5V TTL outputs, I am assuming those are what I am wanting to hook this up? I know my pins are already optoisolated, I supose I could just use that extra optoisolation just to make sure. I assume that I can get these goodies at radioshack right?

    edit - JR, does your motor actually spin up to 8200rpm? or is the encoder on the spindle and geared up?

    edit2- you suggest connecting the ground to where then? or is that without the optoisolator?


    Jon

  6. #26
    Join Date
    Jun 2003
    Posts
    1365
    I just found the pot inside my controller, I have the 8 amp controller and it only has one pot, it does adjust the speed, I got it up to 7500rpm and after that lights would flicker and the motor would make weird noises. probably giving it the full 8 amps and wont handle more.

    I am still curious about the optoisolator/transistor I need

    Jon

  7. #27
    Join Date
    Jan 2005
    Posts
    1880

    clarification

    in your diagram you list s1 s2 s3, as I don't have the controler yet, are these the three solder joints that are illistrated in Jfettings pictures (at the bigging of the thread)?

  8. #28
    Join Date
    Jun 2004
    Posts
    487
    Hey Jon, What you want is an output from your PC that can be driven with PWM. Not sure if you're using Mach2 but that package provides the facility. You do not want to connect a relay here. If your outputs are only 2.5V (unusual, to me), you will need a way to "pull up" that voltage to 5V. A logic chip, transistor or op amp can do this. But before you dive into that, check to see how is it that you're driving that relay. Chances are you can use the same method to drive the LED in the optoisolator as long as you don't go over 5V.

    My motor does spin to 8200 RPM even though it's spec'd for 6750 - nice bonus. About the grounds, it's important that there's no connection between the controller ground and the PC ground. If you look at the circuit, there's no connection there. The base of the output transistor on the opto is driven with light from the LED on the other side so there's no physical connection. The pot tweaking I suggest is so the controller adjusts it's sensitivity to match the actual output of the optoisolator. Otherwise, the output at, say, 2000 RPM on your controller might not match the actual RPM on your motor. You can certainly get around that problem by adding a simple potentiometer at the opto output that pulls up or down.

    I've updated the circuit a bit to reflect actual parts you can order and also layed out the PCB. Below's a list of parts linked to Mouser.com. Click on them and add to cart. I'm also posting the DXF file used and G-Code, if that's useful to you.

    Qty_____PartNo___________Description
    1***** 651-1935174 *****Terminal block, 3 pins
    1***** 651-1935161 *****Terminal block, 2 pins
    1***** 526-NTE3220 *****Optoisolator
    2***** 291-1K *********Resistors, 1K ohm
    1***** 501-FR4X6S ******Copper clad PCB

    Later,
    JR
    Attached Thumbnails Attached Thumbnails OptoBoard.JPG   OptoLayout.JPG   OptoIsolator2.JPG  

  9. #29
    Join Date
    Jun 2004
    Posts
    487
    Hello Michael. The simple circuit above is intended for the Minarik controller. If your controller also has a potentiometer to set it's speed and uses a control voltage between 5V and 25V, you might be able to use it as well. Here's what the S connectors do:

    S1 connects to pin 3 on JP2 and it's the controller's "ground"
    S2 connects to pin 2 on JP2 and it's the control voltage to your controller
    S3 connects to pin 1 on JP2 and it's the source voltage, 5V in our case.

    Measure voltage on your pot pins to determine which is which. Might be that the center pin is the control voltage (input) and the two outside are source (5V) and ground.

    Below's the DXF and G-Code files to the PCB.

    Thanks,
    JR

    Updated files to latest version
    Attached Files Attached Files

  10. #30
    Join Date
    Jun 2003
    Posts
    1365
    Thanks a ton JRoque, I ordered the stuff for 2 of them boards, I mite as well make a second while Im making the first and sell it for cost of parts and shipping.
    Figured It may help someone.

    Did you ever get your coupler for your spindle to hook it direct drive? I would be interested in hearing how that turned out for you.

    -edit- is that drawing already mirrored?

    Jon

  11. #31
    Join Date
    Jun 2004
    Posts
    487
    woops. No they weren't. I changed it and reloaded the files. Not sure it took though. I'll give it a few mins. If not, I'll report.

    JR

  12. #32
    Join Date
    Jun 2004
    Posts
    487
    Here's a pic of the milled PCB and with the components mounted. It's installed and working pretty good. I haven't cut anything yet and that's when I'll know if it works. One note of caution, I hit the "hibernate" button on my laptop while it was still plugged into the mill and for a brief moment the spindle spun up and then stop. Be careful with your setup. Later on I'll be adding some protection circuit to prevent this from happening.

    Later,
    JR

    PS: Jon, you have cameras in my shop or what??? You seem to be working the same stuff I am. Next project is a Mach2 MPG. I'll post on it as it progresses.
    Attached Thumbnails Attached Thumbnails OptoBoard.JPG   OptoBoardAssembled.JPG  

  13. #33
    Join Date
    Jan 2005
    Posts
    1880
    hey JR

    do you use mach2 and if so what is your set up on the spindle screan?

    I don't have the controler yet but I have an optoisolater and was curious if I could do a little testing..

    Ie messure whats coming out of the opto (or do i need an oscilliscope for this?)

  14. #34
    Join Date
    Jun 2004
    Posts
    487
    Hey Michael, yes, I use Mach2. Below's the screenshots of my setup. Note that I selected "Step & Direction" and "PWM Control". In my case, the output pins are set to go high when active but your setup my differ.

    You don't need a scope to see the optoisolator output, a basic DMM will do. Think of the opto as a simple switch that let's a voltage through to the other pin when you shine it with an LED. So on one side (the PC side) you have an LED that you plug into an output of your parallel port and on the other side you have a switch that interrupts a voltage. The cool thing about the opto is that there's no physical connection between the two side. Check out the diagram I posted, it's pretty simple. But post any questions you might have and we'll give you a hand.

    Later,
    Julio
    Attached Thumbnails Attached Thumbnails PortsAndPins.JPG   OutputPins.JPG  

  15. #35
    Join Date
    Jan 2005
    Posts
    1880
    I was playing with the mach3 beta, and what a shock total different looking buttons I will load the mach2 interface in and set that up.

    is mach3 any good or are there too many bugs still

  16. #36
    Join Date
    Jan 2005
    Posts
    1880
    i got the contorler to work (not very well). i did everything on a bread board.

    on my contorler the more resistance the 5k pot has the slower the motor goes. I thought this to be normal.

    it seems the nte3220 is oposite of what I need or am I doing something wrong???

    when I increase the speed on mach2 the motor goes slower and vica versa.

    what is the 1k resistor for on the computer side? circuit protection?

    thanks
    michael. t.

  17. #37
    Join Date
    Jun 2003
    Posts
    1365
    miljnor, you have spindle feedback to mach2 right? I would think it would see where it is going and fix that.

    Jon

  18. #38
    Join Date
    Jan 2005
    Posts
    1880
    no spindle feed back yet just testing components and haven't picked up encoder or tach i will be using..

    any suggestions?

    I think the nte chip was bad, I put a fresh one in and it turns on the spindle the correct direction..

    mach3 had a area that you could change the pulse width is there a place for that in mach2?

    now when I run the spindle it pulses with the freq.

  19. #39
    Join Date
    Jun 2003
    Posts
    1365
    I am using the ones from cnc4pc, they send you the sensor and you have to make your own mounting and disk with the hole in it, Its a very good price. I also have one of their breakout boards and they are decent, a little large but still good.

    I think the problem might have been that you dont have a feedback readout so it is only guessing on the speed, could be the NTE chip too.

    Jon

  20. #40
    Join Date
    Jan 2005
    Posts
    1880
    are the breakout boards just for the rpm signal?

    I have the rutex boards although I havnt't hooked them up yet.

    I am currently in gathering mode, and while gathering I test the unknown stuff so as no suprises when I go to install stuff.

    where did you get your motor driver? I am using the one jr suggested at the begining of the link. one of the differences in the controler you have and the one I have from surplus center is your pot controls a 5v signal I this one controls a 12v signal.

    I don't know much about electronics. but maybe the 3220 is not giving litttle enough resistance at the full rpm of mach2.

    I mesured the voltage at the motor at full throttle and it was only 21vdc. but with a 5k pot it goes all the way up to 120vdc.

    any suggestions would be great. and thank for the help.

    Michael t.

Page 2 of 4 1234

Similar Threads

  1. CNC Controlled Spindle motor speed control
    By gregmary in forum CNC Machine Related Electronics
    Replies: 13
    Last Post: 02-28-2009, 02:01 AM
  2. Spindle for metal and wood. Motor size question
    By bgolash in forum DIY CNC Router Table Machines
    Replies: 2
    Last Post: 05-20-2005, 05:15 PM
  3. Surplus motor went POOF
    By JFettig in forum CNC Machine Related Electronics
    Replies: 20
    Last Post: 05-14-2005, 06:00 AM
  4. 2.2KW Allen Brad. Spindle motor?
    By GalaticDan in forum Servo Motors / Drives
    Replies: 2
    Last Post: 02-02-2005, 06:46 PM
  5. New spindle motor conversion
    By JFettig in forum Benchtop Machines
    Replies: 22
    Last Post: 12-18-2004, 03:53 PM

Posting Permissions

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