Connect with us

Volts to ohms for fuel sender

Discussion in 'General Electronics Discussion' started by Calabashmc, Jan 19, 2016.

Scroll to continue with content
  1. Calabashmc

    Calabashmc

    13
    5
    Jan 18, 2016
    I have a late model Harley Davidson Vrod that uses sonar for fuel level. This sonic fuel level sensor outputs volts 0.9v when full to 3.8V when empty.
    I want to change my instrument cluster but the one I have needs Ohms (0-90) for the fuel gauge not volts.
    So I'm wondering if there is a way to convert the output volts from the sonic fuel level sensor to a resistive range for the Ohm reading fuel gauge. So basically as voltage increases in on circuit resistance increases in the other.
     
  2. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    This is tricky to do...
    Do you have a datasheet?

    Most of the time when something expects 'ohms', it's using the 'ohms' in a voltage divider or something similar to control the amount of current going through the instrument cluster, or using it as a voltage divider to use in the instrument cluster.
     
    hevans1944 likes this.
  3. Calabashmc

    Calabashmc

    13
    5
    Jan 18, 2016
    I do not have a datasheet only the information from the instrument gauge installation manual...

    FUEL LEVEL GAUGE

    An optional fuel level gauge is also available. It can be used with a fuel switch (default setting) or fuel sender.
    The fuel sender can be a 240-33 ohm sender, 73-10 ohm sender, or can be programmed for a custom sender range. The
    YELLOW wire from the 8-wire harness connects to the fuel level sender. When connected to a fuel sender, the fuel
    gauge lights up a series of bars next to the fuel pump symbol. When it is used with a fuel switch, the fuel pump symbol
    will normally be off and will illuminate to indicate low fuel. If a low fuel switch is used it may be necessary to connect a
    load resistor or bulb in order for the switch to operate correctly. One lead from the bulb connects to accessory power and
    the other lead splices into the wire to the fuel switch.
    On the Harley forums most guys have spent money to change the sensor to an older style ohm stick and ball but cost is around $500 as it is a complete unit including fuel pump. So hoping for a cheaper solution to just convert volt output to resistance.
     
  4. Calabashmc

    Calabashmc

    13
    5
    Jan 18, 2016
  5. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    @Calabashmc The smallest value you can get for the digital potentiometer in your link is 10,000 ohms, which is incompatible with a 90 ohm sender the panel display wants to see. But your thinking is in the right direction: a voltage-controlled variable resistance.

    There is a fairly simple solution: use a small PIC microprocessor to digitize the analog output from your existing sensor. A resolution of four or five bits should be sufficient, but eight bits is commonly available. Take the bits from the analog-to-digital conversion and apply them to the bases of MOSFET switching transistors connected to a ladder network. The resistance of the ladder network will then vary from (nominally) zero to 90 ohms as the digitized input voltage varies from 0.9 V to 3.8 V.

    You must choose suitable resistor values and, since you are only switching one resistor, the values will not be the traditional R-2R values where the resistor is switched between "ground" and the "output" or "ground" and a reference voltage. Well, you could do that by using two MOSFETs for each resistor, but my "gut" feeling is that isn;t necessary for this application. I haven't done the calculations on what values to use to get a reasonably linear output as a function of the digitized voltage, but if the values turn out to be unreasonable, or don't provide sufficient linearity, then two MOSFETs per bit is simple enough to implement. Linearity may not be important at all as long as the resistance output is monotonic with respect to the digital input values. Read more than you ever wanted to know about ladder networks, particularly R-2R networks here.

    Ladder networks are available as components, but for this project I think I would just go with hand-selected discrete resistors and limit the resolution to four or five bits, providing sixteen or thirty-two discrete resistances respectively, by ignoring the least significant bits in an 8-bit A/D conversion. You might be able to fit the whole circuit inside the instrument case, but you will need to add a wire to the case for DC power. A lighted instrument could solve that problem if power to the light is available when the ignition switch is on and this power is not derived from a dimming potentiometer or rheostat. The PIC will operate from voltages as little as 2 V but the MOSFET may require more than that to turn on completely. A good operating voltage is +5 V from a three-terminal regulator IC supplied from +12 V battery power tapped off from the ON position of the ignition switch.

    So, we have a PIC with an analog input (typically zero to five volts) that produces an internal digital conversion of that analog input. The the software in the PIC presents four or five bits of that conversion to four or five digital output ports that in turn drive the gates of four or five MOSFETs (2N7000 is what I would use) or perhaps eight or ten MOSFETs. The four or five MOSFET sources are all connected to a common terminal. The MOSFET drains are each connected to a resistor in the ladder. The resistance of the ladder varies according to how many, and which, MOSFETs are turned on. That variable resistance drives your fuel gauge, simulating a 0 to 90 ohm sender unit.

    Are you up for a little electronics construction?
     
    Amar Dhore likes this.
  6. Calabashmc

    Calabashmc

    13
    5
    Jan 18, 2016
    Thanks for the solution hevans1944. I went to a local electronics store today and they said basically the same thing except using an Arduino to do the analog-digital conversion. I bought that with a number of MOSFETs and resistors and a little breadboard to trial getting something happening. My first electronics project in about 30 years so should be fun. I'll report back in a few days as to how this went. No doubt asking for help!
     
  7. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    I would have thought a programmable current sink or source would work wouldn't it. This effectively alters it's resistance by drawing or supplying more or less current dependant on the voltage setting on the input. Not that familiar with fuel gauges so might not work.
    Adam
     
    Gryd3 and Harald Kapp like this.
  8. Alec_t

    Alec_t

    2,940
    799
    Jul 7, 2015
    Does your 90 Ohms correspond to full or to empty?
    What voltage does your instrument cluster run on?
     
  9. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    The Arduino is a good platform for testing "proof of concept," but after you get it programmed and working you may want to port it to a PIC for compactness of size. This could be a profitable after-market item you could sell to the Harley-Davidson community. Won't get rich doing that (most riders like chrome, not electronics) but keep it in mind. I used to ride a 2000 year model 1200cc Honda Ace, so didn't have the luxury of a fuel gauge. It gathers dust in the garage because my wife won't let me ride it unless I convert it to a trike. <sigh>

    Hop
     
  10. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    If the OP does not want to learn two different programming languages, you can actually program 'AVR' microcontrollers with the same Arduino software with an extra step or two. I personally don't like the extra overhead Arduino uses.. but it's good enough for most.
    It's that, or pop out the AVR from the Arduino after you program it... the only difference between the two, is that an Arduino has extra components to allow USB to program it, and has an extra little program on the chip to be able to use the Arduino programmer... that's right ;) The Arduino is simply an AVR with some extra glue
     
    hevans1944 likes this.
  11. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    @Gryd3: I think the Arduino is "overkill" for an embedded microprocessor project as simple as this one, but it is (1) what the OP has; (2) is fairly easy to get up and running; (3) is "supported" by zillions of sketches available for free download to help point the way; and (4) has plenty of I/O bits made easily available for external use on easy-to-jumper pins. Plus, it takes dozens of "shields" that do all sorts of interesting things, available from a slew of manufacturers. It's like a Tinker Toy set for computers. Most (okay: all) sketches will have to be modified to suit a particular application, meaning the OP will need to learn the limited version of C/C++ language supported by the Arduino compiler. But professional programming or coding experience is definitely NOT required. So, I think he made a good choice with which to start out and get his feet wet (so to speak).

    As a personal preference, I would much rather the OP learn assembly for the Microchip PIC series of reduced instruction set computers (RISC) because it gets you much closer to the hardware. You can also program PICs using a free Microchip C compiler (as @chopnhack does) with virtually no penalty in code execution time. There are also better optimizing (but not free) C compilers for PICs if you are really serious about NOT using assembly. Either way, there will be a learning curve for the software aspect. And another learning curve connecting up the MOSFETs to a resistor network to produce a (more or less) linearly variable resistor. One disadvantage (if you don't roll your own) is the requirement for a programming pod such as the Microchip PICKit 3 or the older PICKit 2. The Arduino of course downloads your compiled program to non-volatile memory on the AVR microcontroller using a small "bootstrap" program that is embedded in the AVR chip and is "ready-to-go" as soon as you connect the Arduino to the USB port on your computer.

    After giving it some thought, and doing some research on how some analog moving-needle fuel gauges typically work, I think a programmable current sink could be made to work. I don't think this is an easy or viable solution compared to a simple resistor network.

    @Calabashmc: It seemed to me that a switched resistor network would be simpler, and I still think it is. But not as simple as I first thought. I don't know how to make a binary-controlled variable resistance network without putting a switch contact across each resistor to switch it in and out. That complicates things because it's not just a matter of grounding or not grounding a resistor with a MOSFET, which at first I thought was all you needed. If you string a bunch of resistors in series, placing a MOSFET switch across each one brings on a big problem of how to drive the gate of each MOSFET. The simple solution to that is to use isolated reed relay switches. You may still need a MOSFET to drive the coil of the reed relay, depending on relay-coil voltage and current requirements.

    So, let's face up to the fact that putting switch contacts in parallel with resistors connected in series, and selected to have values in an increasing binary sequence, is not only sufficient but it is also necessary.

    The solution is inexpensive reed relays controlling a binary-valued resistor chain whose total series value adds up to 90 ohms. If only five bits of analog conversion are used (providing 32 discrete fuel-gauge readings between empty and full) this might be the simplest solution: 45 Ω, 22 Ω, 11 Ω, 5 Ω, and 2 Ω resistors in series will add up to 85 ohms, which is probably close enough to 90 ohms. The string could be trimmed to add up to exactly 90 ohms by inserting a 100 Ω trim potentiometer in place of the 45 Ω resistor. Hook-up these five resistors in series, with a reed-relay switch connected across each one, and short-out the resistors with the reed relays actuated in a binary sequence. The reed relay coils can probably be directly driven with the Arduino digital outputs, but if not, the 2N7000 MOSFETs will drive the coils.

    Drive the five relay coils with the five most significant digits of the Arduino A/D output and there you have it. Or Bob's your Uncle. It probably won't be a linear or monotonic variable resistance unless the resistor values are tweeked for good binary ratios... total resistance divided by 2, 4, 8, 16, and 32 for the five resistors. It becomes really difficult to extend the precision of this method to six or more bits of resolution. The binary ratios require ever better and more exact values if monotonicity is to be preserved.

    Five bits is a good practical limit for a home-constructed, binary controlled, variable resistor. If you can tolerate a higher minimum resistance, commercial digital potentiometer products (such as Microchip's MCP41100 you linked to earlier) are available at reasonable cost.

    Advantage of the method described above is it has no ground to worry about. It's just a string of five resistors connected in series, along with five relays whose normally-open contacts are connected across the resistors. Disadvantage is the relatively slow response of the reed relays. Fuel-gauge update rate should be limited to less than ten updates per second to avoid excessive relay chatter. Digitizing the analog input to eight bits and keeping only the five most significant bits helps minimize chatter too, but there isn't much that can be done with fuel sloshing around in the tank and creating large variations in the ultrasonic-derived fuel-level sensor.

    @Gryd3: My main concern was size, although the Arduino AVR technology is available installed on a tiny board, to which you would have to add the switched resistor network and reed relays on a separate board. I have a couple of Arduino UNOs to play with, along with several shields and two Zigbee transceivers. They make "what if" projects pretty simple and easy to breadboard, but the final result is not very compact. I use them for "proof of concept" mostly. For this project a prototyping shield, such as this Arduino Protoshield, should be used for mounting and connecting the five resistors and five reed relays. Here is an example SPST reed relay whose coil can be driven directly by an Arduino digital output pin.

    The PICs (I have several versions of those too) require a bit more head scratching because Microchip always crams twelve pounds of stuff into a twelve ounce bag. You have to be on your toes to know what is enabled automagically on power-up, what you have to specifically disable if you don't want to use the default start-up condition, which pins can be used and for what they can used (all the pins have multiple functions... if they could figure out how to do it, Microchip would multiplex power and ground on one pin and then use that pin for I/O too), what happens after a reset or interrupt occurs... yada, yada, yada. It's all there in the Microchip datasheets, but not particularly organized as a tutorial. You have to dig for it. Still, for most embedded microprocessor projects, it's hard to beat the PIC form-factor and its built-in capabilities. I am a huge fan-boy for Texas Instruments products, the MSP430 series in particular, but I reserve those for rather more complicated embedded applications. The Microchip PIC comes in ridiculously complicated and sophisticated versions, too, but I haven't gone there yet.

    But let's see how well @Calabashmc does with the Arduino. We don't want to hand him schematics and a parts list, do we? Where's the fun in that?
     
    Arouse1973 and Gryd3 like this.
  12. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I'm sure the math would be horrendous.. but if the resistor network was in parallel, you wouldn't need to isolate the the transistors would you?

    Btw, great write-up as always Hevans
     
  13. Alec_t

    Alec_t

    2,940
    799
    Jul 7, 2015
    Another option might be a circuit based on a LM3914.
     
  14. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    That's exactly what I thought when I suggested the MOSFET-switched resistor network to @Calabashmc, although I was thinking along the lines of the classic R-2R constant input-resistance ladder network that diverts currents in a binary fashion. So, instead of that scheme (which won't work) we start out with some resistors all connected on one end and switched to ground on the other end by MOSFETs. That will work if we can do the math and figure out what values we need, how many resistors, and how to make the paralleled resistors decrease in resistance, more or less linearly, as function of a four or five bit binary number that turns on one or more MOSFET switches. Piece of cake, right?

    So we start with two MOSFET switches and one 90 Ω resistor. The first switch connects the top of the first resistor to ground through the first switch to establish zero ohms (nominally) for our variable binary-controlled resistor. Then we open the first switch and close the switch between the bottom of the 90 Ω resistor and ground. That establishes the nominal maximum value of our variable resistor. Now all we need to do is add more resistors and more switches in parallel with that 90 Ω to select thirty more resistance values equally spaced between zero and 90 Ω. That could actually be thirty more resistors, in addition to the 0 Ω and 90 Ω. We would always switch just one resistor to ground for each of the thirty-one steps from 90/32 = 2.8125 Ω to 90 Ω in increments of 2.8125 ohms. I am sure this is doable, but it's not very elegant. It also requires requires a five-line to 32 line decoder to control the MOSFETs if you don't want to use up most of the Arduino I/O ports..

    Now, it would seem that there should be some way to turn on more than one resistor, thereby paralleling those turned on resistors and reducing the overall parallel resistance all the way from 90 Ω down to 0 Ω using a lot less than thirty-two resistors. Unfortunately, there are only 28 combinations of a short-circuit and 1, 2, 3, 4, and 5 paralleled resistors. It's gonna take at least six resistors in various parallel combinations to create more than 32 different resistances, from which we select (if possible) 32 evenly-spaced resistances. That's still less than thirty-two resistors needed for the "only connect one at time to ground" solution.

    So, if we let R0 denote the short-circuit or 0 Ω condition, and R1=90 Ω the first of at least six resistors. we can parallel another resistor of value R2 with R1 to get something less than 90 Ω and our variable resistor now has three values: 0, R2, R2||R1 and R1. Adding a third resistor we get eight combinations: 0, R1||R2||R3, R1||R2, R1||R3, R2||R3, R1, R2, and R3. But what values to choose for R2 and R3? Is it even possible to make choices that will yield a roughly even distribution of variable resistances?

    The problem gets much larger with six resistors, which will produce many more than the 32 value combinations that need to be addressed by the output of a five-bit analog-to-digital converter. Assuming it is even possible to select an evenly distributed set of 32 resistor combinations, there will need to be a software translation table to convert the five A/D output bits to those 32 resistor selection combinations selected by seven output bits (one bit is for short-circuiting all the resistors). No problemo. But what are those six resistor values we should use? Well, one of them is 90 Ω fer shure, but what values get assigned to the remaining five resistors? I have no idea. Maybe someone with computational skills can create a spreadsheet to solve this selection problem.

    So there you have it, @Gryd3. Your idea will probably work if we can "fill in the blanks" on how to select the resistors that will be connected to ground in various combinations. And there is no need to limit the search to just six resistors... surely if, say, eight resistors are used there will be 32 combination values that are evenly enough spaced "gud enuf". You would just need to populate the translation table as a sub-set of a larger set.

    I really like the idea of using binary-weighted, series-connected resistors with a switch across each resistor. After some more research I discovered this method was actually awarded a patent in 2014 as a BCD or binary (both were mentioned in the claims) variable-resistance load! See diagram below copied from the referenced web site:

    [​IMG]
    The patent also shows another image where the above circuit is stacked in series with similar circuits to create multiple decades of variable resistance. This is a novel example of current art? I don't think so.

    We need to fire all the current patent examiners and hire a new crew with common sense. This is patent-able? Really?.:rolleyes:

    Hop
     
    Gryd3 likes this.
  15. Calabashmc

    Calabashmc

    13
    5
    Jan 18, 2016
    I guess the resistance doesn't need to be that granular. I'm thinking if I could get readings at a full tank then for every 1/8th of a tank until Empty. So 9 resistance settings in total. So I'll just have 9 resistors and 9 MOFSET's.
    I was wrong when I said 0-90 ohms before, upon reading the manual it appears the gauge has the following options:
    "The fuel sender can be a 240-33 ohm sender, 73-10 ohm sender, or can be programmed for a custom sender range."
    Not sure what the programmable range it though, the manual doesn't say. So need to map 0.9V full tank to 3.8V empty tank to one of those ohm ranges.
     
    hevans1944 likes this.
  16. Colin Mitchell

    Colin Mitchell

    1,417
    313
    Aug 31, 2014
    You just need an 8 pin PIC12F675
     
  17. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    WOW! POC now. You can use your panel readout at whatever the default sensitivity is (240-33 or 73-10) without custom programming. Just go to Radio Shack or the Australian equivalent and buy a couple of cheap 100 ohm potentiometers because you are gonna do a test. Using just ONE of the two pots, connect it to your panel readout. Use the wiper and one of the end terminals, doesn't make any difference which end terminal, to simulate a variable-resistance sender. No fuel or fuel tank necessary.

    Hook up the two wires connected to the pot exactly as you would if it were a real sender unit and power up your fuel meter. Typically this will require a battery lead and a ground lead for the fuel meter, and one lead of the simulated sender will also connect to ground. But read the instructions for the fuel meter to see how it is connected to the sender and how it is wired up for power.

    Now adjust the wiper arm to produce eight (not nine) fuel indications of 0, 1/8, 1/4. 3/8, 1/2, 5/8, 3/4, 7/8 and FULL. At each of these "cardinal" settings, disconnect the wiper and measure with a digital multimeter the resistance required to produce each fuel-level indication. Try to be as accurate as possible. Write these resistances down. If everything is up to snuff, and you are really lucky, the readings will fall in the range of 10 to 73 ohms. If you can't cover the 0 to FULL range with just ONE pot, connect either end-terminal of the SECOND pot to the wiper arm of the FIRST pot. Now repeat the procedure using the wiper of the SECOND pot and either end terminal of the FIRST pot. You will have to manipulate the wiper on both pots to cover the entire range and it doesn't matter which wipers you twist as long as you can get the fuel gauge to read out at each of the eight "cardinal points. Again, disconnect one wire going to the fuel gauge from the two-pot combination and measure the resistance at each cardinal point on the gauge.

    If you have the option of choosing the 240 - 33 ohm sender for the fuel gauge choose this range! It will be much easier to find suitable resistors over this range of resistance.

    Now you have a listing of eight resistors corresponding to a fuel gauge range of 0 to FULL. If possible, buy a bag of 1/4 watt carbon or metal film resistors with assorted values. Try to find eight resistor reasonably close to the values you have written down. Try these out, one by one, to see what the fuel gauge indicates. If a particular resistor is too high in value, try shunting a second resistor about ten times larger in value across it to bring the parallel combination to the correct cardinal point value. Do this for all eight measured values. If you are extremely lucky, the eight resistors picked from the initial assortment will be "close enuf" and you are done. Wrap some masking tape around each one and label what fuel-level it represents. You are almost done.

    When choosing resistors to represent the cardinal points on the fuel gauge, I would not try to bring a particular fuel-level resistance into conformity with a cardinal point if the resistance value is too small. Instead pick the next higher value from your assorted collection and add a shunt resistor to it to bring the total resistance down. It is a heck of lot easier to connectresistors in parallel than it is to connect them in series.

    At this point you might want to try interfacing your collection of eight cardinal point resistors to an I/O port on your Arduino. How convenient to have eight outputs, which also happens to be the size of an Arduino I/O port.

    If you have a breadboard to prototype with, the next stage goes much quicker and easier. Install eight MOSFETs such that the gates go to each of the eight I/O ports. The source terminals of all eight MOSFETs are connected to common (or ground). One of your collection of eight resistor sets is connected to the drain of each of the eight MOSFETs. Connect the other end of each of the eight resistors to a common point that is not connected to anything else. Make sure you identify the source, gate, and drain leads on the MOSFETs correctly. Check and double-check against the MOSFET data sheet. They don't work worth a damn if you swap the source and drain leads.

    At this point, one of the two wires that connect to your fuel gauge will connect to the isolated common connection of all eight sets of resistors. The other wire that connects to your fuel gage is the common (or ground). Fire up your laptop and try to manually set and and then clear each I/O port bit. You can use an LED with a 330 ohm 1/4 watt resistor in series with it as a "test probe" to see what state, 0 or 1, each output port bit happens to be. Connect the cathode lead of the LED to common (or ground), Connect the 330 ohm resistor to the LED anode and attach a length of insulated hook-up wire to the other end of the resistor. For convenience, I usually solder a wire to one end of the resistor and connect the other end of the wire to the LED anode. Then I can use the free end of the resistor as a probe. Solid 22 or 24 AWG wire works best for this, or you can tin the exposed end of stranded wire to make it "solid" enough to poke into the breadboard connection holes. Test the LED "probe" by touching the wire to +5 v rail (LED lights up) and then to common (or ground) rail (LED does not light up).

    What you are going to find out is whether or not the MOSFETs will operate the fuel gauge through the resistors you have selected. Before connecting the fuel gauge to the resistors, make sure there will be a positive voltage on one lead going to the eight resistors. This voltage will be supplied from a positive battery voltage connected to the fuel gauge. The actual voltage isn't very important, but it is absolutely vital that it be positive with respect to common (or ground). The MOSFETs must have a positive voltage on their drains until they are turned on by a positive voltage on their gates.

    So, connect it all up and take the Arduino out for a spin. You should be able to get the fuel gauge to read at each of the eight cardinal points by setting just one of the eight output bits, one at a time, from bit 0 to bit 7. If it doesn't respond, we will have to use the MOSFETs to drive eight reed-relays, and connect the eight resistors to contacts on the relays. If it does work as advertised, I will show you how to use the A/D converter in the Arduino to drive those eight output bits by digitizing the analog output of your ultrasonic-based fuel-level sensor.

    Hop

    Edit: forgot to include the 7/8 cardinal point. So I guess you need nine resistors after all.
     
    Last edited: Jan 22, 2016
    Gryd3 likes this.
  18. hevans1944

    hevans1944 Hop - AC8NS

    4,595
    2,149
    Jun 21, 2012
    We could get that to work (probably) but it is a little short on output ports if you use the A/D functionality. Would need some support or glue circuits. And the OP already has an Arduino he wants to use. Need one analog input and eight digital outputs with no glue circuitry, but maybe some reed relays depending on the resistor values used to drive the fuel-level readout device.
     
  19. Colin Mitchell

    Colin Mitchell

    1,417
    313
    Aug 31, 2014
    You just need an 8 pin PIC12F675 and a bar-graph driver
     
    hevans1944 likes this.
  20. Harald Kapp

    Harald Kapp Moderator Moderator

    11,310
    2,589
    Nov 17, 2011
    This kind of question has been asked a few times. I think it is based on the (mis?)conception that a true resistor is required to operate this kind of gauge.

    Has anybody considered Adam's post #7?

    I'm pretty sure the gauge doesn't really "measure" the resistance. Either:
    • It sends a constant current to the load and measures the voltage drop. Although I acknowledge that this is a way of measuring resistance, what counts is the voltage drop (that's how multimeters work).When you connect a voltage source that is capable of sinkingthe sense current while maintaining a stable and controllable output voltage, you can control the display of the gauge by setting the appropriate voltage.
    • It outputs a (not necessarily constant) voltage to the load and senses the current that flows. Imho this is less common, but technically easily done. In this case a current source can be connected to the gauge's sensor input and the current needs to be controlled by the output voltage of the fuel sender. This is easily done by a volteg controlled current source (1 opamp required).
    Depending on the accuracy required it may make sense to insert a small microcontroller between fuel sender and volteg/current source to linearize the characteristic, allowing for a more accurate display of fuel level by the gauge. However, inmy experience fuel gauges aren't among the most precise instruments anyway, so a rough trimming (without a microcontroller) for reasonable display of empty and full may be sufficient. Any fuel level in between wil be approximated. A driver normally gets a feeling for the quirks of the fuel gauge of his vehicle anyway.
     
    hevans1944 likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-