Author Topic: Looking for help with signal conversion  (Read 10598 times)

0 Members and 1 Guest are viewing this topic.

Offline twistedsymphonyTopic starter

  • Newbie
  • Posts: 4
Looking for help with signal conversion
« on: June 02, 2012, 01:40:35 pm »
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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Looking for help with signal conversion
« Reply #1 on: June 02, 2012, 02:00:16 pm »
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)
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Looking for help with signal conversion
« Reply #2 on: June 02, 2012, 02:20:56 pm »
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
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Looking for help with signal conversion
« Reply #3 on: June 02, 2012, 02:25:20 pm »
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.
Good enough is the enemy of the best.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Looking for help with signal conversion
« Reply #4 on: June 02, 2012, 02:28:04 pm »
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,
 

Offline twistedsymphonyTopic starter

  • Newbie
  • Posts: 4
Re: Looking for help with signal conversion
« Reply #5 on: June 02, 2012, 07:31:21 pm »
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.44Hz
200mph = 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.
 

Offline twistedsymphonyTopic starter

  • Newbie
  • Posts: 4
Re: Looking for help with signal conversion
« Reply #6 on: June 03, 2012, 10:10:10 pm »
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 :(
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7701
  • Country: au
Re: Looking for help with signal conversion
« Reply #7 on: June 05, 2012, 04:59:26 am »
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.



The 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?
« Last Edit: June 05, 2012, 05:01:21 am by vk6zgo »
 

Uncle Vernon

  • Guest
Re: Looking for help with signal conversion
« Reply #8 on: June 05, 2012, 05:13:12 am »
The Speedometer should be driven from your transmission,& not require any input from your engine.
The 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.

Quote
It will read with your engine off!
Engine stopped not engine off.

Quote
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?
See 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
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7701
  • Country: au
Re: Looking for help with signal conversion
« Reply #9 on: June 05, 2012, 06:37:32 am »
The Speedometer should be driven from your transmission,& not require any input from your engine.
The 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.
 
OK,Unc, you got me on that one! He is probably using the Chev transmission,too,so his only real problem is to get the Nissan Speedo to understand the Chev data ,AND to correct for the different diff ratio.

Quote
It will read with your engine off!
Engine stopped not engine off.
REAL ones did! ;D

Quote
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?
See 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
Back 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.
 

Uncle Vernon

  • Guest
Re: Looking for help with signal conversion
« Reply #10 on: June 05, 2012, 07:53:28 am »
Back 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.
A 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.

Quote
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.
They 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.html


Quote
he is getting the right stuff from the transmission sensor anyway.
Now 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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Looking for help with signal conversion
« Reply #11 on: June 05, 2012, 08:22:37 am »
Here is what i meant,
http://goo.gl/ZTj8N

an 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,


 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7701
  • Country: au
Re: Looking for help with signal conversion
« Reply #12 on: June 05, 2012, 08:25:13 am »
Back 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.
A 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.
Yeah,it looks a lot like you're right!

Quote
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.
They 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.html
Jaycar still stock it as a kit.


Quote
he is getting the right stuff from the transmission sensor anyway.
Now 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.
Well,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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Looking for help with signal conversion
« Reply #13 on: June 05, 2012, 08:35:07 am »
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,
 

Uncle Vernon

  • Guest
Re: Looking for help with signal conversion
« Reply #14 on: June 05, 2012, 08:39:25 am »
Well,if your first point is correct,the Nissan doesn't have those type,
The Chev ECU is apparently seeing something it recognises.
Assumptions 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.

Quote
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.
It 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.
 

Offline twistedsymphonyTopic starter

  • Newbie
  • Posts: 4
Re: Looking for help with signal conversion
« Reply #15 on: June 05, 2012, 11:42:29 pm »
The 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?
I 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).


Back 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.
yes 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.

They 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.html
thats 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.

Here is what i meant,
http://goo.gl/ZTj8N

an 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,

that'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.

... The early sensors made to fit existing locations in the transmission.

this 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 :)
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Looking for help with signal conversion
« Reply #16 on: June 06, 2012, 02:00:55 am »

Here is what i meant,
http://goo.gl/ZTj8N

an 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,

that'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.


In 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,
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf