Square wave to..not sure..shark wave?

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Hi All,
I've tried my best to use the search function, but I can't find one of the wave forms I need to create. Whilst not an electronics whizz, I do pretty complex in car installations so I suppose I'm a half numpty ha ha.

I'm need to transfer the output from a gearbox to an input that the donor vehicle can accept. I've found as much information as I think you'll need, but if anything else is needed please let me know
Original form:

IMG_4241.JPG
At 20mph
Freq 25.85hz
Upper 4.65v
Lower 10.44mv
Average peak to peak 4.75v

@40mph
Freq 47.38hz
Upper 4.65
Lower 10.44mv
Average peak to peak 4.7v

To convert to

IMG_4242.JPG

@20mph
Freq 913.7hz
Upper 7.14v
Lower .41v
Average peak to peak 7.812

@40mph
Freq 1.52khz
Upper 7v
Lower .4v
Average peak to peak 7.35

Upper & lower figures have been obtained from placing a cursor on the oscilloscope graph, peak to peak has been computed by the program.

Both of the signals are just that, so won't require any real amperage, they input signal in trying to create is just a straight input into an ecu. The primary & created waveforms don't have to exactly be mph to mph, somewhere near will do.
I look forward to your replies and any further info you need.

Many thanks
Paul
 

crutschow

Joined Mar 14, 2008
30,818
It can be rounded off with an RC low-pass filter and a diode (resistor in parallel with a diode and both in series with a capacitor to ground).
(Is that time scale on the bottom of your display in seconds?)

But why do you think you need to round-off the leading edges of the signal?
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Hi, thanks for the swift reply.
Thank you for the suggestion, I'll google it to see what it means ha ha!
Yes time scaleis in seconds
Im genuinely not sure what I need to do to get the ecu to accept the new signal, but both of the above are live readings from he original & donor vehicle,so I was purely trying to get as close to what the ecu is looking for as possible.
In reality I think the input to the ecu will be quite robust, as I've already used a sine to square wave converter from one of the abs signals to get a signal the ecu can interpret, but the speeds are too far apart and causing a secondary issue. Having measured the output from the converter it doesn't look like either the square or the tooth wave I'm trying to create, so that also has me stumped a little.
Thinking on my feet, is it difficult to adapt the frequency of what I've already installed to get the mph' s a little closer. Is still need the original adaptation, but the abs to speed would be a handy adaption to have

Cheers
 

#12

Joined Nov 30, 2010
18,223
why do you think you need to round-off the leading edges of the signal?
Right. Those wave shapes are typical errors caused by weak signal drivers or long wires. What makes you think a degraded signal is necessary? The first thing a lot of digital circuits do is run them through a Schmidt Trigger to square them up.
 

strantor

Joined Oct 3, 2010
6,112
Your "shark fin" waveform I assume is supposed to be a square wave but something is wrong with it; somehow too much capacitance. So I think it's safe to guess that you don't need to replicate the "shark fin", just the frequency.

For that, you may need to find out what's the difference between the gearboxes; why one puts out so many more pulses than a other. Is it reading a smaller gear or what? Maybe you could relocate the sensor to spot where it has more teeth to read. If that isn't an option, there may be a frequency multiplier circuit; I'm not sure if that's a real thing but I think I heard it once.
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Right. Those wave shapes are typical errors caused by weak signal drivers or long wires. What makes you think a degraded signal is necessary? The first thing a lot of digital circuits do is run them through a Schmidt Trigger to square them up.
Hi, thanks for the reply.
I've not seen the wave form before, so just presumed it was a manufacturer specific signal. I measured the signal directly from the gearbox connector (about 30mm away) , is there a better way to get a clean signal I can use?
Thanks again
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Your "shark fin" waveform I assume is supposed to be a square wave but something is wrong with it; somehow too much capacitance. So I think it's safe to guess that you don't need to replicate the "shark fin", just the frequency.

For that, you may need to find out what's the difference between the gearboxes; why one puts out so many more pulses than a other. Is it reading a smaller gear or what? Maybe you could relocate the sensor to spot where it has more teeth to read. If that isn't an option, there may be a frequency multiplier circuit; I'm not sure if that's a real thing but I think I heard it once.
Hi,
One of the gearboxes reads from the flywheel, whereas one reads from the output shaft. Not much I can do to change that unfortunately, but I did have the idea of buying a gearbox sensor (they are magnetoresistive) and place a pickup on the axle.
The reason I'm trying to do it this way is that it will be a discreet solution utilising an existing gearbox sensor.
 

#12

Joined Nov 30, 2010
18,223
The flywheel obviously turns faster than the output shaft (except in "direct" gear with a manual transmission). I'm calculating about 35:1 ratio from ~914/~26 and 1520/47.38
So, you need to slow that square wave down by about thirty-five to one?
There are digital and analog ways to do it. Digital is better for accuracy.

Does the onboard computer calculate the speedo reading by knowing what gear the car is in?
Can you calculate from the tire size and differential ratio how fast the driveshaft will be turning, or measure the drive shaft directly at 20 MPH and 40 MPH?

Am I even right about you needing to slow down the signal?
Is all this just for the speedo?
 

strantor

Joined Oct 3, 2010
6,112
Hi,
One of the gearboxes reads from the flywheel, whereas one reads from the output shaft. Not much I can do to change that unfortunately, but I did have the idea of buying a gearbox sensor (they are magnetoresistive) and place a pickup on the axle.
The reason I'm trying to do it this way is that it will be a discreet solution utilising an existing gearbox sensor.
So I'm guessing that your original gearbox is the one who reads from the output shaft? If so that relates to actual vehicle speed not engine RPM. Those are two different parameters. I don't know what you're using the pulse for, but I'm guessing something to do with abs or something. So shouldn't you be using the output shaft to ignore the gearing? Just saying. If the original configuration was looking for output RPM is it going to handle the change to input RPM?

Or do I have it backwards? Either way two different parameters.
 

LesJones

Joined Jan 8, 2017
3,816
For the gearbox with the sensor on the output shaft (I assume that you mean the gearbox output shaft.) then the frequency will be proportional to the road speed. The one with the sensor on the flywheel (Gearbox input shaft.) then for a given road speed the frequency will be different for each gear that is selected.

Les.
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Hi both
I'm installing a later ecu and some of the hardware into an earlier vehicle. I've overcome all other hurdles of getting th parts to communicate external to the original car, and this is the last piece.
So the first scope is the gearbox that is in the earlier car (the one I'm using). This will be utilised for the dash speedo, but ideally I want to also use the output to send to the ecu. This is being utilised by the ecu for 2 main factors, the first is to show the ecu when the vehicle is just moving. This allows us to set launch control stop points, allows flatfoot shifting etc, the second point is that it activates the reverse gear lock out. Currently I have wired in a sine to square wave adapter on one of the abs signals with a 2.7k lift resistor (to 12v) which is giving me an output the ecu is reading, but it's way out of kilter. The lower region I require of 5mph is fine (wheel speed approx 15mph, but the rev lock is just too far adrift. Currently showing the required 11mph on the ecu diagnostics when try wheel speed is 45mph. I've scoped the output from the converter and I now realise from your previous comments that it's probably my reading of the signal as opposed to the signal itself that is corrupt.
Input I have is slower than the output I require.
The reason I'm going to such lengths when I already almost have a solution, is that the ornate function for getting involved in the swap is fog higher end track cars, and invariably won't have the original abs. We install the abs from the later car, but the signal from those are a square wave ac, and anytime we've tried to interrogate or manipulate the output the can sees it as an issue and shuts the circuit down.

Thanks for all the replies I really do appreciate it
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
For the gearbox with the sensor on the output shaft (I assume that you mean the gearbox output shaft.) then the frequency will be proportional to the road speed. The one with the sensor on the flywheel (Gearbox input shaft.) then for a given road speed the frequency will be different for each gear that is selected.

Les.
Hi Les,
The sensor creates the vss required by the clocks, so I would have thought it would be relatively linear. I know what you mean though, obviously the flywheel only moves within the vehicle revs not vehicle speed. I might need to re-asses where it gets its data, as the vehicle in question has no speed/revs gear equations or anything as flash as that.
 

#12

Joined Nov 30, 2010
18,223
I'm getting tired of trying to sort an answer out of a 200 word response. Can you please answer the questions in one sentence each? Half of them only need a yes or a no.
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
I think I understand your needs. I think your best bet would be to use both sensors. Probably not a spot for the additional sensor to read the flywheel, but things can be drilled and tapped if you're not scared.

Alternatively, here's my Google results for "frequency multiplier circuit". I've never used one, but apparently they do exist.

https://www.google.com/search?ie=UT...ndroid-browser&q=frequency+multiplier+circuit
The facility to add the second sensor is available on some of the boxes, but the time involved in doing would make the venture more difficult to be commercially viable.
I'll check into the link, thanks for the help.
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
The flywheel obviously turns faster than the output shaft (except in "direct" gear with a manual transmission). I'm calculating about 35:1 ratio from ~914/~26 and 1520/47.38
So, you need to slow that square wave down by about thirty-five to one?
There are digital and analog ways to do it. Digital is better for accuracy.

Does the onboard computer calculate the speedo reading by knowing what gear the car is in?
Can you calculate from the tire size and differential ratio how fast the driveshaft will be turning, or measure the drive shaft directly at 20 MPH and 40 MPH?

Am I even right about you needing to slow down the signal?
Is all this just for the speedo?
Good morning,
No I need to speed up the signal x35
 

LesJones

Joined Jan 8, 2017
3,816
A phase locked loop frequency based on a CD4046 or similar could multiply the frequency by 35. This is a link to some information on how you would design the multiplier. I think there is some error in your measurments as the ratio at 20 MPH is about 35. at 40 MPH the ratio is about 32. The ratio should be the same at any speed. This WILL NOT solve the problem that you are not taking into account that this ratio will also change depending on which gear is selected. If this is a front engine rear wheel drive car then making a toothed wheel to fit on the gearbox output flange (Inserted between the flange and the universal coupling ) would be a better solution. You would need to measure how many pulses occured for one revolution of the output shaft of the original gear box. You may be able to count the teeth on the wheel that the sensor is close to on the original gear box. It may just use one of the gear wheels that are mounted on that shaft.

Les.
 

shortbus

Joined Sep 30, 2009
9,647
Just to throw another thing into the mix, some systems are looking for a square wave and others are looking for a voltage/sine input. Mixing up the two into the ECM will not get the correct results.
 

Thread Starter

pdapaul

Joined Jun 9, 2017
11
Hi all,
Thanks for the information, but looking into the links that people have posted I believe that the construction of this is in reality above my pay grade.
I've found a local company that is going to build me what I need which sounds a significantly better idea ha ha
 
Top