Abe & JasonC's NB Cam & Crank input circuits - Page 5 - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 05-12-2010, 11:00 PM   #81
Hittin' Boost & Cones
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,572
Total Cats: 11
Default

Thank you. This will be next weeks mission. Id do it this week, but I want my car running for autox

So should I bother disconnecting the TSEL to OPTOUT or just leave it ?
240_to_miata is offline   Reply With Quote
Old 05-13-2010, 02:23 AM   #82
Senior Member
iTrader: (7)
 
Join Date: Jul 2007
Location: Milpitas, CA
Posts: 1,057
Total Cats: 1
Default

Quote:
Originally Posted by 240_to_miata View Post
Thank you. This will be next weeks mission. Id do it this week, but I want my car running for autox

So should I bother disconnecting the TSEL to OPTOUT or just leave it ?
As far as circuits are concerned, you would probably need to cut the connection. Just use a wire/plier cutter, and it should be easy to desolder.
Marc D is offline   Reply With Quote
Old 05-14-2010, 10:35 PM   #83
Elite Member
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,048
Total Cats: 8
Default

Yeah - you don't need to take out the entire circuits (though it wouldn't hurt) at least break each end of it - i.e. where it goes to the CPU, and where it goes to the DB37.
AbeFM is offline   Reply With Quote
Old 01-13-2012, 05:05 PM   #84
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Quote:
Originally Posted by Joe Perez View Post
Jason, regarding the circuit in post 14- I see no pullup on the input side of the gate. Seems to me we need one to the left of R1.

Also, we need the control pin to be tied high. That pin isn't illustrated on your symbol. but the CD4016 has one control per gate.
To update this thread...
The 74C14 (same functionality) appears to have better hysteresis specs for our purposes.
JasonC SBB is offline   Reply With Quote
Old 01-13-2012, 05:26 PM   #85
Boost Pope
Thread Starter
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago (Over two miles from Wrigley Field. Fuck the Cubs. Fuck them in their smarmy goat-hole.)
Posts: 26,315
Total Cats: 1,913
Default

I see I have sparked some renewed interest here.

Being home with a cold, I decided to prototype Jason's circuit this morning (largely out of boredom) and saw that the effective hysteresis spread with the CD40106 was only about 0.6v, although the thresholds were pretty ideal, 2.6v high-going, 2.0v low-going.

The scope traces which revealed this, where CKP into 40106 after the filter is is upper trace, output of IC is lower trace. We're at 40us/div horizontal, and 1v/div vertical on the upper trace:





Not horrible, really. Those traces were taken with a .1uf cap in position C1 and 1k in position R1, with a 1k pullup. Increasing the value of C1 to 0.2uf increased latency to about 300us on the high-going transition, which is just outside the MS's "hardware latency" compensation range (max value is 255us). So I'd wager than 0.15uf is probably the ideal value here.

Sadly, Digikey is without stock on the 74C14, so I'll probably just proceed with this circuit.
Attached Thumbnails
Abe & JasonC's NB Cam & Crank input circuits-o8c2h.gif   Abe & JasonC's NB Cam & Crank input circuits-xuem0.gif  
Joe Perez is offline   Reply With Quote
Old 01-13-2012, 05:32 PM   #86
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,809
Total Cats: 1,780
Default

youknow whats easier?


using the VR input circuit...
Braineack is offline   Reply With Quote
Old 01-15-2012, 05:12 PM   #87
Boost Pope
Thread Starter
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago (Over two miles from Wrigley Field. Fuck the Cubs. Fuck them in their smarmy goat-hole.)
Posts: 26,315
Total Cats: 1,913
Default

Quote:
Originally Posted by Braineack View Post
youknow whats easier?
using the VR input circuit...
You know what's even easier than that?

Your mom.

(Bazinga.)


Quote:
Originally Posted by JasonC SBB View Post
To update this thread...
The 74C14 (same functionality) appears to have better hysteresis specs for our purposes.
I was thinking about this last night.

While the 74C14 does have a guaranteed minimum 1v HT, it also has specified VT+ of minimum 3v, typical 3.6v. As such, using a 74C14 instead of a CD40106 would dramatically increase the effective time-constant of the RC filter, pushing it well outside of the maximum compensation which can be applied within the MS (255us), and thus forcing me to reduce the actual time-constant of the filter.

Such a tradeoff requires an analysis of the probable interference modes within the system in order to make an informed choice. I do not, unfortunately, have a scope capture available of a typical "noisy" system, however I can foresee two possible situations:

