DIY Ethanol Content Gauge

Discussion in 'Mazdaspeed 3/6 E85/CornFed' started by alexwlwsn, Aug 1, 2017.

Watchers:
17 users.
  1. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    I really could just have it all bundled in a little box in the glove box and check it every so often. Maybe a Tupperware painted black lol that would be classy.

    And thinking of it, if it's mounted in the cabin I'd want a way to dim the screen at night time. I may just want to keep it in the glove box and call it a day...
     
    Last edited: Aug 16, 2017
  2. SharksInSpace

    SharksInSpace Planets and shit. Silver Member

    Joined:
    Apr 5, 2016
    Posts:
    1,088
    Trophy Points:
    113
    Location:
    Middle Coast
    Ratings:
    +1,104 / -8
    smaller screen that will fit where the ash tray goes? then you could have a fancy flip cover on it
     
  3. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    That was the original idea, I even bought an OEM ash tray insert to cut up so it could be nicely mounted in there.
     
  4. JohnnyTightlips

    JohnnyTightlips Gold Member

    Joined:
    May 12, 2016
    Posts:
    379
    Trophy Points:
    63
    Location:
    Iowa
    Ratings:
    +316 / -0
    [​IMG]
    --- Double Post Merged, Aug 16, 2017 ---
    I wonder if you could tap into can-bus and display it on the car screen :)
     
    • Like Like x 2
  5. Gizmo

    Gizmo Good news, everyone! Silver Member

    Joined:
    Feb 16, 2016
    Posts:
    427
    Trophy Points:
    63
    Location:
    Kanata, Ontario Canada K2L 2Y4
    Ratings:
    +276 / -0
    This pretty bad ass i have to admit, great job :)
     
  6. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    Well this opens a whole new can of worms... Looks like there's a decent amount of guys tapping into their RX8 CANBus and having it display certain ECU related things (rpm, AFR, etc...).

    In my little Google search:
    There's a device called CANBus Triple that is Arduino based and basically has step by step directions on how to integrate it into your car's CANBus. It has bluetooth and logging capabilities which seems a little fancy for my taste. It also seems to allow control of your radio and things through your phone. Neat, but not what I'm looking to do.

    And then the RXDuino which is the aforementioned method of tapping into the RX8 CANBus.

    I assume I can use a similar method to the RXDuino since our screens look almost the same. I just need to figure out how to tap into the screen so hopefully there's a write-up on that. My setup should be simpler since all I want is to display information already made by my Arduino.

    Looks like I'll have to do some real research on this. The CAN Bus seems to send tons of signals with an address and a message and they all go wherever they need to go. Presumably you need to insert your own messages to their special address in order to have them display on the screen.
    --- Double Post Merged, Aug 17, 2017 ---
    CAN Bus sniffing with an Arduino: Link
    Some dude that already did this for an RX8: Link
    Some other dude that started researching the can bus in a gen1 3: Link
    --- Double Post Merged, Aug 17, 2017 ---
    RxDuino write-up: Link
    RxDuino code: Link

    The more I look around the larger this project seems... I may just end up ordering a smaller screen, putting it in my ash tray, and calling it a day. I may still keep this idea on the back burner though since it seems pretty neat.
     
    Last edited: Aug 17, 2017
    • Like Like x 2
  7. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    Got my 16x2 screen in the mail and it seems to fit perfectly in the place I was initially planning. With it here I don't need to worry about dinning the screen at night time. I'll probably make it a little bezel out of aluminum or lexan and then mount it all up!

    IMG_20170819_153628.jpg
     
    alexwlwsn, via a Nexus device, Aug 20, 2017
    #27
    • Like Like x 5
  8. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    I haven't forgotten this thread! I got a sheet of plastic to mount my LCD screen the other day, just have to cut it out from my cardboard template now. Maybe tonight I'll cut that out and have a real update for you all with more than just words.

    Once I do that I just need to get my AN fittings which I've been holding back on because of money. September is a 3 paycheck month though so I'll likely be ordering them soon!
     
    • Like Like x 2
  9. JohnnyTightlips

    JohnnyTightlips Gold Member

    Joined:
    May 12, 2016
    Posts:
    379
    Trophy Points:
    63
    Location:
    Iowa
    Ratings:
    +316 / -0
    I have also not forgotten , I am working on how this will be plumbed into the stock system as cost effectively as possible while maintaining OEM durability. It will be a bit until I have the funds to get all the fittings.
     
  10. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    Yeah this is a longer time running than I expected unfortunately... I just have $50-60 left to go on AN fittings and then I just need to install it all. Unfortunately life gets in the way oftentimes!
     
  11. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    Ordered my AN fittings!
     
    • Like Like x 2
  12. AYOUSTIN

    AYOUSTIN Silver Member

    Joined:
    Feb 10, 2016
    Posts:
    688
    Trophy Points:
    93
    Location:
    Lisle IL/Big Rapids MI
    Ratings:
    +948 / -1
    Man these threads are just popping up on pretty much every car forum and it's always the same exact setup lol. Anyway there's a couple evo guys who've been running this for a bit now, here's how they've been doing it: https://www.evolutionm.net/forums/e85-ethanol/734384-e85-gauge-w-output-under-100-a.html

    You'll need a 4.7k resistor between the sensor and arduino (wiring diagram in thread). Other than that everything is pretty straightforward (ignore the purple wire, that's for automatic map switching based on E% for evos). One of the guys over there is an IT wiz and already has an arduino library made up to display E%, fuel temp, and a Hz output from the sensor. Using the library he made is pretty much a drag and drop affair which is extremely nice for the coding retarded like myself.

    I'll be throwing one of these things together for myself soonish. Was debating making them for others if there's interest as I know lots of people don't like wiring stuff up. Wasn't thinking anything super fancy, probably just put the arduino in a project box and print out some enclosures to hold the LCD display.
     
    • Like Like x 2
  13. JohnnyTightlips

    JohnnyTightlips Gold Member

    Joined:
    May 12, 2016
    Posts:
    379
    Trophy Points:
    63
    Location:
    Iowa
    Ratings:
    +316 / -0
    If you want to do this on stock setup here is what you will need. I can not verify fitment or anything like that yet but this should work. I have also included the parts needed to get arduino and sensor etc. I plan to do a guide with this when I have the money to pick up the fittings. We will also be getting the code up here which will be a slightly modified version of the evo code.

    For now you can figure out how to do this with this info below and THIS GUIDE , you do not need the 3.3k resistor as you will not be doing any output to an ecu just a screen.


    **note: it has to be this chipset "ATmega328P" if you want the smaller arduino board the newer model doesn't work with the code.
    [​IMG]
    For Arduino Nano V3.0, Elegoo Nano board CH340/ATmega328P with USB cable, compatible with Arduino Nano
    by Elegoo
    Link: http://a.co/3iYm7Pv

    [​IMG]
    SunFounder LCD Module Shield for Arduino
    by SunFounder
    Link: http://a.co/6YqIYHQ

    [​IMG]
    Mixed Fuel Composition Sensor Flex Fuel Sensor Fit For Chevrolet Impala 13577429
    by Vensi
    Link: http://a.co/baXwCo7

    [​IMG]
    Boost Monkey E85 Flex Fuel Sensor Connector Pigtail Plastic Body Flex Fuel Composition Ethanol For GM
    by Boost Monkey®
    Link: http://a.co/ic7JAAA


    ** note: you need this to give proper voltage to the arduino, cars have incosistent power and will not work well with the arduino sensitive electronics, you can get one without a screen but this makes it easy to change it to 5v and see if on the screen
    [​IMG]
    LM2596 DC DC Buck Converter 4.0-40 to 1.3-37V Adjustable Step-Down Power Module Power Buck Converter with LED Display Voltmeter
    by Leaticia
    Link: http://a.co/dRHDBul


    **note: this is a giant pack but is cheap and will give you resistors for future projects, I am sure you can buy just one for 5$ if you want though
    [​IMG]
    Cutequeen 750 pcs,30 Values Resistor Kit x 25pcs =750 pcs (10 Ohm - 1M Ohm) 1/4W Metal Film Resistors Assortment
    Cutequeen
    Link: http://a.co/3dNwQfJ

    FITTINGS
    Get all these fittings from summit. I have listed the part numbers. I have not fully tested this or anything but it should work. I will update when I have actually bought them and installed it all. This would completely replace the stock line from the firewall to the HPFP.

    https://www.summitracing.com/
    [​IMG]
     
    • Like Like x 1
  14. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    Looks pretty similar to my code/setup, except I added in a start-up screen saying MazdaSpeed lol I am jealous of that easy mounting location in the Evo though! I thought about cutting a hole in a trim piece and mounting the screen but if it's always in my view, them I'd need to deal with dimming it at night time. In the ash tray seems like the perfect spot since I can't see any reason you'd need to keep an eagle's eye on your eth %.

    If you start making your own, if you have any questions about that code, or need any changes to it - feel free to let me know. I don't have anything showing ethanol temperature though because I can't think of a good reason to display that honestly.
     
  15. AYOUSTIN

    AYOUSTIN Silver Member

    Joined:
    Feb 10, 2016
    Posts:
    688
    Trophy Points:
    93
    Location:
    Lisle IL/Big Rapids MI
    Ratings:
    +948 / -1
    Wouldn't be too hard to make a box that replaces the pullout portion of the ash tray (assuming the ms3 is like the ms6).

    Fuel temp can be useful sometimes. If it's heating up you can tell that you are returning a lot of fuel back to the tank and hotter fuel is more likely to provide poorer performance. Or sometimes if the itfp fails it will heat up the fuel (depending how it fails). It's a somewhat decent indicator of ambient temperature as well. It has its uses, it's not super vital info but more info doesn't hurt.
     
  16. JohnnyTightlips

    JohnnyTightlips Gold Member

    Joined:
    May 12, 2016
    Posts:
    379
    Trophy Points:
    63
    Location:
    Iowa
    Ratings:
    +316 / -0
    There is a ton you can do with arduino like boost peak and egt etc this would just be the start of it. I am sure we could do some really cool stuff if we wanted an all in one quick gauge.
     
  17. Maisonvi

    Maisonvi Silver Member

    Joined:
    Feb 10, 2016
    Posts:
    1,232
    Trophy Points:
    113
    Location:
    South Haven, MI
    Ratings:
    +1,588 / -0
    Lol returning fuel to the tank. Not a stock fuel system MS3 problem at least.
     
    • Like Like x 1
  18. alexwlwsn

    alexwlwsn Gold Member

    Joined:
    Feb 10, 2016
    Posts:
    504
    Trophy Points:
    93
    Location:
    Harco MD
    Ratings:
    +679 / -0
    I'm planning on measuring the % at the pump end of my return anyway... Odds are all the way back there, the fuel will be close to ambient.
     
  19. JohnnyTightlips

    JohnnyTightlips Gold Member

    Joined:
    May 12, 2016
    Posts:
    379
    Trophy Points:
    63
    Location:
    Iowa
    Ratings:
    +316 / -0
    In the setup I showed it will be fuel coming from the pump before it gets to the HPFP so it should also be ambient or close to I would suppose.
     
  20. AYOUSTIN

    AYOUSTIN Silver Member

    Joined:
    Feb 10, 2016
    Posts:
    688
    Trophy Points:
    93
    Location:
    Lisle IL/Big Rapids MI
    Ratings:
    +948 / -1
    Got my arduino programmed and the LCD working tonight. This is the first time I've ever done any sort of coding and it wasn't bad. Just had to get used to how the arduino software works.


    Some notes to help anyone who goes through with this:

    - I used the libraries and code from the OP in the evo forum thread linked earlier so this only really pertains to that. The two libraries in the zipped folder you download there are for the LCD. Be sure to change the - to a _ in the LiquidCrystal-I2C (change to LiquidCrystal_I2C) library. The software had trouble identifying this library properly before changing it. And change the LiquidCrystal library's name to LCD, as this will also help the arduino software properly find this library.

    - The third library needed is the wire library. I had to go online to find this one (link: https://github.com/esp8266/Arduino/tree/master/libraries/Wire) and just copied the code and made a new library. Open notepad and copy the code for the .h file and save it as wire.h. Do the same for the .cpp file and save it as wire.cpp. Lastly, (not sure if it's actually needed but I did it anyway) copy the keywords file and save it as keywords.txt. Put all of these 3 files into a folder and name the folder Wire. Move this folder into your libraries folder.

    - Depending on where you got your LCD screen from will probably affect this next part. The back of the LCD screen has an I2C bus on the backside that the wires get connected to. You need to know the address for this I2C and put it in the code in order for information to be displayed.

    Copy the code in this link: https://playground.arduino.cc/Main/I2cScanner which is a code that scans the I2C to find the address (or something like that). So start a new file in the arduino software and paste that code into it. Make sure the arduino is connected to your computer and the LCD/I2C is wired properly to the arduino. After you've done all that, hit the upload button. Once you've done that go to Tools > Serial Monitor. Give it a couple seconds to scan and it will spit out the address of your I2C.

    Now that you know the address of your I2C, go back into the code for the ethanol sensor readout and there should be two places in the code where an address is listed for your I2C (it be 4 characters and starts with a 0x). Replace that address with the address you got from the scanner. Now you should have all 3 proper libraries and the right address for the I2C so with the arduino connected to the computer hit upload and it should display the right information.

    Let me know if you guys have any questions and I'll do the best I can to answer, but there's plenty of people here who know more about this than me.

    image1 (1).JPG

    [​IMG]
     
    Last edited: Nov 3, 2017
    • Like Like x 1
Loading...

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)