Jump to content

Speedometer stepper control


Lotussuper7
 Share

Recommended Posts

After much messing around trying too get my cable driven speedometer working properly, I have decided to try and add a stepper motor to drive the speedometer directly ( and get rid of the stupid cable , lol). I'm going to 3d print a bracket to mount the motor on the rear of the gauge , and come up with some way of connecting them (I want to keep the original Smiths gauge as it has the cars odometer). I have got wheel speed working well, so I guess my question is, Can I drive a standard Nema (14/17) stepper directly using the Aux outs, or should I add an external stepper driver and just use one digital out to drive the driver hi/low etc. Is there a benefit to either way ecu wise? 

 

Any thoughts welcome.

 

Cheers

 

Link to comment
Share on other sites

Cant really control a stepper like that without feed back.  GP Stepper control currently only works with a analog feedback position sensor.  

Im not sure if an external driver will work either as it would need to do some kind of home/reset/zero procedure against a hard mechanical stop every start up to know its position to start counting steps from.

Also you will need some type of gearbox as usually 1 step is 1/8 of a turn.  

Link to comment
Share on other sites

My original plan was to use a a4988 stepper driver to drive the stepper motor. This requires a high pulse to drive the stepper one step, There would be no need to have a home position as to stop the speedometer counting only requires the stepper to stop turning, not like controlling a air bleed that needs to reverse to open/close a valve. Can the ecu generate a frequency relative to the speed frequency generated by the wheel speed sensor?

Link to comment
Share on other sites

Just to clarify what I was trying to achieve. My idea was to still use the cable drive input of the speedometer, and replicate the flex cable spinning the input with the stepper, I wasn't going to go as far as interfacing directly to the needle and driving to a specified angle etc.. no cool needle test sweep unfortunately.

It just needs to speed up the stepper as wheel speed increases, with a tuning offset. I was thinking this could just be achieved with a math channel? The stepper driver was going to be left in full step mode to get the lowest frequency drive signal, and fastest rpm of the stepper, the cable spins relatively fast.

 

 

Link to comment
Share on other sites

15 minutes ago, Vaughan said:

There is a built in Speedo Output function which outputs a varying frequency with the ability to have an offset, multi and sweep at power on.

Thanks for the reply, so that would probably be the way to go then, use an external stepper driver and drive it off an aux channel using the speedometer feature, rather than drive the stepper from the ecu. I only suggested driving it from the ecu for simplicity, as I dont use a idle stepper, I figured this might have been a simple option. 

Link to comment
Share on other sites

Thats not how a stepper motor works.  A "step" only tells the motor how far to move from its current position.  So say for instance 100kmh was 100degs clockwise from 0kmh and the stepper was known to be sitting at 0 and is the common 1.8deg/step type.  If you accelerated to 100khm and stayed there then the ecu would have to do 55 clockwise steps and thats it.  It would stop pulsing after 55 counts and only pulse again when/if the speed changed.  So if the speed suddenly changed to 95kmh then the ecu would only do 2 pulses anticlockwise and then stop again. 

The problem is with no position feed back the only way the ecu can know where the needle is, is by keeping a tally of how many steps it has told it to move in each direction.   To further complicate this - just because the ecu told the stepper motor to move 1 step, it doesnt always mean it actually happened - they sometimes "miss" steps or jump two steps.  This is why stepper motors without feed back always have some sort of routine they go through on power up or power down to reset the "zero" position.  With an idle valve this happens by winding the valve full open and counting the steps backwards on power down.  I assume in stepper motor gauges they either force it against a mechanical stop or have a small encoder built in to the motor for feedback.

Edit:  You could possibly look at an RC servo (like they use in RC areoplanes etc).  These use a PWM signal to command an angular position.  From memory quite a simple signal that can be generated with a GP PWM table. All the feedback and PID stuff for position control is built into servo. Only thing Im not sure of is the common angualr range they are available in.   

Link to comment
Share on other sites

54 minutes ago, Adamw said:

Thats not how a stepper motor works.  A "step" only tells the motor how far to move from its current position.  So say for instance 100kmh was 100degs clockwise from 0kmh and the stepper was known to be sitting at 0 and is the common 1.8deg/step type.  If you accelerated to 100khm and stayed there then the ecu would have to do 55 clockwise steps and thats it.  It would stop pulsing after 55 counts and only pulse again when/if the speed changed.  So if the speed suddenly changed to 95kmh then the ecu would only do 2 pulses anticlockwise and then stop again. 

The problem is with no position feed back the only way the ecu can know where the needle is, is by keeping a tally of how many steps it has told it to move in each direction.   To further complicate this - just because the ecu told the stepper motor to move 1 step, it doesnt always mean it actually happened - they sometimes "miss" steps or jump two steps.  This is why stepper motors without feed back always have some sort of routine they go through on power up or power down to reset the "zero" position.  With an idle valve this happens by winding the valve full open and counting the steps backwards on power down.  I assume in stepper motor gauges they either force it against a mechanical stop or have a small encoder built in to the motor for feedback.

Edit:  You could possibly look at an RC servo (like they use in RC areoplanes etc).  These use a PWM signal to command an angular position.  From memory quite a simple signal that can be generated with a GP PWM table. All the feedback and PID stuff for position control is built into servo. Only thing Im not sure of is the common angualr range they are available in.   

Thanks for your reply. I realise how a stepper motor works as I have many years working with 3d printers. 

I dont think we are quite on the same page. The speedometer I want to drive does not have absolute positioning, and I dont want to drive it do defined positions. It works by spinning a magnet inside and dragging the needle around further the faster the input spins.

To increase the speed showing on the speedo simply requires spinning the input faster or slower. No need for absolute position, only number of pulses per sec need to change relative to the cars speed. This is a fixed ratio driven from the gearbox output.

7 minutes ago, Lotussuper7 said:

Thanks for your reply. I realise how a stepper motor works as I have many years working with 3d printers. 

I dont think we are quite on the same page. The speedometer I want to drive does not have absolute positioning, and I dont want to drive it do defined positions. It works by spinning a magnet inside and dragging the needle around further the faster the input spins.

To increase the speed showing on the speedo simply requires spinning the input faster or slower. No need for absolute position, only number of pulses per sec need to change relative to the cars speed. This is a fixed ratio driven from the gearbox output.

I'm not looking for absolute precision here, just a way to have the odometer stay working, and have 'close enough' speed  showing. I have the digital wheel speed available, and can display this on my displaylink screen also.

Link to comment
Share on other sites

Ok missed the post about driving via the old cable input.  Most steeper motor gauges I have seen the stepper is directly connected to the needle.

The common standard for speedo drives is 1000 turns per 100 km, so for 200kmh you will need a motor capable of about 2000RPM.  Can those common steppers do that? 

Link to comment
Share on other sites

11 minutes ago, Adamw said:

Ok missed the post about driving via the old cable input.  Most steeper motor gauges I have seen the stepper is directly connected to the needle.

The common standard for speedo drives is 1000 turns per 100 km, so for 200kmh you will need a motor capable of about 2000RPM.  Can those common steppers do that? 

That's just what I was investigating. Seems most can support around 1500 rpm with full stepping. Dependent on the driven voltage and load. The gauge require very little torque to operate, it will be the speed that may be an issue, may need to incorporate a couple of gears (or belt) into the 3d printed design. Do you know off hand how many pulses (hz) the Fury x can supply on the aux outputs? Standard steppers on full step use 200 pulses per rev, so at say 2000 turns, that would be 2000x200 = 400,000 pulses at 200kph. Maybe less obviously if gearing is involved.

Link to comment
Share on other sites

You mentioned you could drive a standard hobby servo. On that ground, could you just control a Radio control brushless/brushed speed controller and spin a brushless/brushed motor instead of the stepper, I have loads of rc gear. A brushed motor may be better as they usually have better low speed capabilities. You can also no doubt get pwm driven speed controllers for Arduino etc. Will have a look around.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...