The MegaSquirt Project has experienced explosive growth other the years, with hundreds of new MS installations occurring every week - a phenomenal success! MegaSquirt has been successfully used in all aspects of Internal Combustion engine applications including R&D, Industry, Race, and Research. The MS project has transformed itself from a simple R&D project into a full-featured mature engine control system. To reflect this the support structure has also changed to meet the needs of MegaSquirt Users.
Moving forward, the R&D forums for MegaSquirt project are in a read-only mode - no new forum posts are accepted.
However the forums will remain available for view, they still contain a wealth of information on how MegaSquirt works, how it is installed and used. Feel free to search the forums for information, facts, and overview.While the R&D forum traffic has slowed in recent years, this is not at all a reflection of Megasquirt users, which continue to grow year after year. What has changed is that the method of MegaSquirt support today has rapidly moved to Facebook, this is where the vast majority of interaction is happening now. For those not on Facebook the msextra forums is another place for product support. Finally, for product selection assistance, all of the MegaSquirt vendors are there to help you select a system, along with all of the required pieces to make it complete.
A forum for discussing topics of particular interest to those running MegaSquirt in Australia and New Zealand, including parts sources, group buys, etc.
This is loosely MS related so I figured I am OK to put it in here.
My problem comes from using the factory ECU harness for the MS install. I have a ECU connector from a dead ECU and have used that to make an adapter loom from between the stock loom and the MS DB37. Where I ran into trouble was with the circuitry for the main power relay. The relay's coil is switched on both the positive AND negative side, the positive through the ignition switch, and the negative side through the ECU. When the ECU is removed then that part of the circuit is removed, and the main relay does not turn on. So I have to come up with some way of switching the relay's coil to ground, using a +12v input.
I did some googling and read some on using transistors as a switch. Like this:
Now if my understanding is correct R1 is connected to the base, the emitted goes to GND and the relay coil is connected to the collector. When a voltage is put to the base that allows current to flow from the collector to the emitter. The relay coil already has +12v on one side so it's effectively grounding the other side.
Prior preperation and planning prevents piss poor performance
If you are switching a few amps or more you may want to add a diode (eg. 1N4004) across the relay to protect the transistor from an emf spike when the relay is switched off. Connect the cathode to the positive (+12V) side of the relay and the anode to the transistor side.
Here's a reference if a picture helps http://en.wikipedia.org/wiki/Flyback_diode
Let me know if I have read your post correctly. The 12V side of the relay is switched from the ingition, and the ground side is switched through the Factory ecu. I assume this relay feeds power to the MS, injectors coils etc.
If that is correct, then why not just ground the ground side and rely on the ignition switch to control the relay? Thats how a main relay would be done in a normal MS install.
Otherwise I agree with long283.
Cheers
Daniel.
26 Chev hotrod with a 1UZFE and MS3x, Flex fuel, GPIO Transmission control and LCDash.
LS3 powered Race boat with MS3pro and GPIO.
MS2 on a 22r in a Hilux (mates car).
MS2extra on a turbo EF Falcon (brothers car).
Toyota Supra 1jz MS2extra, COP.
13B Turbo MS2extra.
devojet wrote:Let me know if I have read your post correctly. The 12V side of the relay is switched from the ingition, and the ground side is switched through the Factory ecu. I assume this relay feeds power to the MS, injectors coils etc.
If that is correct, then why not just ground the ground side and rely on the ignition switch to control the relay? Thats how a main relay would be done in a normal MS install.
Otherwise I agree with long283.
Cheers
Daniel.
Actually my description is not quite right because I tried that and even with the ignition off when I ground the -ve side of the relay coil it turns on, so the relay must have constant 12v to it.
The EMF spike was going to be my next question, thanks for mentioning that!!!
Prior preperation and planning prevents piss poor performance
I remember my dad had a problem with a commodore v6 in a rodeo. He tried changing the relay switching but it also had a switch that opened when the oil-press went too low. It didn't want to switch off while the engine had oil-press after the wiring mod.
That updated diagram is correct.
Another way to protect the transistor is to use a ~22V zener. Connect the cathode to the transistor on the negative side of the coil and the anode to ground. Similar to the wiring in the MS for the fuel-pump, Idle-air Solenoid circuits.
I checked the relay's coil resistance and it's 69.6 ohms. So I calculate the current draw to be about 170mA @ 12v. So a PN2222A should handle that current no problems.
Right?
Prior preperation and planning prevents piss poor performance
Yeah the PN2222A should be fine. The data sheet says it can handle 1A max.
Cheers
Daniel.
26 Chev hotrod with a 1UZFE and MS3x, Flex fuel, GPIO Transmission control and LCDash.
LS3 powered Race boat with MS3pro and GPIO.
MS2 on a 22r in a Hilux (mates car).
MS2extra on a turbo EF Falcon (brothers car).
Toyota Supra 1jz MS2extra, COP.
13B Turbo MS2extra.
Thanks Daniel. I'm trying ti figure out my resistor values now, and need the Hfe. I look on the datasheet but there's half a dozen values. I think 100 is the closest minimum value? As it says 10v and 150mA. What Hfe figure should I use?
The way you will be using the transistor is more like a switch. You simply want it to turn on or off, like a digital circuit. I believe you should go for maximium gain to keep the gate saturated, as long as the voltage divider keeps the gate below its maximum voltage.