Link to project using PICAXEs

Chris DeHut

Senior Member
Hi all,

Many of you have helped me with a big I/O project and with the PICAXEs in general. I have posted a webpage of what I created - the bigger picture as they say.

The webpage is large and will take a while to load, please be patient.

http://www.woodworkingathome.com/CNC/CNCLatheController.htm

Thanks!

Chris
 

manuka

Senior Member
What a project!The screen is especially a marvel. Your level of finish is outstanding, but why have the keys been arranged in that manner- I'd expected calculator style for the numbers at least. Stan
 

Chris DeHut

Senior Member
Hi Stan,

THANKS!

I am not sure what you are referring to with the keys, but let me explain the alpha numeric pad as I think that is what you are referring to.

This is a CNC controller, so we don't really need all the alpha keys, just the primary ones used within the CNC language. Mostly, it's X Y Z F G M etc. So the layout for the alphabet is structured for the application of CNC. Sort of a most used priority list manor.

The numerical keys are in a calculator layout with the 0 at bottom center and going upwards.

789
456
123
.0-

However, this layout is specifically for CNC control useage so it was modelled after many of the industrial CNC control layouts I have worked on. It looks rather strange at first, but once you use it for it's intended application, you understand real quick why it is the way it is.

Most of the program writing is done with the convential keyboard as that is also connected to the same computer. This keypad is primarily used for quick edits and offset adjustments.

Hope that clears up the confusion ?

Chris
 

evanh

Senior Member
Yeah, excellent construction.

Going from a quick skim of the mach2 instruction manual, I presume you'll be feeding the X-Y servos from the parallel port.

What about the spindle? I see the two PWM outputs on the Easy I/O that could be a speed control but that losses some of the tight control you get if all three axes were position controlled.


Evan
 

Chris DeHut

Senior Member
Hi Evanh,

Yes, there is a very fine line between what I can control with my Easy I/O interface and the parallel port inteface. Easy I/O is handled through the Mach3 Serial I/O routines and a macropump program which runs ever 100 Msec or so (perhaps 10 Msec). This isn't a good I/O speed for some things like servo encoders, step direction signals, even perhaps home switches etc.

For the breakout board, I biased mine to have more inputs than outputs as there is a need for highspeed inputs - the available outputs is still high enough to drive 3 or 4 servos so I am good there.

So, my plan is to use Easy I/O for all the menial tasks - turning relays, solenoids, LEDs, etc. on and off. The PWM outputs may be used for simple motor control such as an auxilary spindle like a driven tool on a lathe.

The Parallel port outputs will drive the spindle and the servos (Spindle is step dir as are the servos). The encoders will feed back into the parallel port as will the spindle speed index pulse signal - those are critical high speed I/Os. Then, I will be connecting several MPGs (optical encoders) used to manually control the machine, into the LPT interface - again speed is good here. After that I still have a couple of I/Os left on the parallel port for whatever other trouble I can get myself into :)

Chris
 

evanh

Senior Member
What sort of edge rate can you reliably count from the quadrature encoders? Or does it have some real hardware counters on the adapter board?

I note from your webpage that you are concerned about the speed of the opto-couplers. Don't worry, I'm confident they'll be faster than any software counting could achieve. And if you do have hardware counters then it's not hard to upgrade to faster opto-couplers or you could ditch them altogether but then you still need "line-receivers" for high performance encoders.


Evan
 

Chris DeHut

Senior Member
You know Evan, after reading your post I started to wonder myself how fast anything is going to be comming off the quadrature encoders. Even for the servos spinning at 4000 RPM, I don't think the frequency is going to be a problem for those Optos.

That's part of the problem with being a newbie to the hardware - everything is second guessed until it works reliably ;-)
 

evanh

Senior Member
A word of warning: If you are going to rely on the encoders to tell you the position, you better be sure the counting is more reliable than the servo drives are at achieving the target position. I wouldn't try to have an edge rate even half of the rated max count rate.

So, I guess I'm asking you to confirm that you are ensuring that the encoders choosen will be slow enough when at maximum rpm. Do you have any figures?

It may be better to just rely on the servo drives to achieve the demanded position and not have the encoders feed back into the adaptor and just have Mach3 display the desired position rather than achieved.


Evan
 

evanh

Senior Member
You may notice I'm hammering this issue a bit. This is partly due to me not finding any real info in the Mach2 manual on the topic of wiring encoders into the Mach parallel interface board and you appear to be intending to do exactly that.


Evan
 

Chris DeHut

Senior Member
Ah, I understand you better now. You are correct, Mach2-3 is not closed loop (in the sense industrial controls are). There are some tricks you can play to get a psuedo closed loop with intermittent checking and such via scripts, but nothing like the industrial controls.

I am not going down that path at this time. The encoder feedback will go to the servo drive board initially. Then as time goes on I will start experimenting with doing some of the tricks mentioned.

Thanks for brining that up though, it is one of those things that could easily mess up someone's plans:)

Chris
 

evanh

Senior Member
Cool. Just remember that, if you do make those mods, attempted corrections of any type based on flawed feedback is just asking for trouble.

Best of luck. It looks like you're having a ball. :)


Evan
 

Chris DeHut

Senior Member
Yeah I know what you mean. If I go down that path it would be a "verify and go" process. I would compare it to on a stepper system going home to verify reported position against the limit switches type of thing.

Oh yes, I am having an absolute blast with all this stuff. The electronics (and these PICAXEs) have just been a hoot to work with and learn about!

Chris
 
Top