kmh to mph converter project - Page 1
Forum section: electronics / projects

author: jason1983
author_rank: Newbie
timestamp: April 12, 2015, 03:50:09 pm
content: Hi guys/girls, Im thinking about building my own kmh to mph converter for my car.the question i have is will it work?i have some lm2917 and lm231an and was wondering if i take the output from the drive which would be in pulsed frequency and input to the lm2917 then take the voltage output from that chip into a trimpot to lower the voltage an calibrate and then give that signal to the lm231am where the output in frequency would go to the speedo.would this work??Thanks

author: dannyf
author_rank: Super Contributor
timestamp: April 12, 2015, 05:11:23 pm
content: QuoteIt can be made to work.Whether you can make it to work is unknowably unknown to anyone but you.

author: Zero999
author_rank: Super Contributor
timestamp: April 12, 2015, 05:14:36 pm
content: What sort of speedometer is it? Dial or digital display?There are probably much better ways to do this. Ideally the speedometer should be completely changed or perhaps the ECU can be reconfigured? A MCU would probably be a better solution than F2V & V2F.

author: jason1983
author_rank: Newbie
timestamp: April 12, 2015, 05:36:35 pm
content: Its a dial one, i can buy a converter module but as i have the parts laying about i thought i would see if its possible

author: German_EE
author_rank: Super Contributor
timestamp: April 12, 2015, 05:39:10 pm
content: Take the pulses from your speed sensor and count the number of pulses over a fixed period using your favorite microprocessor (Arduino, Picaxe, BASIC Stamp etc). Let's say that you get the following table:Km/h Pulses5 1010 2015 3020 40This is the calibration scale for your speedometer. Now do the same by driving at precise Mph and measure the number of pulses:Mph Pulses5 1610 3215 4820 64Now comes the difficult bit because the precise solution depends on your microprocessor. You need to draw up a lookup table something like this:Speed Received OutputKm/h Pulses/s Pulses/s5 10 1610 20 3215 30 4820 40 64So, drive at 20 Km/h and the CPU will measure 40 pulses, it will then output 64 pulses/s to read 20 mph on the speedo. Do yourself a favor and get this calibration done on a rolling road at a garage as it will be much safer.

author: jason1983
author_rank: Newbie
timestamp: April 12, 2015, 05:49:53 pm
content: Thats the trouble as i have never delt with any microprocessors so wouldnt know where to start haha, thought there might have been a simpler solution

author: dom0
author_rank: Super Contributor
timestamp: April 12, 2015, 05:52:51 pm
content: When it comes to applying transformations, possibly non-linear, to slow changing signals MCUs are usually the easiest and best-performing solution.

author: jason1983
author_rank: Newbie
timestamp: April 12, 2015, 05:58:06 pm
content: oh right ok thank you, maybe i better start learning to program thengoogle here i come

author: German_EE
author_rank: Super Contributor
timestamp: April 12, 2015, 06:22:45 pm
content: Most of the general purpose CPUs listed above have some form of frequency counter function that can measure to a few 100 KHz or so. They also have pulse width modulation (PWM) outputs that operate over the same range. The rest is in software but that will be a lot easier to keep in calibration than converting frequency to voltage, doing some math, then converting voltage to frequency over (say) a -10C to +40C temperature range.

author: Zero999
author_rank: Super Contributor
timestamp: April 12, 2015, 06:25:11 pm
content: It is is just a linear transfer, the frequency to voltage conversion, scale and voltage to frequency method will work but won't be so accurate as an MCU.

author: Ian.M
author_rank: Super Contributor
timestamp: April 12, 2015, 06:33:14 pm
content: The analog approach could be made to work on the bench, but to maintain the conversion ratio accurately over the full automotive temperature range for years at a time is another matter that would require considerable design effort so the programmed MCU approach is recommended. To avoid slow jerky updates, it is better to time the interval between input pulses rather than counting pulses in a fixed time. Its also more convent for generating the output pulse.

author: jason1983
author_rank: Newbie
timestamp: April 12, 2015, 07:16:39 pm
content: Thanks everyone for the information, im going to try and learn how to program mcu's as this is a never ventured area for me.I see what people are saying and guesing with battery voltage & temp fluturations it would throw things out to a non acceptable conversion.again thanks for the help.p.s if anyone knows any beginner sites for learning in the mcu field i would be very greatfull and also if anyones has any pointers i can take on board

author: AndreasF
author_rank: Frequent Contributor
timestamp: April 13, 2015, 09:33:38 am
content: If it's a standard dial speedometer the easiest solution is to simply change the markings of dial itself (or make it dual scale). That's what I did when I brought my car from Germany to the UK and its speedometer needed to be changed from km/h to mph.

author: dexters_lab
author_rank: Unknown
timestamp: April 13, 2015, 11:42:57 am
content: with my experience with this issue with Japanese imports, i found the best solution was to simply swap the speeds complete for a UK one. Means no messing around with interfacing or trying to remark the old dial.The make and age of the car does matter though, the older cars are simpler.A long time ago i interfaced a cycle computer to the speed sensor on my imported toyota because the speedo was broken, it worked fine to about 120mph.TBH now, i work only in kmh & my yaris is set to read in kmh, it's not hard to remember the main speeds you need to worry about in kmh with a bit of rounding 50, 65, 80, 100, 120

author: paulie
author_rank: Frequent Contributor
timestamp: April 13, 2015, 11:51:22 am
content: Quote from: dannyf on April 12, 2015, 05:11:23 pm"unknowably unknown"Am I the only one to appreciate the extremely helpful and profoundly philosophical nature of dannyf posts?

author: dom0
author_rank: Super Contributor
timestamp: April 13, 2015, 12:43:09 pm
content: Quote from: paulie on April 13, 2015, 11:51:22 amDo you know Jaden Smith?

author: German_EE
author_rank: Super Contributor
timestamp: April 13, 2015, 04:46:23 pm
content: "There are known knowns. These are things we know that we know. There are known unknowns. That is to say, there are things that we know we don't know. But there are also unknown unknowns. There are things we don't know we don't know."Donald Rumsfeld

author: eneuro
author_rank: Super Contributor
timestamp: April 13, 2015, 08:25:51 pm
content: Quote from: German_EE on April 13, 2015, 04:46:23 pmAt least now everybody knows what does it meanAnyway, probably adding moving average to time between pulses will help smooth those car speed readingsJust thinking is it possible add custom RPM sensor somewhere in ICE car?Maybe glue strong magnet somewhere and adding Hall effect sensor could sense wheels RPM easy?I need in one of the projects car speed to make sensors fusion with Gyro + Accelerometer sensorshttp://www.invensense.com/mems/gyro/mpu6050.htmland when we have object speed relative to gorund it simplify equations and makes things easier.Messing with car digital data busses is never easy.I'd like test this external speed sensor in a few years old Peugeot 206 1.4 HDI (diesel) and vehicle speed reading is the only challenging thing

author: m100
author_rank: Regular Contributor
timestamp: April 14, 2015, 09:04:58 pm
content: Buy a replacement speedo or print a new overlay for the existing one? No electronics and almost 100% guaranteed to work.

author: CM800
author_rank: Frequent Contributor
timestamp: April 14, 2015, 09:33:16 pm
content: Quote from: German_EE on April 12, 2015, 05:39:10 pmI would be worried about doing this kind of thing as surely the speedometer is connected to the miles counter for your car, I believe it is illegal to tamper with it and you would actually loose out and make your car look like it has went much further then it actually has.

author: German_EE
author_rank: Super Contributor
timestamp: April 16, 2015, 07:43:53 am
content: Yeah, that would be an issue as part of the total distance would be in Km and part of it would be in miles. So, we have solved the original problem and generated a new one