Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:55 01 Jun 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Quadrature multichannel decoder for PicoMite using PIO

     Page 5 of 5    
Author Message
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 59
Posted: 08:30am 30 May 2025
Copy link to clipboard 
Print this post

  phil99 said  If you are only recording the encoders while using the hand wheels maybe the speed is low enough for the CMM2.
I think PhenixRising is thinking in terms of the blinding speeds that he uses.

As a test connect a multimeter to one encoder output and read the frequency as you turn the hand wheel at the highest rate you are likely to use. That will provide a reference point to work toward.

If the frequency is a bit high but isn't way too high just going slower may get it in range.

If that is acceptable during a Sherline recording session the PORT Function can record all 8 outputs (2 per encoder) by recording a timestamp and the PORT value each time a PORT bit changes.

To play back the recording instead of driving the Sherlines directly disconnect the encoders and connect 8 CMM2 outputs (they can be the same pins that were used for recording) to the Sherline encoder inputs. Put the Sherlines in recording mode.
Use the PORT Command to send the reconstructed encoder signals from the recording to the Sherlines.

Now the Sherlines can make the parts without the CMM2.
.


I will not be using the hand wheels to drive the stepper motors, the SHERLINE controller will be.
The reason I mentioned the hand wheels is that; the two ended shaft stepper motor, one end hooked to the lead screw on the mill table and the other end has the quadrature encoders where the hand wheel is. With one revolution of the motor, the count will be 0.050 inches.
The mills X axis can move to a distance of 8.65 inches.
The SHERLINES can't record. All inputs has to be put in manually.

Allie
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1399
Posted: 08:34am 30 May 2025
Copy link to clipboard 
Print this post

Well it has been awhile since I have done anything with my cnc yet everytime I walk past it more thoughts are there and for me it's a case of where to start  

Now as I have said with mine I bought 3 off DM556 microsteppers and with Volhouts code I did get an axis running with the supplied code.

I do like the suggestion of using a single RP2040 pico for each axis as the X and Y axis on my cnc uses the same steppers and ball screws where the Z axis uses a different stepper and 2 start ball screw thread.

So by getting one axis going with the pico code perfected it would be case of replicating it for the other axis and then working on the Z axis.

I also have the limit switch's on each axis setup as OC

Now by using a CMM2 I'm sure it could open a Gcode file and read the data and even draw the part on the screen.

Well now my interest is back this weekend if time allows I'll finish mounting the X axis DM556 and get it all wired up to the point where the 3 inputs are needed for each axis, direction, step and enable.

Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2484
Posted: 09:02am 30 May 2025
Copy link to clipboard 
Print this post

  allie said  The SHERLINES can't record. All inputs has to be put in manually.
Ok I have misunderstood your previous description.

Revised plan.
The recording phase can be as I previously described as the Sherlines run your manually entered program. To keep it fast no processing is done, just recording the 8 bit Port and timestamp to file.

A second program then processes this file to extract the direction and pulse count data, saving it to another file.
As this is done offline speed doesn't matter.

A third program takes this file and sends its data to the Sherlines pulse and direction inputs.
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 59
Posted: 09:30am 30 May 2025
Copy link to clipboard 
Print this post

  allie said  
  phil99 said  If you are only recording the encoders while using the hand wheels maybe the speed is low enough for the CMM2.
I think PhenixRising is thinking in terms of the blinding speeds that he uses.

As a test connect a multimeter to one encoder output and read the frequency as you turn the hand wheel at the highest rate you are likely to use. That will provide a reference point to work toward.

If the frequency is a bit high but isn't way too high just going slower may get it in range.

If that is acceptable during a Sherline recording session the PORT Function can record all 8 outputs (2 per encoder) by recording a timestamp and the PORT value each time a PORT bit changes.

To play back the recording instead of driving the Sherlines directly disconnect the encoders and connect 8 CMM2 outputs (they can be the same pins that were used for recording) to the Sherline encoder inputs. Put the Sherlines in recording mode.
Use the PORT Command to send the reconstructed encoder signals from the recording to the Sherlines.

Now the Sherlines can make the parts without the CMM2.
.


I will not be using the hand wheels to drive the stepper motors, the SHERLINE controller will be.
The reason I mentioned the hand wheels is that; the two ended shaft stepper motor, one end hooked to the lead screw on the mill table and the other end has the quadrature encoders where the hand wheel is. With one revolution of the motor, the count will be 0.050 inches.
The mills X axis can move to a distance of 8.65 inches.
The SHERLINES can't record. All inputs has to be put in manually.

Allie


With one revolution of the motor, the count will be 0.050 inches and the mill table will move to 0.050 inch.

Regards Allie
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2484
Posted: 11:03am 30 May 2025
Copy link to clipboard 
Print this post

  Quote  With one revolution of the motor,
I understand this bit  
  Quote  the mill table will move to 0.050 inch.
and this bit, but not this
  Quote  the count will be 0.050 inches
How many pulses does the encoder produce in 1 revolution?
Connect a multimeter to an encoder output and slowly turn the hand wheel 1 revolution, counting the pulses.

When the Sherline is driving the motor how many pulses per second is the encoder producing?
A multimeter connected to an encoder output should be able to measure the frequency.

If the pulse rate is too high recording it won't be viable.

Instead it will be necessary to write a script for the CMM2 to output the required sequence of pulse and direction commands to the Sherlines.
The script would be similar to manually entering the commands on the Sherline keypad.

How far does each axis move with each command pulse?
This will be needed to write each script.
.
Edited 2025-05-30 21:09 by phil99
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1247
Posted: 11:03am 30 May 2025
Copy link to clipboard 
Print this post

Circuit Cellar article on FluidNC

Uses a Pico for the pendant.  
 
     Page 5 of 5    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025