PDA

View Full Version : DRO ideas



Evan
11-05-2004, 03:00 PM
On the CNC mill I am building I have steppers with built in encoders. Unfortunately they are not quadrature encoders, just simple incremental encoders. I have a copy of Steve Lindsay's DRO program but it is designed for quad encoders.

Does anyone know of DRO software that will run from an incremental output and step direction command signal?

ibewgypsie
11-05-2004, 03:10 PM
When you say incremental encoder, do you mean binary multiple bit? Or a potientiometer?


I hate the pots, I used a Research devices stepper controlled valve to control a dye flow loop.. It had a carbon type slide pot for feedback instead of digital.. I wrote software for weeks trying to compensate for the loss of zero setting.. I finally replaced it with a 4/20 ItoP and a 3/15 pneumatic valve.

Did you see the work I have just done on the chinese scales? It is on the "other" topic. It is here clicking right off on another screen..

It is "SLOW" thou.. not a real good way to close a loop.. It will work for my application.

I have the code here, for a parallel input quadrature encoder input through the port in VB.. not much help huh?


------------------
David Cofer, Of:
Tunnel Hill, North Georgia

[This message has been edited by ibewgypsie (edited 11-05-2004).]

Evan
11-05-2004, 03:15 PM
Just a plain slotted disk optical encoder with no index or quad output. It provides pulses when the shaft turns.

ibewgypsie
11-05-2004, 03:33 PM
Redlion, "eaton"? used to make a cube type devise that totalized counts using one pulse train and a directional input.. They also did a multiplier function I used..

They were pricy.. About $450 per ea..

David

ibewgypsie
11-05-2004, 03:38 PM
Do you have any basic stamps laying about?

I have the code for one of them to quadrature input, you can modify it to read the direction and output a quadrature type ttl signal on two pins.. you could if your frequency is not too high read more than one axis..

Them stamps are squirrels thou. I sent Thrud a dead one.. since I found out it . others are looked in a endless loop of a program error..

David

Evan
11-05-2004, 03:39 PM
Hmm. It looks like I either will have to program my own or figure out a way to synthesize a quadrature output by copying and phase shifting the output with the direction signal.

Paul Alciatore
11-05-2004, 04:29 PM
Without a proper quadrature output, you have no way of knowing which way it is turning. I don't think it will work unless you can get that information from somewhere else. Perhaps the motor drive voltage?

The thing is, steppers are usually operated in a open loop configuration. The control circuit says "take one step in the CW direction" and it is just assumed that the machine does it. No feedback. But if the motor does not have enough torque to actually move the screw then you have an error. You could use the simple output just to confirm that it had moved.

Paul A.

Evan
11-05-2004, 04:47 PM
Paul,

Determining direction is no problem. The controllers I am using are step and direction input. The direction input tells the system anywhere I want which direction they should be moving whether they do or not. The shaft encoders tell how far they moved in either direction whether they missed steps or not. I just need the appropriate software.

Tony
11-05-2004, 07:02 PM
evan,
excuse my ignorance, but don't you already have DRO data by nature of it being a CNC?
your CNC software doesn't give you XYZ status?

take your pulse signal and send through a counter, display to screen with direction command toggling +/- sign?

unless you're trying to do feedback for error correction, in which case you'll need a second set of encoders anyway, no?

then again if you can rely on these for CNC application, i'd guess you're in an acceptable window of error.. in which case, i dont get the question.

just curious,
-tony

ps.. more thinking happened.. split the signal and send to another serial port.. wire only appropriate pins, use Lindsy's DRO software?

[This message has been edited by knucklehead (edited 11-05-2004).]

Evan
11-05-2004, 07:38 PM
Good question Tony. It will be full CNC, open loop. I want the DRO so I can use it manually with a non computer driven pendant. A fly-by-wire milling machine. I might even make a set of hand wheels which turn encoders to send pulses to the steppers. I was even thinking of a way to provide force feedback. Yeah, I know. Why not just put knobs on the machine? This sounds like more fun and I can electronically alter rates.

I happen to have a strong dislike for having to do programming to heat something in my microwave. I feel the same about machine tools. I do want the advantages that full CNC can give me but I also would like to be able to run it manually. Just dial in the feed rate with a knob and use a joystick like David. But I need a DRO.

[This message has been edited by Evan (edited 11-05-2004).]

Nutter
11-05-2004, 07:53 PM
Have you ever connected a stepper motor to a scope and rotated it? The coils put out a quadrature signal. You'd want to unplug it from the driver and plug it into the DRO, but it could work - if you gear ratio isn't so high that it's hard to turn the motor.

ibewgypsie
11-05-2004, 08:01 PM
Build you a keyboard emulator joystick..

YOu are running turbocnc? If so it works great with it.. search out Ipac and read the information we posted about a week back.

The digital arcade joystick closes a (4) NO contact to the emulator and it sees it as the key for direction or whatever you program the emulator for.. I use the factory codes on the emulator, nothing to lose programming in.

It is much simpler.. to use the software that is there.. We tested it here in the house next to the keyboard playing a tetris game.. The keyboard is easier on the wrist.. (poor design of joystick mount) The computer does not have a clue it is not the keyboard keying in the ascii keycodes..

I looked at the emulators because I could save the next keyboard from turning black. I have a counterbalanced arm to swivel the monitor and keyboard down to a easy chair soon.. Actually a barber chair I used to tattoo with.. SOON.. I can program and write things in comfort.. The front side of machine should have a E-stop hardwired, start enable, and setup joystick, buttons, program rewind.. All should save the keyboard.. I just wish I had that old boss panel back..

I hate computers too.. but the are excellent number crunchers.. I think sometimes I will build a 555 timer w/parallel cable to replace the computer too.. It has to ramp up/down thou perfect or you lose steps. The accell/decell is the problem. Better to let the computer take care of it and don't worry about a thing except the part you are cutting..

NOW for the next crazy confusing thing.. I changed the direction of the "joystick" twice.. should you advance the cutter toward the part or advance the part to the cutter? Sounds simple but you will see what I mean.. it is confusing.. but it is neat to have a 2hp dremel tool.

My bridgeport has open loop steppers. Works fine till you try to tune it for MAX speed, then you can mess up.. parts, mills, and paitience.. better to slow it just a tad and never have problems..

For what it is worth, I am not sure Turbocnc is better or worse than anything else "we" can afford.. I love the wizards in Mach2, but I lost the joystick to "his" (Art) design to a DirectX emulator driver.. A real analog joystick 0-5vdc w.gameport is mucho better.. problem? you can't get that with a new machine.

If I can help feel free to contact me offline email. I am typing out a vb6 program for the mill and foresee a weekend of here at this monitor.. It is working with the scale.. whoo hoo.. at least that money ain't lost like so many other experiments..


------------------
David Cofer, Of:
Tunnel Hill, North Georgia

Evan
11-05-2004, 08:22 PM
Nutter,

The steppers will always be doing the motion control. There won't be any manual knobs except small ones to move something with power off.

David,

When it comes time I may talk to you about some of your ideas. It will be a while. I am still making parts and have not yet even laid out or drilled a hole yet. Lot and lots of flycutting and milling in the lathe as well as belt sanding. I am making nearly all of the plate parts from 6061-T561 tooling plate that I picked for scrap value http://bbs.homeshopmachinist.net//biggrin.gif

Yankee1
11-05-2004, 10:38 PM
Hello Evan,
Is this what you are looking for?
http://www.lindsayengraving.com/other_interests/dro.html

Ryobiguy
11-06-2004, 01:16 AM
Hey Evan, I know one that could be:
"DRO 4.0 software is now free as is the C++ code!"
Following the links someone else already rewrote it. I can't find the download for the source code, if anyone sees it please post the link. -edit: I found it, I got lost on the shiny http://bbs.homeshopmachinist.net//smile.gif
What OS are you going to use ideally for this standalone DRO? Good 'ol DOS, Windows, or Linux/BSD?



[This message has been edited by Ryobiguy (edited 11-06-2004).]

Evan
11-06-2004, 01:57 AM
Yankee et. al,

I have that. It is designed to work with a quadrature encoder only. The steppers I have are not quadrature on the encoder.

But, having said that, I decided to dissect one of the encoders tonight. HA! Although they do not have quad outputs brought out on the cable the little teeny circuit board and the chip as well as the encoder disk IS a quadrature encoder. All I have to do is hook up three more wires to the labled points on the PCB and bring them out and I have quadrature encoders. Piece o' cake.

David,

For manual control with a 555 all you really need is acceleration ramping. Decel doesn't matter much. The stepper isn't going to coast much when the steps are stopped. Just stop a tiny bit ahead of destination and hit the jog a few times. Accel control can be had with a simple pot adjustable time constant to pin 5 on a 555.

ibewgypsie
11-06-2004, 10:15 AM
What I didn't tell ya..

You can lose steps on decell as well as accell. The reason I could not ever get my Windows cnc program to work was the timing subroutine. If it is not timed perfect it overshoots the motor. Like access a hard drive to let "Bill" record what you are doing with his software.. etc.. Linux is just as bad with the new versions. I looked into the XP and it was running about 30 things at once. Windows is not a very good program for cnc machines. THE Mach2 timing subroutine is akin to the RTlinux kernel (if not it), a whole subsystem that runs in the background with real hardware/software timing calls. This can have some funny results on the screen writes sometimes.. jumping in and out.

Dos is much better, single tasking.

Lemme know how it comes out. I have the code in Visual basic (steal the logic out) or in Turbo Basic (compilable) program in dos.

I think the Borland software (turbo basic) is not made anymore? Is it still copyrighted? It is neat for making .exe programs in dos. I left one copy at the place where I worked for four years as a engineer. The DMA pattern tufting machines ran on it. (hi-lo loop pattern) Before I redid them they used photocells and a acetate pattern w/mercury wetted relays.

You are welcome to take what I got and make the best/worst of it. I am not a programmer, just dabble.

IF the scale/Dro program will work for you, it was still clicking this morning. It is accurrate so it appears. As accurrate as the scale I guess.. .02mm? I did notice it walking one .0001 while leaned against the wall.

I do need help multiplexing 3 axis thou.. relays? how? the picture from Japan looks like they use a magic box to connect 3 or more chinese scales. Perhaps with your expertise you can add to that pot.

I wonder how they hold up to moisture? cutting fluid?

David

ibewgypsie
11-06-2004, 10:22 AM
I built a 555 timer, actually a 556 dual.. One side controlled the frequency out, other side controlled the pulse width out.

I hooked it to a opto-controlled base transistor and ran my tattoo machine with it. I have some/several of pcbs somewhere.. I know I seen the acetate for the board somewhere..

There is circuit design software out htere for the 555. It is "the" experimentors favorite.

Back on my head.. Software is kicking my butt.

------------------
David Cofer, Of:
Tunnel Hill, North Georgia

[This message has been edited by ibewgypsie (edited 11-06-2004).]

Evan
11-06-2004, 10:58 AM
David,

It doesn't matter if I lose steps on decell in "manual" mode. The encoder outputs to the DRO tell me where I am and they reflect real position. The 555 has been my favorite chip for a long time. You can make all sort of off the wall circuits with it. It's not just a timer.

mochinist
11-06-2004, 11:42 PM
Geez does anyone else feel kinda dumb when evan and ibew start talking lol

ibewgypsie
11-07-2004, 11:19 AM
I feel kinda dumb when I start programming. I do a hundred lines of code, then see two lines will do the same thing. My read axis data is about that now.. From a single line of gcode.. I know there is a mask sort out there in VB to search out the X,Y,Z,I,R out..

