Hi there, Wondering if someone might be able to point me in the right direction as I've had little success via Youtube; where videos expect you to be an electronics genius. Though mechanically inclined, I crumble whenever electronics are involved in a project. I'd like to create a digital read out that tells me the distance in inches, preferably as accurate as possible, from a point on a carriage which is attached to a servo driven ball screw. The distance would be changed via a rotary encoder. This is going to be used to adjust the backstop of a press brake - to easily and quickly change the distance of the backstop for different bend dimensions. There's little to no force on this structure as it's only used as a backstop. I did a little reading of Rob Taylor's thread on linear motion and felt a servo and ball screw combination would get me the anti-backlash and accuracy I'd like. So I suppose I'm looking for someone who might know their way around servo motors, drivers, encoders and a DRO or LED display to point me in the right direction... Would be just perfect if there was a build that pertained to this setup but I tried some terms in the Openbuilds search bar but had no success.
I need to update that thread. I say that every time it gets brought up though. It's a lot of work! Ball screw I agree with, a cheap 1204 would be perfect for this, especially if it's antibacklash, which means the seller has re-packed it with slightly larger ball bearings to take the play out of the bearing races. Or they're just lying and they didn't, that happens a lot too. Servo I'm not sure I do agree with, I think a little NEMA17 stepper motor would do just fine. Servos are for when you need very high acceleration, high torque at high speed, and/or extremely high-precision (14-20-bit) rotary encoding on the axis. Since you need a linear measurement, the actual motor type is kind of irrelevant here, so paying five times the price for a servo just doesn't make much sense. A simple stepper and antibacklash ball screw has the repeatability to get you to +/-0.01mm (0.00039"), potentially even lower. Probably slightly overkill for a brake, but nice to have. Throw a single glass scale and a 2-axis DRO on there, run the stepper driver from an Arduino running a basic encoder and stepper sketch (I'm sure there are plenty of easy-to-copy examples on that one out there), and you're set. All that said... Does this thing actually need to be electronic? You have to crank an encoder to move it anyway, it just seems like a lot more effort. A simple lead screw with a hand crank and the glass scale/DRO is all you need. If you're hoping for a version where you set the exact location you want and the controller moves the backstop to that location within a very small tolerance and with repeatability... Well, that's a significantly different project. I haven't seen anyone else do that, so it'd be a custom code project. Read: expensive. Depends how important this CNC backstop is, I suppose.
I made one but used a different approach. Mine was a 4 foot (maybe 6 foot, cant remember) wide break. The original auto back gauge took a dump and they wanted thousands to replace it. The original setup used a dc motor connected to a shaft that hooked into a two belt and pulley setup that moved the gantry on linear rails. They used expensive linear encoders to track movement. I ditched the dc motor and linear encoders and basically did the same thing Neo7CNC did with his chop saw stop using a clearpath servo. At first I used his interface setup (arduino, code, etc). Worked great. See my post about this on Login • Instagram But since this was for a production environment, I needed something that would be able to move to the next programmed position automatically. Basically do multiple bend positions for a single part. I ended up adding a Raspberry Pi into the mix and wrote a kivy based frontend. It sent coordinates to the arduino similar to how the keypad did, but allowed me to save/load simple text files for each of our parts. You could also set multiple coordinates on the fly. See my post about this on Login • Instagram With all of that said, I could have done it much cheaper and saved a ton of coding time using OB parts and OB Control. But I didnt know that at the time
I also realized that a servo is overkill after sifting through some videos. My lack of electronics knowledge lead me to believe I needed some sort of electronics for the DRO which made me think "Might as well make it cool and move by itself." but now that I know what a glass scale is, you're right, it might just need a hand crank and the DRO. Looking up the glass scales.. No **** is it plug and play. Despite the price tag on some of them, they seem like the one and only choice for accurate linear measurements! Here I was looking up videos on how to have a LED display convert the rotations of a servo/stepper into a linear dimension... Should have realized there was something way better when google itself was like "Here's like, seven results." Thanks for the help!
Some really cool stuff. I do really like the idea of the programmed bends - currently we would set up the backstop, bend maybe 50 parts, reset the backstop for the next bend, bend the 50 parts. I'd be curious if having a programmed set of bends and bending each part to final would be faster...
It is. There's a lot of lost time and added motion having to pick up and put down the same part multiple times. All that was needed was a limit switch on the downstroke of the ram to signal when to move the gauge. Simple stuff.
Agreed. Maybe I'll design something that's able to be motorized later down the line - I'll try this DRO, I think that in itself will great improve the quality of life of using the machine to begin with.
I wonder what the repeatability is with belts vs screws. The problem is tracking the rotary input doesn't give you an inherently meaningful output (I mean, maybe on a chop saw), but again, I'm not sure how precise the positioning has to be on a brake. I know it's higher than most people realize, but it's a project I haven't tackled yet. Maybe with a nice Gates GT Kevlar belt and quality (or custom-machined) pulleys you can hit a thou? Problem there is you also don't know what you're hitting without the linear encoder. This was my concern, which is why I thought it had to be electronic- but since I was envisaging also actually checking the move in a closed-loop fashion, that becomes a significantly different project. I like that Kivy though, I'd never heard of it- don't do much with Pis- but it looks like it could be a really nice interface for some systems automation projects I'm thinking about. Possibly only hand crank for fine positioning and some kind of cam-lock slider for coarse positioning? Would be much faster. Yup. Just etched-glass optical TTL quadrature encoders in a straight line, nice and easy. The expensive ones are usually +/-0.001mm, the cheaper ones +/-0.005mm. I doubt bending requires a micron of accuracy (nor could the jig thermally hold it) so you can opt for the less expensive ones. I pick them up for like, $70 apiece. You can get them five feet long for less than $200 (which reminds me, I need to buy one soon). The Chinese ones are just as good as the Swiss ones, glass is glass. I've heard they may all be made by Heidenhain anyway, regardless of who sells them. Even if you go to electronic later, if you're wondering what the "significantly different project" looks like, I'd keep the glass scale, ditch the DRO in favor of an LS7366 buffer IC or something similar, SPI that into the Arduino with some kind of (very basic, not aggressively tuned) closed-loop PID subroutine, and send the main loop its target points over serial from a RasPi running a GUI just like Shawn showed above. It's not an enormously difficult project, but it does require some programming experience. I wish I had a use for it, because it sounds like a fun project, but I'm not sure I can think of one. Sadly I don't have [space for yet] a brake. Of course if all the bending accuracy you need is like, +/-0.5mm, then yeah, running open loop with no encoders and letting grbl control everything is the way I'd probably go.
From what I recall when researching replacement off the shelf systems, all of them used belts. Maybe the multi-axis back gauges used screws. Not sure. Hitting a thou on a break seems a bit overkill but those Clearpath servos are no joke and despite paying a bunch of money for it, I was happy I went that route. I had to replace the belts as well and those were pretty stout. Cant remember which one I got. Kivy is pretty cool. I havent done anything with it since that project. My first project was a combo coolant monitor and Sonos controller for my Tormach control panel. I had automotive type pressure sensors on the input and output side of my filter to alert me when the filter needed to be replaced and a level in the tank to know when the coolant needed to be topped off.
Well, I've realized a reason to want a stepper turn the ballscrew rather than try to do it mechanically. This is the style of press brake's we have, a 2' x 12 ton press. There aren't very many mounting points inside the machine and there isn't really much room to bring a mechanical crank to the outside. A DRO with an encoder wheel to turn a stepper would just be a few bundled wires instead of a mechanical linkage coming out of the front right or left window - which a mechanical linkage would possibly hinder the sheet metal if the piece is larger than 24" wide... If that makes any sense.
Mine was an atek as well. If you look at their catalog you'll see their Smart-gage option. That's the one I retrofitted. Its stupid expensive which pissed me off.
I saw that when I was looking it up, definitely pricey - I feel like it's a bit overkill for us. Just gotta figure out how to drive a stepper via an encoder, which I've seen a few videos on and it's much more streamlined now that I don't have to worry about any distance measuring too, since the glass scale will be in charge of that.
Eh, if belts work then they work. Definitely a lot faster for a production environment, in terms of keeping up with the operator. I'm not sure about the tolerances here because no one's actually said what they need to be, which is hard to design a machine around. I know for some downstream ops like TIG welding, the tolerances are shockingly tight- not quite machinist tolerances, but pretty close- to be able to hit procedure spec in some more precision industries and product lines. Nice! You're ahead of Grimsmo, then. Just give the operator a couple of different appropriate options for step size; you don't want them to be cranking away all day just to reach the next stop. I mean some changeover time is acceptable if you're gonna continue batchworking, I guess, but if you're trying to move toward one-piece flow, some rapid back and forth would be good. Maybe just a button that like, 50x's the encoder step size in the Arduino code for rapid acquisition. That way when there might be a workpiece in there and they only have one hand, they can tweak it at the lower setting based on the DRO.
Dimensions for bends are at most 001". So that's what I'd like to be aiming for. I like the idea of a fine adjust with the encoder but a much more rapid adjust with another. Could it be done with two separate encoders? I've got a couple laying around. I ordered a bunch of oddball components to try and bread board this contraption together. Finally got myself a decent benchtop power supply after deciding I've sacrificed too many dc power bricks I get with random products I don't use anymore.. lol Can't get my head around arduino just yet. Every time I see someone "program" it they just copy and paste some chunk of code and just say "done!" and I'm then standing there confused, lol.
It could be done with two separate encoders, you'd just have to attach a couple more interrupts (assuming you're counting with interrupts, I believe that's the norm with encoders in Arduino). I don't think that would inherently produce more program overhead, the main thing is just counting the encoder pulses to add/subtract them from the current encoder count, sending the stepper pulse train of the difference between current position and intended position any time there isn't an interrupt, and constantly tracking current position in case it gets interrupted again. Keeping everything asynchronous should keep it feeling snappy and responsive to the operator whist also being best practice for coding. I think the built in stepper.h library makes a lot of this much easier and more human-readable. Should be pretty straightforward, really, because "true position" is irrelevant to the program. You're working entirely in incremental positioning, so if things get janky somewhere, the operator can just twiddle an encoder some more to compensate. You don't want it too laggy and glitchy, of course, but you're also not trying to build a precision axis control. Use plenty of serial prints with the Arduino plugged into the computer to start working on it and tracking the encoder.
Parts came in, but didn't really get too far. Everything's wired to this post. I made sure to plug in the "zones" of the stepper motor into their correct places on the driver - though when everything was all set, the stepper reacted to maybe every third or fourth click of the encoder in one direction, but did just fine in the opposite direction. This code also has a return to 0 feature, which isn't really useful to me at all, but when pressed it returned just fine. I wasn't entirely sure if I had the zones correct or not, so I switched up some of the wires and now no matter what direction the encoder is turned, it doesn't move... Worst part is, it does this when the zones are returned to how they were originally. I haven't been able to get the little movement I had originally. Could I have fried the stepper driver? When I say it doesn't move, it sounds like it's fighting itself. I've rearranged the wires multiple times to no avail. Arduino Uno (Elegoo version) Stepper Driver Encoder Nema 17 Stepper Any ideas?
Never heard of the A3967, probably wouldn't even think about using one. For a production type environment where reliability counts, I'd either get a TMC stepstick like this: https://www.amazon.com/BIGTREETECH-TMC2209-Stepper-TMC2208-TMC2130/dp/B07ZPV4HFP/ or, even better and far easier to wire to, an industrial-style driver like this: https://www.amazon.com/STEPPERONLINE-1-0-4-2A-20-50VDC-Micro-step-Resolutions/dp/B06Y5VPSFN which is a pretty good price for a DM542 and Stepperonline are a fairly well established vendor at this point. I also use the Elegoo Unos for prototyping, and stepper motors are usually pretty bulletproof, so I'm assuming it's the driver. Also assuming the wiring is perfect- ripping it all apart and rewiring very slowly and deliberately is usually a good plan before spending more money.
Could be that your encoder code expects a 4x counts per detent encoder, but you have a single count per detent hooked up too. I would test the stepper code with a simple loop too (to rule out if the issue is on the UI/input side or on the motor/output side)
Also make sure you're multimeter-testing the stepper wiring. One of the phases might be backwards, the documentation may be incorrect, etc.
Something interesting maybe, it's been hooked up, powered on but I haven't been moving the encoder at all - but the driver chip is too hot to touch and the stepper is very warm. I'd like to try and see if I can get this working with what I've got as it's the exact same stuff in the video, but this is the kind of stuff that drives me nuts, aha. I've got extra drivers and another stepper to rule things out / test with. I was hoping it wasn't the stepper, tried another and it was the same result which makes me agree that it's likely the driver. I kind of understand what you're saying, I assume you're referring to the "StepsToTake=4". Just guessing, I changed it to 1 assuming that might do something. Trying it now. Edit: Now nothing happens... Ha.
Have you looked at quadrature encoding to understand what the Arduino is looking for and how it's able to count forward and backward using just the two offset square waves? It took me longer than it probably should have to wrap my head around it, but it should be clearer once you do as to whether one click = one step, or one click = one full "wavelength". MPG encoders are the latter, which caused me some issues one time. "StepsToTake" sounds like what I was talking about earlier with the scaling button. If you don't always want to be locked to a single stepper step per encoder click, you have to scale it by something reasonable. If you have a 20-step encoder and you want the revolutions to match with a 200-step (full-stepping) stepper, then every time you click the encoder you want the stepper to take 10 steps, right?
Nothing's changed since I've replaced the driver, rewired the entire circuit. If anything my blood pressure has risen. It's unfortunate doing something exactly like the tutorial has laid out, using their program, same components, yet different result. When the encoder is turned CW, it's taking a step forward, then a step back. But when the encoder is turned CCW, it does perfectly fine until a little hiccup and has a similar "one step forward, one step back" occurrence. I don't know why, I'd love it if someone could give the code a lookover or suggest different components and possibly the code to go with them. I am at the lowest of the low in understanding code and I've been unable to wrap my head around the majority of these electronic components and how the operate. I honestly just want something that will allow me to roll and encoder and move the stepper motor accordingly. I do like the idea of a button that adjusts speed of the encoder whilst pressed. This is the tutorial where the code is if someone's inclined to look it over.
Isolate the sections. Flash JUST a sketch that tests the motor, see if that works. Test sketches that just deal with encoder (or wire up buttons, encoders make for terrible UIs) And test that seperately. Then merge.
Yup. Wasn't kidding when I said about throwing serial prints in all over the place and testing plugged into the computer. The problem with blindly following tutorials is if one part doesn't work, you have no idea which part and no idea why it doesn't work. If you're anything like me, you need to go in the reverse order; need to solve a problem, and learn each part step by step (along with some handy best practices and nasty surprises like "variable scope") as you gradually combine them into a working system. "Reading an encoder", "controlling a stepper motor", etc. Then, the hard part is, when you combine them you need a hefty dose of abstract logical thinking to understand how to create the bits that tie them together and keep them functioning (like running totals, targets, flags, etc). That part a tutorial might help with, might not. I mostly don't get along too well with programming tutorials, to be honest. Except when moving machine axes, then they're wonderful.
I think I've decided to do four buttons.. Maybe. Maybe just two. But two momentary buttons that will drive the stepper CW or CCW. And maybe two other buttons for 'nudging' the backstop into its desired dimension. I found a test for just running the stepper and it didn't work, so I deemed my drivers to be terrible and ordered a TB6600 driver. We'll see if things hit the fan on Friday when the parts arrive.
Yeah, fairly certain, did the whole "hold wire a to wire b, if hard to turn, that's a pair." thing. With the tutorial, the driver didnt like the encoder I think, because when the encoder button was pressed, the motor always returned to the position smoothly without fighting itself. So I was pretty certain I got my pairs right.
I'm looking to do something exactly like the chop saw stop, but with a much smaller range. I only need 8 inches or so and would like good accuracy. (.001) or so. I want to use for a stop on a rule bending machine. Any pointers? any pre-made stuff out there that gets me most the way there? Thanks
thinking of getting this, pairing with the clear path servo from teknic. Electric CNC Linear Stage Actuator Linear Rail 200mm Stroke Cross Sliding Table SFU1605 Ballscrew C7 Slide Module for CNC Engraving Machine: Amazon.com: Industrial & Scientific