work in progress stimulator board

Hardware inside and outside of the ECU
Post Reply
User avatar
kb1gtt
contributor
contributor
Posts: 3777
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: stimulator board

Post by kb1gtt »

I agree that VR signals are often not symmetrical, and are often not the same in the + and - swing. More about the math and such design criteria like voltage prediction found around page 17 to 19 of this PDF http://www.flw.com/pdf/airpax.pdf

All of the OEM wheel's I've seen have a had a "proper"-ish pitch and wheel diameter such that the signal looks kind of like a sine wave and can handle both the min and max RPM. However that does not have to be the situation. Also it's much worse at low RPM.

When I login to my Fedora box as "su -" I get tempted to ask sudo "who's your daddy" :) It's bad humor, however that's the humor I have :) http://www.fedorafaq.org/basics/#root
Welcome to the friendlier side of internet crazy :)
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

Ideal VR is symmetrical believe it or not. I fully understand physical tolerance and real world affects. But the concept is and will always be symmetrical. The point I was making is that Russian was using RS232 to mimick what the Honda ECU would see coming out of its own TTL output. That idea is flawed because it is pointless to simulate the gap phase. That phase is garbage and should never be used for timing. I can't see why Honda would use that phase for anything significant. The reason why you will never see 50% duty cycle is because physical limitation on detecting true zero, even if you had a perfect wheel. The reason why you see somthing like 25% duty cycle at the TTL output with low RPM (which is what Russian is trying to simulate) is because of the threshold limitation of the inputs. But that doesnt change where is actually crosses zero, which is close to 50%, or the tollerance of the phyical teeth. Conceptually, VR will always cross zero in the center of the high and low teeth, which result as a 50% duty cycle signal in terms of zero crossing.

If we are going to simulate the signal, I don't see why we are manipulating the signal so that the TTL output matches? Just simulate a perfect signal by providing the perfect zero crossing. If you want to test error cases, then that's a different story and differerent application.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

kb1gtt wrote: Also it's much worse at low RPP
Let me make it clearer. Zero crossing point does NOT vary with RPM. Again, it is worst at low only because the input threshold is not perfect zero. At low RPM, it reaches near zero very early. But that doesn't mean it actually crosses zero. So what it ''looks'' like 25% isn't truly 25%. It is still close to 50%. Blame the input for that. Don't fault the real signal and consider it not symetrical.

As RPM increases it is easier to detect zero due to faster slew rate, which is why it approaches 50%. Or should I say it always crosses zero at the middle of the valley... Always...

That's why the valley phase is garbage at low RPM, again, not because the signal varies or isn't symmetrical, its because we can't reliably detect the zero crossing due to the extremely slow slew rate near zero. Any noise or physical variance will cause it to look like it crosses.

No one is my daddy lol... Who's your daddy now?
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote: VR sensors do not always generate purely symmetrical outputs, to think otherwise is wrong. VR sensors do not always generate pure sine wave outputs, to think otherwise is wrong.

Peak V+ is around 18, valley V- is about -2. Amazing, isn't it? The peak is WAY more than the valley.
And that is from dual-ended, isolated VR sensors, not single-ended with one leg tied to ground.
It's more amazing that you don't understand my point before making the assumption that I have no clue what you are talking about. Everything you said here doesn't address my point. I am FULLY aware that amplitude is different between the Peak and Valley. Yes, I already knew that it is not a pure sine wave. But amplitude and the shape of the waveform are meaningless here. ONLY zero crossing matters. The point is, zero crossing during the valley phase is and will ALWAYS be proportional to the wheel profile. In Russian case, it is NOT 25% even though the TTL output said so. RPM doesn't change where it crosses. By using 25% we are inducing a NEW variable that doesn't belong in the VR scheme.

To think the whole point of using VR is the fact that zero crossing of the PEAK is reliable. What were they thinking? Guess what? Zero crossing for the Valley is the same, but too bad we can't physically detect it reliably, therefore it is useless.
You do not have the required permissions to view the files attached to this post.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

The positive going negative zero crossing, which is the ideal trigger point provided the VR sensor and the tooth tip are of the same dimensions- length and width, occurs as the tooth passes through the VR sensor's flux. The valley on a tooth wheel has no influence, unless the wheel itself has asymmetrical teeth. Then you end up with things like what I posted- a sharp spike followed by the zero-crossing, then a delayed return to 0v.

The image you posted... the trigger below which is commented that the one trigger looks symmetrical, doesn't look symmetrical to me. Were it so, the distance between teeth would be the same as the tooth face, which it obviously is not; I can easily see 25-33% difference between the two- it appears you might be able to fit two 'tooth faces' between adjacent teeth.

Here's the tooth wheel that generates the scope shots I posted above:
cxtc (6).JPG
Study that a moment and I'm sure you'll see why there's a sharp positive spike, and a shallow negative, followed by a gradual return to 0v.
You do not have the required permissions to view the files attached to this post.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

The wheel I showed you is symmetrical. It is symmetrical from the CENTER of the teeth to the CENTER of the valley, then to the next center of the teeth. It is a mirror image. The valley doesn't have to shape like the teeth to be symmetrical.

Study it a little bit... And tell me that's not symmetrical. LOL. So is the 24 teeth wheel that Russian is using. It is symmetrical.
You do not have the required permissions to view the files attached to this post.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote: Image.
That is NOT the wheel being used for the 24 teeth. I had the 97 accord myself. The teeth look more like what I showed you.

Again, for the sole purpose of my critizism. I am talking about the 24 teeth!! Not the 1 teeth or the 4 teeth, because those are odviously not symmetrical.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

The 'valley' between teeth is nothing more than empty space, and is typically where a VR sensor's output should be 0 volts. Nothing about the valley should be considered other than the period the wheel spends in the valley, and even then that is just a waiting period for the next tooth to come into the VR sensor's "window". When that happens, the voltage should swing positive, and as the center of the tooth passes over the center of the VR sensor, the voltage swings negative until the tooth has left the sensors "window", at which point the voltage should return to 0v, but as I've shown that's not always the case.

In the image you posted in your previous post, you "unwrapped" the trigger wheel, and have the distance between the teeth's root the same as the width of the teeth, but you forgot to take into account the difference in circumference between the 'root' of the teeth and the 'face' of the teeth, so no, they are not symmetrical given the heel and toe of the teeth are perpendicular to the face, and the circle created at the base of the teeth. Take some ink or paint and apply it to the faces of the teeth on that trigger, then roll it along some paper and you'll see what I mean.

No need to argue. I'm just pointing out some failed logic.
Last edited by abecedarian on Mon Aug 25, 2014 6:12 pm, edited 1 time in total.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:The 'valley' between teeth is nothing more than empty space, and is typically where a VR sensor's output should be 0 volts. Nothing about the valley should be considered other than the period the wheel spends in the valley, and even then that is just a waiting period for the next tooth to come into the VR sensor's "window". When that happens, the voltage should swing positive, and as the center of the tooth passes over the center of the VR sensor, the voltage swings negative until the tooth has left the sensors "window".
I think the point went way passed your head. :o I already said that valley is useless in practice because we cannot detect the true point of zero crossing. And yes, the valley HAS A ZERO CROSSING. It is just not useful in terms of circuit design because we cannot reliably detect it

The point is, Russian is generating a 25% so that Honda thinks its more real. But in reality, that's much less real than 50%. That's the only failed logic I see.


Also, you CAN use the valley to trigger. Won't happen for the Honda distro, but something like this works:
Image

As you can see, Valley does have zero crossing. And it is in the center of the valley.
Last edited by Sudo on Mon Aug 25, 2014 6:26 pm, edited 1 time in total.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Here's a trigger with just under 1mm wide teeth and valleys.
DSC00002.JPG
Are you sure the distance between adjacent teeth is equal to the valley?

My micrometer says it's almost 3mm between teeth. That would result in about a 33% duty cycle between zero crossings.
You do not have the required permissions to view the files attached to this post.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:Here's a trigger with just under 1mm wide teeth and valleys.
DSC00002.JPG
Are you sure the distance between adjacent teeth is equal to the valley?

My micrometer says it's almost 3mm between teeth.
This wheel will product zero crossing at the center of each teeth (maximum flux) and center of each valley (minimum flux). Period. That's pretty much the definition of VR.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

You have, in a round about way, proven exactly what I was saying.

With a toothed wheel, you're looking for the positive-going-negative transition; with a notched wheel, you're looking for the negative-going-positive transition. In either case, it's the sharp edge where the voltage swings quickly from one polarity to the other that is of interest, not the period between, where the voltage IS 0V.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:You have, in a round about way, proven exactly what I was saying.

