0
\$\begingroup\$

Can someone help simplify the resistor usage in this circuit?

VS is a constant 5v supply. Flex is a variable voltage between 0 and 5v.

The resistors above have been brute forced to achieve this rough voltage range above. Could someone help explain how we could go about simplifying the circuit?

It is essentially a voltage adder and divider which has two possible modes of operation. We can only use resistors as it will be in a very noisy environment and needs to be something an auto electrician can easily add to a vehicle loom.

Mode 1. Low boost with the following voltage mapping.

0v -> 0v

5v -> 700mv

Mode 2. High boost with the following voltage mapping

0v -> 750mv

5v -> 1.25v

Schematic

edit: Here is the multi sim project if that is of any help https://www.multisim.com/content/ERRVHRCS93ekiEiXBNgbZH/flex-fuel-with-high-and-low-boost-1/open/

edit2: Here is the big picture, maybe someone can help design this better.

We have a single analog input into a vehicle PCM that accepts 0 - 1.66v

We have two inputs we would like to get into the firmware.

Ethanol 0-100% signal which is currently a 0-5v signal.

The state of a switch in the cabin, this is a logical 0 or 1. It is a switch so it can be anything.

We cannot modify the analog input logic as it is in low level firmware, as we are reverse engineering assembler code this would involve modifying the stack which is too complex. We can however use the signals at a higher level within the firmware and use a lookup table to infer the states.

We then have a lookup table that takes the voltage and infers ethanol content.

The lookup table looks like this:

Eg 0 to 0.7v is 0-100% ethanol low boost (eg switch off)

0.75 -> 1.45v is 0-100% ethanol high boost (eg switch on)

Lookup table of volts to % ethanol

Lookup table of volts to % ethanol

Lookup table of high or low boost

Lookup table of high or low boost

What is the best way to multiplex this analog and digital signal into a single analog input?

We have a 5V source available however this needs to be a very simple circuit that can be put within a loom without a PCB at lost cost. Hence the resistor voltage divider/summer we came up with above.

\$\endgroup\$
  • 1
    \$\begingroup\$ We could.. make your design better.. or you could tell us what you actually want and we could totally revamp the whole design and maybe even come up with a sensible circuit that helps everyone in the long run. \$\endgroup\$ – Harry Svensson Nov 2 '18 at 5:09
  • \$\begingroup\$ I thought it might be a bit rich to ask for that. But sure I will edit it to explain the big picture. \$\endgroup\$ – rolls Nov 2 '18 at 5:15
  • \$\begingroup\$ Ok I've added the big picture / full scope. \$\endgroup\$ – rolls Nov 2 '18 at 5:20
  • 1
    \$\begingroup\$ You say that you have two signals, yet in your schematic there is only one (flex). - The "Mode 1" and "Mode 2" part above makes no sense to me, you're saying that something is mapped from 0 V to 0 V and something is mapped from 5 V to 0.7 V. Same thing in the mode 2 part. I don't know what that something is. - I also don't see why you are talking about adding the binary signal of on/off high/low boost onto your analog value. - It's very unclear what part you cannot modify due to "low level firmware" and what you can modify because... it is in "higher level within the firmware". \$\endgroup\$ – Harry Svensson Nov 2 '18 at 6:10
  • \$\begingroup\$ Updated. Does it make sense now? We have a single analog input, and we want to input a digital input and an analog value via this single input. We are reverse engineering and modifying existing firmware, we cannot modify the original code without great difficulty hence this solution. This is a working solution, we would just like to simplify the circuit. \$\endgroup\$ – rolls Nov 2 '18 at 8:33
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

To get 0.5V amplitude from a 5V signal r8||r9 should be 100k/9 I made a spreadsheet to solve that and picked values for R8 until I got close

but as you don't need both signals at the same time it can actually be simplified even further.

schematic

simulate this circuit

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You are a legend \$\endgroup\$ – rolls Nov 16 '18 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.