Pin pulled down on shutdown?

MearCat

Member
I've got a circuit (w/ 28X1) which use a 0-5V voltage input from my cars' ECU (but the 28X1 is powered from a separate circuit in the car) and when I power off the uC with a manual switch, the car engine cuts out. I think there is some kind of feedback getting to the ECU which it doesn't like. It seems like it may be pulling down that line once it is shut off. There are no leaks to ground on the PCB, as the track from the voltage input terminal block goes directly to the uC and is NOT connected to any other tracks on the PCB (professionally made PCB btw)

Does anyone have any suggestion to whether I can use eg. rectifier or other diode to stop any signal / feedback getting from my circuit back to the ECU? Or suggestions on what it could be casuing this?

Regards,
Alan in Oz
 

moxhamj

New Member
Might take a few experiments, but essentially you need a high impedence device that stays high impedence when it is off. A picaxe input may not satisfy that criteria.

1) You could use a small reed relay. Use the picaxe to turn it on and make the connection. When the picaxe is off or unpowered, the reed relay drops out. These sorts of relays use only a few milliamps.

2) You could use an op amp voltage follower like a CA3140. You will need to run it on more than 5V though if you want the full 0-5V range. if you run a 1meg resistor into the input of the op amp, and connect the - input to the output then the output will follow the input. But the input resistance will now be 1 meg which should not upset the car computer so much.

I'd probably go for soution 1 though, as it provides true isolation. It need not be a reed relay - in fact any relay would do.
 

BeanieBots

Moderator
When any chip is powered down, all it's outputs effectively look like a diode pulling down to 0v.
The simplest solution is to use a diode configured such that when the output is high, it sources current. That does make the assumption that the controlled input has a pull DOWN resistor though.
 

Dippy

Moderator
Caveats taken for granted...

Well, this is the unknown quanitity ain't it.

"...which use a 0-5V voltage input from my cars' ECU".
- is this a digital line?
- with full push-pull or open collector? (e.g. does it need a pull-up)
- source impedance?
- is it an analogue line?
- it may be a 5V input to your professionally made pcb, but is it 5V OUTPUT from ECU?
- "professionally made", but was it professionally designed :) ?
- do you really have enough info to be doing this project without potential damage?

I'd go with DrAc's op-amp buffer. There are a zillion sutiable op-amps out there.
For digital the slight V loss via a 5V powered op-amp shouldn't matter for a PIC input anyway. For digital, the important issue is the wave quality, which will be fine with any op-amp happy on single rail with even a modest GBwP.
Quite honestly a transistor or two and a brace of resistors might do the trick just as well.
But without knowing the ECU spec I couldn't give a 100% answer.

What's the baud rate from ECU btw? (assuming digital).
Have you 'scoped it?
Is it deffo output only from ECU?
It is deffo not some kind of one-wire two way traffic?

Is this your first dabble in electronics and/or digital stuff?
 

MearCat

Member
Yes this is a trick one since specs like source impededance on ECUs are v. hard to find.

A few answers :

- No not a digital line. It is analogue 0-5V (I have measured with a DMM that the voltage output from the ECU actually varies from ~1.5-4.5V)
- No this is not my 1st (or 2nd, or 3rd, or 4th...) "dabble" in electronics
- The PCB wasn't designed by a pro but I wouldn't consider myself an amatuer either.
- Signal is definitely one way TO the ECU. I am intercepting the signal from the flow meter (so really it's not an ECU output, but a pull down to 0V will cause issues)

BeanieBots has hit it with the fact that when then uC is powered down it pulls the signal to 0V which would definitely cause the ECU to see no air flow to the engine and cause an engine cut out. I'll look into an op-amp as a buffer amp/voltage follower (with 1MOhm resistor)
 
Last edited:

BeanieBots

Moderator
When the PICAXE is not powered, the ECU sees 0v as you've described for the reasons stated. So, under these conditions, what SHOULD the ECU see and why? Surely it can only be a fixed value because (by definition) there is no signal. In which case, the ECU should have a POT to set the fixed value and be disconnected from the PICAXE via a relay contact.
 

Dippy

Moderator
Aha, so an ambiguity has crept in.

"(I have measured with a DMM that the voltage output from the ECU actually varies from ~1.5-4.5V)"


and

"Signal is definitely one way TO the ECU. I am intercepting the signal from the flow meter..."

See the confusion for us? (This is an example of how a basic schematic and fuller initial description can save hours.)

OK, so you are taking a sample from this analogue line from a flow meter TO an ECU analogue input.
So you are using READADC in some form?

Like all measuring equipment (e.g. your DMM) you need the measuring equipment to have a very high impedance so that it does NOT affect the original signal.
The unpowered PIC will drag the line down and your ECU thinks there is something awry.

Answer: Op-Amp as mentioned before. Nice high impedance (assuming your wiring is good). Acts as a buffer. You'll only need a op-amp in a 'follower' circuit so it can't get much more simple. Power it from 12V so you get an unimpeded swing up to 5V if needed. From a 'slow' analogue sensor even a low-power low-f-spec OpAmp should be fine.

Interference aside - job done I'd have thought. And even on digital lines it is a good idea to buffer things from 3rd party devices where you don't know the spec.
 

BeanieBots

Moderator
But don't connect direct to the op-amp or it will present the same problem when powered down. Large R in series.
Might even get away with simple R (<20k) in series with ADC pin.
Depends on source impedance. Worth measuring it, then you'll know how much loading it can take and how much it will be effected by that loading.
 
Top