Shop OBEX P1 Docs P2 Docs Learn Events
Using a BS2 for a MPG monitor — Parallax Forums

Using a BS2 for a MPG monitor

rushrvrushrv Posts: 8
edited 2013-04-15 18:02 in BASIC Stamp
Morning all,

I am looking into using a Basic Stamp for a MPG monitor on my Ford Truck. I have looked online and have found a few places where they have used other microcontrolers for this. The main reason I am using the BS2 is cause i know the programing (a little bit more than other microcontrolers) and i have a couple of dozen floating around. I was wondering if any one has done this in the past. If so any thoughts on the details involved or problems to over come?


I am not looking for someone to write my code for me but I might need some guidance and pointers

Robert

Comments

  • davejamesdavejames Posts: 4,047
    edited 2013-04-06 23:35
    ...sounds like a fun project!

    Well, MPG means miles per gallon so:
    1 - need to gather mileage between two points
    2 - need to know how much fuel was used

    Have you thought about how 1 & 2 would be done?
  • rushrvrushrv Posts: 8
    edited 2013-04-07 13:32
    davejames wrote: »
    ...sounds like a fun project!

    Well, MPG means miles per gallon so:
    1 - need to gather mileage between two points
    2 - need to know how much fuel was used

    Have you thought about how 1 & 2 would be done?


    Seeings as how to I have a digital odometer on my truck (2001 Ford F-150 XLT) I can tap into the the outputs coming from the ECU.

    1. I can pull from the MPH and/or the mileage data going to the display and the speedometer
    2. I can pull the pulse rate of the fuel injectors (not my own idea) use that data and try the formula [ Pulse rate X injector size X the number of injectors = fuel volume used]
    or i can install a flow meter in the fuel line. I think that might be the easier way, but i am not crazy about messing with the fuel lines. I have the technical and mechanical skills to do this, but finding a sensor that will calculate the fuel rate and pressure and present it in a useable data form might not be in my price range for this project. That and the idea just occurred to me.
  • davejamesdavejames Posts: 4,047
    edited 2013-04-07 14:34
    ...ok - I had completely forgot about the idea of tapping into the trucks computer (doh!).

    So I guess the next question is how to interpret the ECU's data, if the data rate is compatible with the Stamp. On that note, there was an earlier thread about using a Stamp to read the ECU "codes" for diagnostic efforts. You might try a forum search on that and see what turns up.
  • FranklinFranklin Posts: 4,747
    edited 2013-04-07 15:35
    I think another avenue to follow is finding out what signals you will get from the deivces you plan to use for inputs and then you can figure out if the stamp can use those. If they are digital you will need to know any protocols and speeds to make the decision if the stamp will work.
  • rushrvrushrv Posts: 8
    edited 2013-04-10 21:43
    I haven't hung this project out to dry, just been swamped with other a work ptoject. I plan on starting it this weekend. (If i am not at work)
  • ercoerco Posts: 20,256
    edited 2013-04-10 22:55
    Look for a Zemco ZT-4 Driving computer on Ebay. It's a complete kit, usually ~$50. Has display, fuel flow sensor, driveshaft magnets & sensor, etc. You can use as-is, or just use the sensors, still worth the $50. Nearly 30 years old, but still popular with the road rally crowd.

    http://www.ebay.com/itm/Vtg-Zemco-ZT-4-Drive-Distance-MPG-MPH-Time-Computer-New-Old-Stock-Set-/261192908864?pt=Motors_Car_Truck_Parts_Accessories&hash=item3cd04f8040&vxp=mtr
  • OrbilusOrbilus Posts: 10
    edited 2013-04-15 11:09
    Now you've got me... one of the reasons I got into programing microprocessors was to do vehicle diagnostics and programing. haven't done it yet but there is a great "Wiki" page http://en.wikipedia.org/wiki/OBD-II_PIDs that describes the OBD II Peramiter IDs to communicate with the vehicle's onboard Computer Serially with your own Microprocessor. Should be pretty easy to get serial data for Speed (from $01, Bit 0D) multiply that by time to get distance traveled, and Bit 5E for fuel consumption given in L/h. The pin-outs for the OBD II system are discribed http://en.wikipedia.org/wiki/On-board_diagnostics here. I'm gonna start working this project this weekend (Finally!). I'll keep an eye on this thread, let me know if you make any head way.
  • rushrvrushrv Posts: 8
    edited 2013-04-15 18:02
    Thanks for the links, i just finished work on code for a rope puller for work. i am gonna get started on this again this weekend. I have been reading up on all the ford manuals i can get my hands on. There has been alot of interesting overveiws of the sensor outputs/outputs. (It would help my side projects if i could get an editor for my tablet, but alas no bueno yet).
Sign In or Register to comment.