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

    jaso Junior Member

    Joined:
    Jul 3, 2012
    18
    4
    0
    Vehicle:
    2010 Prius
    Model:
    III
    Exactly. If you look at transaxle crosssection in the Prius Service Manual the oil pump drive shaft is directly
    driven by input shaft from the ICE (you can also observe it at 7:36 of the video). So whenever ICE rotates
    and only then oil pump is lubricating the transaxle - point.
    Another question is why is ICE rotating - to apply torque to the wheels or charging HV battery (running), to
    assist braking (?) or burn excessive charge of the HV battery (spinning - no fuel).
    And of course ICE is running only in one direction - reverse is done by MG2 alone?

    Jacek.
     
    jdh2550 and lopezjm2001 like 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
    I don't know if MG2 alone does reverse - or whether MG1 is involved as well. They certainly never run the ICE backwards (impossible!) - but the ICE can be running with the wheels spinning backwards (checkout the gadget above and you can drag the sliders around to show you that situation). Also, it's possible that all three gears can be rotating in the same direction - I'm not sure if that happens? It probably does.

    Now, I wonder what would happen if you span the engine backwards (no fuel and no spark)? I'm just curious - don't try this at home folks! I don't think there a fundamental mechanical reason you can't. I don't think it would gain you anything useful either! Just pure curiosity!

    One final question - does anyone know if the Prius does something "special" with valve timing when spinning the engine without fuel or spark? E.g. can it open intake and exhaust valves at the same time and just suck air in and blow it back out without any compression? I'm assuming that it would require far less energy to spin the ICE if you could do that.
     
  3. miscrms

    miscrms Plug Envious Member

    Joined:
    Aug 21, 2007
    2,076
    523
    5
    Location:
    Phoenix, AZ
    Vehicle:
    2005 Prius
    Yup, this is fundamental to the motors. As they spin faster, they generate "back EMF" or voltage. This is essentially subtracted from the applied voltage, reducing output power. This is part of the function of the "boost" converter in the inverter, to extend the useful power range.

    Counter-electromotive force - Wikipedia, the free encyclopedia

    Starting on page 65 of the report below you can see the MG2 output vs. rpm curve at various voltages for the inverter/MG2 combo. The efficiency data is interesting, but for this purpose the data of interest is the top "max output" curve." Note that the natural operation of the boost converter has been disabled, and they are feeding the output stages directly with different dc voltages. Following that curve, you can see how power output begins to fall as you go higher in rpms. You can also see how this curve pushes to the right allowing more power output at higher rpms as the applied voltage is increased by comparing the 225V, 500V and 650V curves. You can also see from the efficiency contours that back EMF does not degrade efficiency, it just limits power output.

    http://ecee.colorado.edu/~ecen5017/notes/OakRidge_2010Prius.pdf

    The faster you go, the more power you need to overcome wind resistance. The faster the motor spins, the less power it puts out. Eventually those two things balance and you reach the max speed (for a given slope/wind etc). This is one reason why many EV conversions still use the mechanical transmission from the donor vehicle to allow you to drop rpms at highway speeds to preserve hill climbing / passing power and/or extend the maximum speed possible.

    Rob
     
  4. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Well, it's not just a factor of back EMF - it's also a factor of the amount of work being asked. If it was just back EMF then the no load RPM would be the same as the loaded RPM. Put your Prius up on blocks and floor the accelerator in EV only mode and the speedo will read well above 70mph.

    The other approach (versus a multiple ratio transmission) to widening the speed range for an electric motor is field-weakening (less magnetic field = less back EMF). I haven't looked at that report (and when you mentioned page 65 it kind of made me think I won't be reading it in detail in the next 5 minutes!) - do you know if the Prius implements any form of field-weakening?
     
  5. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
  6. miscrms

    miscrms Plug Envious Member

    Joined:
    Aug 21, 2007
    2,076
    523
    5
    Location:
    Phoenix, AZ
    Vehicle:
    2005 Prius
    Agreed, the load matters a lot. The point I think I was trying to make is that for any rpm above the "knee" the back EMF limits the max electric power the motor will draw, and consequently limits the max torque output of the motor. That only really matters if you have sufficient load to need max torque output, ie max EV driving speed or EV gradability.

    Not that I'm aware of, though I had thought field weakening was more commonly used in wound motors than in permanent magnet motors like the Prius uses. We're definitely exceeding my limited understanding of electric motors though ;)

    These reports are definitely a lot of fun. Your tax dollars at work :)

    Rob
     
    jdh2550 likes this.
  7. Flying White Dutchman

    Flying White Dutchman Senior Member

    Joined:
    Dec 29, 2007
    4,374
    313
    0
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    not sure if i already posted this or anybody else

    but when i drive in OOG mode and hit just 90kmph on the speedo i notice my car holding back/slowing down feels like something is breaking.
    as soon i get at 89kpmh it go's away

    not sure if any of you guys ever driven a car with a speed limiter on it or ever hit the rev limitir in a old fasion ice car, thats the same feeling.
     
    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
    Attached is a new version of the CAN commands. CAN TX is working - I've confirmed this on my bench setup which has the Atmel logging all bus traffic and the DuinoMite sending using CAN TX. If I send 10 messages I see all 10 show up in the log file.

    However, I haven't managed to send a PID request and receive messages back. So, I'm obviously doing something wrong!

    This is still considered a beta test release - but, AFAIK, everything is working. That's where testing comes in - let me know what's broken...

    Note to self: If I'd set things up on the bench in the first place I could have released this about 1 month ago!
     

    Attached Files:

    lopezjm2001 likes this.
  9. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Thanks. I will test it soon.
     
  10. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Update: I got the PID request working and can receive the primary frame (byte 0 = 0x10), but I can't get the remaining frames to transmit. However, this is with the bECU on the bench and it might just be the fact that the bECU isn't sending data because it's not attached to a pack...

    So, I'll attach stuff to the car sometime this weekend & see what transpires...
     
    lopezjm2001 likes this.
  11. 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 done any basic programming since JDH2550 lost his job. It feels like it was a long time ago so I am a bit rusty and I will begin programming tomorrow Monday.

    Today I drove for three hours to a barbecue at a friends house so I drove in mixed mode. When I was on the freeway driving at high speed I increased the end-voltage from 195v to 236v (A123 battery had 8ah remaining) and the BMSplus put outs a SOC of 40% causing the ICE to charge the PHEV A123 20ah battery at about 20 to 30 amps at 232v constantly and it did not seem to make much difference to the fuel economy. I added 4ah to the A123 20ah battery pack. Later when I got to the suburban low speed roads I changed the End-voltage back to 195v (and stopped charging my A123 pack) when less power is used as there is less wind resistance on lower speed roads. This is the first time I have used the ICE to recharge my PHEV A123 20ah battery pack, I did not think it was possible. If the end-voltage top end range had not been increased from 210v to 236v this would not have been possible, thanks to FWD for pestering Norm into making this change.

    I also noticed that whenever I put the Prius in neutral coming down a steep hill at 90kph the I'CE would always run at 1200rpm (instantaneous FE of about 1.0 l/100km) supposedly to stop MG1 from over revving. And if I then put the Prius shift into Drive mode the ICE would stop running.

    UPDATE: I got the new TX CAN command to work to get and clear DTC code. And I got the HV battery fan control to work also.
     
  12. Flying White Dutchman

    Flying White Dutchman Senior Member

    Joined:
    Dec 29, 2007
    4,374
    313
    0
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    No Thx
    Always like to pester.

    -Tapatalk
     
    lopezjm2001 likes this.
  13. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Update 2: I got the PID request and retrieve all frames to work. Nothing to do with being on the bench - I was just sending the wrong response.

    Here's the output from the attached test program (becu.bas) on the test bench (becu is not hooked to a pack)

    Code:
    CAN Config
    ==========
     
    online = 1
    buffer size = 176
    speed = 500000
    channel flags = 0X3
    Channels in use: 0 1
    End of CAN Config
     
    q:quit, t:0xCE, u:0xCF, v:0xD0 send pid to 7E3
    SENT PID CE TO 7E3
    SENT 0x30 TO 7E3
    3457: 7EB :  8 : 10 26 61 CE 6E CE 20 80
    3466: 7EB :  8 : 21 00 80 00 80 00 80 00
    3474: 7EB :  8 : 22 80 00 80 00 80 00 80
    3483: 7EB :  8 : 23 00 80 00 80 00 80 00
    3492: 7EB :  8 : 24 80 00 80 00 80 00 00
    3501: 7EB :  8 : 25 80 00 00 11 00 00 00
    SENT PID CF TO 7E3
    SENT 0x30 TO 7E3
    6605: 7EB :  8 : 10 17 61 CF 66 38 80 C0
    6613: 7EB :  8 : 21 7C 84 00 08 06 00 66
    6622: 7EB :  8 : 22 38 66 38 66 38 00 80
    6631: 7EB :  8 : 23 00 00 11 00 00 00 00
    SENT PID D0 TO 7E3
    SENT 0x30 TO 7E3
    10455: 7EB :  8 : 10 24 61 D0 0E 00 00 00
    10464: 7EB :  8 : 21 00 00 00 00 00 80 00
    10473: 7EB :  8 : 22 00 80 00 00 13 13 13
    10482: 7EB :  8 : 23 13 13 13 13 13 13 13
    10493: 7EB :  8 : 24 13 13 13 13 00 80 00
    10503: 7EB :  8 : 25 00 11 00 00 00 00 00
    
    The first column is the Timer command output (msec since last reset). However, because of the way I structured the code it's misleading - this is actually the time it takes to empty the buffer - not how long it takes to read the PID frames. However, it appears "instantaneous", in other words, when you press a key there's no noticeable wait before the display pops up.

    Note: drop the ".txt" from the filename when running on the DM - board only allows uploads of certain file types.
     

    Attached Files:

  14. 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 programming. This should cut down on program memory.

    Just wanted to know if you had tried making the PID header a input variable into your subroutine.

    Code:
    Sub RequestPID(header, mode, pid)
    .
    txID = header
    .
    If (k$ = "t") Then RequestPID &H7E3,&H21,&HCE


    I was thinking of trying this code:
    Code:
    Sub pidrequest(header, mode, pid, more)
      Local txData(8) : Local txok
      txID = header : rxID = txID + 8 ' id of reply is 8 higher than module number
      txData(3) = 0 : txData(4) = 0 : txData(5) = 0 : txData(6) = 0 : txData(7) = 0
      txData(0) = &H2 : txData(1) = mode : txData(2) = pid
      CAN TX 0,txID,0,8,txData(0),txOk : Pause 10
      If more = 1 then
        txData(0)=&H30 : txData(1)=0 : txData(2)=0 : CAN TX 0,txID,0,8,txData(0),txOk
      Endif
    End Sub
    
    I like your idea of using "Pause 10 " instead of receiving and acknowledging the first received frame. Great idea.

    Then to filter out the data (example) use this code:
    Code:
    Sub filter21C3
      Local D2 : Local D3 : Local D4 : Local D5 : Local looper : looper=0
      Local rxData(8) : Local rxOk :  Local rxId : Local rxType : Local rxLen
      D2=0 : D3=0 : D4=0 : D5=0
      Do
        CAN RX 1, rxId, rxType, rxLen, rxData(0), rxOk
        If rxOk = 1 then
          If (rxData(0) = &H10) Then
              MG2TQ = (32 * rxData(6) ) + (0.125 * rxData(7)) - 500
              MG2rpm = ((256 * rxData(4)) + rxData(5)) - 16383 : D2=1
          Endif
          If (rxData(0) = &H21) Then
            D3=1 : MG1rpm = ((rxData(3) * 256) + rxData(4)) - 16383
            MG1TQ = (32 * rxData(5) ) + (0.125 * rxData(6)) - 500 : G = rxData(7)
          EndIf
          If (rxData(0) = &H23) Then INV1t = rxData(7) - 50 : D4=1
          If (rxData(0) = &H24) Then
            D5=1 : INV2t = rxData(1) - 50 : MG2t = rxData(2) - 50 : MG1t = rxData(3) - 50
          EndIf
          If D3=1 and D4=1 and D5=1 then Exit Sub
        Endif
        looper = looper + 1 : If looper > 5 then Exit Sub
      Loop
    End Sub
    UPDATE: I got the PIDrequest to work.
     
    NortTexSalv04Prius 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
    The way I have the CAN configuration setup this won't work. I set up the receive channel to filter for replies for the specific response ID. So, if you change the txID you'll need to either (a) change the filter on the RX channel to receive all messages and pick out what you want or (b) you'll need to also change the filter on RX if you change txID.

    (a) should work but it puts us back to a less efficient way of interacting with CAN
    (b) may work but I'm not sure my CAN commands will handle it properly or not. They're certainly not optimized for this - I'll add an easy way to change a channel filter to beta 3.

    Did you change the filter on channel 1 just to accept all messages?
     
  16. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    No. You just add more rx channels configured for a different rxId. So for every different header you use a different rx channel.
    I guess you can still optimize your CAN Commands so you can keep using the same and only one RX channel.

    It just means I have to add and configure more RX channels, but it does work well.
     
  17. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    The way you're doing it is probably the best approach. How many separate channels is your CANVIEW app using?

    DROID RAZR ? 2
     
  18. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I am still working on the active PIDs but I guess I will need about 6 RX channels for active PIDs. I am using 19 RX channels for passive PIDs and just one TX channel. So all up I will use about 26 channels.
     
    [email protected] likes this.
  19. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I am still working on my basic program, the PID requests work really fast and I will update the file in my first post soon. I have added a new page for the H555 canbus message sent by my BMS+ as shown below.
    BMSplus_H555_canbus_message.png

    I haved asked Norm Dick a couple of questions regarding the H555 message .

    EDITED: The H554 message was changed to H559. As H554 was already in use by Toyota.
     
  20. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    jdh2550 and [email protected] like this.