# Change voltage circuit

#### #12

Joined Nov 30, 2010
18,224
and with the 3904 being "on" that will allow a path the ground and when it's released the SCR will shut off, in turn return the output to 2.5V.
I'll take the easy one first. I got the labels backwards. I expected to see input 2 at the bottom, so that's what I believed.

#### #12

Joined Nov 30, 2010
18,224
After pounding the calculator for over an hour, I can't see how to make my circuit work.

#### ScottWang

Joined Aug 23, 2012
7,342
No to be picky, but, Vout in Scott's drawing would not be as labeled if there is 12V tied to R7. The voltage divider switches between 50% and approximately 33% of that voltage.

On edit:

I see the error is a typo as the voltage divider in the TS's second circuit uses 5 volts as the input to the voltage divider. I suspect it was a copy and paste error on Scott's second circuit. With a 5V input, the Vout would be as posted.
Thank you.
About the 5V output circuit, because the original was 12V, so when the output circuit was copied from TS and I didn't notice that, but I had saw #12 that he labeled the output was 5V, during that time I even felt that why #12 want to change to 5V, that's one kind of blind point, so I forgot to labeled as 5V.

#### KeepItSimpleStupid

Joined Mar 4, 2014
5,088
The TS (Thread Starter) is missing something fundamental, but it may not matter.

ECU voltages are usually referenced to the current value of Vcc which could be time varying. e.g it's 1/2 Vcc not 2.5 V. If Vcc happens to be 5.1 V, 1/2 Vcc is 2.55 V. Voltages are not absolute in a typical car. Vcc can change based on any number of variables. It also means you don't need a stable reference. So 1/2 Vcc may be defined as 0 for the sensor output. 2.5 V can be anything including zero.

#### Picbuster

Joined Dec 2, 2013
1,041
Oh yeah! Programming a microprocessor is always better than using 2 or 3 transistors.
Can you list the equipment needed to do this with a PIC?
see attached box AAC fanatic
don't forget the progger cons.
Picbuster

#### Attachments

• 59.3 KB Views: 11

#### Kev0511

Joined Jul 20, 2004
39
Thank you.
About the 5V output circuit, because the original was 12V, so when the output circuit was copied from TS and I didn't notice that, but I had saw #12 that he labeled the output was 5V, during that time I even felt that why #12 want to change to 5V, that's one kind of blind point, so I forgot to labeled as 5V.
Too me it's all good, and i personally understand if anything i wrote/drew would be slightly hard to understand.

The TS (Thread Starter) is missing something fundamental, but it may not matter.ECU voltages are usually referenced to the current value of Vcc which could be time varying. e.g it's 1/2 Vcc not 2.5 V. If Vcc happens to be 5.1 V, 1/2 Vcc is 2.55 V. Voltages are not absolute in a typical car. Vcc can change based on any number of variables. It also means you don't need a stable reference. So 1/2 Vcc may be defined as 0 for the sensor output. 2.5 V can be anything including zero.
Most ECU do have voltage regulators in them so they can have a pretty stable Signal being returned to them from 3 wire sensors (TPS, Pressures, Throttle pedal, ect) and yes the reference voltage may change a little. I do agree with all that, but as you stated "may not matter" since a lot of the inputs have a range that it's (the ecu) looking for, IE my 2.5V is in the middle of the range that the ECU is looking for "when gas gap in removed" also the 1.6V is again in the middle of the range that the ECU is looking for when vacuum pressure is applied. So even if the voltage regulator(s?) inside the ECU drift? abit, it's all will in in the correct parameters.

#### #12

Joined Nov 30, 2010
18,224
I had my feed back point in the wrong place and needed to add a diode to isolate the feedback path from the output path.
or not. It's so complicated as 3 voltages change across 4 resistors.
I really added the feedback diode to simplify the math.
Try this and see if I got it right.
It's days like this when I wish I learned to use a simulator because its all about juggling currents as the impedance and voltages change.
The idea is that 2 inputs will turn this on.
When it's on, the feedback keeps it on when one input drops out and does not keep it on when both inputs drop out.
Once it's off, it takes 2 inputs to start it again.

#### Attachments

• 12.3 KB Views: 6

#### Kev0511

Joined Jul 20, 2004
39
#12,

Thank you again, and everyone else still, for still working through this. I'm wondering #12, the transistors, would any do? say a 2n3904 and 2n3906? I also do have some TIPs (forget the numbers, but both in NPN and PNP flavors)

If any kind will do, i may try building yours first, since i should have everything handy at home already.

it's days like this i wish my high school didn't cancel the electronics classes just as i got to it! Never mind anything else to do with simulator programs and such (which can be over my head too)

Thanks
Kevin

#### #12

Joined Nov 30, 2010
18,224
Yeah. I intentionally design for P.O.S transistors. (Pretty Ordinary Silicon)
It is a rare day when just any old transistor won't work in my designs.

I'm still unaware of whether I obeyed the rules about the inputs you described with 330 ohm resistors, but the 10k resistors I designed for would make 330 ohms insignificant. What I want you to understand is that when 2 (12v) inputs activate this system, it changes it's input spec so it will not drop out when one input drops to zero. Then, after both inputs drop to zero, this system drops the positive feedback so that it does not aid the one input in restarting conduction. Only two inputs can restart it.

I am very good with op-amps, so I modeled this as an op-amp, then deconstructed it down to 2 transistors and tried to compensate for the much worse input current demands of a (comparatively) low gain system. You could use an op-amp, but why bother with selecting one and trying to cope with its power supply and output stage? The critical bleeping part of this circuit is the saturation voltage of Q2 and the feedback resistor, R4. That is the critical point where it modifies the input threshold voltage. You might need to adjust R4 if Q2 saturates harder than I expected.

R5 was declared as (almost) 50 times R3 so it would only affect the input voltage divider by 2%. That is a slop factor required by the low gain design. A 5V c-mos rail to rail op-amp could be used to change R4 to about 1 million ohms, but I also designed with 5% resistors and used a 25% hysteresis criteria, so 2% shouldn't walk this out of the proper input voltage range.

I used a 5V supply because (I think) you named that in the first post. Errors in the 5V supply might need to be adjusted for in the output voltage divider which gives you the 1.6v and the 2.5v outputs. If your input voltages are unstable, you can pre-regulate them with a zener diode on each input.

Last edited:

#### Kev0511

Joined Jul 20, 2004
39
#12:

The 330 ohm resistors from a 12V source is just to simulate the Solenoids themselves that the ECU is looking for when it see if they are truly there, and if they are either shorted to ground or positive, The ECU will trigger them by pulling them to ground. So the circuit that we are talking about will need to be triggered by a ground signals.

Now i tried to make your circuit, but sadly it didn't seem to work for me. All i got on the output side was 1.301 Volts, no matter what i tried. the voltage divider part is working? Seems backwards to what i had in mind, but without the rest of the circuit working?? I had looked over it multiple time to make sure i had it wired up correctly, and it seems to be. Using a 12V / 1.5amp power supply with an 7805 for the 5V side.

I will look at it a bit more tomorrow at some time, and maybe i can see what i may of done wrong (Nothing blew up, thankfully, i only had one 3906)

Thanks for all the help

#### #12

Joined Nov 30, 2010
18,224
I really don't know what to do with, "trigger them with ground signals". I thought the inputs were 12 volts and zero volts.

Maybe if you work this assembly backwards.

With nothing hooked up except 5 volts, R8 and R9, you should have 1.6 volts at the output. Then connect R10 and D4 from 5v to the junction of R8 and R9 and you should have a bit over 2.5 volts.

I think you should replace the down facing diode on the emitter of Q1 with 560 ohms because I forgot to include a limiting resistor between Q1 and Q2.

Build the Q1 Q2 section and see if you can get Q2 to power R10 when you put 5 volts into the base of Q1 through a 47k resistor.
When that works, add the input section and the feedback section.

I see a feedback leakage from R10 to R4 so I moved the emitter diode to the collector of Q2.
That should stop leakage both ways.

#### Attachments

• 13.1 KB Views: 3

#### bwilliams60

Joined Nov 18, 2012
1,442
Sounds like someone is trying to get past an Emissions test and the idiot light is staying on. Interesting concept.

#12

#### #12

Joined Nov 30, 2010
18,224
Sounds like someone is trying to get past an Emissions test and the idiot light is staying on. Interesting concept.
If this guy was trying to cheat the test, he would have thought about the 4th condition: Return to both inputs high and the output goes high.
I studied this because I might have to squelch an idiot light some day.

My 1996 Aerostar threw a code about evaporative emissions. I went all through that system (except for dropping the gas tank to check for split hoses), fixed everything I could find wrong, and never found the problem. That light stayed on for 5 or 6 years before I retired the Aerostar. I guess I'm real happy about not being in a state that checks the idiot lights every year. Still, it's nice when you don't see a, "check engine soon" light every day. You never know if it has more defects than the evap problem so the idiot light becomes useless about alerting you to changes about the engine that actually matter.

#### Kev0511

Joined Jul 20, 2004
39
Hello #12,

I really don't know what to do with, "trigger them with ground signals". I thought the inputs were 12 volts and zero volts.

Well the i'm more/less talking about an automotive 12V system Ground would be the negative side, Technically would be 0 Volts. Also in the chart in the first post(?) Low would equal Negative/ground

Maybe if you work this assembly backwards.

With nothing hooked up except 5 volts, R8 and R9, you should have 1.6 volts at the output. Then connect R10 and D4 from 5v to the junction of R8 and R9 and you should have a bit over 2.5 volts.

This i do get, which seem to be the only part that is truly working for me

Build the Q1 Q2 section and see if you can get Q2 to power R10 when you put 5 volts into the base of Q1 through a 47k resistor.
When that works, add the input section and the feedback section.

