stepper motor logic
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
that's great! then, i'd look for the available step-dir drivers (any recommendations?)
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
[video][/video]
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
what are those boards you are using? have you checked the outputs with logic analyzer? might be the motor of a different type?
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: stepper motor logic
That's http://www.pololu.com/product/2976 with a Pacific something or another stepper motor. I'm assuming MS1 to 3 are disconnected, which I believe floats low, so full step configuration.
Have you set the current limit via that POT? If we don't know the motors ratings, we can guess at .5A to 1A.
Can you take the wire connected to 2A and connect it to 2B, also take 2B and connect to 2A. AKA flip one winding at a time.
Also can you start with very slow steps, say something like 1 pulse per second, or perhaps one pulse per .5 seconds. Once you get it working very slowly, you can start to speed up the pulses to see how fast you can get it to go. You'll find that at some pulse rate you'll stall the motor.
Have you set the current limit via that POT? If we don't know the motors ratings, we can guess at .5A to 1A.
Can you take the wire connected to 2A and connect it to 2B, also take 2B and connect to 2A. AKA flip one winding at a time.
Also can you start with very slow steps, say something like 1 pulse per second, or perhaps one pulse per .5 seconds. Once you get it working very slowly, you can start to speed up the pulses to see how fast you can get it to go. You'll find that at some pulse rate you'll stall the motor.
Welcome to the friendlier side of internet crazy 
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
btw, what is the code you are using? loos as if you are changing direction once a second. no jittering on video. jareds suggestion on decresing the frequency could also help.
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
https://svn.code.sf.net/p/rusefi/code/trunk/firmware/hw_layer/stepper.cpp
200ms pulses, there is no direction control whatsoever - DIR pin is ground. It would help if you can compile this (you would need to uncomment a line in hardware.cpp) and publish a screenshot of logic analyzer - maybe the code does not work, but I doubt that.
I've played with the potentiometer and it made not difference.
There was a suggestion about flipping the wires, I just did that. Same crazy jerking but no movement. The control board gets REALLY hot REALLY fast.
I am putting this on hold until someone figures out a reliable test platform - I am sick of doing hardware troubleshooting, I am a software guy actually. I've implemented the pulses, the pulses do not control this stepper.
200ms pulses, there is no direction control whatsoever - DIR pin is ground. It would help if you can compile this (you would need to uncomment a line in hardware.cpp) and publish a screenshot of logic analyzer - maybe the code does not work, but I doubt that.
I've played with the potentiometer and it made not difference.
There was a suggestion about flipping the wires, I just did that. Same crazy jerking but no movement. The control board gets REALLY hot REALLY fast.
I am putting this on hold until someone figures out a reliable test platform - I am sick of doing hardware troubleshooting, I am a software guy actually. I've implemented the pulses, the pulses do not control this stepper.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
you are speaking of this one?
Code: Select all
iacMotor.initialize(GPIOD_11, GPIOD_10);-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
Typical case of http://rusefi.com/wiki/index.php?title=40 (todo: need to translate this joke into English)puff wrote:http://www.pololu.com/product/2976/faqs
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
Number-One
- contributor

- Posts: 101
- Joined: Sun Jan 05, 2014 2:59 pm
Re: stepper motor logic
russian wrote:Right now I am implementing a two-wire setup simply because someone has donated the hardware and I can focus of the software.puff wrote:so, now the most interesting part - will it be implemented in two-wire or four-wire logic?
4 wires please
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
4 wires shouldn't be any more complex, but that would require 4 pins instead of 2 on the micro controller side, which could pose sort of a problem.
I'd also love to have 4 wires implementation (I got l293 and a stepper to check if it works right now
I'd also love to have 4 wires implementation (I got l293 and a stepper to check if it works right now
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
Same board, but different motor - this one is five wire (four wires go to the board and goes to power supply)
[video][/video]
Who wants to donate a real car stepper idle body?
[video][/video]
Who wants to donate a real car stepper idle body?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
PS: the original stepper motor is now also function. I am a lazy idiot, that was the problem.
On the old vider @ http://rusefi.com/forum/viewtopic.php?f=5&t=767&start=10#p13226 at 0:14 you can see that I only got two wires connected - I've assumed that having one coil would be enough to turn the stepper into one direction. Apparently that's not right, once I got four wires connected as should the issue got resolved.
On the old vider @ http://rusefi.com/forum/viewtopic.php?f=5&t=767&start=10#p13226 at 0:14 you can see that I only got two wires connected - I've assumed that having one coil would be enough to turn the stepper into one direction. Apparently that's not right, once I got four wires connected as should the issue got resolved.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: stepper motor logic
A day when you burn oxygen and learn something is a good day
At least it didn't smoke something. Those learning experiences are more expensive.
Welcome to the friendlier side of internet crazy 
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
Got a donation - just placed an order for a GM stepper IAC and pigtail.russian wrote:Who wants to donate a real car stepper idle body?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
Once again, what are the cons of directing drivers directly from the discovery board?
http://www.ti.com/product/sn754410
http://www.ti.com/lit/ds/symlink/sn754410.pdf
I got L293, but this seems to have some limitations in terms of operating temperature.
This would simplify the board, save some space and money.
http://www.ti.com/product/sn754410
http://www.ti.com/lit/ds/symlink/sn754410.pdf
I got L293, but this seems to have some limitations in terms of operating temperature.
This would simplify the board, save some space and money.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: stepper motor logic
What are the pro's? The A4988 is basically a H-bridge, but with some internal logic that implements features including micro stepping, current limiting, overlap prevention, ect. If we direct drive, many features will need to be built and software debugged. If we buy the chip, we can spend the limited software development time on other features.
Welcome to the friendlier side of internet crazy 
-
DaWaN
- Posts: 51
- Joined: Sat Sep 20, 2014 6:54 pm
- Location: Benschop, Netherlands
Re: stepper motor logic
The pro's of using the SN754410:kb1gtt wrote:What are the pro's? The A4988 is basically a H-bridge, but with some internal logic that implements features including micro stepping, current limiting, overlap prevention, ect. If we direct drive, many features will need to be built and software debugged. If we buy the chip, we can spend the limited software development time on other features.
-Really very cheap part and easy to source
-Outputs of the SN754410 can be easily repurposed
Both points are a big plus if building a fully integrated universal ECU. The SN754410 can be used to drive a high side relay (I recall the MX-5 has one) or something like a VTEC solenoid (altough it is a bit to weak for actual VTEC) and I also remember a weird Toyota IACV which needed some H-bridge-like driving (4A-GE has this thing I think) and the SN754410 can drive that too.
For the time being I agree with kb1gtt, but if RusEFI gains traction and there is a need for universal cheap ECU hardware instead of the many-board-DIY style being used now then the SN754410 makes sense. However, at the moment that is not the focus of rusEFI I think
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
A4988 datasheet says:
Operating Ambient Temperature TA Range S –20 to 85 ºC
as for pros, the support of four-pin stepper control in the firmware would allow people to build their own boards with various chips: STA508, STA509A, SN104690, TPIC2601, or even using discrete components, such as IRLML2502, IRLML0060 or IRLL024.
which exactly features you are talking about? i hardly imagine micro stepping is ever needed in automotive applications (I guess it's more of a cnc domain)
Operating Ambient Temperature TA Range S –20 to 85 ºC
as for pros, the support of four-pin stepper control in the firmware would allow people to build their own boards with various chips: STA508, STA509A, SN104690, TPIC2601, or even using discrete components, such as IRLML2502, IRLML0060 or IRLL024.
which exactly features you are talking about? i hardly imagine micro stepping is ever needed in automotive applications (I guess it's more of a cnc domain)
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
one more idea. what if we make a line in engine config, which would determine if it it would be 4-pin or step-dir control?
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
do you know a person who would make the 4-wire implementation? because trust me: once I have one implementation and it works, it would be hard to convince me to make another onepuff wrote:one more idea. what if we make a line in engine config, which would determine if it it would be 4-pin or step-dir control?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: stepper motor logic
this would be me
may be DaWaN
the thing is i got l293 (SN754410) - which is the power contour. I was very happy to know you started implementation of stepper control (no need to build PWM to stepper converter). To avoid purchasing that $20 board, I was researching some cheaper options and found solution based on 5 Russian chips
When discussing various options with forum people, all of them were convincing me do that in firmware, rather than in hardware, claiming that any extra circuitry adds complexity to the overall solution.
the thing is i got l293 (SN754410) - which is the power contour. I was very happy to know you started implementation of stepper control (no need to build PWM to stepper converter). To avoid purchasing that $20 board, I was researching some cheaper options and found solution based on 5 Russian chips
-
Blown7
- Posts: 4
- Joined: Sun Apr 13, 2014 6:54 pm
Re: stepper motor logic
Just looking around after being gone for a long while recuperating.
On FCA (Chrysler vehicles) the idle stepper circuit becomes the ETC circuit on throttle by wire ECU's. It does double duty as both the stepper motor and the throttle body motor use the same H bridge. Just a FYI in case this project moves forward with drive by throttle control someday.
On FCA (Chrysler vehicles) the idle stepper circuit becomes the ETC circuit on throttle by wire ECU's. It does double duty as both the stepper motor and the throttle body motor use the same H bridge. Just a FYI in case this project moves forward with drive by throttle control someday.
-
meXanicus
- contributor

- Posts: 314
- Joined: Sat Dec 21, 2013 2:42 pm
- Location: Russia, Rostov-na-Donu
Re: stepper motor logic
С 4-проводным управлением можно использовать шаговый двигатель или же электрическую дроссельную заслонку. При одной и той же печатной плате покрываются потребности обоих типов дроссельной заслонки. Это бы в конечном итоге сэкономило деньги.
Google.Translate: With 4-wire control, you can use a stepper motor or an electric throttle. At the same printed circuit board covers the needs of both types of throttle. This would ultimately save money.
Google.Translate: With 4-wire control, you can use a stepper motor or an electric throttle. At the same printed circuit board covers the needs of both types of throttle. This would ultimately save money.
Я на Drive2 Alfa Romeo 156 SW
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
[video][/video]
AC151 idle air control valve
Idle Air Control Valve 94-02 LT1 LT4 LS1 GM Pigtail
A4988 with Heat
AC151 idle air control valve
Idle Air Control Valve 94-02 LT1 LT4 LS1 GM Pigtail
A4988 with Heat
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- Tambralinga
- donator

- Posts: 174
- Joined: Wed Jun 18, 2014 8:36 am
- Location: Bangkok, Thailand
Re: stepper motor logic
http://www.stealth316.com/2-isc-iac.htm
ISC for mitsubishi all model
You are an example for the use on Rusefi ?
ISC for mitsubishi all model
You are an example for the use on Rusefi ?
Skype : shiva-p
+66 8 5357 5159
+66 8 5357 5159
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
I believe this one would work with rusEfi as long as you have the A4988 module - you would connect only four wires and simply leave two wires unconnected.Tambralinga wrote:http://www.stealth316.com/2-isc-iac.htm
ISC for mitsubishi all model
You are an example for the use on Rusefi ?
I do not have a stepped like that to try.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
Number-One
- contributor

- Posts: 101
- Joined: Sun Jan 05, 2014 2:59 pm
Re: stepper motor logic
Great. Can i order one?
- AndreyB
- Site Admin
- Posts: 14765
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: stepper motor logic
http://www.ebay.com/itm/261815066732Number-One wrote:Great. Can i order one?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
Number-One
- contributor

- Posts: 101
- Joined: Sun Jan 05, 2014 2:59 pm
Re: stepper motor logic
Hello, need instruction to connect the stepper board to stm.
I have these pins:
gnd-»gnd-ok
vdd-»5v-ok
1A,2A,1B.2B-»motor-ok
vmot? need? my motor only have 4 wires (2 coils) don´t need this pin right?
enable(rusefi enable pin)? which pin?
MS1?
MS2?
MS3?
Reset-»sleep-ok
step?
direction?
Need help,thank you.
I have these pins:
gnd-»gnd-ok
vdd-»5v-ok
1A,2A,1B.2B-»motor-ok
vmot? need? my motor only have 4 wires (2 coils) don´t need this pin right?
enable(rusefi enable pin)? which pin?
MS1?
MS2?
MS3?
Reset-»sleep-ok
step?
direction?
Need help,thank you.