I got the VB program opening a gcode file, running G00,G01,G77,G81,Mcodes and working. It is not a true cnc mill/lathe program since it does not interpolate (it's a press) but will work reading the chinese scale, operating the ram, Reading a quadrature encoder, operating a dc mtr-gearbox, reading a pair of prox switches and operating a solonoid/cylinder slide.

I think I might do a write up/pictures , but need a scholar to reformat the text.

I think on the chinese slides, a three pole hard contact relay will allow two axis to contact the computer. (looking at my lathe). The two data lines and one power line. The slide would work if you left the batteries in it. While connected it gets power from the link.
IN other words, a TWO DRO system for cost of chinese scales and adapter. It clicks back and forth, you could select via software the axis to monitor.. OR, use it to read parts with a caliper and input measurements into a file..
It (slide) updates the comm link once a second.. while moving the slide manually that is not nearly fast enough. Running 120ipm that is two inches..

I will post ALL the files including a ".exe" version on one of the yahoo sites later when it goes "thump" thump thump and starts hammering out the parts I want.. I am pulling the lower bed today to make a anvil/die to match.. (need some prussian blue)

The $15 chinese caliper at HF has the same comm link on it.. by the way.. I have all the components to make the comm link here.. but I prefer industrial made and engineered items when available and affordable.
------------------
David Cofer, Of:
Tunnel Hill, North Georgia

[This message has been edited by ibewgypsie (edited 11-07-2004).]

Evan
11-07-2004, 02:26 PM
Prussian blue. I have a can of it. I am about to break it out for my mill project. Arrggg.

ibewgypsie
11-07-2004, 05:18 PM
I got the bed back on, welded up the broken weld on it, then cut and welded in two bearing mounts on the bottom for my fore/aft axis.. I was calling it X.. but actually it needs to be Y.. Since the repetitive g77 command steps over Y.. Of course I could write it anyway I want to but..

I had to get on my knees and lift the 250+lb bed back into place. What a pain.. I took it down with a come-a-long but it kept wanting to twist going back. I am getting too old for that.

I am still a long way to cutting out the hammer dies.. Hope yours is going better.. same ole same ole here. drill and tap holes then find they are full of slag from welding six inches away.. Darn CnC you tell it where to go within a half thou and the drill bit wanders 1/8" off on a tangent.. If It was more critical I could spot the holes with a small ball mill but.. A 4 line program was all it needed today.

Tomorrow I get to buy sprockets and chain. WHoo hoo.. I wonder how bad that will hurt.

The digitizer probe, well it is getting close, that'll need to be another screw drive axis.. either servo or stepper across the ram.
Hope your day went better'n mine. I just got some Flexall rubbed on.


David

ibewgypsie
11-08-2004, 01:12 PM
5 #50 About 3" dia. Sprockets, One idler, ten feet chain, hand full of bolts, two lovejoy couplings w/spiders = $254.. Unemployment check = $247.. Ouchie.

Good thing I had a rathole to reach into.

Off to bore some sprockets.. Maybe finish some projects off the list.

------------------
David Cofer, Of:
Tunnel Hill, North Georgia

Yankee1
11-08-2004, 02:35 PM
Hello Again Evan
Check this out http://www.shumatech.com/
I found this kit and price interesting.
Chuck

Evan
11-08-2004, 03:09 PM
Chuck,

I have looked at that and it is attractive. I would like to use the encoders built into my steppers since it simplifies the design greatly. No scales to fiddle with and mount or keep clean. I have a design for the stepper mounting that keeps then really out of the way.

ibewgypsie
11-08-2004, 09:13 PM
Evan, I've decided to put a encoder on the motor instead of the end result pendulum drive I am working on. I figure it will be 18x more accurrate (18:1 ratio)..

I am thinking I might use the Rutex drive also. It is good for 27 amps.. The 1/2hp motor should run fine.

Since I have a single ended motor, I pried off the end cap like a freeze plug, Now I get to drill the end shaft and build some kind of coupling. Shaft is 5/8", encoder is 3/8.. Not sure to pull the armature or try to drill it in place.. I can't figure out how to hold it in the lathe and get it square on to drill if I pull it.. The motor will chuck up in the bridgy.



------------------
David Cofer, Of:
Tunnel Hill, North Georgia