Donations towards server fund so far this month.

 
£0.00 / £100.00 per month
Page:
Home > MS Trials & Testing > MS hardware configuration

Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I've just done a test of the hall sensor.

The output wire is earthed with the gap open. It goes open circuit with a vane in the gap.

There is no voltage on the output wire at any time. So to make a voltage signal, I would need to add the pull up resistor.

However, it is simpler to use the circuit as Jean suggested above, which I think was my plan A anyway. I can use the existing opto sensor circuit for most of it, just need to feed in 5v off the board through a 470R resistor, connect XG1 to SPR1 and OptoOut to JS7.

I will need to shift the output from JS7 and JS10 when the code gets updated.


Attachments:

Edited by Paul S on 26th Jun, 2008.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Yes, that will work.

The hall switch not having an actual output (unless you add a pull-up resistor) is just a way of life with electronic components, designed to leave as many options open as possible.

Essentailly the circuit Jean suggests from the manual provides the pull-up through the led part of the opt-isolator.

I looked at that circuit too but chose against it simply because it is the "opposite way around" to the installed opt-isolator on the MS board. (it was obviously drawn on the basis of building an independant external circuit) but is easy enough to replicate with the installed opto-isolater.

Also there's something about me (also being a mechanical engineer) that says an output should be 12V not 0V !!!!

I also have the "benefit" of using a four wire device so I have all options open and this debate is making me think again.....

Too much thinking, too little progress.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Ummmm, I can't get it to start when configured for dual wheel.

When set to "Dual Wheel with missing tooth", Megatune cannot see any rpm. This is the setting I need to get working.

When set to "Dual Wheel" it runs for about a second then dies as it loses synch. The ignition timing is wandering around all over the place, but it may be due to the MAP bouncing.

Ive used 5v off the proto board through the 470R resistor as above.

I can measure the 5v at the sensor wire when it is disconnected. So I know that the ECU mods are working OK.

It seems to need a stronger signal.

Do you think it would get a better signal if I went for 12v and a 1K resistor?

Also I have removed C30 and dont have C12 fitted. Would fitting C12 help?

Edited by Paul S on 29th Jun, 2008.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

I saw your earlier thread and wondered.....

I find the Extra manual confusing for the settings, the actual settings available aren't the same as "F1" (Help) says they should be.

I can only play in Megatune (Extra) at the moment, MS isn't 100% ready for it to be hooked up to.

5V with 470R is pretty much the same as 12V with 1K.

I always avoid 12V in case it gets anywhere near the CPU (instant death) but in this case the opto-isolator is the protection against that.

C12 should only be required for a noisy signal (ie, points) a Hall switch or Opto-switch are nice clean digital signals.

Also, the opto-isolator requires a very small current to switch it, the input part is just an LED inside a case....

What I would suggest, as you have C12 out, is take a couple of wires from C12 position out to an LED, C12 position is in parallel with the LED inside the isolator, and crank the engine over - the LED should flash once per cam revolution (or go out once per revolution if yours is backwards to mine) but will prove if your signal is strong enough.

Rod.

EDIT - what value do you have for R12, is that where you are biasing your hall switch from or did you bias it as per the circuit Jean recommended? Either way, an LED at C12 will say if it's enough.

Edited by Rod S on 29th Jun, 2008.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I've hooked the input direct to pin 1 of the opto-isolator bypassing R12. I wonder if the 470R alone is enough.

Bit more info here:

http://www.megamanual.com/ms2/inputHEI.htm

I've also just put a shielded wire from the sensor back to the ecu just in case it was interference, but no change.

Just going to try one more thing before I set light to the car.

Edited by Paul S on 29th Jun, 2008.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Do I need a 1K resistor between the OptoOut and JS7 as well?

For information, the resistance readings of the hall sensor are 6 Ohms open gap and 4 MOhm with the vane in the gap.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 29th Jun, 2008 Paul S said:
I've hooked the input direct to pin 1 of the opto-isolator bypassing R12. I wonder if the 470R alone is enough.

So you have a seperate pull-up resistor (as per Jean's suggestion).
If so, even easier to test. Just connect an LED between where you've hooked to pin one, and ground (and crank the engine). You need to confirm whether the LED part of the opto-isolator is being "flashed".

On 29th Jun, 2008 Paul S said:
http://www.megamanual.com/ms2/inputHEI.htm

Interesting about maybe the pulse is too short, but first find if you are getting the pulse.

On 29th Jun, 2008 Paul S said:
I've also just put a shielded wire from the sensor back to the ecu just in case it was interference, but no change.

Although they suggest it, it really shouldn't be an issue, it's a simple on/off device, unlike a VR sensor.

On 29th Jun, 2008 Paul S said:
Do I need a 1K resistor between the OptoOut and JS7 as well?


Not if the Mainboard is built as designed, the opto-isolator is another open collector device, voltage pulled up by R13 to 5V (digital 1) and pulled down to ground, 0V, (digital 0) when the LED part of it is triggered. That digital 0 or 1 goes straight to the CPU "pin" 7 or 10.

All you are seeking to do with that opto-isolator is turn it on/off with your hall switch.

On 29th Jun, 2008 Paul S said:
For information, the resistance readings of the hall sensor are 6 Ohms open gap and 4 MOhm with the vane in the gap.

Resistance readings aren't too important with open collector devices, what matters is that the value of the pull up resistor is low enough to keep the voltage up at Vcc (say 5V) with the small current draw of the output (opto-isolator in this case) when the Hall is "open circuit" but not so low that excessive current flows through the Hall switch when it pulls to ground.

Final thoughts......

Why JS7 ???? something to do with the siamese code ???

Is the MS mainboard complete ???? If you bought it specified as VR inputs and direct coil ignition, R13 and C11 may have not been installed. (step 50 of build manual says you can jump to step 51 of you are only using VR).

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I'll order some LEDs and capacitors to try a few ideas.

JS7 is used for the second input in the MS2/Extra code used as the basis for the Siamese Code.

I'm sure that the board is complete with R13 and C11 as it was configured for multi-purpose use. I will check next time I have it in bits.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Paul,

I've just looked at the spec sheets of the opto-isolator and the hall switch (was going to do a quick current/resistance calculation) and noticed a subtle, but significant, difference between the Hall switch and the opto-switch I'll be using.

I mentioned earlier that one of the features of the opto-switch is it has four wires (the led part of it is totally seperate from the switch part of it) whereas the Hall switch has three (power, ground and output). Thus I can feed my LED with whatever voltage I like (so long as I get the right value resistor to limit the current), BUT the Hall switch is specifcally a 12V device.
Data sheet shows extreme voltage ranges of 4.5V to 24V but nominal 12V.
So if you are powering it at 5V, whilst the 470R resistor will keep the open collector voltage up enough to operate U3, the Hall switch internals may not be operating reliably.
I fear I may have misled you with my diagram as my opto-switch will work down at 1.7V (the forward voltage drop of the LED), hence my preference for 5V.

Rod.

Edited by Rod S on 30th Jun, 2008.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I'm powering the hall switch with a separate 12v supply.

Using the ECU 5v for the opto-isolator/sensor circuit.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Then you should be holding the open collector output up with 1k off the 12V supply ??? (page 3 of datasheet).
I'm confused now how you actually have it wired - can you post a sketch?

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland


On 30th Jun, 2008 retired said:
Then you should be holding the open collector output up with 1k off the 12V supply ??? (page 3 of datasheet).
I'm confused now how you actually have it wired - can you post a sketch?


That is only if you are using a 12v output from the hall sensor.

I'm just using the sensor to ground the signal wire to power the LED side of the opto-isolator from the 5v. I think *oh well*

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

If you are doing what I think you are doing, I think you may have the current the wrong way around...
Is it essentially the second diagram here?
http://www.megamanual.com/ms2/inputHEI.htm

If so, with what you said earlier

On 29th Jun, 2008 Paul S said:
I've hooked the input direct to pin 1 of the opto-isolator bypassing R12.

The LED is the wrong way around.
For that suggested circuit, U3 pin 1 (LED anode) is fed with the 5V through a current limiting resistor and your hall switch output should then be connected to pin 2 so when it pulls to ground, the LED lights.

Sketch?

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Sketch:


Attachments:

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

OK, I mis-interpreted what you said about "input direct to pin 1"
You have the 5V (through limiting resistor) to pin 1 and Hall output (potential ground) to pin 2.

The only reason I can think that it's not working is that the Hall output (open collector) is not being pulled up by this arrangement.

Normally you would have a pull-up resistor direct from the power to the open collector, this arrangement relies on the pull-up resistor in series with the U3 LED, and LEDs have a very high resistance when they are not conducting, so your Hall output may not be coming up to 5V without a direct pull-up resistor, ie, giving a clean 0V but not a clean 5V.
Suggest a DVM across green wire and black with MS powered up and turning dizzy/engine by hand to see if you are getting a clean switch between 0V and 5V.

I also looked up the U3 datasheet and did a quick sum, particularly in light of the MS-Extra suggestion of a 1.3k resistor.

Data sheet for U3 (opto-isolator)
LED (input) part only
forward voltage 1.2V typical, 1.5V max at 10 mA (fairly typical for any LED)
absolute max forward current 80mA
Thus to switch it on the resistor must be capable of passing 10mA but must limit to less than 80mA
Aim for 10mA
V=IR R=V/I R=(12-1.2)/0.01 = 1080 ohms (closest 1k)
or R=(5-1.2)/.01 = 380 ohms - that is the original value of R12
Can't understand why they say 1k3 in their second suggestion (although they do add the note "Note that some users have reported that 1K to 2K Ohms is too high, and a value as low as 330 Ohms may be need for R12 - experiment in your installation to find what works."
On my original calculation (where I said 470R) I had forgotten to deduct the 1.2V from the 5V.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

With 12.2v at the ECU I am getting a switch between 4.2v and 0v.

Is 4.2v high enough?

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Sorry for the delay, lost broadband all yesterday pm/evening....

It isn't whether the 4.2V is high enough, its how it compares to Vcc (the 5V inside the MS where you have picked up the supply for your resistor). Basically it should float at the exact same voltage as Vcc, otherwise current is flowing and it may be enough for the LED bit of the Opto-isolator to be on when it should be off.
Remember it is the 0V at the Hall switch that turns the LED on in your circuit.

If Vcc is a genuine 5V and your Hall switch is only coming up to 4.2V, you have 0.8V where you should have zero.
LEDs run at 1.2V forward drop nominally so it shouldn't come on (esp. as part of the 0.8V will be lost across the resistor) but something's not right.

Needs more thought...

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

When my LEDs turn up, I'll fix one across the C12 holes to see if we get a clean on/off.

Thanks for your help on this Rod, much appreciated.

I've also got Jean looking at the code. When it was written, it was based around not needing a cam sensor so it may be broken in places.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Now, just to confuse matters further, when I suggested putting an LED across the C12 holes (ie, in parallel with the opto-isolator LED) I forgot one of the golden rules of LEDs... They wont current share if fed through a single resistor, only the one with the lowest forward voltage drop will light (they all vary slightly for voltage drop).
Sorry about that, my electronics is a bit rusty......
Is the opto-isolator chip soldered in or in a socket? If it's in a socket, unplug it and an LED at C12 (or even just pushed into the pin1 & 2 location on the socket) is a valid test - otherwise, with them in parallel it's only a 50/50 probability of whether it will tell you anything.
I'll think of a way around that in a minute.....
Sorry.....

EDIT - OK, take the LED and solder another 470R resistor to its anode (long lead, opposite flat). Put the cathode into the C12 hole that's nearest C30 and the other end of the resistor to Vcc (5V) at the proto area. Then you have a direct mimic of your circuit to the opto-isolator and they will both do the same (no current sharing issues).

Edited by Rod S on 1st Jul, 2008.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I'll also measure the voltage at VCC and check for any high resistance at my soldered joints.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Yes, the voltage at Vcc (measured with the same DVM) compared to the voltage at the Hall switch will be interesting. It will prove the effectiveness of the way the MS-Extra diagram that you are using, is at using the 5V supply to pull-up the output of a 12V device.
I can't get my head around it properly at the moment but it doesn't seem "right".
And if you have any resistance at your soldered joints.... Well, shame on you !!!

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Just took some voltage measurements across the ECU.

Open gap on the Hall switch

VCC - 4.9v
Pin1 U3 - 1.2v
Pin2 U3 - 0v
Pin5 U3 - 0v
SPR1 - 0v

Vane in gap

VCC - 4.9v
Pin1 U3 - 4.9v
Pin2 U3 - 4.2v
Pin5 U3 - 4.9v
SPR1 - 4.2v

So it looks like the hall switch is working OK as the output of U3 (Pin5) is switching between 0 and 5v ish.

I think I will park this until Jean has had a look at the code.

Now where did I put that K100 head?

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I've just put the resistor and LED between VCC and the C12 pin hole.

It flashes at half the frequency of the ignition output LEDs so the signal is clean and consistant at engine speeds.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Yes output switching correctly, you say 0 and 5V ish (as if 4.9 is wrong), it's actually right because it's switching between 0v and Vcc.
However, a note of caution....
Your open gap voltages are spot on, Hall (SPR1) pulls to zero so LED inside U3 goes on, current limiting resistor sets the specified 1.2V forward drop over the LED (pin1 - pin2).
The closed gap readings are not so good because SPR1 (and pin2) isn't coming up to 4.9V but only 4.2V so there is 0.7V across the LED instead of 0V. Although this is too low for it to stay on (ie, it is less than 1.2V which is why the output is working correctly) it isn't ideal. I think this is because of biasing the Hall switch open collector through the LED bit of U3, which has a very high internal resistance when not conducting.
There is a possibility it may not switch so cleanly once the switching rate is up with a running engine.
Sorry to be slightly pessimistic (it's in my nature...) but the pin 5 readings are certainly good enough reason to wait and see what Jean says about the code.

Where exactly is the "Code" anyway ???
Although I haven't got time to touch it for the next couple of weeks, I'm thinking of making up a physical simulator for mine to test it out of car (seeing as the car/engine is a long way from complete !!!).

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

The "Code" is the operating system sitting in the ECU memory.

You download it from the laptop and adjust the settings via megatune.

The LED I fitted was giving a clean on/off at cranking speed so I will assume all is well.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."

Home > MS Trials & Testing > MS hardware configuration
Users viewing this thread: none. (+ 1 Guests) <- Prev   Next ->
To post messages you must be logged in!
Username: Password:
Page: