Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiplying/Dividing speedometer square wave signal

Status
Not open for further replies.

mrcarbine

New Member
I have a hall effect sensor that is providing a square wave signal for a speedometer. Certain parameters (tire size, gear ratios, etc) can change the desired output frequency of hall sensor to the PCM. I'd like to find an IC that I can set up to multiply the output of the hall effect sensor by a set amount like 1.14 or 0.88 (likely some variable RC circuit?) to restore it to its original expected values

A simple example, an increase in tire size from 30" to 33" results in a 10% decrease in frequency. I'd like to set up a circuit to increase the output back up 10%

Or if one was to change an axle gear ratio from 3.73 to 4.88 while maintaining 30" tires the frequency would increase by 19%, I'd want to be able to adjust the output and decrease it by 19%

Can a 555 timer do this? Sorry if the question isn't clear, it's difficult to describe
 
No. You cannot do this accurately with an analog RC circuit. You need to use a digital circuit. Ideally, use a 8pin, one-chip ($3) PIC ucontroller. The program would "count" the incoming pulses per unit time (to determine the rate), and it would output a different rate. This is a trivial program for someone skilled.
 
There are analog and digital ways to do that. Digital is probably much simpler, if you need a simple doubling or halving. Analog will allow you to change the ratio by something like 113% or 57%, etc. more easily.

Considering an analog solution, a series of frequency-to-voltage converter chips (F/V), which can also act as voltage-to-frequency (V/F) converters are available. The KA331 and NJM4151 are just two examples. One simply converts the incoming signal to a voltage and then reconverts that voltage using different component values for R and C to a frequency proportional to the original frequency.

This link is to a rather lengthy thread that describe that process in more detail. The last two pages describe the finalized circuit:

https://forum.allaboutcircuits.com/showthread.php?t=48943&page=1

This link refers to that other thread and offers additional information as well as describing a digital method:

https://www.electro-tech-online.com/threads/need-help-with-automotive-tacho-converter.126788/

This link discusses an analog approach:

https://www.electro-tech-online.com/threads/double-frequency-of-pwm-signal.125560/

John
 
Last edited:
Thanks John, I think I'm going to pursue the FVC/VFC method for now, I might dabble into the PIC realm if it turns out to be cheaper

I downloaded the PSpice model for the NJM4151 but I'm having trouble getting it to simulate right. The model came with a report with several evaluation spice circuits and their results. See ASSP model here: **broken link removed**

Here is my circuit, the same as the evaluation circuit shown on page 18 of the NJM4151 report

**broken link removed**

The output should be a rising DC voltage but here is a clip of what I'm getting

**broken link removed**

This could be something very small, it's been 2-3 years since I've used Pspice :D
 
I've been selling a product for a few years which does this - unfortunately due to changes in my public liability insurance I've had to stop.

I ended up with a PIC based solution. I tried the FVC/VFC method but initial testing showed the response to be a little sluggish but more importantly, unless you were incredibly careful with component selection you would get a lot of variance depending on the ambient temperature.

Just be aware of this and maybe test at a full temperature range if you decide to go this route.
 
I've read about the response time and was going to experiment with different RbCb circuits. The datasheets spec out to use low temperature coefficient components so hopefully that will help, either way thank you for that note.

What PIC of choice did you use for your final design? My coworker gave me some protoboard of his based off of a very large processor I feel might be overkill for my application.

Also, could you go into detail about your public liability insurance? I was hoping to sell these in low volume but I hadn't even thought about that
 
I used a PIC 18F1320 - the software would fit in a 1220 but I got a good deal on the 1320 directly from Microchip so ended up using that. It runs at 40Mhz (10Mhz clocks + PLL) but is happy at lower frequencies.

Basically I've been covered under a policy that lets me work from home and they have covered me for public liability for anything I sell under that policy. They decided to discontinue offering that product (not just for me) so I had a shop around to replace it. Turns out that the moment you mention building and selling any products for cars the insurance companies will run a mile. I tried a few specialists, quite a few brokers and everyone I could find online.

I was told by a few companies when I called them that they specifically wouldn't offer insurance for this sort of business :(
 
Couldn't one post some liability blurb that the seller of this type of thing wouldn't be liable for defects, etc?

Also, does anyone have comments on the PSpice circuit?
 
That's the route I'm hoping to go down but maybe supply the preprogrammed chips for "generic" purposes and leave it up to the end user to decide on the application etc.
 
I used the analog FV to VF converter concept with a pickup I reworked a number of years ago that I refitted an electronically controlled OD transmission into.

It worked just fine for me and the I/O frequency drift was what I considered to be well within normal vehicle variations anyway or at least not far enough off to worry about. Most speedometers tend to have a slight variation right from the factory that can be around +- 3% from ideal as is.

The other thing is is that if you are anticipation a slight drift in accuracy just add a fine tuning pot to the circuit to tweak the I/O ratio manually up or down a few percent of the calculated value you need.

From there regular calibration checks are as simple as checking your odometer against a 10 or so mile run of road and seeing if your distance measured is close to theirs or not. If you are off 1/10 of a mile in ten then you have a 1% variation which is more than accurate enough for most any realistic driving.
 
Last edited:
... I was hoping to sell these in low volume but I hadn't even thought about that

For what vehicle?

You do know that the market is pretty well saturated, with multiple manufacturers and well established respected products available worldwide in the $50 to $100 price range?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top