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

Enginer PHEV automatic over/under voltage protection

Discussion in 'Prius PHEV Plug-In Modifications' started by Daox, Jan 6, 2010.

  1. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    I've started talking to a robotics guy I know from the local EV club about how we can use the balancer's warning to trigger some sort of pack disconnect. IMO this is pretty simple thing to do and can be done without cutting anything, and very minimal rewiring. I'm just not an electronics guru, so I need help to put it all together.

    My current thought is to use a simple VOX circuit (microphone activated switch) that is triggered by the buzzer on the balancers. The VOX circuit will feed a signal to a programmable micro controller (the arduino is what I'm familiar with and its cheap). The micro controller will then control a relay to disconnect the pack from both the charger and dc to dc converter. This allows protection from both over and under voltage.

    Once the pack is disconnected, we need to reconnet it somehow. But, with the arduino, we can do pretty much anything with it. We could wait an hour then reconnect the pack, hoping that the balancers have pulled the high cell back down and continue to top off the pack. As soon as the buzzers go off again, it would disconnect for another hour. Another alternative is that we could wait for a manual signal from the user to connect the pack again. This signal could be from another switch added up in the dash area, or even from turning the phev system of and back on (this would require tapping into the phev switch). At that point, the pack would be reconnected and ready to go.

    The setup would cost less than $50.

    The drawbacks of course are you are stuck with the balancer's set voltage points. Personally, I'd like to adjust them a little bit. However, this is a quick fix and I'm hoping Enginer eventually comes up with something on their own.

    Thoughts?
     
    1 person likes this.
  2. ericbecky

    ericbecky Hybrid Battery Hero

    Joined:
    Mar 12, 2004
    4,379
    3,238
    1
    Location:
    Madison, Wisconsin
    Vehicle:
    2005 Prius
    Model:
    Two
    If it is activated via an audio signal, is there any issue of other audio tones inadvertently tripping the audio activation. (The stereo, a bang when closing the hatch, the backup beeps, etc.)
     
    1 person likes this.
  3. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    True, that is a possible problem. You might have to hit a reset switch to get the pack to reconnect. Or, the sensitivity of course could be adjusted with the circuit posted. Another alternative is with the arduino you could even program it to ignore other noise and have the mic only listen for the beep. I think this is probably overkill. I think if you have noises as loud as those buzzers going off in the case, you have other problems. :)
     
    1 person likes this.
  4. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    I ordered the VOX circuit this morning. The current plan is to just deal with charging. This seems to be the area where we are having most of the problems due to charging unattended and not being able to hear the balancer buzzers going off.

    I am thinking that I will make an additional box that goes between the charger and the wall. Inside the box is the VOX circuit, arduino, a wall wart (for 12V power), and a solid state relay. There will be leads going to the inside of the phev box to the microphone. Since we aren't charging on the go, sound won't be an issue. When the balancers go off, it cuts power to the charger. Pretty simple. Once the charger is unplugged, the arduino powers down and it operates as normal.

    I'll keep this thread updated as I build it.
     
    2 people like this.
  5. banshee08

    banshee08 Member

    Joined:
    Aug 7, 2009
    284
    72
    0
    Location:
    El Monte, CA USA
    Vehicle:
    2010 Prius
    Model:
    II
    Instead of using the balancers to trigger you cut off relay. You can use this Cell Log 8S. It has an alarm output lead to trigger external alarms. I am currently using this to monitor my cells while I am driving and it works great. And it logs my voltage difference for later analysis.

    CellLog is releasing! - RC Groups
     
    1 person likes this.
  6. ericbecky

    ericbecky Hybrid Battery Hero

    Joined:
    Mar 12, 2004
    4,379
    3,238
    1
    Location:
    Madison, Wisconsin
    Vehicle:
    2005 Prius
    Model:
    Two
    Looks interesting.
    Rather than trying to sift through the 15 pages of posts, could you please tell us the price? I went to the web site of the mfg, but never found an actual price listed.
    Here's a direct link to the product on the mfg's web site:
    http://www.jun-si.com/EnProductShow.asp?ID=96
     
    1 person likes this.
  7. banshee08

    banshee08 Member

    Joined:
    Aug 7, 2009
    284
    72
    0
    Location:
    El Monte, CA USA
    Vehicle:
    2010 Prius
    Model:
    II
    I got 4 of them for my 8kWh pack. They were like $30 plus shipping straight from China. Here is where I bought them at.

    HobbyKing Online R/C Hobby Store : Cell-Log Cell Voltage Monitor 2-8S Lipo $27.98
     
    2 people like this.
  8. dan2l

    dan2l 2014 Prius v wagon

    Joined:
    Nov 26, 2009
    654
    263
    5
    Location:
    Vancouver Wasington
    Vehicle:
    2014 Prius v wagon
    Model:
    Five
    Hi Doax,
    I have become tuned into the charging process well enough to be watching when it is approaching shut down. I am getting various beeps and alarms from the balancers. I am guessing that about 1/2 the beeps should be corrilated to a shut-down and the other 1/2 are false alarms. How will your system know a real alarm from a false alarm?

    If you do not know if the alarm is real or false, but shut down on all alarms, then you will not know the SOC on the batteries. I would be conserned about restarting the charger on a full battery. The charger comes on pumping out full power and then takes some time to figure out to turn off.

    If you have one cell at 3.75v and all the others at about 3.5v then it only takes about 5 minutes at 15.5a to put the 3.75v cell up to 4.0v where it may be dammaged. So one start of the charger on a full battery pack is probubly OK, but I would never want to do it two times.

    Thanks,
    Dan Lander
     
    1 person likes this.
  9. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    Well, I may or may not complete this project if Jack comes out with the new balancer that controls the dc to dc and charger.

    In any case, there would be no way to differentiate between false and true alarms with this setup. However, if you start up the charger and the alarm goes off again, it simply shuts it down again. So, no worries there.

    BTW, how do you qualify a false alarm?
     
    2 people like this.
  10. dan2l

    dan2l 2014 Prius v wagon

    Joined:
    Nov 26, 2009
    654
    263
    5
    Location:
    Vancouver Wasington
    Vehicle:
    2014 Prius v wagon
    Model:
    Five
    Hi Doax,
    I push the button on the balancer before turning off the charger. As it rolls through the cells, the alarming cell (in my case #5) says 5 3.75H. Also the "d 0.020" number was up at 200mv-300mv. If it is a false alarm the readings will be normal and the charger stops beeping very quickly. I think it gets a false high reading and the alarm goes off, but then it corrects the reading quickly. A real alarm keeps beeping and will drive you crazy while you are trying to figure out which cell it is.

    Thanks,
    Dan
     
    1 person likes this.
  11. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    Interesting. I could program the arduino to watch for situations such as these. Say, the alarm must beep 5 times before it cuts power to the charger.
     
    1 person likes this.
  12. pbui

    pbui Member

    Joined:
    Dec 9, 2009
    190
    13
    1
    Location:
    Los Gatos, northern CA
    Vehicle:
    2004 Prius
    Model:
    N/A
    Thanks for the awesome tip on this product. Because each cell voltage is logged; you can really tell the cell health status, charge capacity. In a serial pack, the pack total capacity is its weakest/lowest capacity cell.

    and the external relay can easily be connected to a single 48v DPDT relay to turn off the charger and converter.

    thank you !:D
     
    1 person likes this.
  13. banshee08

    banshee08 Member

    Joined:
    Aug 7, 2009
    284
    72
    0
    Location:
    El Monte, CA USA
    Vehicle:
    2010 Prius
    Model:
    II

    I am no electronics expert. But if anyone comes up with a relay design to cut off the charger or converter please let us know. I currently have the alarm lead going to a brighter LED to inform me of the alarm. These things work great but you need to read through the thread to make sure meter is not only using power from cells 1 ~ 6. I have not done the mod which involves connecting two leads on the circuit to pull power from cell 7 and 8 also. Also make sure to update the firmware for the sleep functions.
     
    1 person likes this.
  14. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    Unfortunately, once you get the alarm signal you have to have some logic behind what to do with it. Do you want it to disconnect the charger until you hit a button? Do you want it to turn off for 30 minutes? If you just hook it up directly, it will turn off the charger until the alarm stops sounding, then it will turn the charger on again. This is why I am using the arduino. Once I get this circuit setup, it would probably work just fine with your cell monitor's alarm. You just would hook it up where my vox circuit would normally connect to.

    There are simpler ways of doing this with specialized chips. I just don't know how to do that. Plus, the arduino isn't expensive and you can do a lot more with it if you want.
     
    1 person likes this.
  15. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    I started and mostly finished the coding for the arduino during lunch today. I added a lot of comments (everything after the //) so hopefully someone other than me can understand how it is operating.

    If it is complete gibberish I can type out how it is working.



    /*
    PHEV Automatic Charger Disconnect
    This program monitors a signal from an alarm. Upon
    getting a verified signal that the alarm is going off,
    the Arduino disconnects power via a relay.
    */

    const int AlarmPin = 1; // pin to monitor alarm signal
    const int RelayPin = 2; // pin to signal the relay
    int AlarmPinStatus = 0; // relays AlarmPin status
    boolean RelayPinStatus = true; // RelayPin on/off
    boolean AlarmCheck = false; // makes sure alarm goes off before counters can increment again
    int AlarmCounter = 0; // counts alarms to verify true/false alarm
    unsigned long LastAlarmTime; // time since the last beep
    unsigned long ChargerOffTime; // time since the charger was turned off


    void setup() {
    pinMode(AlarmPin, INPUT);
    pinMode(RelayPin, OUTPUT);
    digitalWrite(RelayPin, HIGH); // turn relay on
    }

    void loop() {

    AlarmPinStatus = digitalRead(AlarmPin); // read AlarmPin status

    if (AlarmPinStatus == HIGH && AlarmCheck == false) { // check for alarm & alarm check
    ++AlarmCounter; // increment alarm counter
    LastAlarmTime = millis(); // set last beep timer
    AlarmCheck = true; // prevent AlarmCounter increment until alarm turns off
    }
    if (AlarmPinStatus == LOW) { // verify alarm is off before counters can increment again
    AlarmCheck = false;
    }
    if (millis() - LastAlarmTime > 20000) { // if it has been more than 20 seconds since the last beep
    LastAlarmTime = 0; // reset last beep timer
    }
    if (AlarmCounter = 15) { // if alarm has gone off 15 times within 20 seconds
    AlarmCounter = 0; // reset AlarmCounter
    digitalWrite(RelayPin, LOW); // turn charger off
    RelayPinStatus = false;
    ChargerOffTime = millis(); // set charger off time
    }
    if (millis() - ChargerOffTime > 3600000 && RelayPinStatus == false) { // wait 60 minutes with charger off
    digitalWrite(RelayPin, HIGH); // turn charger back on
    RelayPinStatus = true;
    }
    }


    Wow, thats really messy and hard to read on a forum...

    In any case, that part is pretty much done.
     
  16. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    Well, timing is going well. I received the VOX circuit tonight. The kit is pretty small, so I went ahead and soldered it up tonight.

    Kit and contents.
    [​IMG]




    The assembled kit. I must say, the kit is pretty straight forward, but there are no step by step instructions. So, you really have to be careful about getting things in the right place (only had to move one item I had soldered down), and getting polarity right and things like that.
    [​IMG]




    Its getting late for me (wake up at 4am for work blah), so I'll do some testing later this week. I'll get some video and adjust it or something.

    I'll be going to the local EV build this weekend. At that point I'll be picking up a solid state relay from a member of the group.
     
    2 people like this.
  17. brad_rules_man

    brad_rules_man Hybrid electric revolutionizer

    Joined:
    Jul 5, 2005
    716
    76
    0
    Location:
    Effingham
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Daox, thanks for your constant pursuit of improvement. I think you are the one that Eric was talking to me about. Thanks to you, some of my own ideas and challenges might be met. :)
     
  18. Daox

    Daox Member

    Joined:
    May 19, 2009
    196
    58
    0
    Location:
    US, Wisconsin
    Vehicle:
    2004 Prius
    Model:
    N/A
    Thanks for the kind words Brad.

    I've also been thinking about how to automatically disconnect the dc to dc converter and I think I have it figured out. The idea is to tap into the ethernet line that goes up to the switch up front. This can be done with connectors so install is very easy and no wire cutting is necessary. The switch up front sends a 12v ready signal to the dc to dc converter. I will use that 12V to power the arduino and another relay. The relay will disconnect 12V power after the arduino thus keeping power to the arduino, but cutting it to the dc to dc converter. This will also prevent the arduino from drawing 12V power while the car is off. Thusly, if you turn the PHEV switch up front off, the arduino will power down. When you turn it back on, it will restart the program canceling the 60 minute timer currently built in to the program.

    Thoughts?
     
    1 person likes this.
  19. brad_rules_man

    brad_rules_man Hybrid electric revolutionizer

    Joined:
    Jul 5, 2005
    716
    76
    0
    Location:
    Effingham
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Yeah, I have a few thoughts. I had to re-read everything twice to make sure I was absorbing everything!

    So, if arduino can only be on if the car is on, so do you need it while charging? I hope I didn't over simplify it. I see everything your doing and it seems like it would be an excellent set up for driving when you cannot hear it, and see the led. If it were me, I would hope it wouldn't trip very often. So I would just set it up to shut off for 30 minutes and balance out/cool off. Then it should be fine when it comes back on and if it isn't, it will trip again. hehe

    However, Now I'm realizing that this was for charging, because the other sounds could be interfering with that microphone circuit. So, ... I just wonder if it'd be better to find a way to trigger the necessary relays by opening up the balancer and find a way to unsolder the speaker and find a way to make that current trigger the relay... or maybe hard wire it to the microphone wire giving it some sort of direct input? I know it sounds ridiculous especially with so many balancers.

    You may never ask for my thoughts again, lol they are very scatter-brained.

    Just keep us in your train of thought. You probably have way better ideas. lol
     
  20. brad_rules_man

    brad_rules_man Hybrid electric revolutionizer

    Joined:
    Jul 5, 2005
    716
    76
    0
    Location:
    Effingham
    Vehicle:
    Other Hybrid
    Model:
    N/A
    For the record, my original idea was to use a baby monitor, but it isn't automated. I would still have to be around or conscious of the car.