LM1815 - why extra input circuitry?

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

Post Reply
coyoteboy
Super MS/Extra'er
Posts: 1076
Joined: Wed Feb 01, 2006 7:52 am
Location: UK

LM1815 - why extra input circuitry?

Post by coyoteboy »

I'm curious - Ive been told the 1815 circuitry identified on the sns-e website can (and has been used) directly interfacing with the ECU pins, ignoring the optoisolator etc.

Checking the schematics for the board seeing the Wing and John diodes etc - since the 1815 circuit produces a 0-5v square wave output surely all you need is to protect the output/input with a 1K resistor? I cant see any time where the 1815 could go higher than 5v (unless a reg blew, then youre screwed anyway) and the signal from the 1815 should be a clean output.

Can anyone advise me where I'm going wrong in my thinking before i make a stupid and expensive mistake with my dual VRs.
I'm all for protection but i dont see the need for extra complexity where its not needed - im sure the gurus here will laugh at me and point out a reason but i have to ask :)
Cheers
J
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

You are correct. As long as the LM1815 is producing the correct trigger edge you would be ok. From memory the output is inverted, hence using half of the opto as a simple transistor inverter.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
coyoteboy
Super MS/Extra'er
Posts: 1076
Joined: Wed Feb 01, 2006 7:52 am
Location: UK

Post by coyoteboy »

Ahah, so thats why the opto is used. I'll have to look at that then. Thanks for the pointer, id have missed that for sure!
coyoteboy
Super MS/Extra'er
Posts: 1076
Joined: Wed Feb 01, 2006 7:52 am
Location: UK

Post by coyoteboy »

According to the diagrams the 1815 its low (sink) output unless the VR signal goes negative, when it goes to approx 86% of the VCC:
http://cache.national.com/ds/LM/LM1815.pdf

If the ECU is looking for high then its configured the correct way without inversion?

Thanks
J (learning slowly)
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

The problem is that the ms1 chip can only trigger on the falling edge of the IRQ signal, so you need to invert the output of the lm1815 so that the zero crossing from the VR is on the falling edge of the signal to the IRQ pin. Then the IRQ triggers on the zero crossing and timing will be correct assuming everything else is set up right.
coyoteboy
Super MS/Extra'er
Posts: 1076
Joined: Wed Feb 01, 2006 7:52 am
Location: UK

Post by coyoteboy »

Ahah. Right, now im understanding. I'll have to sort out an inverting tranny then for each channel :shock: :RTFM: :D

So I should be able to throw in a P type transistor with the gate tied to ground, feed the 1815 output to the source (resistor protected) and tie the drain to ground and get an inverted output? I hate transistors, they never make sense to me lol
Post Reply