Low squarewave frequency doubler? - Page 1
Forum section: electronics / beginners

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: July 05, 2020, 04:27:32 am
content: I have a vehicles cruise control system, that pulls its speed signal pin high, then the speed sensor pulses it low.My current speed sensor does half the frequency needed to set the speed somewhere " reasonable" 80-240kph seems excessive?I built this:http://www.hobby-circuits.com/circuits/digital/377/frequency-doubler-with-4011But got very little useful output from it, when testing it with a frequency generator.I don't believe the cruise module cares about duty cycle.I'm needing to double 30-100Hz or so.Thanks!

author: mikerj
author_rank: Super Contributor
timestamp: July 05, 2020, 10:34:58 am
content: Quote from: AmmoJammo on July 05, 2020, 04:27:32 amCruise control is for highways so 80kph seems like an perfectly reasonable minimum speed.A simple frequency doubler using a monostable triggering on both edges (the one in your link) only works over a relatively small frequency range and the duty cycle will vary with frequency. A small 8 bit microcontroller could run a digital PLL at the frequencies required for a speed sensor, giving you a fixed duty cycle, and you could easily change the multiplier if required.

author: Ian.M
author_rank: Super Contributor
timestamp: July 05, 2020, 12:33:09 pm
content: Alternatively, a pure analog approach would be a F to V circuit controlling a VCO. However both it and the digital PLL suffer from response lag due to the required low pass filter either on the F to V output, or the PLL's loop filter. If you are unlucky, the lag will destabilize the cruse control's speed control loop. Some experimentation, preferably on a rolling road or on an otherwise unoccupied test track may be required to avoid excessive excitement on the highway!

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2020, 04:43:40 pm
content: Quote from: AmmoJammo on July 05, 2020, 04:27:32 amThe circuit you linked to will work, but not with the components chosen.Change the IC to a CD4013/MC14013.Increase C1 and C2 to 100 nF.Increase R1 and R2 to 22...47 kohms.Try it out and let us know.

author: David Hess
author_rank: Super Contributor
timestamp: July 05, 2020, 05:27:06 pm
content: A strictly analog PLL frequency multiplier is feasible also and used to be common in old frequency counters to increase resolution without increasing gate time.If the duty cycle of the output can vary over a wide range, then a monstable triggered by both edges of the input will work. This could be as simple as an XOR gate and RC delay and what I would try first.

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2020, 05:30:45 pm
content: Quote from: David Hess on July 05, 2020, 05:27:06 pmI'd say it's possible, but not feasible in this application. Lock/track time would be measured in seconds, not optimal for a cruise control.

author: David Hess
author_rank: Super Contributor
timestamp: July 05, 2020, 06:06:04 pm
content: Quote from: Benta on July 05, 2020, 05:30:45 pmLock time is limited by the lowest frequency of operation and would be plenty fast.

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2020, 06:27:48 pm
content: Quote from: David Hess on July 05, 2020, 06:06:04 pmLock time is normally an order of magnitude higher than the lowest frequency of operation (if by this you mean the input/reference frequency). I suggest you study "Phaselock Techniques" by Gardner. A lock within 100 cycles is possible, but quite aggressive. 200 cycles is realistic and can be achieved.I'll leave the rest of the maths to you, you seem to be the expert and able to prove Gardner wrong...

author: janoc
author_rank: Super Contributor
timestamp: July 05, 2020, 08:56:43 pm
content: Quote from: mikerj on July 05, 2020, 10:34:58 amI have yet to see a car where you can't enable cruise control below 80kph. It is very common to turn it on during long stretches of city driving where you need to stay under 50kph or you get flashed by a radar and get a ticket. E.g. we have a stretch of a road here with several villages back-to-back where you are going almost 8 kilometers at 50kph. The police knows it and they are putting radars there regularly, sometimes even several (I have seen 3 radars in a row there once). Clicking the cruise control on is a lifesaver there.

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2020, 09:35:42 pm
content: Sorry, janoc, but you're totally missing the point here... and that at a level where I have to ask if someone in your vicinity smoked something forbidden.The OP is asking how to double the output frequency of an automotive speed sensor to make it compatible with his vehicle.Your speed traps in France are not really the issue.

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2020, 10:24:37 pm
content: Quote from: Benta on July 05, 2020, 04:43:40 pmApologies for quoting myself, but editing is no longer an option (forum timeout).You should also add Schottky diodes in parallel to R1 and R2. Cathodes connected to +12 V. BAT46 or equivalent.

author: mawyatt
author_rank: Super Contributor
timestamp: July 06, 2020, 02:24:42 am
content: Quote from: AmmoJammo on July 05, 2020, 04:27:32 amA simple solution that may work is to use a Exclusive OR CMOS gate, such as a 74HC86 and delay one of the two gate inputs which come from the clock input source. This will produce a pulse on either edge of the input, so effectively doubling the clock input rate. For a range of 30 to 100Hz, a 10~20K and 0.1uF for delay would be a good for starters.Best,

author: Miti
author_rank: Super Contributor
timestamp: July 07, 2020, 02:45:43 am
content: Quote from: Benta on July 05, 2020, 09:35:42 pmWow, a bit aggressive, don’t you think? The OP also asked:Quote from: AmmoJammo on July 05, 2020, 04:27:32 amI think that’s the part that he was answering, and indeed, it is about double than what it should be. It shall start engaging around 40Kph.

author: janoc
author_rank: Super Contributor
timestamp: July 07, 2020, 02:27:25 pm
content: Quote from: Miti on July 07, 2020, 02:45:43 amIndeed, especially when not bothering to actually read what the reply was to. I guess insulting people as fast as possible is more important for him?Quote from: Miti on July 07, 2020, 02:45:43 amI was actually replying to Mikerj's comment about cruise control "being for highways" (and thus 80kph limit not being reasonable). It is right there, I have even quoted the relevant bit ...

author: Benta
author_rank: Super Contributor
timestamp: July 07, 2020, 03:46:01 pm
content: Quote from: janoc on July 07, 2020, 02:27:25 pmWhy do you assume I'm a "him"? And yes, I missed the point about Mikerj's comment, sorry.

author: SilverSolder
author_rank: Super Contributor
timestamp: July 07, 2020, 04:38:28 pm
content: Quote from: janoc on July 05, 2020, 08:56:43 pmMy car won't allow cruise below 30mph (~50Km/h), which I find a little irritating on occasion. I would think 40Km/h is a reasonable minimum for a cruise control.

author: Benta
author_rank: Super Contributor
timestamp: July 07, 2020, 05:12:32 pm
content: My previous cars (BMW, Audi) allowed cruise control over 30 km/h. AFAIK this is pretty standard.

author: Miti
author_rank: Super Contributor
timestamp: July 07, 2020, 05:24:57 pm
content: Quote from: YoungJulian34 on July 07, 2020, 09:54:43 amGrammarly...yes, that’s what you need, Grammarly.

author: SilverSolder
author_rank: Super Contributor
timestamp: July 07, 2020, 05:25:53 pm
content: Quote from: Benta on July 07, 2020, 05:12:32 pmI agree, I think 50Km/h is the highest "min cruise speed" I have seen in any vehicle. It is what it is, I got used to it.I also have an old Mazda MX5 with a manual transmission, it allows setting the cruise in 1.st gear to sub - 10Km/h speeds. So, on average, my cars are probably average!

author: Benta
author_rank: Super Contributor
timestamp: July 07, 2020, 05:33:20 pm
content: Quote from: SilverSolder on July 07, 2020, 05:25:53 pmSeems we're in the same club: '97 NA 1.8

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: July 07, 2020, 08:19:38 pm
content: Quote from: Benta on July 05, 2020, 10:24:37 pmDid you mean a 4013? (Dual flip flop) in place of the NAND gate? or was that a typo?Thanks for the other suggestions guys! I found a few possible solutions based on these as well

author: SilverSolder
author_rank: Super Contributor
timestamp: July 07, 2020, 08:46:11 pm
content: Quote from: Benta on July 07, 2020, 05:33:20 pmAwesome, mine's a 1990 1.6!

author: Benta
author_rank: Super Contributor
timestamp: July 07, 2020, 09:18:50 pm
content: Quote from: AmmoJammo on July 07, 2020, 08:19:38 pmDamn, damn, damn! I meant a CD4093/MC14093. Serious typo, my apologies (slapping myself)I hope this did not get you into serious trouble

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: July 11, 2020, 04:50:27 am
content: Thanks for the help guys!

author: Andreas
author_rank: Super Contributor
timestamp: December 06, 2020, 06:12:59 am
content: Quote from: AmmoJammo on July 11, 2020, 04:50:27 amHello,and this really works with a "real" car?Usually there is a plausibility between engine speed and wheel speed which switches off cruise control if there is a implausible "gear ratio" like e.g. on a slippery/iced road.with best regardsAndreas

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: December 06, 2020, 07:39:28 am
content: This system has no way of monitoring engine RPM, only wheel speed.