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. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    It should be straight forward using the PIDs made available by USBseawolf2000 for the Android Torque application. The problem is testing.
     
  2. Flying White Dutchman

    Flying White Dutchman Senior Member

    Joined:
    Dec 29, 2007
    4,374
    313
    0
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    i can do testing in 2014 maybe:)
     
  3. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    EV Display Unit Version 3

    PHEV Display.png
    Moving along...... here is the latest page I have added to my CGolormax2 or/and Duinomite Mega. I have interfaced my EV Display Unit Version 3 (from MiniBMS) with my Basic Canview program. The data is transmitted from the EV Display Unit V3 using a slave Bluetooth Device HC-06.
    The HC-06 is a Bluetooth slave device which connects to the EV Display Unit V3. Just like this one from EBay JY MCU V2 Bluetooth Wireless TO Serial RS232 TTL Module AVR Arduino PIC Cable | eBay
    The wiring between the EV Display Unit V3 and the HC-06 Bluetooth device is simple, just four wires.
    EV Display Unit Bluetooth Connections.jpg

    The HC-05 is a Bluetooth master/slave device which is set as a Master to receive the EV Display V3 data.
    The master Bluetooth device HC-05 is connected to the CGcolormax2 or a Duinomite Mega. Just like this one from EBay Wireless Bluetooth RF Transceiver Module Serial RS232 TTL HC 05 FOR Arduino AVR | eBay

    EV Display Unit Serial Data protocol.png

    Above is the data format details that is sent by the EV Display Unit V3. You need to set the speed of the HC-06 to a baud rate of 38400. This is done using the HC-06 AT commands. See HC-06 AT commands list attached. You also need to set the HC-05 as a Master device using the HC-05 AT commands. You can find some handy YouTube videos of people using AT commands. It was a lot simpler than I expected.

    I left the HC-05 Master Bluetooth device set to a default baud rate of 9600. No need to change baud rate on the HC-05.

    The HC-05 (set as Master) automatically pairs with the HC-06 (slave).

    The wiring between the CGcolormax2 or Duinomite Mega and the HC-05 Master Bluetooth device is simple. (using Com2). See photo attached. It only involves four wires i.e. 5v or 3.3v, ground, Tx and Rx. Tx wire always connects to Rx pin on other device. Rx wire always connects to Tx pin on other device.

    VCC - 5Vdc or 3.3Vdc
    GRD - Ground
    Tx - transmit data line connects to Duinomite Mega GPIO pin 10 (com 2), CGcolormax2 pin D1 (com2).
    Rx - receive data line connects to Duinomite Mega GPIO pin 8 (com 2), CGcolormax2 pin D0 (com2).


    EV Display Unit Version 4

    In Version 4 the serial speed was reduced from 38400 to 9600 and format is now zero padded fixed width string instead of comma delimited string.

    In the file AUTOSTT.BAS change line 748 using a program like notepad which comes standard with Microsoft Windows. Note that the serial speed is changed from 38400 to 9600. Also the string buffer size is increased from 45 to 48.

    Code:
    Open "COM2:9600,48" As #10 : Pause 1000
    Also replace the contents of the file EVDIS.BAS with the code below. This code is adapted to the zero padded fixed width.

    Code:
    Sub EVDIS
      Font 2
      Print @(20,100) CLR$(fg,bg)+"PHEV DISPLAY" : Font 1
      Print @(20,140) CLR$(fg,bg)+"AH remain  :"
      Print @(20,170) CLR$(fg,bg)+"Pack volts :"
      Print @(20,200) CLR$(fg,bg)+"Fuel Gauge :"
      Print @(20,230) CLR$(fg,bg)+"SoC %      :"
      Print @(20,260) CLR$(fg,bg)+"Amp + or - :"
      Print @(20,290) CLR$(fg,bg)+"Current    :"
      Print @(20,320) CLR$(fg,bg)+"Power      :"
      Print @(20,350) CLR$(fg,bg)+"Temperature:"
    End Sub
    
    Sub UpdateEVDIS
       Font 2
       Local check$,check1$, check2$, check3$, check4$, check5$, check6$
    
       If Input$(1,#10)="B" Then check$=Input$(1,#10)
    
       If Input$(1,#10)="H" Then
         If page=24 or Standby=1 Then Print @(90,130) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$="" : check4$="" : check5$=""
         check1$=Input$(1,#10) : check2$=Input$(1,#10) : check3$=Input$(1,#10) : check4$=Input$(1,#10) : check5$=Input$(1,#10)
         EVah=Val(check1$+check2$+check3$+check4$+check5$)/10
       If page=24 or Standby=1 Then Print @(90,130) CLR$(fg,bg)+Format$(EVah,"% g"); " ah"
       EndIf
       If EVah=40.0 Then AHT=0
    
       If Input$(1,#10)="V" Then
         If page=24 or Standby=1 Then Print @(90,160) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$=""
         Check1$=Input$(1,#10) : Check2$=Input$(1,#10) : Check3$=Input$(1,#10)
         EVvolts=Val(check1$+check2$+check3$)
         If page=24 or Standby=1 Then Print @(90,160) CLR$(fg,bg)+Format$(EVvolts,"% g"); " volts"
       EndIf
    
       If Input$(1,#10)="F" Then
         If page=24 or Standby=1 Then Print @(90,190) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$=""
         Check1$=Input$(1,#10) : Check2$=Input$(1,#10) : Check3$=Input$(1,#10)
         EVfuel=Val(check1$+check2$+check3$)
         If page=24 or Standby=1 Then Print @(90,190) CLR$(fg,bg)+Format$(EVfuel,"% g"); " %"
       EndIf
    
       If Input$(1,#10)="S" Then
         If page=24 or Standby=1 Then Print @(90,220) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$=""
         Check1$=Input$(1,#10) : Check2$=Input$(1,#10) : Check3$=Input$(1,#10)
         EVsoc=Val(check1$+check2$+check3$)
         If page=24 or Standby=1 Then Print @(90,220) CLR$(fg,bg)+Format$(EVsoc,"% g"); " %"
       EndIf
    
       If Input$(1,#10)="D" Then
         If page=24 or Standby=1 Then Print @(90,250) CLR$(fg,bg)+"           ";
         Check$=Input$(1,#10)
         If check$="1" And (Page=24 or Standby=1) Then Print @(90,250) CLR$(fg,bg)+" Charge";
         If check$="1" Then DC=0 
         If check$="0" And (Page=24 or Standby=1) Then Print @(90,250) CLR$(fg,bg)+" Discharge";
         If check$="0" Then DC=1
       EndIf
    
       If Input$(1,#10)="A" Then
         If page=24 or Standby=1 Then Print @(90,280) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$="" : check4$="" : check5$=""
         check1$=Input$(1,#10) : check2$=Input$(1,#10) : check3$=Input$(1,#10)
         check4$=Input$(1,#10) : check5$=Input$(1,#10)
         EVamps=Val(check1$+check2$+check3$+check4$+check5$)/10
         If DC=1 Then EVamps=-EVamps
         If page=24 or Standby=1 Then Print @(90,280) CLR$(fg,bg)+Format$(EVamps,"%+.1f") " amps"
       EndIf
    
       If Input$(1,#10)="W" Then
         If page=24 or Standby=1 Then Print @(90,310) CLR$(fg,bg)+"             ";
         check1$="" : check2$="" : check3$="" : check4$="" : check5$="" : check6$=""
         check1$=Input$(1,#10) : check2$=Input$(1,#10) : check3$=Input$(1,#10)
         check4$=Input$(1,#10) : check5$=Input$(1,#10) : check6$=Input$(1,#10)
         EVwatts=Val(check1$+check2$+check3$+check4$+check5$+check6$)
         If page=24 or Standby=1 Then Print @(90,310) CLR$(fg,bg)+Format$(EVwatts,"% g"); " watts"
       EndIf
    
       If Input$(1,#10)="T" Then
         If page=24 or Standby=1 Then Print @(90,340) CLR$(fg,bg)+"           ";
         check1$="" : check2$="" : check3$=""
         check1$=Input$(1,#10) : check2$=Input$(1,#10) : check3$=Input$(1,#10)
         EVtemp=Val(check1$+check2$+check3$)
         If page=24 or Standby=1 Then
           Print @(90,340) CLR$(fg,bg)+"     ";
           If metric=1 Then
             Print @(90,340) CLR$(fg,bg)+Format$(EVtemp,"% -3.0f"); : Font 1
             Print CLR$(fg,bg)+" o"; : Font 2 : Print CLR$(fg,bg)+"C";
           Endif
           If metric=0 Then
             EVtempF=(EVtemp*9/5)+32
             Print @(90,340) CLR$(fg,bg)+Format$(EVtempF,"% -3.0f"); : Font 1
             Print CLR$(fg,bg)+" o"; : Font 2 : Print CLR$(fg,bg)+"F";
           Endif
         Endif
       EndIf
    
       check$=Input$(9,#10)
    
    End Sub
    
    
     

    Attached Files:

    #443 lopezjm2001, Jan 21, 2014
    Last edited: Jun 14, 2015
  4. mrbigh

    mrbigh Prius Absolutum Dominium

    Joined:
    Sep 6, 2005
    3,686
    699
    2
    Location:
    Long Island, NY
    Vehicle:
    Other Electric Vehicle
    It's getting like a PROFESSIONAL EQUIPMENT (y)
     
    lopezjm2001 likes this.
  5. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Just uploaded my latest CANVIEW basic program. It includes the logic for the EV Display Unit used with bluetooth modules from cleanpowerauto.com. No longer uses colour mode 2, now uses mode 1,7 instead to maximise memory usage.

    The upload as usual is found in the first post in this thread.
     
  6. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
    Just a Question on CSV files in the package .. is there a reason for all the many lines containing a single comma ","
    on every line in the CSV files ? :)
     
  7. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Not sure. But probably because I was only logging the HV battery voltage and current. Updating is faster if fewer variables are logged.
     
  8. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
  9. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I also noticed this, possibly a timer which is not being reset to 0. Let me know if you see the problem. I will look into it later.

    Thanks.

    EDITED

    I found the missing code in library file F7.LIB. Will upload later.

    EDITED

    New zip file has been uploaded dated 17/02/2014.
     
  10. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
    Great!! Thanks :)
     
  11. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
    Graph is good ....... :)

    But now seems the NiMH Battery Voltage ( high, low and delta) display broke AND no data on NiMH IR display :(
     
  12. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I checked it out. It only happens if you are logging. Easiest solution is stop logging if you want to see F5 or F6, for the time being.

    This is caused by the amount of time the program takes to write to the SD card when data logging causing the PID requests for F5(NiMH voltage blocks) and F6(NiMH IR values) to miss getting their data. Will try to fix, may take a while. Allso data returned by PIDs called by F9 are also conflicting with data returned by F5 or F6. Should just be a matter of timing and making sure to empty the buffer after each PID request.


    Thanks.
     
  13. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II

    Also seem to have a problem with the A/hr reading . seems to jump to high value... (maybe after vehicle restarts)
    Higher than my batteries can deliver on a charge.
     
  14. patrickhoss

    patrickhoss New Member

    Joined:
    Mar 12, 2014
    2
    0
    0
    Location:
    Las Vegas, Nevada
    Vehicle:
    2005 Prius
    Model:
    Four
    Hello my name is patrick new to this forum, ive been reading alot about the duinomite mega i purchased one recently didnt work the way i thought. Is there anything I can buy from you thats completed? or from someone else? i really just need something anything at all that helps for my plug in conversion thanks
     
  15. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Hi Patrick,
    I do not sell anything. DIY stuff is not easy to understand. My only advice is to keep reading and trying to understand what to do with the Duinomite Mega as it is challenging.
    If you think that it is all too hard and want an easier option then you may want to look at using a different device like a Android phone like at this thread Gen2 Prius: Custom PIDs for Torque (Android App) with formulas | PriusChat
    Then you could just use a Scangauge.
    What kind of plug in conversion do you have?
    Thanks,
    John
    Still working on it.
     
  16. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
  17. patrickhoss

    patrickhoss New Member

    Joined:
    Mar 12, 2014
    2
    0
    0
    Location:
    Las Vegas, Nevada
    Vehicle:
    2005 Prius
    Model:
    Four
    I have a 12kwhr lithium setup i am getting my charger custom made, and i need some kind of software/hardware to really take advantage of a plug in solution, if anyone has any tips please let me know
     
  18. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
    Not sure what method ( If any decided yet ) you are using to manage your lithium setup ... and integration with the Toyota HSD.

    There are controllers available from PIS and also hybrid interfaces ( BMS+) (limited availability now) .. There is also Orion BMS and controllers ..
    Then there was also the chinese "enginer" system 48V battery with DC-DC inverter(not sure if this is still on market )
    They each have there pros and cons...

    The Duinomite Mega CANVIEW role is more for monitoring the CANview traffic and providing a Display of what is happening with the PlugIN Hybrid upgrade you have installed. ( It can be used also to give some control of BMS+ but in our case my BMS+ operates in standalone mode )
     
  19. SynEco@eVehicle.co.nz

    Joined:
    Jan 9, 2007
    139
    19
    0
    Vehicle:
    2004 Prius
    Model:
    II
    Got this DTC
    4 83 1 10 147 0 0 0 in Duinomite HVDTC

    Assume this is logged in Dec so translates to P0A93 ?
     
  20. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    The information on DTCs are limited. Need to convert from decimal to hexidecimal.
    4 53 1 A 93 0 0 0
    Best to use Techstream (Chinsese clone) like miniVCI to find the problem.