With a toothed wheel, you're looking for the positive-going-negative transition, with a notched wheel, you're looking for the negative-going-positive transition. In either case, it's the sharp edge where the voltage swings quickly from one polarity to the other that is of interest, not the period between, where the voltage IS 0V.
But that's wrong. ;) It happens in the center of the teeth where it switches from maximum positive flux to maximum negative flux. And vise versa for the valley where it switch from negative minimum flux to positive minimum flux. It does NOT happen at the edge of the teeth.

Image

Image

Image
Last edited by Sudo on Mon Aug 25, 2014 7:11 pm, edited 1 time in total.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Did you notice that in the last picture, the VR sensor is obviously reversed?
Sudo wrote:
abecedarian wrote:You have, in a round about way, proven exactly what I was saying.

With a toothed wheel, you're looking for the positive-going-negative transition, with a notched wheel, you're looking for the negative-going-positive transition. In either case, it's the sharp edge where the voltage swings quickly from one polarity to the other that is of interest, not the period between, where the voltage IS 0V.
But that's wrong. ;) It happens in the center.
Image

Image

Image
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:Did you notice that in the last picture, the VR sensor is obviously reversed?
That's Irrelevant.

Point is:
Zero crossing happens in the center of the teeth where it switches from maximum positive flux to maximum negative flux. And vise versa for the valley where it switch from negative minimum flux to positive minimum flux. It does NOT happen at the edge of the teeth.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

I am going to beat this to death... Still need more convincing?
You do not have the required permissions to view the files attached to this post.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Again, you've proven what I've said.

The tooth moves into the VR sensor "window" and the voltage swings (I suppose positive or negative is of little relevance), and as the center of the tooth passes the center of the sensor "window", the voltage swings to the opposite polarity. And that is the most reliable point for determining position. Pretty much exactly what I've been saying, and pretty much what the Maxim PDF doc screenshot you've posted says. Nothing about the valley is mentioned there, and that's what I've been saying- what happens in the valley, the void between teeth, doesn't matter... usually.

So here we have much ado about nothing. ;)
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:Nothing about the valley is mentioned there, and that's what I've been saying- what happens in the valley, the void between teeth, doesn't matter... usually.
The valley HAS a zero crossing point. THAT's what I am saying. It is near 50%. Just because we can't detect it electrically, doesn't mean it don't exist. So where in there do you see that 25% duty cycle to simulate a symmetrical VR signal is appropriate? All I am saying is that 50% is more appropriate.

I think I will let this one go. I give up. Think whatever you want. I am done :D
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Sudo wrote:
abecedarian wrote:Nothing about the valley is mentioned there, and that's what I've been saying- what happens in the valley, the void between teeth, doesn't matter... usually.
The valley HAS a zero crossing point. THAT's what I am saying. It is near 50%. Just because we can't detect it electrically, doesn't mean it don't exist. So where in there do you see that 25% duty cycle to simulate a symmetrical VR signal is appropriate? All I am saying is that 50% is more appropriate.

I think I will let this one go. I give up. Think whatever you want. I am done :D
The valley IS a zero crossing- that's where the tooth is leaving the VR sensor and the next tooth is approaching. Using that period for anything other than maybe running a timer to measure that period is pointless.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:
Sudo wrote:
abecedarian wrote:Nothing about the valley is mentioned there, and that's what I've been saying- what happens in the valley, the void between teeth, doesn't matter... usually.
The valley HAS a zero crossing point. THAT's what I am saying. It is near 50%. Just because we can't detect it electrically, doesn't mean it don't exist. So where in there do you see that 25% duty cycle to simulate a symmetrical VR signal is appropriate? All I am saying is that 50% is more appropriate.

I think I will let this one go. I give up. Think whatever you want. I am done :D
The valley IS a zero crossing- that's where the tooth is leaving the VR sensor and the next tooth is approaching. Using that period for anything other than maybe running a timer to measure that period is pointless.
Both of the center of Valley and Teeth are zero crossing........... It depends on which one you choose. The one with more width is the less reliable one.
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Sudo wrote:Both of the center of Valley and Teeth are zero crossing........... It depends on which one you choose. The one with more width is the less reliable one.
And that typically is the valley.

So let's just let this lay in state. :D
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:
Sudo wrote:Both of the center of Valley and Teeth are zero crossing........... It depends on which one you choose. The one with more width is the less reliable one.
And that typically is the valley.

So let's just let this lay in state. :D
Exactly, so why are we purposely inducing a 25% signal? When in reality, it is at 50%?

My point is that our simulated VR signal using RS232 should follow "Real crossing point" (50% duty) for its transitions. Not the red signal (not 50%)...

Image
User avatar
kb1gtt
contributor
contributor
Posts: 3777
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: stimulator board

Post by kb1gtt »

Sudo wrote:But amplitude and the shape of the waveform are meaningless here. ONLY zero crossing matters.
I wanted to poke this comment a bit. The amplitude can give some information about RPM. However it's often not used. For example with chips that I have never seen, you could use the amplitude to change the band pass center frequency as a kind of kalman filter. Such a filter could be handy mostly for removing noise from the system when at low RPM. If you see a large amplitude spike when you expect a low amplitude spikes, you could ignore the spike as it has to be noise.

So how can this be applied to a simulator board? The simulator board should allow playback of the log file information. I agree that the MAX232 chip + and - ouput is better then several other options, and I also agree it can be better. For example, there are op-amps with differential outputs, that could be driven to make an exact match to the real signal. The goal with the MAX chip is that you play back a log file, and get the same TTL signals. Those TTL signals are handy for validating pieces of the system and allowing desktop development. The MAX232 chip is also low cost and easily bread boarded.

The problem that russian is seeing is most likely due to a wondering DC offset similar to the picture posted above with the "real 0 crossing" comment added. See modified picture below, notice the length of the noise in the middle is the source of the errors being detected. When that noise is short enough, it doesn't trigger the energy detected. However when the noise is there long enough, it triggers the energy dector and creates false triggers. It doesn't take much to bugger the VR signal.
7_27_10_raw_vr_vs_lm1815_output_NOISE_modified.jpg
You do not have the required permissions to view the files attached to this post.
Welcome to the friendlier side of internet crazy :)
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

Yes, and by providing a 25% duty cycle signal instead 50%. The DC is not zero anymore because of the imbalance signal. The average is above zero in Russian's case. His signal looks like 75% high and 25% low, which result as a ~3V DC if the signal is +/-6V peak to peak. That's my point.

Russian, just try 50% for the 24 teeth signal. That way you can prove me wrong and I will just shut up about it. :D
User avatar
abecedarian
Posts: 386
Joined: Fri Nov 15, 2013 10:49 am

Re: stimulator board

Post by abecedarian »

Am I missing something somewhere regarding what duty cycle means?

To me, a 25% duty cycle means during one period, 1/4 spent high, 3/4 spent low... 25% at 'high' voltage and 75% at the low voltage.
Thresholds obviously play a part in this as well, though.
You can lead the horticulture but you can't make them think.
Sudo
Posts: 92
Joined: Mon Mar 17, 2014 12:53 am

Re: stimulator board

Post by Sudo »

abecedarian wrote:Am I missing something somewhere regarding what duty cycle means?

To me, a 25% duty cycle means during one period, 1/4 spent high, 3/4 spent low... 25% at 'high' voltage and 75% at the low voltage.
Thresholds obviously play a part in this as well, though.
75% and 25% duty is interchangeable in my book. It is all matter of perspective. :D Just like how certain country design all of their circuit referencing the power instead of ground.

So if you insist, change everything from 25% to 75%. It's basically the same to me. All my ideas still applies. It would be -3V DC instead of +3V DC.

So for a 50% duty cycle, is it half high or half low? :lol: Ok, lame joke. Anyways. You get my point.
User avatar
AndreyB
Site Admin
Posts: 14727
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stimulator board

Post by AndreyB »

Status update: now with 1uF electrolytic capacitors, hopefully I've positioned all of the right.
RPM 300, x24 channel works fine:
3 digital inputs + 3 digital outputs
Image
ChA = max232 digital input, ChB = max232 analog ouput
IMAG001.BMP
RPM1200, x24 channel is skipping:
Image
IMAG000.BMP
You do not have the required permissions to view the files attached to this post.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14727
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stimulator board

Post by AndreyB »

Now max232 analog output and VR digital output at 1200 and 2400.
You do not have the required permissions to view the files attached to this post.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14727
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stimulator board

Post by AndreyB »

Never mind, one of the caps was not where it should be. New picture with the cap in the right spot, 3600 this time
You do not have the required permissions to view the files attached to this post.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14727
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: stimulator board

Post by AndreyB »

Now with a 1uF series / de-couping capacitor between MAX232 output and Honda VR input, 1200 is not skipping and 2400 is skipping 50%, not 75% as it used to. Progress!?
You do not have the required permissions to view the files attached to this post.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply