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

My Duinomite Mega Canview V4 equivalent Project

Discussion in 'Prius PHEV Plug-In Modifications' started by lopezjm2001, Jul 19, 2012.

?
  1. Yes

    11 vote(s)
    100.0%
  2. Prefer to use Android Torque device

    0 vote(s)
    0.0%
  3. Prefer to use Scangauge

    0 vote(s)
    0.0%
  1. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Rushed? Full of bugs? Needs further testing? Them's fighting words! ;)

    Just kidding of course. Yes, it needs at least another round of testing - that's why this is the beta release - not the final release. It certainly isn't ready for prime-time. I shall continue to work on it. Keep the bug reports coming.

    Issues so far:

    1) data(0) vs. data(8): That's actually correct in that in the PDF document it's describing the parameters you need to pass to the function. You need to pass a numeric array with 8 slots - hence "data(8)". However, to actually pass that argument in the code you need to pass the reference to the first element in that array (hence "data(0)"). It's confusing and I'll update the documentation to make it clearer. (p.s. your gamble was correct - quick, buy some lottery tickets while your luck still holds!)

    2) Debugging output still occurring. Oops sorry about that - it'll be fixed in beta 2 (later today).

    3) More examples needed - including TX. Yes, as I said in my original release the examples aren't finished yet. The example to read PIDs will be the one that demonstrates TX.

    4) Example1.bas - suggested change to show screen update time. I wasn't actually trying to display screen update time. I'm showing a timestamp of when the command is read so that you can see that none have been dropped (in example 1 whereas some are dropped in example 2). So, no change required.

    So, I have a total of 4 issues reported - I'll work on the first 3 and leave the 4th as an "exercise for the reader".

    Anything else? Or is it just not working for you at all?
     
    [email protected] likes this.
  2. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Unless using my implementation can result in you writing less code the new commands won't help with program memory. The better memory management is for the heap - not for the program code. However, having said that I'm not exactly sure how the edit command works - does it allocate from the heap? It's something I can look into after I've got all those pesky bugs dealt with.
     
    [email protected] likes this.
  3. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I will keep you posted. I will try again using a simple program just using getcandata() and updateVGA. Let us know when you have a second beta available. Thanks.

    EDITED: The problem is that I cannot use my existing program with your implementation due to bugs so I can only be able to test/find bugs on the weekend.
     
  4. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    When I ran the command memory. The program was about 45% use of memory. When you go into edit online or edit mode it uses the remainder of the memory. In my case I was getting the reply "Insufficient memory". However if I reduced the number of lines used in the program then less memory was used when being used to go into edit mode. Hence smaller program uses less memory in edit mode.
     
  5. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I have split my CAnview_V4.0_BMS+.BAS program into smaller programs for the purpose of debugging JDH2550's CAN commands. The CAN commands have been converted from Frank's CAN commands to JDH2550's CAN commands. Files are attached. They have not been tested yet. I need my Duinomite Mega to drive to work so I do not want to flash it every five minutes.
     

    Attached Files:

    [email protected] likes this.
  6. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Ah, yes - I can see how that would affect things.
     
  7. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Your CAN command for receiving works well except for your output problem. I got my passive can basic program Ie. CANPASS.BAS to work and it was faster than ever. I can now remove unnecessary logic that was previously used due to the buffer overflow problem. I cannot get your CAN transmit command to work. Tried different variations. It had a problem with the data array. Obviously you have not got it working yet. Hope to see your beta2.

    I used your ECT.BAS program to measure how often the passive PIDs are broadcasted over the CANBUS.

    HV Battery temperature - H3CB - 90mS
    BMSplus - H555 - 94mS
    Brake - H030 - 0 to 1 mS
    Current - H03B - 0 to 1 mS
    ECT - H52C - 992mS
    Gas Tank - H5A4 - 0 to 1 mS
    ICE kW - H038 - 0 to 1 mS
    ICE Temperature - H039 - 0 to 1 mS
    KPH - H0B4 - 6mS
    Power - H03A - 0 to 1 mS
    ICE RPM - H3C8 - 56mS
    Gas pedal position - H244 - 16mS
    Intake temperature - H3CF - 118mS
     
    NortTexSalv04Prius likes this.
  8. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Sorry for the delay on beta2. I'll be working on it today.
     
  9. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    I've squashed a few bugs but I'm having trouble getting TX to work.

    DROID RAZR ? 2
     
  10. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Thanks for the progress report. Just wondering, how are you testing your TX command?

    I got my CanviewV4.BAS program to work but cannot transmit so I cannot clear my DTC. So now I am driving around with a DTC all the time. However the updating of parameters is now turbo charged.
     
    [email protected] likes this.
  11. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Same sort of simple tests I was doing last time around - sending out a request for a PID and monitoring for the response. I'm starting to wonder if I've actually got a bad connection and RX is working but not TX.

    Next steps (when I get time - I'm currently job hunting):
    - reinstall 3.2C + CAN and try your code that was retrieving PIDs successfully
    - hook up a second CAN device to log all traffic so that I can see if the transmitted message is even reaching the bus
    - I might also get a friend to help me hook up a scope or possibly some form of logic analyzer


    I'd suggest you fall back to using 4.0 + Franks CAN commands. You had that working, right? It might be a while before I can figure out what's up with TX. It's nothing fundamental - with RX working reliably there's no reason that I won't be able to get TX working. I hope you saved a version of that code?
     
    [email protected] likes this.
  12. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Sorry to hear that you have lost your job. I know how distressfull it is to not have a job to pay off the mortgage, i have been there. Maybe you can ask the US government for a financial bailout (comic relief). I am sure that a software Engineer as talented as yourself will have no trouble finding work. But don't let your current situation affect your mojo. I never thought I would have to advise an American to keep their confidence up. I do not care how long it takes you to get CAN TX working as long as you are confident that it can be done.

    I keep my old Norm's Canview V4.0 in my Prius just incase. The latest copy of my CANVIEWV4.0_BMS.BAS in my first post still uses Frank's CAN commands. It will not be updated to your CAN commands until I am confident that they all work well.

    Anyhow, good luck with the job hunting.
     
    jdh2550 and [email protected] like this.
  13. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    It has just come to notice to me in another thread that the ICE ECU can be spoofed simply by resending the modified CAN message to inhibit the ICE. This should allow EV mode at higher speeds than the normal 45kph limit. At some point in the future I will try this and see whether it actually works. Apparently if you send the message soon after the original the I'CE ECU will ignore the first message. But can the Duinomite Mega be quick enough to do this. I think that there is a small window of opportunity in time after the original is sent that the modified must be sent in order for the first message to be ignored.
     
  14. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    A couple of thoughts about this:

    1) you also need to send messages that spin the engine. Not just inhibit it. You need to do that to keep MGs within rpm limits and also for lubrication. Proceed with caution.

    2) if a BASIC based implementation is too slow we can add more CAN commands in C. :)

    DROID RAZR ? 2
     
    [email protected] likes this.
  15. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Thanks for the good wishes. It's not too bad (a) I'm still working part time for job A while looking for job B; (b) when I searched monster.com for "software engineer within 20 miles of Ann Arbor" it returned 77 hits. Now the majority of those may not be suitable - but it's a great start...

    I'm not too worried. However, I do need to refill the family coffers though - they're looking a little empty!
     
  16. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    It would not hurt to spin the ICE now and then for the lubrication of the ICE. However there is a lot of speculation around whether it is necessary or not and nobody has made a good case either way or stated how often or for how much time the ICE must spin. Nobody using the OOG mode has reported any lubrication issues so I guess there is no imminent danger if you do not spin the ICE. However I would spin the ICE now and then just to be sure. I have read that the fuel like E15 that I use has 15% ethanol added to it and it may separate over a long time of not being used causing timing issues or knocking of the ICE. I have heard a lot about car engines that knock or misfire due to using E15 because these engines are not suited for E15 but are only suited to full unleaded fuel. And the fuel not being used after a certain amount of time may become degraded. So to me the fuel issue is a lot bigger than the ICE lubrication issue.
    I remember from watching a documentary that in South America they use engines that are timed and modified to use 100% ethanol fuel. So South America is not dependent on crude oil.
     
    [email protected] likes this.
  17. miscrms

    miscrms Plug Envious Member

    Joined:
    Aug 21, 2007
    2,076
    523
    5
    Location:
    Phoenix, AZ
    Vehicle:
    2005 Prius
    I think that the more important point was that you do need to spin the ICE to prevent MG1 from over-revving at high speed. The Prius does this automatically when in OOG mode, not sure that's still true if you start spoofing the related messages. PIS ECM doesn't seem to just do this by triggering the OOG mode through spoofing, as I believe they can still light the ICE when needed. Its definitely going to take some careful experimenting :) Would be very cool if you can get it to work!

    Rob
     
    jdh2550 likes this.
  18. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I have not heard of MG1 over revving before. I can see how once the ICE inhibit spoof is removed and the spoofed H3C8 byte 2 is also removed the ICE will come on at the target rpm which is probably too high as the Hybrid ECU does not know that the ICE was inhibited. It can normally go up to 10000 rpm. Once the ICE inhibit and H348 byte 2 (ICE rpm feedback to HV ECU) spoof is removed the ICE target rpm can be lowered by spoofing H348 byte 2 and then brought up gradually to the original value. This way the initial high torque will not cause MG1 to over rev.

    At the moment it is all just theory. I will need to spend more time studying CAN frames of interest i.e. H348, H3C8, H03A and H3CA.
     
    jdh2550 and [email protected] like this.
  19. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    It's certainly possible - that's one of the things that impressed me about pEEf's solution. Both that he achieved this but that he manages to explain it rather than shrouding it in "well that's our secret sauce" guff...

    To me this is the heart of the conversion. But, we'll see... (if I ever get to the dang thing! <-- that's just frustration speaking - I've no intention of giving up)
     
    [email protected] likes this.
  20. Flying White Dutchman

    Flying White Dutchman Senior Member

    Joined:
    Dec 29, 2007
    4,374
    313
    0
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    ? In oog mode the ice will not spin
    Or do i read your post incorrectly?

    -Tapatalk