Welcome to Our Community

Some features disabled for guests. Register Today.

Spindle Controller for Brushless DC Motor

Discussion in 'Controller Boards' started by The Dude, Jan 25, 2014.

  1. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    I'm working on building the Pulse Width Modulator (PWM) generator which is required to control an Electronic Speed Controller (ESC) which controls a brushless DC motor. I'm learning a lot and wanted to share it with everyone. If you're trying to make your own spindle based on the 890KV OX RC spindle then this is for you. I'm working on the parts list and so far I needed a 555 timer and I found some 15 year old timers in my storage. I wanted to test them to see if they are good and here is a circuit which works to test these timers:
    555-tester-circuit.JPG
    Now on to using the <good> timer to generate a signal for the ESC. :) If you have a good timer the lights will alternately blink. They stay on for about 1s each and then turn off and the other one comes on. Anything else means a bad timer or miswired circuit. Also, smoke coming from an LED means a miswired circuit too ;).
     
    #1 The Dude, Jan 25, 2014
    Last edited: Jan 25, 2014
    TMG likes this.
  2. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    So let me get this straight... Someone in Hong Kong is willing to sell you something for cheaper than you can make it yourself. They are also willing to give free shipping for this $1.67 item. Have you ever heard of dumping? And when your $1.67 part goes bad do you just shut down your cnc machine and wait for 3 weeks for a new one from Hong Kong?

    For me, this is about having control over my machine. I can fix it, troubleshoot it, etc. As time goes by, I will build my own ESC and eventually a motor controller. These will be sitting on-hand as replacement parts and when they get used another will be made. I'll never have any down time unless I want it. See how that works?

    FYI, my dad build a TV back in the 60s... We replaced one resistor in the 80's and it was used almost every day for 30 years. I think he still has it.
     
  3. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    That site always gives me an error going to a url if I'm not logged in to phlatforum.
     
  4. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    OIC now. I am looking at the parts for a PWM controller and it looks like I need the 555, 2 capacitors, 2 resistors, and a potentiometer. Another reason I'm doing this is because I'd like to be able to get a readout of the actual RPM on the spindle by using an optical switch. I have to fab 8 switches already so one more is no problem.

    Another option I'm looking at for the pwm is to use pin15 off my parallel port. I don't like this because it reduces the overall bandwidth of the port which means slower stepper speeds. A separate controller which can send an updated speed less frequently is ideal until I can resolve the bandwidth.
     
  5. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    Ideally the computer will set and read the RPMs. For now I can just do the timer thing to get it running and calculate the RPM by hand. Later, I can replace the potentiometer with a device that communicates on pin 15 of the parallel port via serial data. This device will take a digital number, probably 8 bits, and convert that to a resistance and act as the pot. Even later, this device will read the RPMs of the motor and send that value over pin 15 every couple seconds. The computer has it's own RPM display and panel for setting the speed.

    FYI I have both an analog-to-digital converter and a digital-to-analog chip from an old fiber optics hobby board that I no longer use so the parts could be reused. ADC0804LCN and CD4516BE
     
    #5 The Dude, Jan 28, 2014
    Last edited: Jan 28, 2014
  6. The Dude

    The Dude Well-Known
    Builder

    Joined:
    Jan 2, 2014
    Messages:
    243
    Likes Received:
    102
    The problem with that is you have the motor turning at 10k RPM so you must sample the port at 10k Hz which lowers the bandwidth by as much. I don't really care about having realtime RPM readouts if it slows my steppers down. Each motor takes like 30kHz when I adjust for the PC jitter.

    But anyway, I do have this arduino sitting around. They're like $40. I could use it to do the spindle functionality as well as give me a real-time readout on an an LCD and connect pin 15 to the parallel port for serial comms. It's a little bit of overkill but if I later add a heated bed it could control that... maybe it could be used for a lathe...
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice