I would like to use my Alfa Romeo speedo in my simrig, I have got the cluster pinout and the speed signal is coming from the ABS (Just like any other car, my BMW cluster works like charm). The only problem is, it's no moving. I have tried a wide range of square-waves to see if it's using a different frequency band, no joy. (A 4N35 opto switches the signal pin to GND, so it's isolated from the MCU.) Same goes for the Tachometer(REV) (The only difference it's getting it's signal from the ignition coil, SGN -> +12V.) I was able to pop this one up to 7000 1/min and by lowering the frequency it was going down to ~5000 1/min and after that back to 0. However incresing the frequency did not get it back to 5000 1/min. (It's quite weird, maybe this one is broken.) The Tachometer has a MLX14308IBF wired up to the stepper, I could not find the datasheet for this. The Speedometer only has an LCD Driver, some sort of MCU and an EEPROM (storing and calculating distance travelled?!)

I have decided to take it apart and drive the stepper motor directly. The stepper motor has 4 pins and of course has no markings on it except: 048.5302.9915 (38) 39/01 this get's us nowhere as it's a date code and some sort of serial number. After a quick google search I have figured out that I'm facing with a bipolar stepper motor, so I need a L293D to drive it. I have built the circuit and started testing ( http://www.tigoe.com/pcomp/code/circuits/motors/stepper-motors/ ) L293D 2 wire control

The site has the arduino code as well. No matter what I was setting the step the Speedometer showed 110km/h or 220km/h after some random needle "waving". So I have decided to use all 4 control lines instead of 2 (dropped the resistors and the NPNs). Now it only goes up to ~40km/h or ~240km/h (depends on the wiring). https://www.flickr.com/photos/zoszko/14995250153/in/photostream/ Here you can check out the PCB and the back of the stepper: https://www.flickr.com/photos/zoszko/15616229922/in/photostream/ (has no driver IC) https://www.flickr.com/photos/zoszko/15615403925/in/photostream/ (ignore the markings on it's back, those are mine)

I can upload the picture of the Tachometer as well if it helps. :)

So after the story telling, the actual question:

  • Shall I keep playing with the square waves (any actual value would help a lot or other method, to test emulating the ABS.)?
  • How can I determine the motorSteps for 1 circle? (If it's too low the stepper "vibrates" if it's to high it "cries".)
  • Does the L293D HBridge will do the trick or I should use something else?

Thank You for reading this :) Z.

EDIT #1: The Power consumption is 0.08A @ 12V it sits at 0.08A even when it's "waving" .

  • \$\begingroup\$ how powerful is this stepper motor? Will the L293D handle the current? You really should find a better stepper driver IC, but I guess you are directly controlling it with a microcontroller so maybe this quad half-bridge is okay. Also can you please edit your question to remove all the half-words? It's terrible to read, with things like "freq" and "diff". Also try to include units (like kHz, just not k) wherever you can. \$\endgroup\$
    – KyranF
    Oct 24, 2014 at 14:44
  • \$\begingroup\$ Well they don't have to be powerfull as the only move one single plastic needle. The half-words are now gone and I have also corrected those values, so now everyone should get it. \$\endgroup\$
    – Zoszko
    Oct 24, 2014 at 16:26
  • 2
    \$\begingroup\$ I don't believe these are really stepper motors at all. More like a sort of sine/cosine vector meter movement. In effect, you could argue it is sort of like a stepper motor operated only in microstepping mode that doesn't really span more than a step or four. \$\endgroup\$ Oct 24, 2014 at 16:38
  • 1
    \$\begingroup\$ That would explain the two steps of 110 and 220km/h... If so, you want separate PWM signals from the Arduino into control1 and control2. 50% duty = 0, 0%= -1, 100% = +1. Then feed sin(speed) to one and cos(speed) to the other. \$\endgroup\$
    – user16324
    Oct 24, 2014 at 16:48
  • \$\begingroup\$ Thank you guys! I'm just about to creat my very own Arduino library based on this, BUT there is no -1 step in the Stepper.h as the stepper motors use the following to identify steps: switch (thisStep) { case 0: /* 01 / digitalWrite(motor_pin_1, LOW); digitalWrite(motor_pin_2, HIGH); break; case 1: / 11 / .. break; case 2: / 10 / .. break; case 3: / 00 */ .. break; } I can change these to analogWrite(motor_pin_1, 127) and analogWrite(motor_pin_1, 255). I am not quite sure how am I gonna do the cos and sine feed... \$\endgroup\$
    – Zoszko
    Oct 24, 2014 at 23:34

1 Answer 1


Well, you might say I did not solved the problem of driving these gauges with an Arduino, but I have solved the problem. I have just ordered a couple X27.168 5V stepper motors (~$2/pc) and replaced these 'noone-realy-knows-how-to-drive-them' motors. They fit perfectly and it's really easy to interface them with the stepper library.

  • 1
    \$\begingroup\$ This doesn't really seem like a good application for a stepper motor (how are you going to zero it?) which is probably why the original did not use stepper motors. It was already explained how to drive the original - you need to drive the sine and cosine coils proportionate to the components for your desired angle. \$\endgroup\$ Nov 18, 2014 at 18:18
  • \$\begingroup\$ Sir, You are wrong most of the automotive manufacturers use these type of stepper motors. (Incl. GM) And it's quite easy to zero a motor like this. \$\endgroup\$
    – Zoszko
    Nov 21, 2014 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.