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

"De"-nginer

Discussion in 'Gen 2 Prius Technical Discussion' started by Bruce Meacham, Jul 3, 2012.

?
  1. Sure, why not

    87.5%
  2. You are high

    0 vote(s)
    0.0%
  3. Did you think about...

    12.5%
  1. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    I hope to make this a running post for a one-off 2005 Prius PHEV conversion project utilizing an existing 4kwh Enginer. The target is a 10 kwh 35-Mile / 55+ mph pure EV; poor man's Volt!

    The Project

    For latest source and technical information see the PHEVCU git hub project

    Battery
    I'l be starting with the 4kw Enginer's, I need to add an additional 6kwh (10kw target) and end up at 240-260v pack. To do that I'll split the two Enginer packs into two again. That yields 100v/40Ah. I'll add an additional 48 cells of 40Ah LiFePO4, that gets me 250vnom / 40Ah, 9984Wh (lets call it 10kwh). I'll BMS the whole pack. ~$4k all said.

    From my EV experience, I will be building a proper insulated, ventilated and heated battery box. This makes a big difference in real world.


    Design:
    [​IMG]
    PHEVCU - Plug-in Hybrid Electric Vehicle Control Unit
    - Build a battery ECU (Dionmite w/dual Can-Bus') that can send the information the rest of the car (mostly HV ECU) wants.
    - Interface (CAN) with the El
    con 2500 Watt charger to set charge rates

    0x346 / 0x34C: See other threads, but something will need to be done to spoof EV mode

    I'm confident I know how to get all that done, but I'm concerned about fail safes, over-speed, over/under-temp, etc?

    BTW; I'm a big fan of simplicity, I don't need/want any kind of display. This is my wife's car, if she has to touch a button or it goes into error-state, this is a total failure. Ideally, I should program the ECUs to fail gracefully into whichever mode makes most sense without feedback.
     
    NortTexSalv04Prius 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
    Hi Bruce - I think we're both high and both after the exact same thing - a poor man's Volt. :)

    Regarding topology see the other thread (I read that one before I saw this).

    Some other thoughts:
    - Batteries:
    -- do you have any concerns with imbalance between older and newer cells?
    -- what is the spec of your BMS?
    -- please tell us more about your battery box design? I wasn't thinking cooling would be necessary and as far as heating I was thinking I would sacrifice performance and switch to ICE sooner in cold weather (after all the one thing ICE is good at is generating excess heat!!) However, I'd like to learn more.

    - Display:
    -- Ultimately I want a plug-and-forget system as well. However, at first I think an interactive display is a great development tool. Do you plan on having a display hooked up during development?

    - Failsafes:
    -- Wimp! We don't need no stinking failsafes...
    -- Just kidding - of course! I guess the best way to tackle this is to think of all the important variables and consider safe operating ranges? What are you thinking?
    -- My biggest concern is abusing the ICE - either by not running it enough, the lubricating not working as well when just spinning, the switch into "kick-down" mode or into >70mph mode when we go from EV only to ICE+EV.

    Good luck!
     
  3. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    :ROFLMAO: <- it all makes more sense from this angle


    yes, but I'm ignoring them. Worst case, I need to replace the entire pack.


    I'm using miniBMS in my BMW EV. Calling it a BMS is a stretch, it's really a balancing and fail-safe system. That would be my preferred off the shelf solution. But... I have another idea, BMS cost is a direct function of voltage (ie, more volts, more cost, very linear). A BMS for 256v is $1250 just for the cell units. But here's the rub, LiFePO4 don't go wildly out of ballance, it lasts much longer with a gentle nudge in the right direction over time.

    There are EV folk out there going entirely un-regulated or managed, but they manually check the battery periodically and balance by hand. I could do this as well, but I'd like to consider a scale-able solution. I have a profressional EE friend with a Twike (they run 380v, 16ah), he needs to replace his batteries. The trick is, the BMS costs more than the batteries! I've pitched him my MUX'g BMS
    [​IMG]
    The X/Y gates are 1Amp dual mosfets configured like a SSR ($0.18/unit).

    Yup, this is one of those things the amateur overlooks (I did) and it's really critical to year round performance. The battery MUST stay between 50-120F (10-48C). Too cold, they won't give any juice, running a little too hot lowers the cycle life and a way too hot (>150F); the cells swell and that's the end of your pack.

    To keep the batteries happy, you need a closed insulated container. Above the insulation, but below the batteries, I put a thin (0.025) aluminum sheet (6061-T6) to which I zip-tied-and-glued an 42 watt thermostat driven soil heater. I hooked that to the charger line so if it gets too cold, it turns itself on while charging all night.

    On the cooling side, I use a fan connected by 95F (35C) thermal switch to the car's 12v system. I perforated whole in the bottom of my battery box for draining and ventilation on the bottom (goes through the aluminum sheet). This draws cool air through the entire box.

    Agree, fortunately, the duinmite mega has a VGA output, I will get a small 12v display and dump logs/data while I test drive. Once I'm done, I'll pull it.


    I think I will expand EV mode slowly, I'll start with the stock range, then add 5mph. Many others have done the stealth EV thing, so I should find out their results. This is realy two initiatives in one project... First, make a Prius run with a huge EV battery; second, how can I run it faster on EV only?

    Great feedback and keep me thinking!
     
    NortTexSalv04Prius likes this.
  4. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    One very important question: What tool are you using for diagramming? I like your pics! ;)
     
  5. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    It's just docs.google.com... I'm a lead software engineer / architect, so I do diagrams a lot.
     
  6. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    A WORD OF CAUTION.... The #1 cause of EV fires is BMS failure at 4AM when nobody is paying attention and a small short and plastic fire turns into a house burning down. So don't do my wild idea out of hand, take basic fire prevention precautions (steal case/fire resistant materials), test it a lot and out of limits. That's my plan.
     
  7. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Hey Bruce,

    Check out the online store at Olimex - looks like the DuinoMite eMega is out now (the PDF datasheet from the Mouser link lists it as coming soon). Also, it looks like it's cheaper to buy the eMega direct from their site (depending on shipping) - 40 eur = $50. Mouser lists the eMega at $68.

    I'm tempted to get one...

    Edit: Just ordered the eMega from Mouser. I'm intrigued by doing this in MM Basic. BTW, on the other page you link to an opensource "canduino" project. Sparkfun sells something for $45 but it has a bunch of widgets that you won't want: CAN-BUS Shield - SparkFun Electronics
     
  8. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    It doesn't have the first CAN bus exposed as well. But otherwise, yeah, it's better.
     
  9. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
  10. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Damn - I should've looked more closely. But I dare say I can make it work.
     
  11. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    Oh yeah, easily. The documentation says the first transceiver is on the board, I just can see where they pin'd it. The second I was just going to duplicate the circuit they provided (see the schematics). The pins to the C2TX/C2RX are still there, I think they're hijack'd for a serial port or something though. Worst case, you need a dremel. The basic language supports the first can for sure, the second has an I/O, but I'm not as confident.
     
  12. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Just ordered a Duinomite Mega locally from Dontronics in Australia. It comes with a case for AU$16.40 extra. Firstly i will set it up just for monitoring. I would like to see if you can install a second CAN that can be programmed with mmbasic. Good luck.
     
  13. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    I plan on using my DuinoMite eMega for monitoring/logging and I'll continue to use the Atmel for the bECU+ (what Bruce calls PHEV controller - which, I have to admit, is a way better name ;))

    Assuming I get it all working I might then invest $40 in the DM/Mega for a permanently mounted solution. Or I might try my hand at a custom hardware solution (because even the $40 DM/Mega has way more stuff on it than we need). But all that's a long way off yet... Too many choices!!!
     
  14. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    In all honest, I'm feeling lackluster on the tools for the dionomite, it reminds me of my Apple IIGS, very cool, now what do I do with it? I do think it will do what we want, but the tools are not what I'm looking for. I've written plenty of BASIC (I grew up in the town of it's invention; Hanover, NH). It's an awful language for low level.

    I will make a stab at writing on-chip, but I don't have high hopes it will do everything I need and I know it wont get written the way I'd prefer. I am very concerned that all the hardware functionality I'd like to use isn't available (interrupts, gate settings, etc) and I'll end up writing something that kinda works, but doesn't really.

    I do think that if I invest $1000 in the compilers and IDE, I'd be sitting pretty. But out a grand on something I won't use much.

    There are few platforms that have the power and I/O to handle bridging. The one's I like most (Atmel or Cygnal) just don't have it. They can do it, but not on a single chip and it would be messy; if I can't get the dionomite to work, I may try again with an two Arduions w/CAN drivers. it will be much more complicated hardware, but it can be done.

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

    I thought you could use C/C++ and the Arduino libraries with the duionomite? Using the penguino(sp?) ide? If that's so then those libraries are a little more capable. They're also open-source so you can modify them to add any capability you feel is missing.

    I'm interested to know why you think that Atmel processors aren't up to the job? The board I'm using is based around a 32-bit chip with two can ports and I'm expecting that it will handle the bridging just fine. Or do you mean that the ATMega2560 in particular? (that's the 8-bit chip on the Adruino Mega).

    However, CAN on the Prius is 500kbps and is probably less than 50% bus utilization so I wouldn't be all that surprised if the duinomite's BASIC interpreter could keep up. I'd be surprised if an ATMega2560 @ 16MHz wouldn't cut it.

    What am I missing? (I'm primarily a high level software engineer but I do have some low-level experience - so I'm always wary that I've missed something important!)
     
  16. jdh2550

    jdh2550 Co-Founder, Current Motor Company

    Joined:
    Nov 16, 2010
    317
    249
    0
    Location:
    Ann Arbor
    Vehicle:
    2005 Prius
    Model:
    N/A
    Bruce (and anyone else who's following a similar journey),

    If you have time then please check out this post YAPiP - recreating pEEf's approach | Page 8 | PriusChat

    I'm starting to dig into the meanings of the flags in the three CAN messages of most interest for ICE control: 038, 348 and 3C8.
     
    NortTexSalv04Prius likes this.
  17. Bruce Meacham

    Bruce Meacham 2005 Prius/Enginer 4kwh and BMW EV conversion

    Joined:
    Jun 17, 2012
    45
    8
    0
    Location:
    Kansas
    Vehicle:
    2005 Prius
    Model:
    N/A
    I'd love to be wrong here; but PIC is a very different instruction set, so, I think not. The other "mite" boards do have that capability, but they are atmel(?) based.

    I should have stated the Arduino, but I said Atmel, which isn't fair. The Atmel line is very robust and a good choice for this solution as well.

    I revere your work on the message decoding. You are saving me a ton of guess work. From what I glean, I'll still intercept 038.B0.b3 in EV mode, pass everything else both ways.

    I've refined my "BMS" system as such... It's combination balancer and v-split detector
    [​IMG]
    The zener will have to be tightly matched (tested and returned). It would be much easier to match if I could use pairs, but I can't find power zeners at 1.8v. 3.3 is the smallest in this series. But the cost for this system would be under $100.

    For detection, I'm looking at Lee Hart's "Batt Bridge".

    Watch this YouTube on the batt bridge

    Any thoughts or critique?
     
  18. lopezjm2001

    lopezjm2001 Senior Member

    Joined:
    Apr 14, 2009
    1,146
    407
    5
    Location:
    Sydney Australia
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    My Duinomite Mega is ready to go. Done the basic programming using Dmbasic2.7B to just print the received CAN messages to my Lillyput VGA screen. Just plug it into my OBD2 connector. Will see what happens. Cross my fingers and toes.
     
    jdh2550 likes 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
    I'm holding my breath to hear the results....
     
  20. lopezjm2001

    lopezjm2001 Senior Member

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

    You can rest easy. WOW!!! It works. My Frankenstein is alive!!! It scrolls really fast over the screen. I took a photo and video and will post later. I had to disconnect the Canbus to stop the scrolling so I could read the data. Fantastic. I had to use a separate VGA monitor as the Lillyput screen was wired into the Canview. Next step is to write basic code to filter out the Canbus messages I want and log them to my microSD card.

    Here is a shortcut to my YouTube video of raw Canbus data on my big LCD screen.

    YouTube - Raw Canbus Video.
     
    NortTexSalv04Prius likes this.