Transistors used as switch

I have two circuits on an older vehicle ECM that need to be activated by providing ground. Voltage across the connection measure just under 12v and they draw 0.5ma when activated.
Would this circuit work?
Is there a better way to do it?

  • A 180k base resistor is too large.
    Use 180R.

Hi, @anon66902326
Welcome to the forum.

What controller are you using 5V or 3V3 logic?

Tom.... :smiley: :+1: :coffee: :australia:

3v3. Nano ESP32.

JFETs?

Full switching of a 2N2222 requires 10% of collector current into the base.
That works out to a base CL resistor of about 50k.
I guess that 100k or even 180k would still work, with a bit more saturation loss.
I would use 47k and call it a day.
Leo..

And make sure gnd of Arduino is connected to gnd of ECU system.

Tom.... :smiley: :+1: :coffee: :australia:

This is named 'open collector configuration'.
A very common circuit.
As suggested by others: use a smaller resistor...

+1
If grounds can't be shared then use an opto coupler, which is the safer approach anyway.
Leo..

Better in what way?
Less parts?
Cheaper parts?
A more reliable design?
Doesn't need an Arduino?

What are you trying to do with the ECU?
What inputs are you activating and why?

Tom.... :smiley: :+1: :coffee: :australia:

Where does the Arduino come into this?

Explain a bit more what you are trying to do and why.

and they draw 0.5ma when activated.
0.5mA ?

Toyota has several test modes that are activated by jumping connectors to ground. Other connectors output digital or analog data depending on the test modes that are activated.

If I've understood your description then the impedance of your two old circuits would be about 24k. To sink that load it seems your required circuit could look like this:

But increasing the base resistor to 100k makes no significant difference to the load current in that simulation. But the varying gain of 2N2222 transistors probably will.

Using 100k will yield a circuit thatt is sensitive to interference...
In a car that is not a good idea...