Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:08 25 Nov 2024 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 : CGCOLORMAX2-B to Sherline CNC Controller for milling machine

     Page 2 of 5    
Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:51pm 13 Apr 2024
Copy link to clipboard 
Print this post

GRBL...Awesome because nobody needs:

-Backlash compensation
-Rigid tapping
-Threading
-Closed loop servo control
-Tool compensation (not just length but diameter as well)
-Tool table
-Multiple work coordinate systems
-Automatic tool changer
-Automatic tool length measurement
-Probing
-Absolute encoders (never need to home)

Anyway.  
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:10pm 13 Apr 2024
Copy link to clipboard 
Print this post

Getting back to the OP, does he need all that?
Is he setting up an automated factory or is it a small scale hobby setup?
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 10:46pm 13 Apr 2024
Copy link to clipboard 
Print this post

  phil99 said  Getting back to the OP, does he need all that?
Is he setting up an automated factory or is it a small scale hobby setup?


He never reappeared so now I'm getting carried away with what Bryan1 proposed  

For me, GRBL is a toy. How does it qualify as "control" when it runs totally blind.

It's CNHAH (computer numerical hit and hope)
 
allie
Newbie

Joined: 06/10/2018
Location: Canada
Posts: 33
Posted: 02:49am 14 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Alie,

When I read your text, I think the stepper motors are controlled from the 16F77, that does the translation from STEP and DIRECTION control signals to PWM control and (micro) stepping of the H-bridge.

So the Maximite must provide these 2 signals per axis.

The pulses on STEP repeat at 1.5ms fastest. So you can use something like a 100us pulse, or 500us pulse (0.5ms).
You do not need to push to the limit of 20us…
STEP pulses are typically edge sensitive.

I am not sure whether the CMM1 (colormax) is capable of handling this real time control in MMBasic. For a single axis maybe, but not for 3 axis. Maybe you should look at isolating the real-time aspect from the CMM1. You could for instance look at GRBL on Arduino (or a different CPU). You can feed the Arduino with coordinate data, and it will do the movement of the stepper motors. You can configure it to meet your speeds, step size and I know it can do 4 axis on a Arduino UNO (x/y/z + spindle speed).

GRBL for Arduino

I just found there is also GRBL for RP2040 (pico).

GRBL HAL RP2040

Complete PCB (without power stages)

Volhout

Note: when above is correct your mmbasic program may have to provide acceleration and deceleration when driving the stepper motors.
The setup you describe should be compatible with the classic MACH3 MS-DOS program, that Uses pc parallel port.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:17am 14 Apr 2024
Copy link to clipboard 
Print this post

Maybe I am not into 3D machining as most of you, but as far as I know the workflow is as follows

1/ a design is created
2/ machining files are generated
3/ the machine file is sent to the cnc machine
4/ the machine executes the instructions

1,2 are outside the capabilities for a cmm2, this is the terrain of pc’s
3 is doable by cmm2, but also CMM1 or picomite
4 is best performed by well designed machine control processors, such as GRBL

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 07:06am 14 Apr 2024
Copy link to clipboard 
Print this post

But when in camera mode both 1 and 2 can be generated by the CMM2 so reading the input can be logged to file which can be run.

For me it will be fun making the probe which can be the first step to life where what is captured is then made using the CMM2.

Also the jog feature for each axis which can help on the calibration of each axis.

Now to make this open source I do need to know how to start a github setup then the CMM2 CNC wiki can start.

Cheers Bryan
 
IanT
Regular Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 86
Posted: 08:12am 14 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Maybe I am not into 3D machining as most of you, but as far as I know the workflow is as follows

1/ a design is created
2/ machining files are generated
3/ the machine file is sent to the cnc machine
4/ the machine executes the instructions

1,2 are outside the capabilities for a cmm2, this is the terrain of pc’s
3 is doable by cmm2, but also CMM1 or picomite
4 is best performed by well designed machine control processors, such as GRBL

Volhout


Yes, this is correct Volhout.

1/ It might be possible to create a simple CAD system using MMB but I will stick with Solid Edge in the meantime
2/ Depends on exactly what you are trying to do but there are many CAM options out the for 2D, 2.5D and 3D machining but again Fusion 360 will probably have to do for now
4/ My CNC has GRBL running on a 32bit cpu and it seems fine - so no needs there either.

