IAC stepper step output

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

Post Reply
lutorm
Helpful MS/Extra'er
Posts: 146
Joined: Sat Apr 11, 2015 2:53 pm
Location: The island of Hawaii

IAC stepper step output

Post by lutorm »

Hey all,

I'm going to run an IAC stepper controlled by an Arduino that's already handling a bunch of auxiliary stuff for my Microsquirt, talking to it over CAN. I'm getting the step value in the broadcast and can run the motor according to that position, but the question is how to handle the homing.

I was going to initialize my view of the "current" stepper position at power-up from the first position sent by the MS, but it has already gone through a substantial part of the homing sequence before I get the first broadcast packet. I think I need to independently home the motor before starting to listen to what position the MS is wanting. However, this requires me knowing how the IAC step value is initialized, and I haven't seen it documented exactly how this step value is defined.

If the settings are such that, say, wide open steps is 100 and homing is 150, does this mean that:
  • If homing direction is closed, homing takes 150 steps in the closing direction and then calls the current position 0?
  • If homing direction is open, homing takes 150 steps in the open direction and then calls the current position 100?
Any info would be helpful.

Thanks,

/Patrik
CTMBol
MS/Extra Newbie
Posts: 29
Joined: Sun Sep 18, 2016 7:06 am
Location: The Netherlands

Re: IAC stepper step output

Post by CTMBol »

Hello Patrik,

I don't know which firmware version you use. But you can see in Tunerstudio homing steps and homing direction. So simulate that with your arduino and ignore the first few can messages.

Greetings Marcel
lutorm
Helpful MS/Extra'er
Posts: 146
Joined: Sat Apr 11, 2015 2:53 pm
Location: The island of Hawaii

Re: IAC stepper step output

Post by lutorm »

This is with a 3.4.1 Microsquirt.

That's essentially what I've done, but I still need to know how the positions correspond. It looks like it's essentially as I said -- after homed open it considers that position to be the "fully open" setting. I think this is going to work.
Post Reply