Looking for help with signal conversion - Page 1
Forum section: electronics / beginners

author: twistedsymphony
author_rank: Newbie
timestamp: June 02, 2012, 01:40:35 pm
content: I'm mostly just a hobbyist when it comes to electronics, I've done a lot with automotive circuits as well as video game and arcade machine modifications. Recently I swapped a V8 from a 1999 Corvette into my 1995 Nissan 240sx, most of the electrical conversion was smooth and simple but I'm still banging my head on one aspect... the speedometer.The computer from the V8 outputs a pulse that represents the car's speed it's 4000 PPM (pulses per mile), it's computer generated but it simulates a hall-effect sensor... so it's about a 50% duty cycle, between 0 and some low voltage (I'm hoping to get my hand on an o-scope so I can figure out exactly what it looks like)The Speedometer in the cluster is expecting a signal from a small generator that produces an AC signal of 16000 PPM, again low peak voltage but dropping below 0 on the bottom half of the sine wave.So basically I need to convert the output of the computer such that the speedometer can understand it and display my speed.I believe I can reprogram the computer to output the necessary 16000 PPM instead of 4000PPM but I still have the issue of converting a DC sqaure wave into a an AC sine wave.I haven't had much luck finding existing circuits for this online... ideally this would need to run on 12V from the car's electrical system, fit in a small-ish package (say smaller than a deck of cards) and low cost (ideally < $10 in parts )I have a decent amount of experience building simple circuits and playing around with microcontrollers but when it comes to analog signals or signal processing I get lost fast. Any help or pointers would be very much appreciated.

author: Rerouter
author_rank: Super Contributor
timestamp: June 02, 2012, 02:00:16 pm
content: the fast and dirty method would be to get an inverting regulator, +12 in to -12V or similar out, and then use an op amp (this is whats actually done for testing instruments)the hall effect output requires a liftup in most cases, a 10K to ignition, and the output switches to ground,as for the tacho, ac signal you can still drive it with a square wave, just use the op amp as a comparitor and then use a resistor divider to bring the voltage down to what you need (roughly 0.6V on the coil driven tachos)

author: jimmc
author_rank: Frequent Contributor
timestamp: June 02, 2012, 02:20:56 pm
content: If the square wave switches between 0 and V then AC coupling [i.e. adding a series capacitor (and possibly a resistor to 0v on the O/P side)] will change the output to -V/2 and +V/2.If this is not sufficient, then a simple amplifier before the capacitor will do the job without requiring a negative supply.Jim

author: hlavac
author_rank: Frequent Contributor
timestamp: June 02, 2012, 02:25:20 pm
content: Simple filtering the square into the sine would not work due to the variable frequency.I would try getting away with using the square wave instead of the sine.It should work if they just count zero crossings.Just AC-couple it through a capacitor, with a resistor connecting the other end of the cap to ground for biasing. That would shift the square wave so it has ground in the middle instead of at the bottom.If you can reprogram the source for the 16000 PPM you should be fine. If not, it would take a small microcontroller to quadruple the frequency.Also you may find the amplitude too small, then you would need to amplify it a bit first.Or, they could just rectify the ac and use the RMS voltage that increases with RPM to drive the speedometer. In that case, you would need different approach (some sort of PWM DAC would help here, so microcontroller again).Both should be pretty cheap, at most ATtiny25, a crystal if you want decent precision, some caps and resistors, maybe 78L05. Easily under $10.

author: Rerouter
author_rank: Super Contributor
timestamp: June 02, 2012, 02:28:04 pm
content: to reiterate, the tacho will function as normal driven off a square wave, the sine shaping is not required, in late 70's or earlier tachos sometimes the shape matters, but in these modern ones it uses the actualy zero crossing as its input,

author: twistedsymphony
author_rank: Newbie
timestamp: June 02, 2012, 07:31:21 pm
content: wow... thank for all the great fast replies!I'm not very familiar with AC coupling but if I understand what you're staying correctly my circuit should look like this:...with the op-amp portion only needed if the signal voltage is too low.What values for C1 and R1 should I be using considering the frequency range?1mph = 16000pph =~ 4.44Hz200mph = 3200000pph =~ 888.89Hz(not that I plan on driving 200mph, that's just what the speedo goes to)As for the tachometer, I've already taken care of that conversion, I simply used a j/k flip flop as a frequency divider since I'm going from an 8 cyl engine down to a tach that expects a 4 cyl signal.

author: twistedsymphony
author_rank: Newbie
timestamp: June 03, 2012, 10:10:10 pm
content: So I have the cluster on my desk and I built a 555 timer circuit with a decaying frequency that goes from 100Hz down to 0 in hopes of emulating the output from the engine's computer...I've found the load from the cluster is quite high (~400Kohm) running anything between a 1uF and 10uF capacitor without a resistor seems to do a good job at preserving the signal and moving the zero point half way up the wave form...sadly the cluster still sits dormant not responding to the output signal

author: vk6zgo
author_rank: Super Contributor
timestamp: June 05, 2012, 04:59:26 am
content: Quote from: twistedsymphony on June 02, 2012, 01:40:35 pmThe Speedometer should be driven from your transmission,& not require any input from your engine.It will read with your engine off!Even if the Nissan,& the Chev electrics use some more sophisticated circuitry to do this,why can't you keep the Nissan circuit just for the Speedo?

author: Unknown
author_rank: Unknown
timestamp: June 05, 2012, 05:13:12 am
content: Quote from: vk6zgo on June 05, 2012, 04:59:26 amThe OP didn't say engine. He said engine computer. The computer looks for the road speed data from a whatever sensor and uses the data, (mostly for nanny mode stuff). The engine computer outputs a drive to run the speedometer. Nothing to do with engine speed.QuoteEngine stopped not engine off.QuoteSee above. Any way you go about it you have to get a recognisable indication of road speed to the engine computer. Plenty of off the shelf stuff to do that. Once that is achieved you then return to the OPs problem of driving a speedo from a foreign signal

author: vk6zgo
author_rank: Super Contributor
timestamp: June 05, 2012, 06:37:32 am
content: Quote from: Uncle Vernon on June 05, 2012, 05:13:12 amBack in the days of first generation Electronic speedos,the sensors on quite a few cars were mounted in a cylindrical housing with a drive gear on it,which replaced the old speedo cables.After market vendors would sell an adaptor to drive the speedo at the correct rate when different engine +transmissions were fitted.I'm pretty sure the same people who marketed these have a product for sale which addresses the OPs problem,so the easy way might be to bite the bullet & buy one of them.Fairly obviously (though not to me--duhh!) he is getting the right stuff from the transmission sensor anyway.

author: Unknown
author_rank: Unknown
timestamp: June 05, 2012, 07:53:28 am
content: Quote from: vk6zgo on June 05, 2012, 06:37:32 amA lot are still done that way. Ford introduced the first ones this side of planet around the 80's, they were basically a tiny alternator sender, which is likely the type the Datsun cluster is looking for.QuoteThey do. There's is a Silicon chip kit sold as a "speedo corrector" that offered a moderately popular way of mating diverse hardware. I'm not sure it will solve this problem though, but could be worth a look.http://www.siliconchip.com.au/cms/A_108157/article.htmlQuoteNow that depends we don't know which Chev or which Datsun. Later stuff likely wont get road speed from the transmission, a lot of later vehicles now derive the signal from ABS wheel sensors via some signal conditioning and wheel slip comparison from the ABS. controller.

author: Rerouter
author_rank: Super Contributor
timestamp: June 05, 2012, 08:22:37 am
content: Here is what i meant,http://goo.gl/ZTj8Nan op amp used as a comparitor, and a 10K liftup for the computer output, though a much higher value could be used, 10K is good for noise immunity,and you would run the op amp off which ever voltage you wish to use (i reccomend 5 or 12V) and its inverted compliment, you can pick up inverting regulators for a few dollars and hide this all away on a bit of perf or vero board,

author: vk6zgo
author_rank: Super Contributor
timestamp: June 05, 2012, 08:25:13 am
content: Quote from: Uncle Vernon on June 05, 2012, 07:53:28 amWell,if your first point is correct,the Nissan doesn't have those type,The Chev ECU is apparently seeing something it recognises.I'm a bit surprised at the low frequencies involved,though I guess it means you can minimise the "smarts" involved in the instruments,& keep most of them in the ECU.

author: Rerouter
author_rank: Super Contributor
timestamp: June 05, 2012, 08:35:07 am
content: Yeah you will be lucky to see above 2Khz in most automotive applications, with 4Khz approaching the limit of most marine and trucks,as for the final calibration, the older AC speedo's where pretty horribly non linear, you will want to make sure it reads spot on or high at all speeds above 40Km/h, 25Mile/h.automotive spec is 7% fast reading allowed, 0% slow,

author: Unknown
author_rank: Unknown
timestamp: June 05, 2012, 08:39:25 am
content: Quote from: vk6zgo on June 05, 2012, 08:25:13 amAssumptions there isn't enough specific info. Is a Chev ECU being used or something aftermarket? The ECU may or may not perfectly without ECU input.QuoteIt is Automotive, where cheapest solution = best solution, the initial thrust of electronic speedo was only one of cost reduction, send plus wire cheaper and easier than mechanical cable. The early sensors made to fit existing locations in the transmission.

author: twistedsymphony
author_rank: Newbie
timestamp: June 05, 2012, 11:42:29 pm
content: Quote from: vk6zgo on June 05, 2012, 04:59:26 amI can't keep the Nissan circuit for the speedo because along with the V8 I also replaced the transmission. The original Nissan cluster used to read from a gear-driven VSS in the Nissan transmission, now the Chevy transmission has a hall-effect based VSS that feeds into the Engine computer. The Nissan was originally designed such that the cluster would read the VSS signal and then "clean it" and pass it along to the Nissan Engine computer (along with other systems such as ABS and cruise control) The Chevy system is designed such that the computer reads the VSS directly and then outputs a "clean" signal for the cluster and other system. I theoretically could convert the signal from the Chevy VSS but it's just a dirtier version of the output I can get from the engine computer, it's still wrong for the Nissan cluster and I have no opportunity to multiply the signal using the computer (I'd be forced to do it externally).Quote from: vk6zgo on June 05, 2012, 06:37:32 amyes there is such a product, the only compatible one I know about is made from a company called Dakota Digital, however the unit costs $80 and from what I've heard from people who have used it on setups similar to mine, it does a very poor job at low speeds (below 20MPH the signal becomes jumpy and the needle bounces around). I figured I would take the opportunity to learn something new and possibly build something that operates smoothly throughout the speed range.Quote from: Uncle Vernon on June 05, 2012, 07:53:28 amthats a pretty slick circuit... it may be useful and I think I have most of the parts necessary to build it, even if it's not something that will work for this car it would be useful in my truck, in which the speedo reads about 15% off due to the dramatic difference in tire size.Quote from: Rerouter on June 05, 2012, 08:22:37 amthat's pretty useful, while I haven't found much regarding the actual output of the original Nissan VSS I have found that most similar VSS from other manufacturers typically only output 1V on the peak of the wave and -1V in the valley.Quote from: Uncle Vernon on June 05, 2012, 08:39:25 amthis is absolutely true, that truck of mine (a 1989 Toyota Pickup) originally had a mechanical, cable driven speedometer, the cable broke and I discovered that newer models (1992 and newer) had the same transfer case but used an electronic speedo... I bought a cluster from a newer model as well as a gear driven VSS that fit right in the same spot as the old cable adapter. All I had to do was run 3 wires to the dash and I was able to "upgrade" to an electronic speedometer.--------Thanks again for all the comments, it looks like I've still got some more work to do

author: Rerouter
author_rank: Super Contributor
timestamp: June 06, 2012, 02:00:55 am
content: Quote from: twistedsymphony on June 05, 2012, 11:42:29 pmIn that case you use a dual package op amp and use a resistor divider to the input of a second op amp in a voltage following setup and make that output your final signal, that was just how to get the crossing zero signal,