What I would certainly welcome is a solution in area 3/

My WM3020 doesn't come with an 'off-line' controller (unlike most 3D printers), so the PC needs to be connected to run the G-code sender (typically UGS or Candle). However a simple Jog control and G-code sender should be well within the capability of a PicoMite or anything faster like the CMM2.

I suspect it won't be me doing it, so I'll wait in hope!  :-)

Interesting thread though...

Regards,

IanT
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:22am 14 Apr 2024
Copy link to clipboard 
Print this post

  IanT said  However a simple Jog control and G-code sender should be well within the capability of a PicoMite or anything faster like the CMM2.


No experience with this but I keep seeing it.
Edited 2024-04-14 19:22 by PhenixRising
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 09:55am 14 Apr 2024
Copy link to clipboard 
Print this post

Here is a question if the CMM2 can read a G-Code file then it would be a simple load procedure then run the file.

So 1&2 are done outside the CMM2 then simply put on the SDCard so they can be loaded.

Now in camera getting that image to reproduce that was captured by the input then running the file.

Now on the interface of this design I do think a controller board needs to be made so the connector out of the CMM2 has full control of what goes on.

Just like those old boards and in fact I do still the original parallel port controller from when I got this cnc going. So that will find the pin assignments on the old controller so that is an option.

Then it will bring back the 32 bit days when my cnc worked and Mac3 ruled the day but now we have a CMM2 and that has a brain to handle the challenge a wiki is needed as this is huge task to complete.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 10:36am 14 Apr 2024
Copy link to clipboard 
Print this post

Don't know if the attached could be a useful reference but...
pscnc.zip

pathlib4.zip
Edited 2024-04-14 20:48 by PhenixRising
 
allie
Newbie

Joined: 06/10/2018
Location: Canada
Posts: 33
Posted: 02:10pm 14 Apr 2024
Copy link to clipboard 
Print this post

I have the CGCOLORMAX2-B with (3) 5 volt relays wired to 3 axis on the milling machine
stepper motors to be controlled by one SHERLINE Linear Controller. All works good with MMBASIC to choose which axis I want to use by turning on a relay for one axis at a given time.
What I need to know is what step pulse (width) do I need to advance the SHERLINE Controller to move one step. I know I need 2 signals for step and direction. Direction is easy either a + or - signal meaning 3.3 or 0 volts for direction. The width of the Step in milliseconds is the question for step to work on the SHERLINE Controller for it to advance one step. I did some math and it came out that 8 steps will move the Mill or Lath Axis X,Y,Z to one thousands of an inch. I have two testers hooked now on the Colormaximite2gen2 with programs running to generate the step signal in milliseconds.
I Have the Parallax Propeller Scope and the Saleae Logic 8 to see the signals coming from Colormaximite2gen2. All looks good. I also  programmed the Colormaximite2gen2 to output a pulse out on pin 33 and put that pulse back into the Colormaximite2gen2 into pin 18(fast count). The pulse that I output on pin 33 is the same width of the pulse that I put out on pin 32 that will go to the SHERLINE CNC CONTROLLER'S STEP IN. I'm using the COLORMAXIMITE2GEN2'S FREQIN and print it to the screen to verify that I have my other SCOPE and LOGIC 8 settings set up right. All is good.
Now I can play around with the millisecond numbers to see which works the best.
Then I'll work on the speed for ramping up and running the stepper motors.
Best regards allie.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 03:36pm 14 Apr 2024
Copy link to clipboard 
Print this post

Allie,

Mechanical relays to communicate step pulses may not be very fast, unless you happen to have reed contacts.
Most relays will barely reach 60hz on-off-on cycle.
Can your shearling controller accept opto couplers to control the step input.

Volhout
Edited 2024-04-15 01:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
allie
Newbie

Joined: 06/10/2018
Location: Canada
Posts: 33
Posted: 08:06pm 14 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Allie,

Mechanical relays to communicate step pulses may not be very fast, unless you happen to have reed contacts.
Most relays will barely reach 60hz on-off-on cycle.
Can your shearling controller accept opto couplers to control the step input.

