Welcome to OpenBuilds Community

Signup today and join in on the fun!

Sign Up

890KV OX RC spindle

Discussion in 'Other Builds' started by Robert Hummel, Jan 13, 2014.

  1. Jestah

    Jestah Journeyman Builder

    Ok.... here is the progress so far of my over thinking.....

    Spindle parts 1.jpg

    I have taken apart a few sets of skateboard wheels and found a stack of washers, speed rings, steel spacers and the locking collar to make a solid connection between the two skate bearings.

    Spindle parts 2.jpg

    I spent a lot of time finding the right mix of speed rings to get the stack as close as I can measure to the required space between the bearings. I did the final adjustment just as I would a skate wheel, a whisper of slop with no pressure on the bearings and then with light press from my fingers the spacer stops moving.

    The tidiest but not so easy to setup solution was to put the locking collar between the skate bearings but between I think it should transfer the push and pull load to the skate bearings not motor bearings. I just don't like relying on the motor bearings that lack a spacer between the front and back bearing stack to keep the spindle locked down.

    Just about to pop down to the workshop and drill some holding points for the grub screws then time to get cracking on the servo tester!
    kram242 and Robert Hummel like this.
  2. oni305

    oni305 Veteran Builder

    Not really...
    An Optocoupler is enough to overcome this (moreover, it is always a good idea to isolate the PC from external electronics)
    The only problem I see is to know the frequency of the PWM signal generated on the LPT to tune the RC filter, after that everything could be done via software
  3. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    When running Mach3 with a Kernel speed of 25kHz you can choose (more or less) any pulse repetition frequency for the PWM signal of between 5 Hz and 4 kHz.

    Tweakie.
  4. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

  5. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    Excellent article by C.J.H. - explains the setting-up and operation of the Mach3 PWM very well. :thumbsup:

    Just out or curiosity Robert - what is the maximum and minimum RPM of your outrunners ?

    Tweakie.
  6. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    RPM is calculated by the voltage multiplied by the KVA of the Outrunner.
    In my case I will be using 12.5 vdc
    and a 890 KVA motor.
    Giving me a max of 11,125 RPM
    Not to sure where it starts out but I'm going to guess at about 500 but stalling is a problem at that kind of speed if trying to mill anything
  7. JustinTime

    JustinTime Veteran Builder

    That will be the no load RPM. Hobby King sells a device where you can measure the load RPM.
    Robert Hummel likes this.
  8. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    Yes that is right!
    Forgot that part lol
  9. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    Attiny programmer made and ready to get this project running :)
    image.jpg
    Anthony Webb and Jestah like this.
  10. oni305

    oni305 Veteran Builder

    I'll suggest to use an ATtiny13
  11. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    Looks like you are well on your way with the speed controller project Robert. :thumbsup:

    Tweakie.
  12. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    Not sure if I have any tiny13's left only 85's.
    Are you thinking of using the internal clock ?
    I have done some reading up but for a none programing guy like myself it's over dive on the nerd :)
    Seems like there are many ways to skin this cat, software and hardware wise ;)
  13. oni305

    oni305 Veteran Builder

    Even the 85 it's OK (the 13 is cheaper)

    Yes, for this project is enough

    Yes for a little more code complexity it's possible to directly analyze the pwm signal (removing the RC filter).
    In this case I think it's the best solution, whith the 85 because it have two separate Timers inside
  14. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    I'm not sure but correct me if I'm wrong, how I see it since there are many different input voltage ranges I think a voltage divider circuit before the input would be a good idea.
    It would be a little more work code wise but this way anything above 5vdc could be adjusted then calculated in code to convert to the proper ms output based on the input voltage.

    In sence three or four diffent codes to work with the supplied input
    Know your input volts
    Adjust divider
    Upload code for said divider setting
  15. oni305

    oni305 Veteran Builder

    It's better to use an optoisolator, the voltage divider is not so useful

    But i think to make the siplest (and cheaper) circuit it's better to not use the RC fiter

    I'll start to think a little on the code...
  16. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    I agree.

    It does seem a bit pointless to convert a digital signal to analog in hardware only to convert it back to digital again in software.

    It would be a simple enough task to sample the Mach3 PWM waveform, measuring the width of a duty cycle pulse then scaling the value found into the 1 mS – 2 mS range then outputting this pulse - all done in a continuous loop repeating at a 20 mS interval.


    Tweakie.
  17. bit53b

    bit53b Well-Known Builder


    Did you mean by using Timer Capture? This might do the trick...
    http://www.atmel.com/Images/doc8014.pdf
  18. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    Hi Bit53b,

    Thank you for the information and link :thumbsup: (a chip that I didn't even know existed).

    I think the processing power of the ATtiny and similar R.I.S.C. chips will allow an incoming PWM to be measured quite easily without having to resort to a specialist chip. Of course, the proof of the pudding is always in the eating, so it has yet to be proven but I have every confidence. :)

    Tweakie.
  19. DSardano

    DSardano Well-Known Builder

    quick question for you gents...
    I know the IPM and spindle speed are the main control points, but do you feel this spindle will handle the task of milling steel? Id love to hear your response; thanks in advance.
  20. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    Ok I must have miss understood something as I thought mach3 put out a 0-10 anolog signal
    Now that I re-read things it's the G540 that puts out the 0-10 based on mach3s PWM signal that works with the chin VFDs.
    So yes my idea is pointless ;)
  21. bit53b

    bit53b Well-Known Builder


    Hi Tweakie,

    Sorry I was a little hurried this morning and could have made my explanation/link a lot clearer.
    The document I linked isn’t a new chip exactly, it’s an Atmel application note explaining how to use the input capture module found in some of the Atmel micro controllers. This is a peripheral feature of the chips, and not a separate, specialist chip. It allows you to calculate frequency, duty cycle of an applied signal using edge-triggered interrupts.

    I was a bit hasty though, I don’t think it appears on the above devices after all!
  22. oni305

    oni305 Veteran Builder

    The ATtiny85 dont have the Input Capture feature ^^

    The solution is to use the pin change interrupt + a timer to measure the lengthof the UP signal & DOWN signal to calculate the value of the PWM

    PWM_value = T_UP / (T_UP + T_DOWN)

    Concurrently another timer interrupt is used to generate the new PWM signal
  23. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

  24. oni305

    oni305 Veteran Builder

    I think the circuit could be something like this
    schem.png
    Robert Hummel likes this.
  25. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    I
    have all said parts needed to construct the circuit shown mind you it's a 85 not 45 but that really don't matter other then cost
  26. oni305

    oni305 Veteran Builder

    :p it's the same chip (only the amount of memory change ) and in the cad one symbol is enough to make the design
  27. Robert Hummel

    Robert Hummel Custom Builder Staff Member Builder

    Do you think a PC817 would also work in place of the 4n35, may not be fast enough :/
  28. oni305

    oni305 Veteran Builder

    If the max freq is 4 Khz (as tweakie said) the pc817 can be used, but R2 have to be a 1K
  29. Tweakie

    Tweakie OpenBuilds Team Staff Member Builder

    Hi Guys,

    Having babbled on about it, I thought I would just have to give it a try - I had a bit of spare time so connected up a test rig yesterday afternoon.
    I am using a spare pcb (made for another project), the Microchip PIC12f683 and TTL gates for I/O buffering.

    For the initial tests I have set a Mach3 spindle range of 0 to 100 to indicate percentage of motor speed so 0% is off and 100% is full speed (GCodes: S0 to S100).

    I don’t have a spare outrunner (without stripping down one of my models and that is not going to happen) but I am assuming that if we can control a servo then we can control a bldc controller in a similar manner.

    For those that are interested, here is a short video; http://www.graytel.talktalk.net/bldcPWM.wmv


    Tweakie.
    Jestah likes this.
  30. Jestah

    Jestah Journeyman Builder

    Wow Well done Tweakie!

    Was that using the circuit a few posts above? I think I understand the principals about reading and then translating the PWM from Mach3 but I am also well out of my depth on how to code this.

    Am I correct in assuming I need to build a small programming rig to program the required small IC ?

Share This Page