NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Advanced?
September 28, 2009 by Jesuz |
I know this might be advanced, or not? I just started with all this.. but one of my main goals are to make some kind of digital read out for my analog speedometer. I was wondering if anyone has done this, or know of where I can get any information on it. |
---|---|
September 29, 2009 by rusirius |
The first question I would have to ask is rather the speedometer is analog or not... I doubt it is... Don't get me wrong, I know it's an analog DIAL, but I'm guessing the signal feeding it is a digital signal from the ECU... Let me throw some ideas out there for you... The first easiest way would just be to count the pulses being fed to it... The higher the frequency, the fast you're going... (think the reverse of the PWM on the MCU...) That one would be really simple... Power input from battery (make sure to fuse it just in case) feeding the power regulator, feeding the MCU, which would have a single I/O pin connected and simply collect the number of pulses occuring in a specific time period... Then you can relate that to a given speed... (trial and error on that part). The other possibility, and this is a little nicer... Take the pulses feeding the tachometer (even if your dash doesn't have one, your ECU does, so you can still find it...). Do the same thing... Then somewhere you'll have something from the transmission telling the ECU (or possibly a dash display?) what gear the tranny is in... Tie that to another I/O... This one is probably an analog voltage so you'll probably have to use the ADC for it... Now look up the specs on the tranny and find out what gear ratios you have (don't forget to calculate in the gear ratio of the transaxle too!)... Now you have RPM and gear ratio (calculated from gear information) so you can relate that to a speed... The nice thing about doing it that way is that you can now make it "adjustable", so you could clock it with GPS or something and "tweak" it to get it exactly right... |
September 29, 2009 by rajabalu21 |
Please take a look at the OBD II car Computer. You may have to research to find out what standard is used by your car. But, the speed information can be directly obtained without any transducer. All the best! |
September 29, 2009 by mcai8sh4 |
Hi Jesuz, interrestingly enough, there's another member who's looking at doing the same thing - only his vehicle doesn't have any OBD. We have been discussing this on the IRC channel (freenode #nerdkits). At this point, whilst the theory seems good - in practise it isn't working perfectly. The chaps name : Capt. Maybe with the help from the forums and bouncing ideas off each other you could both reach your goals. I speak to him (fairly) regulaly, so I'll let him know you are wanting to do the same type of thing. Another idea - as Rusirius has mentioned, the trikiest part should(?) be counting the pulses. Perhaps using the pules from the HT leads to induce a current connected to an MCU pin could be used to count the firing times - the rest is maths. OR hall effect sensors. Also read JKITSONs tractor sled thread (here) does this type of thing (monitoring RPM), so that might be worth a read. Good luck - keep us all posted on your findings. -Steve |
September 29, 2009 by dangraham |
If the car has ABS brakes there will be a nice sensor on each wheel for the ABS system. You can tap the signal from this to the MCU, easy to calculate because it is on the wheel its self; just count the teeth on the sensor wheel. The hard part and part I am still working on is reading this into my program. Below is info from Humberto...Share and share alike. Using ICP1 is a good idea, however, as that is the pin we use as the programming mode pin I recommend you don't use that pin and instead copy its functionality using a normal pin change interrupt and a normal timer. This will also give you more freedom with which pins you can use, and which timers you can use, and allows you to break up the functionality neatly into the pin change interrupt code and the PWM code which you can test independently. You will be able to set up a pin change interrupt on any pin on your chip. Once you have the pin change interrupt working with your hall effect sensor, id suggest trying to merge in the real time clock code, this is also interrupt driven, and uses a timer to keep time down to hundredths of a second. Using this and your Hall Effect sensor you should be able to output something like RMPs to the LCD. I am still stuck on how to setup the code for the pins and timers, but working on this. |
September 29, 2009 by mcai8sh4 |
dangraham : For the clock timer - see the realtime clock example - you can just copy the basic setup code and interupt handler and then you have a variable that increments by one every 1/100th second. (I've done this myself, so might be able to help if you have problems) For the pin change interrupt, maybe looking at the ps2 keyboard tutorial, specifically seting up the pin change interrupt in the function init_keyboard(); and the handler, ISR(PCINT1_vect) I haven't played with pin change interrupts yet (it's on my list), but if you have problems, shout out - I may try and get a better understanding soon. Since I'm new to all this, it's good to figure out a basic example then play around. |
October 01, 2009 by Jesuz |
wow, I am going to look into this as much as possible, even though most of it is a little over my head still. I dont want to go the way of the obd 2 way, I want to leave that open. The counting the pulses seems pretty difficult, how does the needle know? It appears to just be some sort of motor? I do have ABS sensors on my wheels, one of which is bad. So when i replace that I might look into that a bit. My car is a 92 BMW 325i, I also have a 95 325is. Do you think the signal going to the tach needle would be digital? Anyway to check? I was thinking about just taking a multimeter to the connector of the RPM gauge and seeing if the volts went up.. which is what I was thinking was happening. Thanks for all the input. Any Ideas are appreciated, Who dosent want a digital dash in a digital world? Needle gauges are outrated. |
October 01, 2009 by rusirius |
Jesuz, It depends really... Someone with more auto experience might be able to tell you if there is a standard that has been developed... Or even a google search might be of help... Basically though, as far as I know there are several ways the data could be being delivered to the speedometer... Of course there are serial and other types of links, but given the data and function, I seriously doubt that's being implemented...
|
October 02, 2009 by Capt |
Helo! I've working on the same prodject, Or i was, I've hadn't had time to do more. Hope that i've get more time soon. I've got it "working" in some way, Could count up to ~4 Km/h. My program was a mixture of the real time clock and my own code. It worked as this: Wheel passed the hall sensor, And added 1 to a value Then when the value counting 4, i've calculated the average speed over the 4 Rounds. The problem was that i've used to mutch time to update the display and didn't use interupts (i've think). The speedometer on older car's uses a wire from a sprocket in the transmisson, This sucks becaus if you change the dimension on your rim, the speedometer is wrong. The rpm is counting pulses from the coil (divided on the amount of sylinders/pistons) By using optocuplers you get an digital signal. for testing i've attached a hallsensor from a bicycle speedometer to a bicycle upsinde down. -Capt |
Please log in to post a reply.
Did you know that you can control 120 LEDs with just 17 microcontroller pins? Learn more...
|