stepper motor logic

It's all about the code!
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stepper motor logic

Post by AndreyB »

puff 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?
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 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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: stepper motor logic

Post by puff »

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 :D 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.
Blown7
Posts: 4
Joined: Sun Apr 13, 2014 6:54 pm

Re: stepper motor logic

Post by Blown7 »

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.
meXanicus
contributor
contributor
Posts: 314
Joined: Sat Dec 21, 2013 2:42 pm
Location: Russia, Rostov-na-Donu

Re: stepper motor logic

Post by meXanicus »

С 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.
Я на Drive2 Alfa Romeo 156 SW
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stepper motor logic

Post by AndreyB »

[video][/video]

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
User avatar
Tambralinga
donator
donator
Posts: 174
Joined: Wed Jun 18, 2014 8:36 am
Location: Bangkok, Thailand

Re: stepper motor logic

Post by Tambralinga »

http://www.stealth316.com/2-isc-iac.htm
ISC for mitsubishi all model
You are an example for the use on Rusefi ?
Skype : shiva-p
+66 8 5357 5159
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stepper motor logic

Post by AndreyB »

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 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.

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
Number-One
contributor
contributor
Posts: 101
Joined: Sun Jan 05, 2014 2:59 pm

Re: stepper motor logic

Post by Number-One »

Great. Can i order one?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stepper motor logic

Post by AndreyB »

Number-One wrote:Great. Can i order one?
http://www.ebay.com/itm/261815066732
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
Number-One
contributor
contributor
Posts: 101
Joined: Sun Jan 05, 2014 2:59 pm

Re: stepper motor logic

Post by Number-One »

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.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: stepper motor logic

Post by kb1gtt »

I have A4988 set like this for truck IAC valve. If it's not noted below, there is no connection to that A4988 board.
IAC reference Haynes 12-41
-- A4988 ENABLE --> STM32 PE12
-- A4988 SLEEP --> A4988 RESET (JUMPER TOGETHER)
-- A4988 STEP --> STM32 PE14
-- A4988 DIRECTION --> STM32 PE10
-- A4988 GND --> GND (BOTH GND'S SHOULD BE NEAR HARNESS CONNECTOR)
-- A4988 VDD --> 5V
-- A4988 1B --> harness side of W20 --> Frank pin 1T --> ECU harness A20 --> step 4
-- A4988 1A --> harness side of W19 --> Frank pin 1S --> ECU harness A19 --> step 1
-- A4988 2A --> harness side of W17 --> Frank pin 1Q--> ECU harness A10 --> step 2
-- A4988 2B --> harness side of W18 --> Frank pin 1R --> ECU harness A11 --> step 3
-- A4988 GND --> GND (BOTH GND'S SHOULD BE NEAR HARNESS CONNECTOR)
-- A4988 VMOT --> 12V BAT (ADDED 47uF TO 100uF 25V CAP)
The -- A4988 is this board or equivalent. https://www.pololu.com/product/1182
Posted here http://rusefi.com/forum/viewtopic.php?f=3&t=864
Welcome to the friendlier side of internet crazy :)
Number-One
contributor
contributor
Posts: 101
Joined: Sun Jan 05, 2014 2:59 pm

Re: stepper motor logic

Post by Number-One »

Thank you.
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: stepper motor logic

Post by puff »

what lines do I add to my rover_v8.cpp file to switch to stepper idle and enable those pe10, pe12, pe14 pins?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stepper motor logic

Post by AndreyB »

setDefaultConfiguration has

Code: Select all

	boardConfiguration->idle.stepperDirectionPin = GPIOE_10;
	boardConfiguration->idle.stepperStepPin = GPIOE_12;
	engineConfiguration->stepperEnablePin = GPIOE_14;
	engineConfiguration->idleStepperReactionTime = 10;
	engineConfiguration->idleStepperTotalSteps = 150;
you just need to add

Code: Select all

boardConfiguration->useStepperIdle = true;
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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: stepper motor logic

Post by puff »

Used this file, compiled and flashed the firmware. As a result:

Code: Select all

2017-01-05 16_56: EngineState: confirmation_idleinfo:8
2017-01-05 16_56: EngineState: idleMode=IM_MANUAL position=50.00 isStepper=No
2017-01-05 16_56: EngineState: idle valve freq=200 on NONE
2017-01-05 16_56: EngineState: idleControl=IC_LINEAR
2017-01-05 16_56: EngineState: idle P=0.10 I=0.05 D=0.00 dT=10
Seems, not working?
Attachments
rover_v8.cpp
(5.74 KiB) Downloaded 816 times
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: stepper motor logic

Post by puff »

stupid me. haven't updated the file.
Post Reply