1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Digital Fuel Meter (LED type gauge) - Need Help!

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by biboymusic, May 23, 2010.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    Morning bb,
    I will look at your latest results and post back some suggestions.

    Whats a DOPA..??
     
  2. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Dual OP-Amp (DOPA), Lol. Thanks eric, I'll be waiting.
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi bb,
    Reply to your results. Please confirm what type of OPA you are now using.:)
    #1.
    Measuring VS, I can also get 0.07v to 0.77v and beyond (200 Ohm pot) from Full to empty tank.
    ;
    The reading should be as you have posted ie: 70mV thru 770mV

    #2 Measuring the voltages on vo1, it reads (from full tank to empty) 0.63v to 3.1v and beyond but I can't get below 0.63v.

    You should be able to get down to vo1 = +0.35v
    ;

    Note that I can go beyond 3.1v (Since I'm using a 200 Ohm trimpot to emulate the sender) but not below 0.63v (0 resistance already).
    The vo1 = +3.1v is what I would expect.
    Note: some pots have 'end' resistance and not go down to a 'complete zero R'


    #3 Measuring the voltages on vo2, it reads (from full tank to empty) 2.40v to 0.64v but I can't get below 0.64v.
    The +0.64v minimum is making the LM3914 to light LED's #1 and 2

    The above measurements were taken at the standard SPAN and ZERO pot settings (14.5K and 19K).

    Increasing the ZERO pot's resistance will light the 2 upper LEDs (Making it an 8 functioning LEDs), but can't get to turn off the 2 lower LEDs even by tweaking both trim pots.
    This is what I would expect the ZERO pot to do.

    As a result, Only 6 LEDs are functioning on the full fuel sender range. The last 2 LEDs stays on forever, while the upper 2 leds don't light forever the (0.64v to 2.40v range) at the standard pot settings.
    This error is due to the +0.64v offset error.

    If the OPA is causing these problems , there is a solution, adding a resistor to the LM3914, I will explain how to do that, if required.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City

    Hello Eric,

    I'm using another LM358 that I just bought this morning. Measuring every resistor doesn't give accurate readings like 470R rates at only 457 Ohms etc... will these affect vo1? Almost every resistor doesn't give exact readings.

    How about if we'll just make the LM3914 minimum to 0.64v? Even if i connect VS to the ground the minimum of vo1 is still 0.64v lighting the last 2 LEDs.
     
  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    OK,
    I will post a value for a resistor on pin# 4 on the LM3914, so that you can adjust off that 0.64V
    EDIT:
    hi,
    Wire up the LM3914 as shown in this image, the 5K pot will enable you to back off the +0.64v at the EMPTY tank end. LED#1.

    I have built the tank sensor using LM358 and it works perfectly OK.??
    I cannot say at this time why your version is not working as expected.:)
     

    Attached Files:

    Last edited: Jun 11, 2010
  7. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Thanks Eric,

    Just to clear things up. All 3 pins of the trimpot will be used this time right?

    Leg #1 connected to ground.
    Leg #2 (wiper) on pin #4 of LM3914.
    Leg #3 on pin #6 of LM3914.

    Is this correct?

    The LM358 I bought were cheap chinese replica of the original National and Fairchild versions as they are the only ones available. So I don't expect them to be of accurate specs.
     
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi bb,
    Your connection details are correct...
    Just looked at the 'bb' , with the extra 5Kpot on my project board, its working away happily.!
     
  9. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Hello Eric,

    Everything's working perfectly now. Its now even attached to my motorcycle... really looks good and functions awesomely! Thank you so much. I'll be observing the project for a few days if anything weird might happen. Fuel sloshing will be observed also.

    Next: Digital Speedometer on a PIC16f84a with 3 multiplexed 7-segment displays. I will be needing your help on how to tweak a bicycle speed sensor (from a broken cateye, magnet type sensor) to convert its output that is acceptable and countable by the MCU.
     
    Last edited: Jun 11, 2010
  10. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi bb,
    Thanks for letting me know that its now all OK.

    Looking forward to our next joint venture.;)
     
    • Like Like x 1
  11. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Hello Eric,

    Im also looking forward to our next project. It's 2AM now. Good morning! :)
     
  12. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Hello Eric,

    Our fuel gauge is still working fine, thou fuel sloshing is very annoying. I have bought 1uF non-polar capacitors (remember the 1uF we discarded?), will these alleviate the problem? Or we need a major modification to average the fuel readings?
     
  13. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    I will look and get back to you.

    EDIT:
    This should give you a quick solution, if not let me know.
    If you have a larger value than100uF [ say 470uF] it will be ok to use it.
     

    Attached Files:

    Last edited: Jun 12, 2010
  14. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    Wow never thought it would be that easy to modulate sloshing. Thou I won't be able to try it till tomorrow since its already 11PM. I'll let you know tomorrow. Goodnight!
     
  15. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,125
    Likes:
    564
    Location:
    AZ 86334
  16. biboymusic

    biboymusic Member

    Joined:
    May 23, 2010
    Messages:
    79
    Likes:
    0
    Location:
    General Santos City
    @MikeML thanks mike, but it seems that eric's quick fix did a good job already and sloshing was gone.

    @Eric, your sloshing fix was perfect. Now it really is an awesome fuel gauge. Thank you so much for all the time and effort.

    I'll now put up a new thread on a PIC16f84a based Speedometer using a bike speed sensor.
     
    Last edited: Jun 13, 2010
  17. psichopath2302

    psichopath2302 New Member

    Joined:
    Jul 11, 2012
    Messages:
    2
    Likes:
    0
    hii bb,
    where you should connect +vr ?
     
  18. psichopath2302

    psichopath2302 New Member

    Joined:
    Jul 11, 2012
    Messages:
    2
    Likes:
    0
    Hii Eric, can use 7805 as main voltage ?
    can you send us , the changes of overall circuit thanks eric
     
  19. chemelec

    chemelec Well-Known Member

    Joined:
    Apr 4, 2004
    Messages:
    2,123
    Likes:
    77
    Location:
    Hedley, B.C. Canada
    Gas-Gauge.png This Circuit should also work.
    Just arrange your LED's so the Full LED is at the top, Or Right side.
     
  20. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Hi psycho, I see you've been signed up a while but only done a couple posts.

    I dont think biboy will respond, hos post was 4 years ago.
     
  21. chemelec

    chemelec Well-Known Member

    Joined:
    Apr 4, 2004
    Messages:
    2,123
    Likes:
    77
    Location:
    Hedley, B.C. Canada
    GAS-2.png I Prototyped this up and it Works.
    With a Full Tank, Adjust the 250 Ohm Pot to JUST Light the Full LED.
     

Share This Page