hevans1944
Hop - AC8NS
I must be getting old, and afflicted wit alt timers disease ta boot. I completely forgot about bar-graph drivers, Colin!You just need an 8 pin PIC12F675 and a bar-graph driver
I must be getting old, and afflicted wit alt timers disease ta boot. I completely forgot about bar-graph drivers, Colin!You just need an 8 pin PIC12F675 and a bar-graph driver
I did consider it, and @Alec_t's post#13 (LM3914 bar-graph driver) too. It is quite likely that the commercial fuel gauge, which does display fuel levels on an LED bar-graph, uses an LM3914 to perform its function. I was under the misinformed impression that the fuel-gauge was an analog meter movement. So it is probably very feasible to convert an analog output from an ultrasonic-based fuel-level sender to a range of voltages that the instrumentation fuel gauge will interpret correctly. However, without the gauge in-hand or a schematic of its internal construction, some experimentation would be required.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? ...
Yes, it has to be a voltage source or a current source to determine resistance. If I were guessing, it's just an internal resistive divider connected between the battery supply and ground. The external variable-resistance sender is connected across one of the internal resistors and causes the divider ratio to change. But we don't know the details of that, or what the end-user does to select a 200 to 33 ohm range versus a 73 to 10 ohm range or what is required to select a custom range. That last part, custom range, offers hope for a simple solution where the voltage sender can just be connected directly to the fuel gauge! Sure would be nice to know more about the actual fuel gauge before trotting off to explore more complicated solutions.... 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). ...
I agree 100% with this philosophy. When I was riding motorcycles I always kept an eye on my trip odometer to "gauge" how much fuel was left in the tank because my Honda ACE didn't have a fuel gauge. However, if that "odometer fuel gauge" failed there was the "reserve" tank that would (hopefully) get me to the nearest gas station if the engine ran out of fuel during a run. Problem with relying on the reserve is the selection valve must be restored to its normal position after re-fueling. Forget to do this and the next time you have to switch to the reserve you will find you have been running on reserve all the time and the gas tank is now truly empty. Embarrassing.... 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.
I'm all for using a bar-graph driver.... but as far as correcting for non-linear output of the sensor, you would need to calibrate it to the shape of the tank. If you are selling the product, you may need a different 'map' for different models.I did consider it, and @Alec_t's post#13 (LM3914 bar-graph driver) too. It is quite likely that the commercial fuel gauge, which does display fuel levels on an LED bar-graph, uses an LM3914 to perform its function. I was under the misinformed impression that the fuel-gauge was an analog meter movement. So it is probably very feasible to convert an analog output from an ultrasonic-based fuel-level sender to a range of voltages that the instrumentation fuel gauge will interpret correctly. However, without the gauge in-hand or a schematic of its internal construction, some experimentation would be required.
If the OP wants to experiment, it may turn out that a simple op-amp is all that is required. Or, depending on the source impedance of the voltage sender, perhaps just a resistor divider to scale the output of the sender. If linearization is desirable or required (I doubt that it would be) a few diode-resistor networks in the feedback path of a cheap op-amp will do that in a piece-wise linear fashion.
Yes, it has to be a voltage source or a current source to determine resistance. If I were guessing, it's just an internal resistive divider connected between the battery supply and ground. The external variable-resistance sender is connected across one of the internal resistors and causes the divider ratio to change. But we don't know the details of that, or what the end-user does to select a 200 to 33 ohm range versus a 73 to 10 ohm range or what is required to select a custom range. That last part, custom range, offers hope for a simple solution where the voltage sender can just be connected directly to the fuel gauge! Sure would be nice to know more about the actual fuel gauge before trotting off to explore more complicated solutions.
I agree 100% with this philosophy. When I was riding motorcycles I always kept an eye on my trip odometer to "gauge" how much fuel was left in the tank because my Honda ACE didn't have a fuel gauge. However, if that "odometer fuel gauge" failed there was the "reserve" tank that would (hopefully) get me to the nearest gas station if the engine ran out of fuel during a run. Problem with relying on the reserve is the selection valve must be restored to its normal position after re-fueling. Forget to do this and the next time you have to switch to the reserve you will find you have been running on reserve all the time and the gas tank is now truly empty. Embarrassing.
Hop
I suspect vehicle vibration would cause havoc with that. There might be safety issues too, with fuel tanks flopping around on hinges or springs or whatever.And now i wonder why no one has mounted motorcycle fuel tanks on miniature load cells.
I guess that's because this method would interfere with the use of "Tank rucksacks" (I beg to excuse my lack of the prope English word) and would also be sensitive to any weight put on top of the tank, e.g. a biker leaning over te tank.And now i wonder why no one has mounted motorcycle fuel tanks on miniature load cells. This arrangement would not be sensitive to volume variations as a function of depth, as float-based or ultrasonic-based transducers are. Measuring the weight of the fuel remaining in the tank is a more accurate gauge of fuel supply.
We knowI can do that and I have absolutely no electronics knowledge at all.
Will do - will take me a few days.We're all doing lots of guesswork here.
Let's re-start by getting some hard facts from @Calabashmc :
Can you do some measurements and provide the results to us?
- put an amperemeter (or multimeter in mA range) in series with the fuel gauge's sensor input.
- connect the other end of the amperemeter to a variable resistor (potentiometer) or use different resistor values for the following measurements, the other end of the resistor to ground (0V)
- optionally connect a voltmeter in parallel to the resistor (or from the gauge's output to ground, for this measurment it shouldn't matter). this isn't quite necesayr aas we can get V from I*R.
- measure voltage and current for a few different resistances in the range 0Ω...90Ω (or whatever range you've set the gauge to)
From this data we should be able to judge whether the gauge uses constant current, constant voltage or a resistive divider (as has been suggested by several posters in this thread). Once we know that, we should be better prepared to help you. Can you also post the model of the gauge? Maybe we can find a schematic for this model.
Or a young passenger riding on the tank. So, never mind! Tank rucksacks or tank saddlebags are common accessories.I guess that's becasue this method would interfere with the use of "Tank rucksacks" (I beg to excuse my lack of the prope English word) and would also be sensitive to any weight put on top of the tank, e.g. a biker leaning over te tank.
Let's call those good parts to have for now.I'd love to do these suggestions but I am a total newb to electronics. As stated this is my first project. So detailed instructions are much appreciated!
I have some MOSFET's, some resistors and an Arduino which I bought because the dude at the electronics shop said that's what I'd need. if not I'll go buy more stuff if someone can give me a shopping list and some pics on how to put it all together. Yep, total newb.
You encouraged something similar not long ago...Instead of messing around with all these values, you simply get a LED bargraph driver and connect the output of the sender to the input of the chip via resistors and a trim pot.
Now fill the tank and watch the LEDs increase. See how linear the results are.
You can design the bargrah to show from full to empty or from half-full to empty.
No experimenting needed.
You just create a table of 8 and divide the input voltage into 8 sections.
Then fill and empty tank as see when the first LED comes on. Change the table value and start again.
Continue until all 8 values are as required.
If more display 'bars' = more fuel, this setup is inconsistent with the table of measurements in post #34.The setup of the gauge is 100ohms is full tank, 10 ohms empty tank.