Volhout


I know. I only need one of the 3 relays to turn on at a time. (ie) If I want the X AXIS to move I turn on relay X, Y AXIS is Y relay, Z AXIS is Z relay. The relays are four pole all four poles turn on at the same time. If I want the X AXIS to move 8 inches that X AXIS relay stays on until the 8 inches has moved. Then the next AXIS will turn on and so on. The SHERLINE CNC CONTROLLER through the step input controls the 4 signals going to the stepper motor coils through it's four input wires. The only signals the CGCOLORMAX2-B needs to send is the step signal and the direction signal.
I have the COLORMAXIMITE2GEN2 interfaced to the CGCOLORMAX2-B.
I chose this way because the CGCOLORMAX2-B has through holes on their board to add my relays and the L293D to turn on the relays. The COLORMAXIMITE2GEN2 will tell the CGCOLORMAX2-B which relay to turn on then the COLORMAXIMITE2GEN2 will output the step pulse and direction to the SHERLINE CNC CONTROLLER.

regards allie
 
allie
Newbie

Joined: 06/10/2018
Location: Canada
Posts: 33
Posted: 08:14pm 14 Apr 2024
Copy link to clipboard 
Print this post

I said first in the last post that the CGCOLORMAX2-B will send out the step and direction than I said the COLORMAXIMITE2GEN2 will send out the step and direction which will be the one that does. Sorry for the misprint.

regards Allie
 
IanT
Regular Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 86
Posted: 10:50am 15 Apr 2024
Copy link to clipboard 
Print this post

  PhenixRising said  
  IanT said  However a simple Jog control and G-code sender should be well within the capability of a PicoMite or anything faster like the CMM2.


No experience with this but I keep seeing it.


I'd not thought to look beyond UGS & Candle P-R, so I hadn't seen this. Thank you.
I'll have a closer look when I get some time (but the feature summary looks very useful)

I've only just recently started thinking about using my (Android) phone with 'Mites, when I started playing with the WebMite, using the 'Serial WiFi Terminal' app.

I've also just purchased a couple of HC-06's to look at Bluetooth R/C of my small (3D printed) model locomotives. I've got them running with PicoMite IR controls at the moment, using a cheap TV controller, which is great for my Grandson to play with. I'll be using 'Serial Bluetooth Terminal' for this, at least to begin with, which is by the same developer. I've found his WiFi app very useful and I hope that the BT version will be similar in it's utility.

Anyway, thanks very much for the suggestion. A 'Mobile' does seem an obvious way to go for simple control applications that don't need too much in the way of graphic feedback or controller 'intelligence' (at last for someone with my limited skill set & free time).

Regards,


IanT
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 11:28am 15 Apr 2024
Copy link to clipboard 
Print this post

@IanT

Android->Mite is child's play with Bluetooth. For the Mite, it's just reading/writing to a com-port. No different to hard-wiring.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 01:54pm 15 Apr 2024
Copy link to clipboard 
Print this post

@IanT

You can be up and Bluetoothing in minutes.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 05:16pm 16 Apr 2024
Copy link to clipboard 
Print this post

"Ramping up"

Especially for steppers, better to use proper S-Curve accel/decel. Sample for accel:


dim as integer res,samptime
dim as float f,intspeed,ramp_segments,frac

ramp_segments = 1/1000
res = 1000

sync 2,M

do
 inc samptime,2
 sync
 frac = samptime*ramp_segments

 f=(3-2*frac)*frac^2

 intspeed = f * 5000
 print samptime, intspeed
loop until samptime=>res

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:48pm 16 Apr 2024
Copy link to clipboard 
Print this post

Hi Phoenix,

I feel this is expandable tp 3 axis. As long as your mmbasic loop is significantly faster than the granularity of the s curves.

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 08:08pm 16 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Phoenix,

I feel this is expandable tp 3 axis. As long as your mmbasic loop is significantly faster than the granularity of the s curves.

Volhout


Oh sure. It takes 54µS on the Pico in a 2000µS window. Alternatively, it can be pre-calc'd prior to execution.
 
     Page 2 of 5    
Print this page
© JAQ Software 2024