1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Arduino Automatic Coolant Temp Hack for Better MPG's

Discussion in 'Gen 2 Prius Accessories & Modifications' started by TheForce, Feb 23, 2011.

  1. seilerts

    seilerts Battery Curmudgeon

    Joined:
    Mar 7, 2010
    3,326
    1,512
    38
    Location:
    Santa Fe, NM
    Vehicle:
    2005 Prius
    Got the nano, waiting on the pot...might be a few days.
     
    Meg&Bear likes this.
  2. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Cant wait to hear your results. :D
     
    Meg&Bear likes this.
  3. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Today I had some trouble with it faking the temperature. As I was headed home the engine warmed up to about 110F and the Arduino started faking the temp. Some time later I noticed that the LED was red but the temperature on the scangauge was about 143F. For some reason it thought the real temperature was too hot. I tried resetting several times on the road but it just went back to the red LED indicating it was too hot even though the real temp was well below stop temp setting. When I got home it stopped doing this so I could not hook up my PC to capture the serial output of the Arduino.

    I will continue to monitor this before I put this in a project box.
     
    Meg&Bear likes this.
  4. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    I think I may have fixed my problem. After looking at the serial out the average was just not right for the input. After fiddling around with the wires I found that one of my wire taps was the issue or so I think. When I wiggled it the average wondered around a LOT. So instead of using my crappy wire taps I just twisted the wires together and wrapped them in black tape. I tested it again and this time the numbers were as rock solid as before.

    I think the heat may have expanded the plastic and metal in the wire tap just a bit to cause this issue. I will find out if my problem is gone tomorrow after I get off work.
     
    Meg&Bear likes this.
  5. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    No problems today.

    I should have this in a project box by the weekend. I tried to make a shield last week but it was a complete failure. I used a radio shack double sided perfboard and when I checked all my connections with a multimeter it looked fine. Nothing was shorted. When I hooked it up to the car there was a small spark near the digital pot and some magic smoke appeared. Aparently there was either a defect in the board or there was a whisker that just did not show up on my multimeter when I did my checks. I think I only damaged the digital pot. The Arduino seemed fine when I ran some tests with it.

    This time instead of making a shield I have compacted everything as best I can onto a generic single sided perfboard. I'm just going to use some wires to go to the perfboard to the Arduino. You'll see when I get it finished. It currently looks pretty good in the CAD software and has a very small footprint. I think if you combine this with a Arduino nano or mini you could stuff it in a very small box or just wrap it up in some electrical tape. I managed to put the LED on but if you left it off you could make it even smaller.

    I might get started on the perfboard tonight if I get time.
     
    Meg&Bear and dave77 like this.
  6. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Just wanted to give an update.

    I still have my breadboard in the car. I'm having trouble getting the perfboard version to work. Kind of looks like a short somewhere but I cant find it with my multimeter.

    I'm still waiting for warm weather to see how it performs in the heat.

    seilerts how is yours coming along?
     
    Meg&Bear likes this.
  7. stefano5777

    stefano5777 Member

    Joined:
    Mar 15, 2011
    380
    47
    6
    Location:
    St. Petersburg Florida
    Vehicle:
    2005 Prius
    Model:
    N/A
    And here i thought i had a grasp on all this stuff when BAM!!!!!! you guys lost me :)
     
  8. ItsNotAboutTheMoney

    ItsNotAboutTheMoney EditProfOptInfoCustomUser Title

    Joined:
    Jul 18, 2009
    2,287
    460
    0
    Location:
    Maine
    Vehicle:
    2010 Prius
    Model:
    II
    I know why. It's because I didn't proof-read properly.

    Change /= to /

    Code:
        ADC_average = ADC_sum /= 8;    // Put the average in to ADC_average.  Could >> 3 if we can guarantee all values are > 0
    
    Code:
        ADC_average = ADC_sum / 8;    // Put the average in to ADC_average.  Could >> 3 if we can guarantee all values are > 0
    
    It was dividing the rolling sum by 8 each time CAL_Average was called.

    I don't need credit for this. My code didn't add any functionality. As the open source world says: ideas are easy, it's implementation that's difficult and you're doing the hard work.
     
    Meg&Bear and dave77 like this.
  9. sorka

    sorka Active Member

    Joined:
    May 9, 2008
    1,004
    194
    0
    Location:
    Merced, CA
    Vehicle:
    2019 Prius
    Model:
    Limited
    If you're putting a kit together for sale, please count me in :)
     
    Meg&Bear and joelevi like this.
  10. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Sorry I'm not putting a kit together. You'll have to source out your own parts.

    Just to give an update.

    Finally had a really hot day today. The temp in the car was well over 100F when I left from work. The circuit failed to fake the temperature so There still must be some component that is affected by the heat. I'll bring my mini laptop with me tomorrow to see if I can tell whats going on. Thats if its hot again.

    I'm going to get one of ccdisce ECT spoofers since he is offering it cheap but I still want to get this Arduino version working just so there is another option out there for those of us that want to play around a bit. I will continue to work on the Arduino version but its not really a high priority at the moment.


    Thanks ItsNotAboutTheMoney. I make mistakes like that all the time. I'll try it out again when I get time.
     
    Meg&Bear likes this.
  11. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    I took a look at the serial output today and I'm just wondering if the Arduino's ADC reference voltage is being affected by the ambient temperature? Its acting like what its seeing is a different voltage than what it actually is. So it thinks its seeing the correct numbers when actually its not if that makes sense.

    I will try to bring some canned air with me next time to see if cooling down the Arduino changes anything. If not I will move on to the transistor then the digital pot.
     
    Meg&Bear likes this.
  12. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    I got my parts the other night and decided to build my version of TheForce's arduino temp hack. I'm using a RBBB (really bare bones board) from moderndevice.com, and a shield of my own making. Its a nice very small unit. I love the RBBBs (and they're cheap)!

    Anyway, here are the pics. I still don't have the switch or LEDs mounted yet. I'm going to scrounge those parts off something I have laying around.

    Arduino on the left, temp hack shield on the right.
    [​IMG]



    Here is the other side of the shield.
    [​IMG]



    And here it is assembled.
    [​IMG]
     
    Meg&Bear, joelevi and dave77 like this.
  13. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    I finished up the hack shield this morning. I did make a small change to the schematic. To reduce the amount of resistors needed I put just one 560 ohm resistor before all of the resistors.

    I also changed the code a tiny bit. I swapped some pins on the arduino to digital pot so it would be easier to wire up the shield.

    [​IMG]



    Here is the finished board on the arduino.

    [​IMG]
     
    Meg&Bear and dave77 like this.
  14. mrbigh

    mrbigh Prius Absolutum Dominium

    Joined:
    Sep 6, 2005
    3,686
    699
    2
    Location:
    Long Island, NY
    Vehicle:
    Other Electric Vehicle
    looking good and simple.........
     
  15. relliMmoT

    relliMmoT New Member

    Joined:
    Mar 5, 2012
    1
    0
    0
    Location:
    Shreveport, LA
    Vehicle:
    2002 Prius
    Model:
    N/A
    Hey I've got a Gen 1 w/ a 4KWh Enginer kit. I was wondering if you know of anyone who has attempted this on a Gen 1? Details?
     
  16. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
  17. wjtracy

    wjtracy Senior Member

    Joined:
    Sep 19, 2006
    11,314
    3,588
    1
    Location:
    Northern VA (NoVA)
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Are you using this and how much does it help?
    ...just got an Arduino so now I know what you are talking about.
     
  18. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    2 people like this.
  19. Flying White Dutchman

    Flying White Dutchman Senior Member

    Joined:
    Dec 29, 2007
    4,374
    313
    0
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    any idear about price?
     
  20. usnavystgc

    usnavystgc Die Hard DIYer and Ebike enthusiast.

    Joined:
    Jul 29, 2011
    3,159
    988
    0
    Location:
    Tucson, AZ
    Vehicle:
    2005 Prius
    Model:
    Four
    Hey Force,
    I would really like to get ccdisce's version. I have tried to get ahold of him by sending him a pmail with no luck. I don't know if I'm doing something wrong or not. I don't see any sent items in my account so maybe I don't have access to send a pmail but I really want this hack. I've ordered a PIS 4kw kit and feel like this is a necessary add on to maximize my investment. I've attempted the analog version but couldn't get it set right (consistently). I hate to bug you with this but any help you could give me would be appreciated. My email is [email protected] if you want to email me. I would build it myself but I don't know how to do the programming.