Hello, I am trying to command a 4-wire bipolar stepper motor using an ATMEGA8 and L293d H-bridge. Could anyone help me with a piece of code and an electric scheme?
Thanks in advance!
How far did you search? There's been tons of prior threads that mentioned "h-bridge"
One thing I feel worth pointing out, as it would appear from your OP that you only have one H bridge, you'll need two H bridges to drive a 4 wire (bipolar) stepper motor.
From the information I have found, only one H-bridge is needed. Here is something I have found: http://www.plc-doc.com/stepper-m...
But I would need a code for Atmel Studio 6.2. Can anybody help me modify the code in the link?
Howard_Smith, I suppose L293d is a dual H-bridge.
The given code looks like Codevision, why not simply get the evaluation version of that?
Could you help me with that?
In truth I did not bother to check the device when I saw the OP, but yes that device does contain 2 H bridges. Have you not considered using a newer device? Perhaps one that is capable of microstepping, such as the L6472 (or the L6482 if you need external FETs for more powerful motors) which have the advantage of SPI communication, essentially meaning all you have to do is send commands to it over SPI to drive your motor.
Edit: If you have an Arduino you can get a Nucleo board for the L6474 which would no doubt have an Arduino library for it already, which you could simply import into AS7. I don't know where in the world you are but I can pick one of those up for a measily £10 GBP
Ampertronics Pty. Ltd.
* Electronic Design * Custom Products * Contract Assembly
From the information I have found, only one H-bridge is needed.
Wrong. You need one H-bridge per winding. Since your motor has 2 windings you need two H-bridges. There many driver-ICs available. They vary in e.g. max current, and also in other capabilities. E.g. do you need microstepping?
You can of-course build your own H-bridges from discrete components, but in many cases the driver-ICs makes things easier (not that they remove all discrete components, but a lot of'em..)
There can be no specific advice given unless you give some numbers for your motor. Current? Voltage? Do you have a manufacturer name and a model/part number?
As has been hinted at above there are loads of info on the Web re stepper motors. First stop is often this: http://homepage.divms.uiowa.edu/... (Carefulo, he's writing about both unipolar and bipolar motors!).
I'm a fan of the NJMnnnn driver ICs for bipolars: http://www.njr.com/semicon/motor... NJR has a bunch of nice app notes that are excellent reads. If you look e.g. at http://www.njr.com/semicon/produ... then the links to the app notes are half-way down the page under the "Related Data" heading.
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
Thanks for the valuable information but the proiect I have to make involves a bipolar stepper motor and an Atmega8. I also already bought an L293d driver. The only problem I have is with writing the code for Atmega8. Does anyone have made a program like that? I can pay, also.
Regarding the stepper motor, it is a DC 12V with 7.5° per step.
Everything you need.
But if your professor knows how to use Google to search, s/he will find this also.
Ross McKenzie ValuSoft Melbourne Australia
I already found that website. But I don't understand the electric scheme. It uses a 4 wire bipolar stepper motor but in the electric scheme, there are 5 wires.
You really didn't read the site too closely did you? I see only four wires to the motor.
Why is the voltage and current draw of the motor important? Hint: voltage * current = power. Most components have explicit maximum power ratings in Watts, or implied by stating both voltage and current.
Thanks for the valuable information but the proiect I have to make involves a bipolar stepper
If that was re my post then what is the "but" about? Jones site is full of info regarding bipolar stepper motors. NJM/NJR as a lot of driver ICs for bipolars.
But I don't understand the electric scheme. It uses a 4 wire bipolar stepper motor but in the electric scheme, there are 5 wires.
If you ask questions about things you don't understand we will try to help you understand. And since the suspicion on this being a school assignment has been raised: No-one will give or sell ready-to-run code if we suspect this is a school assignment.
I did not asked for a ready-to-run code.
And it is not for a school asignment. It truly is for a school project.
School assignment or school project does not matter. School projects are for you to solve. We can help by answering questions and explain stuff but will not simply give away ready-to-run code. And you're definitively not supposed to buy solutions for school work.
Ok. Can you recommend some material regarding stepper motor control and atmega8 programming? I can't find too much information. The atmega8 data sheet does not contain too much information that I need.
The link that I gave you was a fairly detailed explanation of the theory. Yes it includes code, but you do not have to use it directly. You could use it to learn the principles of operation and then attempt writing your own version. Understand?
No. The ATmega data sheet does not talk about specific applications. That is only natural sincd the ATmega can be used for thousands of different applications.
You simply wont find all info in one place. It'll be pieces here and pieces there and it is your job to put it together. (Unless someone has done exactly what you are looking for and has put it on the web...)
Have you had a look through Jones site that I pointed to?
This looks interesting : http://www.instructables.com/id/Bipolar-Stepper-Motor/
It was the fifth hit when I googled "atmega h-bridge bipolar stepper"...
Now I'm studying it. Thanks a lot!
If you know how to google and read why do you then bother us with simple questions?
Please remember that honey works better than vinegar.
Keep it nice or there will be repercussions.
© 2018 Microchip Technology Inc.