L297 L298 Stepper Motor Driver For Mac
I am trying to build my own stepper drivers for my 3 axis CNC plotter (a cnc with pen instead of a tool). And also plan to expand their use in future 3D printer projects. My motor driver would include L297 and L298. I assume those replying are familiar with L297 and L298 combined motor driver circuits. Since, I' will be using Arduino and RepRap Arduino g-code interpreter in the project I would like my drivers to be fully compatible with the interpreter i'll be using. I am not sure about the inputs pins in L297 that i'll be needing for application in my project. I know I 'll be using the following pins for sure: CW/CCW' Clock(steps) Enable Osc As we know they are the essential ones.
But I am not sure about Half/Full. I read on RepRap wiki page, The interpreter works in both mode but which one is better and will produce better results?? I am also not sure about the Sync,Home and Reset pins? I know what they do (took a look at the datasheet) but I don't know how they are used or for what they are used. (never seen anyone using those) Do i need those pins? It would be really helpful if someone could guide me in the right direction.
I would also appreciate advises that would be help me complete this project successfully. FULL / HALF step.
If you can, use half step, the motor will be much smoother at lower speeds. HOME: you put a switch at the end, ideally a switch that is NOT going to break when you run into it. Glancing blow is best design for an end switch. You run full speed into it. Then stop, back up, then slowly run till it changes state. You look at the number of steps you have used to get there.
If you add every step towards the positive and subtract every step that is in the negative direction, the ideal balance is 0. You went out 10,375 steps, you came back 10,375. However if you went out 10,375 and you came back 10,100. Then something is amiss. Home allows you to see and verify that total. Also, it is the 0 on each axis. The 0 from which everything is referenced.
The reason I advocate specialized stepper drivers such as the Pololu DRV8825 or A4988 is because they make the job of controlling stepper motors sooo much easier. And they take a lot of the calculation load off the 'long in the tooth' Arduino.
Using an L297 / L298 is a bit like painting the exterior walls of a house with a 25mm paintbrush - it can be done, but why would you bother? By all means use an L297/ L298 if you prefer. But make sure you are fully aware of what the specialized drivers can do before you make that decision.R. The reason I advocate specialized stepper drivers such as the Pololu DRV8825 or A4988 is because they make the job of controlling stepper motors sooo much easier.
And they take a lot of the calculation load off the 'long in the tooth' Arduino. Using an L297 / L298 is a bit like painting the exterior walls of a house with a 25mm paintbrush - it can be done, but why would you bother? By all means use an L297/ L298 if you prefer.
But make sure you are fully aware of what the specialized drivers can do before you make that decision.R. The inputs and outputs are the same. The motor connection is the same the power supply is the same with the L297, they both take step and dir inputs.
They both have resistance settings for current limiting they both have disable 'out of the box' when you buy a pre-made board, you connect power, connect the motor, connect the signal, run the library and run the motor. For the L298, you have to use 4 pins, for may of the other drivers, you use two. in this APPLICATION, after all APPLICATION dictates all. He says he is following the work of others.
If someone has a device like a plotter that they have working, then deviating from the prescribed instructions has a 50/50 shot (or worse) of getting the project to work the first time. The wonderful part about stepper drivers is that in many places, you can swap one type for another type because they are almost interchangeable. The control/software does not see any difference, the power supply does not and the motors do not. Also, I believe that you have never actually used an L298. It is like painting a house with a higher power pressure painter with only 2 settings. The A4988 is like painting a house with a low power spray painter with 5 settings.
The mechanical gearing allows the L298 to do the same thing as a microstepper. I have no clue why so many people come to this list and say I have an L298 and then are told to thow them away and buy something else that does the exact same thing, only a bit different. It is the only device that I have seen on this list that is treated this way. There is nothing inherently wrong with the chip. It is only in the mind of those offering help. And I have yet to see ANYONE ever say they could not get an L298 to work, or even that it was difficult to get to work.
The knowledge base for the L298 rivals that of the Arduino. I posted similar questions in several other electronics forums but instead of helping me and encouraging to me build my own stuff people suggested me to buy 50$-60$ driver boards with their fancy high resolution mircrostepping features. For god sake, I am not going to machine an engine part for SR-71 black bird. I don't need such resolutions. I bet those who milled the the SR-71's engine parts didn't have such resolutions. I am just a diy enthusiasts who wants to build cool stuff by myself.
This is why I am here in the first place. If I wanted to buy and assemble stuff I would have got a CNC kit and watch a tutorial on youtube and assembled it.
This is what hobbyist community has come to. Buying pre-made kits and assembling them.
I hate this new culture that has been introduced into hobbyist electronics community. 'Connect pin 1 here, pin 2 there, 1k resistor here, upload this code and switch on.congratulations, you have made your own bla bla bla.' I have seen kids who don't even know how to program a micro controller coming to school with quad copters and claiming to built it by themselves and being praised by teachers for what a fantastic job they had done. But the truth is, they just ordered few parts online and connected them together by watching a tutorial on YouTube and have no idea what so ever how the damn thing works. This is pure cancer. I mean kids in 70s used to build computers by reading manuals of the computers that existed and from parts they found in scrap yards. Those were the real hobbyist and enthusiasts.
Now you are guilty of exactly the same thing as those modern teachers you so despise. I WAS a kid in the 70s, you could not build anything from a computer manual. You had to get the data sheets, by post, study them and make your own design. I know because that is what I did. Now to the real problem with those chips. 1) They use transistors, therefore there is a significant voltage drop or loss in the H-bridge. This leads to more heat that has to be dissipated.
A modern design will use FETs with low Ron resistance thus reducing the heat and voltage loss. The loss in voltage also means you have to have a higher supply voltage than you would otherwise need or accept lower performance. 2) You need the two chips to make a chopping regulator and the layout is a bit critical in order for this to be stable.
3) The current sensing resistor passes all the current through them. This means that they have to be high wattage resistors and the control of current is limited to the fixed values of resistor you can get, or bodge up by series / parallel resistor combinations. 4) Using these chips is an expensive option, there are much cheaper stepping motor driver chips. Way back in the 1920s there was a magazine called 'Practical Wireless', I read an old copy when I was at University.
In this they described how you could make your own capacitors by filing down coins with a silver content and melting the silver with a blow torch onto some broken pottery. Kids of today just buy capacitors, what sort of DIY is that? Well it is the 'Standing on the shoulders of giants' DIY which allows more to be achieved instead of fighting the battles of the past. So yes you can fight those battles, build an ALU from TTL or any of the old stuff but this is nostalgia, nothing else. So what was a Heathkit kit? Or any one of a number of kits that make things easy to learn. The only thing wrong here is the lack of knowledge of the educators.
The trick in any sort of education at first is to make the student think they know a lot more than they do. Look at reading books for very small children, very few words, lots of pictures and lots of repetition. 'Spot can run, see spot run and run', once they loose the fear of words they can then genuinely begin to learn. It is the same with electronics, I started at the age of 8 with a kit called TransTronic ( there seems to be no reference to this on the net these days ).
You had a peg board and components on plastic mounts with clips for wires. You put an overlay over the board and plugged the parts into it and then followed the pictures with the wires. I could make a radio. Without that I probably would not have had a life long career in electronics. Right, but you said 'standing on the shoulders of giants' I agree that we are setting a fundamental layer for future generations, just like those writing.bat files in DOS did 30 years ago.
Our work is standing on the shoulders of those who came before. Those kids of today will reminisce to the days they used a thing called a keyboard. I think it is unnecessary to make your own whatever, if it is commonly sold.
Instead of spending hours making a cap and a resistor to light a light, you buy the parts and make your thing. Unnecessary, but done daily by people putting chips on their own boards. My issue is that all too frequently, people come to this list to figure out how to do a specific thing.
They already bought the parts, got them on the bench and have almost the whole thing working. Want some handholding. What do I do with this. And then are told to throw it all away and go out an order new parts that do the same thing, but in a different package that does a few more features that may never be used. I have seen it time and time again on the L298. It's a electrolytic cap in a mylar world.
I have seen it on programs as well. One can look at a sketch and know the level of the writer. A lot of delay?
A lot of nested if statements? Someone who has a very small toolbox, but is able to get the job done, just like Mr Grumpy was in the 80's with caps and resistors and a 555. People will say to hit delete and go figure out how to use arrays and state machines. In other words, that program that has 20 hours in the making should be tossed. When it will work fine with a few tweaks. When often, it is the next logical step, but there is no actual reason to change. A for loop is nothing but pre-written code that does the exact same thing as can be done the long way.
For the most part, that was true, Mike - and maybe it was a different thing for you guys across the pond, as well. I wasn't a kid messing with computers in the 70's - I got my first real computer (TRS-80 Color Computer 2 - 16K, etc) in 1984. My knowledge of the time was coding in BASIC, and typing in programs from magazines (and converting those that didn't have an example for my machine). More 'standing on shoulders' I suppose - but it did lead me to an eventual career in software development. That said - it was possible (barely) that - if you had access to the Apple II/IIe (and maybe even the Apple I) manuals - you could use them to build your own machine.
The manual had a complete schematic in the back (folded out and everything), as well as a text listing of the ROM and monitor assembler code. So - in theory, and if you had the equipment, knowledge, time, and money - you could 'clone' the Apple. I'm sure more than a few people did so. I know the Apple was cloned in the Soviet Union, too. With the Color Computer 1 and 2 - you could also get the schematics (I don't recall if they were included with the machine in the manual or not - maybe - or you may have had to get a copy of the service manual from a friendly Radio Shack bench tech). The system was mainly a bog-standard Motorola 68xx design - all the chips and such were all from Motorola, including the VDG and such. What you would have trouble getting would be the ROM - you would have had to get a dump of it somewhere, then had some way to burn it to an EPROM (not cheap equipment back then).
But I bet people did it. Side note: You couldn't do the same with the CoCo 3, though - the GIME chip, which was a custom ASIC of the day, was not available to the public - to this day, it's lack of availability has been a thorn in the side of us who run these machines, as there isn't any chip-level documentation on how it worked, nor any real datasheets available. Paid youtube downloader for mac. While it has been emulated to a great extent, that emulation isn't anywhere near perfect. Nor has anyone been able to yet recreate it in hardware - though there does exist a very large wire-wrapped CoCo 3 prototype that is in the process of being reverse-engineered - it does not have a GIME on it - but it was used for OS-9 development at Microware, so there is a suspicion that it's GIME was implemented using a more discrete method.
Otherwise - I know there was available more than a few books on how to build your own computer from ICs and such (CPU, glue 74xx TTL stuff, RAM, etc) - most of them from TAB Books. Byte Magazine - among others - also published many articles on building your own computers. Most of these were pretty rudimentary - even compared to contemporary equipment - but they worked, and gave people a lower cost way to experience computers and computing - and for someone skilled enough, most of the time they could be easily expanded in some pretty extreme ways. There were also several robotics books for hobbyists of that era (I have copies of most of them on my bookshelf) - and more than a few of those described how to build a computer (or something akin to a hardware state machine controller - at the minimum) to control the robot - microcontrollers were definitely not a thing then, as you know.
So - here in the States at least - it was possible (and yeah - you probably still needed the datasheets - not arguing that) to build a computer 'from the manual' back in the 1970s; ok - late 1970s - really, homemade computers weren't a thing until around 1975-76, with the advent of the 8080 and other low-cost cpu's and glue logic that came out from Intel and Motorola. Prior to that, I do know there were people playing around with everything from the 4004 (at best), to old telephone relays, custom analog computing machines, discrete logic, switches and lightbulbs and other things - but most of that stuff was mainly very basic logic circuits - maybe an adder or counter here and there, or basic flip-flop style 'memory' built from relays.
I know there were a few very ambitious people who built custom electro-mechanical machines that used custom paper tape or other methods for I/O, memory - relay-based registers - and other custom pieces - and the machines were very large, very slow, and had little capability - but they taught their builders a ton. Even those were typically informed by more than a few books, though such information wasn't easy to obtain in a form that showed exactly how it worked (I have collected a few university-level textbooks from the 1950s and 60s on computer design and programming - some of them go into enough depth for you to construct a whole tube or transistor machine - if you had the money, space, and time to do so). Well - enough of the nostalgia trip I guess - I'm not trying to argue with you here, Mike. Overall, yes, we all stand on the shoulders of giants, and we should use that leverage when and where possible. Ideally, someone will do the research and realize that the pre-constructed parts and PCBs are a great value, and free up your time to do more interesting stuff.
But - some people do have old L297 and L298 chips lying around or got them for a great deal (I have a few tubes myself laying around) - so, if they can fit the application, and efficiency isn't a great concern - and the extra functionality isn't needed - people shouldn't berate somebody on their choice, but should instead help them to understand whatever their problem is. They would get their problem (hopefully) solved - and they'll have the knowledge perhaps to next time look into the more modern devices that are available.
This is true - but OP did say they were planning on using an L297/298 combo for the driver, which (if following the datasheet(s) app examples) - I believe - does do current limiting (I might be wrong, though - I'd have to review the datasheets again myself). That said - most people seem to have no clue (which indicates they haven't read the datasheet for the L298) of the availability of the L297, or its purpose in the chipset (strangely, though, I don't think I've ever seen anyone try to develop with the Arduino/ATMega328 a software and microcontroller solution to put in place of the L297 - ie, an L298 Motor Driver Library - with microstepping, current-limiting, etc). The trick in any sort of education at first is to make the student think they know a lot more than they do. Look at reading books for very small children, very few words, lots of pictures and lots of repetition. 'Spot can run, see spot run and run', once they loose the fear of words they can then genuinely begin to learn. It is the same with electronics, I started at the age of 8 with a kit called TransTronic ( there seems to be no reference to this on the net these days ).
You had a peg board and components on plastic mounts with clips for wires. You put an overlay over the board and plugged the parts into it and then followed the pictures with the wires. I could make a radio. Without that I probably would not have had a life long career in electronics. I was ok with kits and stuff until it got annoying. I myself got into electronics by assembling my first Line following robot when i was 14. And now, I am an engineering student, joined this july.
L298 Motor Driver Arduino
But i feel these days they are over doing it. There's a kit for everything. They are making people lazy instead of inspiring them to build things. For example: When i was building my first audio Amplifier circuit, I understood how sensitive the damn thing was. It took me hours to figure out the capacitor values that were fit for my applications. I learned a lot. I don't think people who buy amplifier kits online get the same experience that I got.
Second, the community has got a lot worst as well. I must have chosen L297 and L298 for a reason. They seem to completely ignore it and suggest stuff that i already know about and I don't need or don't have access to. The reason I can't use Allegro's chip because they are not available in my country. I looked for it every where and the only way I can get it in my country is if I order it online. Besides, this is my first time working with a stepper motor and I am so excited about the idea of etching my own PC board and building my own motor driver that I totally gave up on the idea of ordering it online. And that is why I am here.
I need help and guidance not pre-made solutions. And I thank you a lot that you helped by mentioning the limitations and drawbacks of the two chips. But I think, those chips are good enough for my project. See, I learned something new. I wouldn't have learned it if had ordered that Allegro chip online and went on with my project. Thanks everyone who replied.