Ok.... here is the progress so far of my over thinking..... 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. 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!
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
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.
Found some light reading http://www.cjh.com.au//PWM Spindle Control using Mach3.pdf Noticed you have had a read at this before Tweakie
Excellent article by C.J.H. - explains the setting-up and operation of the Mach3 PWM very well. Just out or curiosity Robert - what is the maximum and minimum RPM of your outrunners ? Tweakie.
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
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
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
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
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...
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.
Did you mean by using Timer Capture? This might do the trick... http://www.atmel.com/Images/doc8014.pdf
Hi Bit53b, Thank you for the information and link (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.
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.
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
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!
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
Something that may help but I hit a language block after a few links http://digistump.com/board/index.php?topic=689.0
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
it's the same chip (only the amount of memory change ) and in the cad one symbol is enough to make the design
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.
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 ?