VSS without MS3X?

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

Post Reply
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

VSS without MS3X?

Post by Kumppari »

Im trying to figure out how to add vehicle speed sensor (5 volt hall) to megasquirt. manual says to connect it to MS3X, but I dont have one of those. It also mentions DIY options on MS2 manual, but Im having no luck finding the correct page. Im also not very good at electronics. So, if some kind soul would tell me exactly what kind of circuit I need to solder togheter, and where to connect it on the v3.0/ms3 board, it would be greatly appreciated.

thanks
walterclark1
Experienced MS/Extra'er
Posts: 292
Joined: Tue Jan 01, 2013 3:37 pm
Location: Dover, MA., USA

Re: VSS without MS3X?

Post by walterclark1 »

Fire up your TS and go to the Advanced Engine, then Speed and Gear Sensors menu. Under Vehicle speed sensor 1 and Input, any one of those that you have thats not already in use can be the VSS input. Such as PE0, PE1, JS10, JS11.

The circuit is exactly like a Hall Crank position sensor. 5V to power the Hall, a pullup resistor (around 2K ohms should be fine) at the V3 board end between the input and +5V, and a Ground (preferably a sensor ground) at the V3 board. As most of these inputs are direct to the MS3 daughter cars (with jumpers to connect them to a pin on the main connector). And this is an output from a potentially unfriendly world, I would not be a bad idea to add a circuit for this on the proto area similar to the ones at the MS3X input for Tableswitch, Nitrous In ,etc. which is on the second page of the MS3-Expansion schematics at:http://www.msextra.com/doc/general/ms3v ... .html#ms3x. These already include that pullup.
A2 VW GTI 9A - MS3/3X
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

This circuit? If yes, i got some questions:

datalog in - Im thinking this would be the signal from hall.
V12 - I hope this is the pullup thing, cause I only have four cylinders.
VCC - No idea.
PT6 - Ditto, altough i guess one of these goes to the processor. Im going to use JS7/PE0.

Well, atleast i recognise the two grounding points, and the component symbols. Managed to pull them from an old ms1/2.2 board, execpt the diodes which lack description. What should they be?
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: VSS without MS3X?

Post by arran »

Vcc is "supply voltage" and is usually 5v. V12 will be referring to 12V in the proto area.

So you are looking not just at how to get VSS with just MS3 but also you need a circuit?

My experience on the matter is to build this circuit:
Image

The circuit is just a hall effect and a comparitor to square up the signal.

I am using "tableswitch" input and it works very well. The hall effect sensor is mounted inside the instrument cluster and picks up off a little steel drum looking piece that turns speedo cable rotation into needle deflection.
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

arran wrote:So you are looking not just at how to get VSS with just MS3 but also you need a circuit?
Thats kinda what I tried to convey in my opening post.
I got the hall sensor slapped in the car, pointing at driveshaft. For me, that was the easy part. Now all I need to know is where to stick the three wires fom said sensor. I would prefer easy solution, naturally. But what ever works, as long as somenone can gude me through it, ill be happy.

This circuit you are proposing, would it be inside the ms3 enclosure or outside? Seenig as there is 5v available within, would simplify things a bit. Also, I was under the impression that hall sensors produce square signal, why would it need squaring up?
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: VSS without MS3X?

Post by arran »

The hall effect sensor I used most certainly did not output a square wave, more a sine wave. Perhaps there are others out there that have a built in comparator.

The circuit is more than a proposition! It is what I am currently using in my car and have been for about 7 years now. I originally built it to provide a speed signal for an AVCR and I basically wanted to create a pulse train similar to what would be used in a cruise control. I've made a couple of reproductions for friends.

There are of course many ways to skin a cat, the way I have skinned the cat is with that circuit.

I constructed it on a bit of generic circuit board, it fits inside 25mm x 30mm approx, the sensor and board are mounted in and behind the instrument cluster. It takes 12V from the cluster volt meter and signal/ground run the MS in a shielded cable to sensor ground and Launch In. More info is on my site here:
http://web.aanet.com.au/~arran/car/projectpart4.html
About halfway down that page are pics of the circuit and speedo.

The megasquirt however will probably work with the analog signal, the digital circuitry will assert a high or low at some threshold around 2.5 volts.