1: There is induced noise present on the line, causing ripple in the signal, and
2: The sensor exhibits a behavior analogous to switch bounce, possibly due to mechanical factors (vibration, timing belt stretch, lash in the interface between the cam and the CAS, etc.)

Now, a part with a larger hysteresis would be effective in combating scenario #1, although it seems quite a stretch to me to envision there being 600mv or more worth of noise in the line. It would not, however, be effective against a signal which exhibits ringing across the full rail-to-rail range.

Sacrificing on-chip hysteresis in favor of a longer actual RC time constant, however, provides protection against both scenarios. Noise will inherently be absorbed by the filter, as will ringing events provided that they occur within a sufficiently brief time window.

In other words, I'm starting to change my opinion here, looking at a large RC time constant as being of greater significance than a large hysteresis voltage, given the constraint of a hard limit on total trigger latency.
Joe Perez is offline   Reply With Quote
Old 05-02-2012, 12:45 PM   #88
Junior Member
 
Join Date: Mar 2010
Location: Durham, NC
Posts: 406
Total Cats: 19
Default

For those like me who barely understand what's going on. Make sure you bring Vdd to +5v and Vss to ground when the CD40106 circuit. Otherwise ---- gets weird.
FatKao is offline   Reply With Quote
Old 05-02-2012, 12:49 PM   #89
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,809
Total Cats: 1,780
Default

I dont really see any point to this circuit anymore, at least when using MS2/3
Braineack is offline   Reply With Quote
Old 06-16-2012, 06:40 PM   #90
Junior Member
 
Join Date: Sep 2010
Location: SFL
Posts: 376
Total Cats: 3
Default

would a LM324 work in the application also? 0ne channel to the TSEL and the cam to the 3x or this.


I also want to bring 2 separate vehicle speed sensors in on the remain 2 channels later on.
MD323 is offline   Reply With Quote
Old 06-21-2012, 03:52 PM   #91
Elite Member
iTrader: (3)
 
AbeFM's Avatar
 
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,048
Total Cats: 8
Default

