Multiplying Frequency

Jun 19, 2006 42 Replies

Hey guys I was wondering if you could help me with a little problem. I am trying to design circuit that will multiply frequency by 1.15. I am trying to interface a manual transmission speed sensor to my cars automatic transmission computer. My main problem is that I need to convert every 36.5 Hz to 43 Hz. The signal can be either be 50% duty cycle TTL or sine wave. I did some research and found some ways you can multiply TTL but it won't be 50% duty cycle. Can I resolve this by using a jk flip flop. I also thought about using a LM2917 (frequency to voltage converter) and a XR2206 function generator IC configured in voltage to frequency setup. My problem with this that I need a negative supply when all I have available is +12V. I also vaguely remember something about a multiplier IC, but don't even know where to get started with that. Thanks for any advice.



-Richard



Frequency multipliers and dividers require common (integer) denominators or harmonic relations.

At such low frequencies it would be more appropriate to measure the period of each cycle with a high resolution counter, do the math, and generate an output with another timer. Lots of little micros could do this easily.

BTW, analog multipliers are **not** the way to go! A possible solution with discretes is to use a PLL to get a **much** higher frequency that can be divided by a counter. Getting a PLL to stay locked onto a moving signal with a large frequency difference is a lot more difficult than it sounds.....the uC solution will certinaly be simpler!

As with so many of these sorts of problems, the best approach is probably a small micro. As an example, a PIC 12F675 is in an 8-pin DIP, and requires only 5V supply. Doesn't even need a crystal, just a cap across the supply. Of course you have to program it.

You'd be better of changing the tooth wheel if that is possible.

Regards,

Boris Mohar

Got Knock? - see: Viatrack Printed Circuit Designs (among other things)

formatting link

void _-void-_ in the obvious place

Posted via a free Usenet account from http://www.teranews.com

But unless you are talking high volume or need real small size, going as small as the 12F675 is probably an exaggeration! Being small can make life difficult ;-)

Why ? He requires only one input and one output pin, so in this case there are even too many IOs :) Frequency precision is not an issue either since he only needs that the ratio between input and output is correct.

vic

I didnt even think about using a micro, how hard would be it to code? I have only taking one class on C AVR programing and it wasn't one of my favorites. Thanks for the replys guys. I dont mind a complex analog solution.

OK, so he gets chips and programmer for a 12F, and then next project he needs a UART.

I always have some 16F876/7's hanging around (28/40) and they do for all my little jobs ;-)

Coding in assembly for a PIC or 8051 is very easy. You just type in the instructions one above the other. Designing the software usually takes longer than coding it.

-- kensmith@rahul.net forging knowledge

reciprocal counting, table lookup.

variables: current_count, current_output

initialize: jam something reasonable into current_output. start the output task going, flipping the output line when the output timer hits zero.

two tasks: one foreground watching the input, one generating the output (probably interrupt driven)

the input watching task loops forever, counting periods between edges of the input, save that as current_input.

take current_input and convert that (calculation, or table lookup) to the output count, save that as current_output.

the output task, probably interrupt driven, a hardware timer with a timer zero interrupt.

load the timer with current_output. When you get the timer zero interrupt, flip the state of the output line and load the timer with current_output again.

Doing it this way, current_output lags current_input by at least a measurement cycle.

Left as an exercise to the reader is what to do with whacko (jittery) readings: instead of jamming in a new value for current_output, you could average the old with the new. Or, you could window the value and limit the change per cycle to a predetermined amount. The idea is to smooth noisy data, and do that in a single-chip micro without a multiply instruction. (Add and shift right to average, but watch out for overflow). You can also smooth/window on the input side.

The idea is to try and match the physics of the system; how fast can the speed change? Well, ignoring events such as a thrown rod or a siezed bearing, in which case weird data from this gadget is the least of your problems.

Just make sure failure modes of *this* gadget are benign!

Namaste--

And the problem with a 4046 Phase Lock Loop is....?

Many thanks, Don Lancaster voice phone: (928)428-4073 Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552 rss: http://www.tinaja.com/whtnu.xml email: don@tinaja.com Please visit my GURU\'s LAIR web site at http://www.tinaja.com

low frequency? i dont see how a low divide by factor would work.

No problem at all to use a 4046 PLL. It'll just take more hardware than a micro.

If you're setup to work with and are familiar with some kind of micro that would probably be the simplest way to go, but to learn a new assembly language, although a good thing to do would, if you're like me, take a lot longer than getting the 4046 to work. This is especially true of learning the ins and outs of programming interupts.

Btw, multiplying 36.5Hz up to 43Hz is a factor of 1.17808 not 1.15, but maybe 1.15 is close enough? 1.18 would be quite a bit closer. Anyway, use the 4046 to multiply the freq by 118, then divide that by

100.

Mike

------------------------------------------------------------------------ The odds of a single modest length protein randomly forming is approx

1 in 10^260. By comparison the number atoms in the known universe has been estimated at 10^80 atoms. Figues are from the writings of Nobel Prize winner Francis Crick in 1981.
[...]
139/118 = 1.177966
-- kensmith@rahul.net forging knowledge

A fairly trivial program for a 8 pin micro.

So tell us already.

Personally I'd use gears... as someone already calculated, 139 teeth to 118 teeth ;-)

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

With gears there's no averaging... the ultimate in PLL's ;-)

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Using a micro, I'd measure the period, average it a bit, and then multiply that number by 0.8488372/2 ** in fixed-point math and use that to precisely time each half of the output period. The clock is non-critical so it could be on-chip RC.

** 0x3653594D

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

Sure there is. It's called "momentum".

Keith

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required