So you can try perhaps using the SIGNAL ground, 5 volts from internal to MS out of the case on a SPR, and the actual signal on whatever is an available input.
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

Okay then. I will order the necessary parts, assemble the circuit, test it out and report my success. Or more likely ask more questions.
walterclark1
Experienced MS/Extra'er
Posts: 292
Joined: Tue Jan 01, 2013 3:37 pm
Location: Dover, MA., USA

Re: VSS without MS3X?

Post by walterclark1 »

Kumppari wrote:This circuit? If yes, i got some questions:

datalog in - Im thinking this would be the signal from hall.
V12 - I hope this is the pullup thing, cause I only have four cylinders.
VCC - No idea.
PT6 - Ditto, altough i guess one of these goes to the processor. Im going to use JS7/PE0.

Well, atleast i recognise the two grounding points, and the component symbols. Managed to pull them from an old ms1/2.2 board, execpt the diodes which lack description. What should they be?
That circuit is correct. As mentioned V12 will be the pullup voltage. If your Hall is powered by 5V then this would be 5V as well. Vcc is 5V. PT6 is the output and will go to PE0 in your setup. this circuit basically protects the processor from excessive input voltage and provides the pullup the hall needs. I have yet to see a hall gear teeth sensor that was properly oriented and detecting "gear" that did not approximate a square wave, but it is possible. A pure hall device (sensor and diff amplifier) will approximate an analog based on distance to a moving magnet but most gear type sensors available are more than just the sensor and amplifier, they also contain a Schmitt trigger that will result in a digital output (high/low). They include the magnet, allowing them to detect passing ferrous metal, and some electronics to clean them up (the Schmitt trigger) and normally an open collector NPN output transistor for interfacing flexibility.
Last edited by walterclark1 on Fri Apr 18, 2014 1:17 pm, edited 1 time in total.
A2 VW GTI 9A - MS3/3X
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

That was useful info, thanks. Cleared some things up.
Also noticed that what I tought were two diodes, is actually something else. Live and learn I guess.
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: VSS without MS3X?

Post by arran »

They are two diodes
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
walterclark1
Experienced MS/Extra'er
Posts: 292
Joined: Tue Jan 01, 2013 3:37 pm
Location: Dover, MA., USA

Re: VSS without MS3X?

Post by walterclark1 »

Yes, 2 diodes. These are the protection devises for the input. The parts used on the MS3X are good but they are surface mount and can be hard to handle. There is no exact thruhole replacement but these come close: http://www.mouser.com/ProductDetail/Vis ... R4rA%3d%3d or http://www.mouser.com/ProductDetail/STM ... VXLuej0w==.

One more thing. The datasheet for the Hall sensor you have should telly you whether you can expect a logic type output from it ( 0v / 5V) or if it is a more analog output that needs some added signal processing such as using that comparator circuit.
A2 VW GTI 9A - MS3/3X
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

Okay, so the diodes were just hidden inside a funny enclosure. Got it.

Havent found a datasheet yet. Says 5WY316A on the sensor, according to google it belongs in a daewoo/chevrolet matiz. And there is a magnet inside cause it attracts iron. Is there some test that a dummy like me could perform with a multimeter? Or maybe with an oscilloscope, my friend has one I could propably get my hands on.
walterclark1
Experienced MS/Extra'er
Posts: 292
Joined: Tue Jan 01, 2013 3:37 pm
Location: Dover, MA., USA

Re: VSS without MS3X?

Post by walterclark1 »

Yes, thats often a problem with such parts targeted to a specific vehicle...no datasheet. If it has a magnet in it odds are it is a complete assembly. I would just hook it up and give it a spin. Scoping the output wouldnt hurt and if you dont get VSS working correctly in TS right away it would help tell you whether the sensor is working right or not. It should be a series of squarewave like pulses. It will go low when near a tooth and high otherwise.

The Schotty diodes on the MS3 board packaged in one of a number of common SMT packages (SOT323) and look more like a transistor package. I think they use a 3 leg package even only 2 are used to help with correct placement on the circuit board. Its almost impossible to onsert it backwards, unlike a common 2 leg package such as the SOD323 of some other diodes or similar packaging of resistors and capacitors.
A2 VW GTI 9A - MS3/3X
nismoautoxr
Super MS/Extra'er
Posts: 2631
Joined: Sun May 29, 2011 10:28 am
Location: birmingham ,Alabama. U.S.A.

Re: VSS without MS3X?

Post by nismoautoxr »

speaking from experience with Daewoo products ...most if not all of their hall sensors are powered by 12volts but that number you posted results in no google results for me . Also many of them already have a pullup in them so this could take some trial with a scope /DVOM.
Ricky-
1995 Nissan 240sx, 403 LS strokerv8 N/A 6speed trans
MS3&MS3X v.3.0 PCB
42lb/hr Hi-Z inj.,230/232 @.050 on 114LSA cam
sequential fuel and sequential spark
LS3/LSA card MAF sensor
97 Mazda MX5
MS3 2002 vvt motor
.60 trim T4 Turbo at 15 PSI
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: VSS without MS3X?

Post by arran »

The hall effect sensor I am using is here:
http://m.jaycar.com.au/m_productView.asp?ID=ZD1902

A data sheet is downloadable from that page.
It is physically small which suits my application because I can poke it through small holes in the instrument cluster pcb to access the speedo mechanism and therefore no "modifications" are necessary to mount it. Also as it is internal rather than external to the car there are no weatherproofing or physical protection considerations.
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
Kumppari
MS/Extra Newbie
Posts: 13
Joined: Sun Mar 09, 2014 10:34 pm

Re: VSS without MS3X?

Post by Kumppari »

nismoautoxr wrote:speaking from experience with Daewoo products ...most if not all of their hall sensors are powered by 12volts but that number you posted results in no google results for me . Also many of them already have a pullup in them so this could take some trial with a scope /DVOM.
Sorry, mistyped the code. 5WY3168A is the correct one.
Seller said 5v, but i woud not be suprised if it worked with 12v also.
walterclark1
Experienced MS/Extra'er
Posts: 292
Joined: Tue Jan 01, 2013 3:37 pm
Location: Dover, MA., USA

Re: VSS without MS3X?

Post by walterclark1 »

Assuming the sensor contains signal conditioning circuits, they should, but may not necessarily fully function at 5V and require something over say 7-8V to work correctly. However the pullup does not change power the sensor and does not affect the way the sensor works. In fact most sensors use what is called an open collector output that provides either a ground or high impedance floating output so the circuit that detects the sensor can tailor this to its input needs.

It is possible (but not particularly common, at least among industry standard gear tooth sensors) that the sensor output is driven to both a high (5/12V) and low (0V) state. In that case you would not need a pullup, though having a typical one (such as 2K Ohms) would not hurt anything.

You can pretest the sensor easily enough to determine how it should be connected.

Connect the sensor power lead to 5V and ground to ground. Measure voltage between the output and ground with a multimeter. Then move a bit of ferrous metal close to the business end of the sensor. If you see no change, such as a ground when the metal is near and something steady and close to 5V when taken away, either the device is an open collector (needs a pullup) or it needs 12V to operate. If it works that way it is a 5V device and needs no added pullup (see my note in the next paragraph about measuring open collector outputs). Assuming you saw no change in the output voltage, next add a 2K resistor between the output and the power lead to add in that pullup and re-measure it with and without the metal object. If it works now you do need the pullup but 5V is fine for power and pullup. If it still didnt change remove the pullup and connect power to 12V. Re-measure the output. If it works (now 0V when the metal is close and likely as not 5 or 12V when the metal is removed) the sensor needs 12V power but not a pullup. If still no change, add back that pullup (to either a 5V or 12V source for this experiment is fine) and re-measure.

One note about open collector outputs. It is sometimes possible to read a voltage when it is in its high impedance state without an obvious pullup resistor. This depends on the output device used and the impedance of the multimeter. An extremely high input impedance multimeter or a fairly leaky output transistor can give you this somewhat false reading. If you are getting a voltage reading without a pullup resistor, you should load the output of the sensor slightly with a resistor of say 10K ohms to 100K ohms (connected across the multimeter leads). If the voltage goes to zero then this is an open collector output and needs a regular pullup. If it remains at a steady voltage then the sensor output is driven both high and low, or already has an internal pullup and you dont need to add one.
A2 VW GTI 9A - MS3/3X
Post Reply