Jason/Joe,
There are some new chips which I've been wanting to try - and I agree that a little bit of predictable delay isn't a bad thing (what's a few degrees between friends)... But as I recall with my circuit, I'd slightly bumped the values of the resistors (more for what was commonly available than to re-engineer anything) nonetheless I bumped them so the hysteresis was greater.

Off the top of my head, I don't know what that number was, but I recall it was pretty substantial... That I tried smaller numbers like a 1 volt window and got nothing. I believe on the car you need to have at least a 3 volt, I would do a 3.5 volt, to be sure you're getting rid of the ungodly amounts of noise present (i.e. switching at >4.25 and <0.75). I remember in testing being shocked how big it had to be.

Quote:
Originally Posted by Braineack View Post
I dont really see any point to this circuit anymore, at least when using MS2/3
Is MS2/3 code for the new hybrids? I thought you had to. I mean, I thought their inputs were still shady. Fred over at FreeEMS has some little super cheap dual input board which actually looks ok - I was very tempted to try it on a friend/customer's car only his real issue was grounding and once he fixed it everything was better. :-)
AbeFM is offline   Reply With Quote
Old 06-21-2012, 03:56 PM   #92
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,809
Total Cats: 1,780
Default

the VR input on the MS can sync reliably well over 20K RPMs or something (forgot what diyautotune.com tested). There's no issue with it and it's already built into the mainboard and expander board.

I sure Fred will say bad things about it, that's what he does, but there's also thousands of cars running it vs his what? handful?

so long as you're running MS i see no point in reinventing the wheel trigger... because it's as simple as inserting two jumpers and adding 1 pullup.
Braineack is offline   Reply With Quote
Old 06-21-2012, 06:01 PM   #93
Boost Pope
Thread Starter
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago (Over two miles from Wrigley Field. Fuck the Cubs. Fuck them in their smarmy goat-hole.)
Posts: 26,315
Total Cats: 1,913
Default

Abe! I thought you were dead! Haven't seen you around these parts in forever.
Joe Perez is offline   Reply With Quote
Old 06-21-2012, 06:11 PM   #94
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,809
Total Cats: 1,780
Default

dont you live together?
Braineack is offline   Reply With Quote
Old 06-21-2012, 06:16 PM   #95
Boost Pope
Thread Starter
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago (Over two miles from Wrigley Field. Fuck the Cubs. Fuck them in their smarmy goat-hole.)
Posts: 26,315
Total Cats: 1,913
Default

Quote:
Originally Posted by Braineack View Post
dont you live together?
No, I got tired of driving in bullshit traffic for an hour and a half every day to get from his place up to Carlsbad about two years ago. And I'm pretty sure that with the two of us in the same place, we had to have been violating some city ordinance for "maximum number of non-functional engines stored in a residential dwelling."

edit: given that this is a Miata form, I suppose that this particular line of conversation could be interpreted in a couple of different ways. (And yes, the neighbors had taken note of two Miata-owning men sharing a residence. Abe's pink motorcycle didn't help matters.)
Joe Perez is offline   Reply With Quote
Old 01-03-2013, 08:42 PM   #96
Junior Member
iTrader: (2)
 
Join Date: Sep 2011
Posts: 320
Total Cats: -1
Default

if I build this circuit in the vr area of the board, what are the settings in tunerstudio, under spark settings and wheel decoder settings, if run with a CAS?
tottestad is offline   Reply With Quote
Old 01-03-2013, 09:59 PM   #97
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,809
Total Cats: 1,780
Default

are you building a ms2?
Braineack is offline   Reply With Quote
Old 01-03-2013, 10:58 PM   #98
Junior Member
iTrader: (2)
 
Join Date: Sep 2011
Posts: 320
Total Cats: -1
Default

No, its an ms1. The car has the cruising stumble. By the log its setting off the rev limiter. Spiking rpm to around 9000 rpm in the logs.
tottestad is offline   Reply With Quote
Old 01-04-2013, 12:25 PM   #99
Junior Member
iTrader: (2)
 
Join Date: Sep 2011
Posts: 320
Total Cats: -1
Default

so, I have the car running, but the trigger angle is set to 4+0. the problem im having is its hard to start. is sounds like its out of time and backfiring until it fires up, then all is fine. From what ive read, the settings I have put the ms in next cylinder mode, I suspect that has something to do with it. attatched is the circuit I built for the 2nd input. I have is going to pin 11 on the processor. (not js10)
Attached Thumbnails
Abe &amp; JasonC's NB Cam &amp; Crank input circuits-2ndopto.jpg  
tottestad is offline   Reply With Quote
Old 03-29-2013, 05:33 PM   #100
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Quote:
Originally Posted by Joe Perez View Post
Not horrible, really. Those traces were taken with a .1uf cap in position C1 and 1k in position R1, with a 1k pullup. Increasing the value of C1 to 0.2uf increased latency to about 300us on the high-going transition, which is just outside the MS's "hardware latency" compensation range (max value is 255us). So I'd wager than 0.15uf is probably the ideal value here.
Hmm, I missed this post when it came out.

I wouldn't set the delay to be more than about 75 us. At 7000 RPM, one degree of crank rotation takes 24 us. So 75 us is about 3*.

The problem is not being unable to correct for the latency in software. Rather, the problem is the *variance* in latency over temperature and time. The capacitor tolerance, and the Schmitt thresholds, can change with temperature. Therefore the latency will change. If your 75 us latency varies by 30%, that's a 1* change in latency. If your latency is 250 us, that'll be a 3* change. Your software can't know that it changed.

Quote:
Sacrificing on-chip hysteresis in favor of a longer actual RC time constant, however, provides protection against both scenarios. Noise will inherently be absorbed by the filter, as will ringing events provided that they occur within a sufficiently brief time window.

In other words, I'm starting to change my opinion here, looking at a large RC time constant as being of greater significance than a large hysteresis voltage, given the constraint of a hard limit on total trigger latency.
What you have to look at, to judge between long RC constant with small hysteresis, vs. vice versa, is, for a given latency, how good the noise rejection is. The big difference between large hysteresis and small hysteresis is that, once the state of the output toggles, large hysteresis makes it more resistant to noise that tries to toggle the output back. Which is the whole point of hysteresis to begin with.
JasonC SBB is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Project Gemini - Turbo Civic on the Cheap Full_Tilt_Boogie Build Threads 57 07-19-2017 05:11 PM
Need help - Stock Balancer and Fastforward overlay pulleys Frank_and_Beans Supercharger Discussion 13 09-12-2016 09:17 PM
My solution for Oiltemp and Oilpressure input into Megasuirt (MS3) Zaphod MEGAsquirt 41 01-24-2016 01:25 PM
Got bad Crank Angle Sensor and Random Misfire codes, but runs fine. Greasyman General Miata Chat 2 09-28-2015 11:44 AM
WTB HPDE miata - Texas Voltwings Cars for sale/trade 0 09-27-2015 07:40 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 04:04 AM.