Pages: 1 [2]   Go Down
Author Topic: Controlling an analog automotive tachometer  (Read 3647 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BenF is right, 3000Hz is far too high. Use the calculations he provided, or to put is another way, frequency = RPM * cylinders/120.

Your equation yielded the proper results albeit the needle only got close to the given x1000 which I sort of expected given the quality of this gauge (it was SUPER cheap)....

Below is the code I used and I sent the signal through a simple 4N25 Opto I had laying around to isolate the arduino from the rest of it...

Code:
void setup()  {
  pinMode(9, OUTPUT);
}

void loop()  {
    tone(9, 33.3333333333333);
    delay(2500);
    tone(9, 66.66666666666667);
    delay(2500);
    tone(9, 100);
    delay(2500);
    tone(9, 133.3333333333333);
    delay(2500);
    tone(9, 166.6666666666667);
    delay(2500);
    tone(9, 200);
    delay(2500);
    tone(9, 233.3333333333333);
    delay(2500);
    tone(9, 266.6666666666667);
    delay(2500);
    noTone(9);
    delay(2500);
}
Logged

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am glad you got it working. I am just curious, did you have a datasheet ? Others maybe interested doing the same thing.  Even me, I may add a tach for my car.

I haven't looked at the OBDuino and similar, but a tach-out signal would be a nice addition, if there isn't such a function already. Adding a tach to a Ford Focus is either easy or hard. I've found multiple differing "guides" on how to do it, but most of them involve an adapter which IIRC hooks up to the coil, or DIY renditions of the the same. I assume that if you hook up to the CANbus, tach info is there someplace.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank for the tips, justjed, I have to look into the Ford Focus Can Bus to have the tach signal.  Hum... by just thinking about it, when my car was being tested for emissions require by the Ministry of Transportation - Ontario, the tech only connect the CAN bus to a computer system and can read all the info when the car run on a tread mill.

Yes, it is possible... I will do a search about it. I will look at the book "Haynes Repair Manual" Ford Focus 2000 to 2005.

BTW, justjed, my car is fix, $3000 for a 60 000 km motor. ( include installation ).  smiley-eek Just to let you know. The motor fail around 150 000 km.   smiley-eek-blue

My car is fine now, BTW
   
Logged

Pages: 1 [2]   Go Up
Jump to: