Clock pod mod with Subarb Select Monitor ECU polling and Arduino - Page 2
+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27

This is a discussion on Clock pod mod with Subarb Select Monitor ECU polling and Arduino within the Tutorials & DIY forums, part of the Tech & Modifying & General Repairs category; I've been lurking this post for awhile. I'm much more active on NASIOC, as most of my DIY and mods ...

  1. #16
    Registered User
    Join Date
    Nov 2013
    Posts
    6
    I've been lurking this post for awhile. I'm much more active on NASIOC, as most of my DIY and mods are over there. You initially spliced into the the K-Line, but ended up doing something else. Did splicing go successfully or are you still tapping through the front OBD II port?

    I looked through your code and it looks good. It could use some optimization. It seems to me like you're burning a lot of procession power running unnecessary comparisons and that loop within a loop.

    Example: You're making two checks here, which it should only need to be one, case switching would be good or even just nested if-else.
    If MILread is false, it'll never hit into MILread is true, so why waste processing power checking?
    if(MILread == false) {
    ......
    }
    if(MILon == true && MILread == true) {
    ............
    }


    I've noticed that there was a person with 08+ WRX running a similar set up and showed off on youtube, but i can't seem to find it now. They took it off the web?

    I'd love to help. Let me know what you'd need.

  2. Remove Advertisements
    ClubWRX.net
    Advertisements
     

  3. #17
    Registered User Obeisance's Avatar
    Join Date
    Apr 2012
    Location
    not Ann Arbor
    Posts
    331
    Quote Originally Posted by iheartawd View Post
    You initially spliced into the the K-Line, [...] Did splicing go successfully or are you still tapping through the front OBD II port?
    After "fixing" my circuit (which allowed me to share the tx/rx lines while having the arduino end at 5V, OBD end at 12V) by replacing a bad transistor, the single connection on the back side of the K-line seems to be all that I need to get communication. This means that I can still use the OBDII port (but have to unplug the arduino so that it does not interrupt any other communications). I will concede that my circuit is flawed since it gets garbled numbers if there is not a pause after every few hundred bytes received. I suspect that this has to do with some kind of capacitance in the circuit which arises with the pull up resistors (I use 1 kOhm on the 12V pull up, and 10 kOhm on the 5V lines), but I am not interested in re-soldering this for a 5th time. Additionally, my code does not properly read values unless there are pauses (two Serial.println() calls) in the readECU function.. I'm stumped by this as well, but am content not asking why.


    Quote Originally Posted by iheartawd View Post
    I looked through your code [... ]It could use some optimization. [...]

    Example: You're making two checks here, which it should only need to be one, case switching would be good or even just nested if-else.
    If MILread is false, it'll never hit into MILread is true, so why waste processing power checking?
    if(MILread == false) {
    ......
    }
    if(MILon == true && MILread == true) {
    ............
    }
    When I wrote the second version, I sloppily cut and pasted the old code. You have a shape eye; it does appear that the only way for MILon to be true is if MILread == true, thus I am making an unnecessary comparison every loop. If I get bored, I may try making some optimizations (or if you're interested, you're welcome to make them for me) however, I am likely blind to the problems (even the obvious ones like this) without some kind of extra help.

    The loop within the loop is my dumb way of updating the time and intake air temperature only once every minute.

    Quote Originally Posted by iheartawd View Post
    I've noticed that there was a person with 08+ WRX running a similar set up and showed off on youtube, but i can't seem to find it now. They took it off the web?
    Perhaps this one: Ssm arduino gauge - wrx - YouTube
    The best version I've seen is the Apex Spec C: http://forums.nasioc.com/forums/show....php?t=2238468

    At this point, I have no idea what help I need. For now, it seems to be functioning "well" and fast. If my CEL comes back and I cannot easily read it, then I ought to make some changes. If you have ideas for additions to this project, or want to try something out, I'm open to trying your code or discussing suggestions.

    If I get bored, in the future I may try making the boost gauge have finer pixels (someone on youtube has done this using the parts of the 16x2 subcells), and maybe make the arduino stop trying to communicate if someone else is on the OBD port.

    Other ideas for future additions to this project include
    1) adding button controls via the cruise control stalk (I've no idea how to go about this for now) for selection of different logging parameters
    2) adding extra sensors (it would be neat to have a lateral g-gauge)
    3) adding some kind of WiFi/GPS reporting so that my car tries telling a server where it is over certain time intervals (this would be an expensive project)
    4) adding an RFID reader to recognize my drivers license and disable the car without it (pie in the sky idea)

    I appreciate your interest in this, and would be grateful for your suggestions.
    Last edited by Obeisance; 08-22-2014 at 02:37 PM.
    David - '05 WRX

  4. #18
    Registered User
    Join Date
    Nov 2013
    Posts
    6
    I'm a senior software engineer by day, so I love coding. If it wasn't for this thread that you started, I could have dismissed the Adruino ability to be used as a car monitoring system, so thank you.

    I've been using a bluetooth Scanner + Raspberry Pi to monitor my car, but I'd love to cut out the wireless delay, as it adds a good amount delay.

    I'm also starting a thread on using the adruino to set up a dual fuel system with a smart cut-off monitor. Example:
    91 < 3500 RPM
    e85 + 91 > 3500 RPM

    This would completely solve any problem that e85 would have.

    Would you be able to make a complete DIY of the whole process that you took to set this Adruino up, including a parts list? I'd love to see.
    Last edited by iheartawd; 08-15-2014 at 07:58 PM.

  5. #19
    Registered User Obeisance's Avatar
    Join Date
    Apr 2012
    Location
    not Ann Arbor
    Posts
    331
    Quote Originally Posted by iheartawd View Post
    Would you be able to make a complete DIY of the whole process that you took to set this Adruino up, including a parts list? I'd love to see.
    I don't think I can handle making a clean DIY, but I believe that the installation pictures in my other posts show most of the process. I also figure that the circuit could be soldered in different ways, so I'm not planning to show my poorly soldered version. One note: I ended up using pin headers to attach the parts of the serial LCD together so that I could have a better fit in the clock pod, and so that I could remove the ATmega328 part of it. The arduino pins which I use to connect to the circuit are listed in the code (2 pins each: I2C (there are sda and scl on the arduino uno); digital outputs for LCD and SSM communication).

    Installation is quite straightforward:
    1) open up the clock pod, remove the old clock
    2) clip in wire splice points: 1 - back side of the K-line in the OBD port; 2&3 - 12V (ACC) and ground in clock pod harness; 4&5 - 12V and ground in cigarette lighter harness
    3) install power converter (the cigarette lighter-to-usb) by soldering on some wire leads, connecting to 12V and gnd. Run the USB cable between the area behind the cigarette lighter and the clock pod
    4) run wires from OBD K-line, 12V (clk pod) and gnd (clk pod) up to the clock pod area to attach to the arduino
    5) modify the clock pod (as in my previous posts) and install the LCD; run wires to the arduino circuits: 12V is a pull up, gnd is obvious, OBD K-line is the signal line.
    6) re-assemble, leaving the arduino loose in the clock pod area.

    Here is a parts list (excepting wire, arduino header pins, some solderable wire clamping headers and tools which I already had):

    $19.99 Arduino Uno R3 - microcenter
    $4.95 USB A to B 6' cable - microcenter
    $5.99 Digistump real time clock shield kit - microcenter
    $3.99 Arduino prototype shield PCB (I used header pins that I already had) - microcenter
    $25.99 Sparkfun serial LCD kit - microcenter
    $4.99 Vivitar USB DC dual port charger - microcenter
    $1.49 5 pack of 10K 1/4 W resistors - radioshack (I used 330Ohm, 1kOhm, and 10kOhm)
    $3.49 pack of 15 2N2222 transistors - radioshack
    $2.49 quick splice connectors, 14-18 awg - radioshack
    $1.99 quick splice connectors, 18-22 awg - radioshack
    ----------------------------------------------------------
    $78.34

    Unnecessary stuff:
    $2.49 another PCB to fix all of my desoldering
    $5.99 desoldering bulb to help take things apart when my circuit failed (this didn't actually help much)


    Quote Originally Posted by iheartawd View Post
    I'm also starting a thread on using the adruino to set up a dual fuel system with a smart cut-off monitor. Example:
    91 < 3500 RPM
    e85 + 91 > 3500 RPM
    This is an interesting idea; do you mean that you'd use the arduino to monitor engine speed, and then add some amount of E85 based upon that reading (directly into fuel line? or inject into intake air stream?)? If so, then I assume that you'd have to be pretty comfortable with tuning the ECU so that the car would expect the different fuel (and change the amount of injected fuel rapidly). Also, could methanol or water injection into the intake airstream (as many companies sell a kit to do) give a simpler solution for knock control?

    I am very interested to see this thread, so please post it here (or at least a link to your thread) on clubwrx.
    Last edited by Obeisance; 08-16-2014 at 05:44 AM.
    David - '05 WRX

  6. #20
    Registered User
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by Obeisance View Post
    I am very interested to see this thread, so please post it here (or at least a link to your thread) on clubwrx.
    I wanted to have everything working before making the thread. I tune my own car using romraider Open source and it believe that it shouldn't be a problem.

    The reason why I'd go with e85 over Methanol or Water, is that e85 is an extremely clean flammable liquid. Methanol and water has WAY too many risk of destroying the engine when they fail and they do FAIL often.

    What I currently have working off the car (they are spare):
    10 Gallon tank, AEM 320lph e85 Pump, e85 Filter and stainless lines
    Injectors working independently with Adruino
    Port+Polish TGV
    Port+Polish Intake Manifold

    What I need help with:
    Figuring where to tap the injectors into.


    I tried looking for a set of these: APS Dual Injector setup
    DSCF5785.jpg Photo by saoul_marin | Photobucket

    But no one are selling them =/

  7. #21
    Registered User pete25r's Avatar
    Join Date
    Jan 2011
    Location
    Maryland
    Posts
    514
    Quote Originally Posted by iheartawd View Post
    Injectors working independently with Adruino
    that sounds like fun.

    I've been wanting to do something cool with my Arduino too.

    I was thinking of something like Obeisance is doing. I don't have all them skills yet though.

    I might try a simpler project like some thermo sensor for intake, maybe even pre and post IC.


    You guys are doing great things. Keep the posts coming, we'll learn something from you guys.
    N.E.R.D. # 3.579545 MHz

    Bugeye Mafia v 2.0 # 371

    pete25r's build

  8. #22
    Registered User
    Join Date
    Sep 2012
    Posts
    22
    I'm thinking of doing something similar, this sounds like an interesting project.

    I found this kit & tutorial from SparkFun: https://learn.sparkfun.com/tutorials...t-hookup-guide - the only issue is that they've discontinued their Arduino RedBoard, but that can be replaced with the part mentioned earlier in the thread the Serial LCD Kit, which basically has an arduino board attached to it, and with the FTDI board in this package you can reprogram it using the code provided on this thread.

    Using this package it's a little more costly than the OP but it should be more straight forward since the OBD II UART board does a lot in terms of normalizing the voltage (i.e. you won't have to create the custom board that was mentioned at the top of the thread) and whatnot (I think? correct me if I'm wrong)

    Hope this helps someone, I won't know until I've bought the parts and tried it myself which I plan on doing in the near future. I probably won't replace the existing clock unit in my car though, will probably fashion some custom molding where the cigarette adapter is

    Edit: the OBD II UART board from Sparkfun also determines the protocol to use, so if you wanted to use this setup on multiple cars, it makes swapping it between cars much easier
    Last edited by fatalerrorx2; 09-01-2014 at 05:44 AM.

  9. #23
    Registered User
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by fatalerrorx2 View Post
    I'm thinking of doing something similar, this sounds like an interesting project.

    I found this kit & tutorial from SparkFun: https://learn.sparkfun.com/tutorials...t-hookup-guide - the only issue is that they've discontinued their Arduino RedBoard, but that can be replaced with the part mentioned earlier in the thread the Serial LCD Kit, which basically has an arduino board attached to it, and with the FTDI board in this package you can reprogram it using the code provided on this thread.

    Using this package it's a little more costly than the OP but it should be more straight forward since the OBD II UART board does a lot in terms of normalizing the voltage (i.e. you won't have to create the custom board that was mentioned at the top of the thread) and whatnot (I think? correct me if I'm wrong)

    Hope this helps someone, I won't know until I've bought the parts and tried it myself which I plan on doing in the near future. I probably won't replace the existing clock unit in my car though, will probably fashion some custom molding where the cigarette adapter is

    Edit: the OBD II UART board from Sparkfun also determines the protocol to use, so if you wanted to use this setup on multiple cars, it makes swapping it between cars much easier

    I decided to replace the clock because it cuts time between my vision of the road and the gauge. I added the time back into the Adruino LCD. Mounting it down where the cigarette adaptor is, will add a SIGNIFICANT gap between road and gauge. I'd advise against it.

  10. #24
    Registered User Obeisance's Avatar
    Join Date
    Apr 2012
    Location
    not Ann Arbor
    Posts
    331
    This mod has given me some random useless information: while sitting in traffic for a while yesterday, I saw my intake air temperature rise to 58 °C. That is a lot hotter than I anticipated.
    David - '05 WRX

  11. #25
    Registered User CodeWarrior's Avatar
    Join Date
    Apr 2009
    Location
    São Paulo/Brazil
    Posts
    1
    nice and clever setup mate
    looking forward to try it as well

  12. #26
    Registered User Obeisance's Avatar
    Join Date
    Apr 2012
    Location
    not Ann Arbor
    Posts
    331
    As an update, I've been in correspondence with dshultz on the romraider forums and have finally learned the correct interpretation of ecu response bytes. I've updated the code since my previous calculation of rpm for the injector duty cycle value was incorrect.

    https://drive.google.com/file/d/0ByG...ew?usp=sharing
    Last edited by Obeisance; 10-04-2014 at 02:20 PM.
    David - '05 WRX

  13. #27
    The Guy On The Couch TownLine500's Avatar
    Join Date
    Oct 2013
    Location
    Boston
    Posts
    1,906
    I Support ClubWRX
    Nice work!
    And great write up, this should be a sticky.
    I'm really liking those options, and gauge set up.
    You would honestly think with the mods and the following the WRX has they would integrate more gauge options from the factory. So if you want boost, fuel air, oil temp, just to name a few. There should be an option for stlyeized gauge clusters set up from the factory.
    Love the idea great work keep us updated.
    STINK EYE MOB #500

    2009 Subaru Impreza (I bought it new for my Mom)
    2004 Subaru WRX (Sold)
    2013 Subaru WRX Premium
    1996 Honda Civic Lx
    WRX genuine Face Ripping ACCELERATION!!!

    My Boston Beat Down Build Thread
    http://www.clubwrx.net/forums/builds...wrx-build.html

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Quick Reply Quick Reply

Register Now

Please enter the name by which you would like to log-in and be known on this site.
If you do not want to register, fill this field only and the name will be used as user name for your post.

Please enter a password for your user account. Note that passwords are case-sensitive.

Please enter a valid email address for yourself. We strongly suggest that you stay away from using aol, yahoo, msn, and hotmail accounts. Sometimes the mail server blocks the emails from our server. As a result you will not receive any notifications including the confirmation email.

Log-in

Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •