Hello Folks,
Let me start off with the shameful admission that I do not have a clue about programming microprocessors.
I had intended to use a Genie processor because it has a nice simple programming front end in which you just draw a flow chart and the programme does the coding for you. However, glancing through various publications, I have come to realise just how versatile is the Arduino.
To get to the point, I am working on a positioning OSD for my CNC machine using CD40110BE up/down counter/drivers to directly drive the 7 segment displays. Each digit of the display (6 digits per axis) is driven by its own IC which are then cascaded to increment or decrement the next digit. I intended to use the 'pulse' and 'dir' signals to the stepper motor drivers to provide the up/down count to first IC in each bank.
I have already built the circuit but now need to utilise some sort of processor to count the pulses to send to the first CD20110BE.
I intend to have 4 significant figures for each of the X, Y and Z axes (it is a large machine) with two decimal places and with each significant count indicating travel in one millimetre increments. There is a fixed decimal point between digits 2 and 3 giving a resolution of 100th of a millimetre.
My lead screws have a pitch of 1.75mm per revolution and with 50 microsteps on my 1.8 degree stepper motors, I arrive at a total of 5714.28571 pulses per millimetre of travel. I chose that configuration because I thought that it was the most easily divisible number after the first two significant figures (decimal point moved two places to the left) leaving the remainder for calculating 0.1 and 0.01 of a millimetre.
I also have a fourth rotary axis with rotation in degrees which, again, I would like to be accurate to two decimal places. This drive works at a ratio of 6:1 and with a microstep count of 50 will give me 60 degrees per revolution of the motor.
On a small machine, the first 4 digits giving a resolution of 100th of a millimetre would be accurate enough for my needs but as my machine has a travel of 1700mm, the accumulated errors add up to quite a considerable overall error and I need to increase the accuracy by an additional one or two decimal places. Of course, there will also be a requirement for the 'dir' pulses to decrement the count as they occur.
As previously stated, I don't have a clue how to go about it correctly. Can anybody help a poor soul wandering in the wilderness?
I am attaching a jpg of the spreadsheet that I used to calculate the step rate and also a schematic of the circuit if it is any help.