I started with Q2 first, first with the 2n3904 and even a 2955T, but the voltages at the divider went down when i grounded the base of the transistors?!?
Sadly i had lost time to play with it anymore again tonight, but will try and pick it up again tomorrow. Just seems odd the PNP transistor seem to work okay when testing them,but as i add them to the voltage divider part, things go funny? Maybe the 7805 can't handle the load?

#### #12

Joined Nov 30, 2010
18,224
If you connect the base of the pnp directly to ground it will short out the 5v supply through its emitter to base junction and then through the ground you attached. That's why R7 is 560 ohms.
This whole contraption uses about 3 milliamps. There is no 5 volt regulator that can't handle at least 30 times that much current.

#### Kev0511

Joined Jul 20, 2004
39
Sounds like someone is trying to get past an Emissions test and the idiot light is staying on. Interesting concept.
Techincally passing the emission test is easy, as long as long as they don't check for the readiness monitors Also on short trips (corner store and back, ect) the ECU won't go into this test mode that i'm trying to simulate.

And just to give you an idea, this is for using a Subaru engine into an older vehicle that doesn't have all the Evaporative emissions equipment that the Subaru the engine came out of.

If this guy was trying to cheat the test, he would have thought about the 4th condition: Return to both inputs high and the output goes high. I studied this because I might have to squelch an idiot light some day.

My 1996 Aerostar threw a code about evaporative emissions. That light stayed on for 5 or 6 years before I retired the Aerostar. I guess I'm real happy about not being in a state that checks the idiot lights every year.
I'm trying to simulate a response from the Fuel tank pressure sensor that the ECU is expecting when it goes through the tests. So as my chart states, there when there is no test being performed is just a normal condition, then three stages when the test is being performed. So basically your Forth condition is my normal/no test part of my chart. But the ECU is only expecting a value of 0 to 5 volts, with @2.5V from the sensor when the test isn't being done, it's not just when the test is being performed.

Thank you to all.

#### bwilliams60

Joined Nov 18, 2012
1,442
Very good to know. Both my boys drive Subarus and this sounds like something my older one would do. Where did you get the parameters for the test?
I am guessing you live in Canada?

#### Kev0511

Joined Jul 20, 2004
39
The below circuit was designed according to the table in #1.
How is the stage 4, does it just turn off the power?
Hello ScottWang, I decided to build up your circuit (CD4013) to see if it worked, and it seems to work as intended, just need to tweek the output side which has nothing to do with the circuit you designed for me.

But without hooking it up to the ECU and hooking the ECU to my computer to see what exactly the ECU is seeing it's kind of pointless. but at this time it outputs 2.494 volts and when switched over it outputs 1.631 volts, which at this time may be a bit high? Wonder if a Pot may be a good way to be able to fine tune it as needed?

Also you mentioned if the input devices are not switches? Being that the ECU is triggering these via transistors, and there is technically a 330ohm pull up resistor does that mean i don't need R2, R4 or C1? Seem to be okay at this time on my bread board with them, but if i can simplify it more i'll be happy.

Thank you Sir

PS haven't given up on the other ones yet!

Last edited:

#### Kev0511

Joined Jul 20, 2004
39
Very good to know. Both my boys drive Subarus and this sounds like something my older one would do. Where did you get the parameters for the test?
I am guessing you live in Canada?
Well in the subaru shop manuals they can go into detail about how each test is performed, what conditions need to be met before the test can be started, What elapsed time the test should run for from various info it gets from sensors, and what the outcome should be!

Sadly making this one circuit will more then likely open up other issues down the line! (IE more trouble codes)

And yes i live in Canada, only a few provinces have emissions testing, and luckily the one i live in doesn't!

#### ScottWang

Joined Aug 23, 2012
7,342
Hello ScottWang, I decided to build up your circuit (CD4013) to see if it worked, and it seems to work as intended, just need to tweek the output side which has nothing to do with the circuit you designed for me.

But without hooking it up to the ECU and hooking the ECU to my computer to see what exactly the ECU is seeing it's kind of pointless. but at this time it outputs 2.494 volts and when switched over it outputs 1.631 volts, which at this time may be a bit high? Wonder if a Pot may be a good way to be able to fine tune it as needed?

Also you mentioned if the input devices are not switches? Being that the ECU is triggering these via transistors, and there is technically a 330ohm pull up resistor does that mean i don't need R2, R4 or C1? Seem to be okay at this time on my bread board with them, but if i can simplify it more i'll be happy.

Thank you Sir

PS haven't given up on the other ones yet!
When the input signal 2 is come from a switch then R2 is the pull low resistor when the switch is off, the R3 and C1 are the switch debounce, if the input signal 2 is not come from the switch but a logical signal then you don't need the R2 and C1, if the input signal 1 also is not come from a switch then you don't need R4, if you can accept the original status of voltage changing then you don't need the C2 or change to a smaller as 10uF/10V.

The output voltage that you used the voltage divider, I didn't change the values of resistors and I just thought that you can calculate by yourself, it is not so hard.