On 11/25/2014 11:46 AM, andy pugh wrote: > On 25 November 2014 at 16:11, Leonardo Marsaglia > <[email protected]> wrote: >> Having a 1024 PPR encoder is not that bad, I guess I can scale it using HAL >> (is that right?) and that would give a pretty accurate variation for >> cutting the lobes. > Yes, if you set the encoder scale to 2.8444444444444444444444444444444 > (1024/360) the encoder will read out directly in degrees. > (it might need to be 4x higher if the 1024 is slots not edges) > > It isn't 100% ideal as there is scope for rounding errors after many > thousands of turns, as 1024/360 doesn't quite go. If you put in a > large number of decimal places it will take a long time to be wrong, > though. > > Double-precison is good to about 15 significant figures, so you might > expect to see the angle drifting after a few trillion revolutions, > which probably doesn't matter.
Since you have limited availability of local parts; you might want to consider using some automotive sensors such as the camshaft and crankshaft sensors used by most cars these days. I've replaced some on Fords over the years and they typically fit into a hole recess in the engine block and extend to sense a gear or segmented ring. Around here (Midwest USA) I have seen them as cheap as $15 or so. I believe the sensors I was checking/replacing were run off 5 volt power, so they should not be difficult to interface. Apparently the Ford sensors I was testing were hall effect sensors. More cam and crank sensor info that you probably need. http://www.aa1car.com/library/crank_sensors.htm http://easyautodiagnostics.com/misc-index/ckp-cmp-sensor-basics-1 If you stagger two hall effect sensors on a gear so they are out of phase by 90 degrees, you can create a full quadrature signal fairly easily. If you have a timing belt pulley, that may work as well. Dave --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
