ElectricMotorcycleForum.com

Makes And Models => Zero Motorcycles Forum | 2013+ => Topic started by: Keith on July 13, 2017, 05:14:19 AM

Title: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 13, 2017, 05:14:19 AM
I'd like to be able to check the state of charge of my packs while they are off the bike. Doing that would require getting the contactor to close and using a voltmeter. I've been through the wiki and searched this forum but I can't find anything specific for the modular pack enable logic. Charging off bike is done with a simple connection to the QuiQ that is just three wires, V-, V+ and enable. The adaptor also has a jumper that must be present or the contactor will not close. Measuring the enable wire during charging shows about 1V above V- when connected and charging and about 3.5V if not connected to the pack. Ideally I'd like to convince the pack to close the contactor with a passive circuit. That would be a just a SB Smart connector with a connection for a voltmeter. But I'm guessing that the DeltaQ sources current on the enable wire that the pack pulls down to begin charging. Maybe a small battery and resistor could supply that current?

Here's a picture of the power pack adaptor wiring, I'm thinking of modifying that to allow a voltage check. I have four packs, so at times I may have three on the shelf and one in the bike. It is not convenient to shuffle the packs on and off the bike just to get charge levels, so a quick way to read voltages would be great. I could get a rough idea from the BMS LEDs but that requires removing the plug to press a reset button every time. And it only reads 25%, 50%, 75% and 100% levels, too coarse for my purpose. If the pack needs to see charging voltage then I don't think this idea is practical, but hopefully if can be done simply. Does anyone know how? I can do some trial and error but this seems like a simple question.
Title: Re: Single Brick off bike Pack SOC tester
Post by: Doctorbass on July 13, 2017, 06:29:50 AM
If you only want to see voltage to give you a great idea of the SOC then i think one of the two main pins( i dont remember if neg or pos) and one of the small pins on the signal ping row near right will give you directly the pack voltage.
Doc

Zero work with "BMS enable" pins and "throttle enable" or "throttle engage" signal pins to activate or not the bike or battery or bms.

Doc
Title: Re: Single Brick off bike Pack SOC tester
Post by: Keith on July 13, 2017, 07:43:55 AM
The most voltage I could find is 12V from P1 to V-. About 3V to V- on some other pins. It seems like the contactor needs to be closed first. Or maybe some other condition to enable high voltage?
Title: Re: Single Brick off bike Pack SOC tester
Post by: Doctorbass on July 13, 2017, 11:41:27 AM
The most voltage I could find is 12V from P1 to V-. About 3V to V- on some other pins. It seems like the contactor needs to be closed first. Or maybe some other condition to enable high voltage?

No, contactor dont need to be closed to see voltage of the pack. the pack voltage is present on one of teh NEG or POS and one of the little pins i'm 100% sure as i tested that

Doc
Title: Re: Single Brick off bike Pack SOC tester
Post by: Keith on July 13, 2017, 07:07:56 PM
I found it! That pin is very corroded on my packs, black in color, so dark that I thought it was not installed, invisible against the black plastic housing. It is S1, the top left female contact, opposite the V- contact. Maybe that corrosion is part of my isolation issues. So, now that I know, checking voltage is very simple, nothing to build just probe the right pins. Thanks Doc!

But I would like to be able to close the contactor. That would make it possible to use the packs to drive an inverter, much handier than using a generator during a power outage. I don't know if anyone has done that with these packs, but I've seen comments that suggest it is possible by feeding an inverter with the high voltage DC at the point before AC conversion is done. I've looked but have not found an inverter that is designed for ~100V DC input.
Title: Re: Single Brick off bike Pack SOC tester
Post by: Doctorbass on July 13, 2017, 07:27:41 PM
Add dielectric grease to all pins that you see corrosion! this will save you alot of problem.

Doc
Title: Re: Single Brick off bike Pack SOC tester, close contactor?
Post by: Keith on July 13, 2017, 09:56:48 PM
OK, I've done it, got the contactor to close. As I suspected a battery and resistor on the enable wire does the trick. Here's a diagram for those who are interested.

I've been using dielectric grease on these connectors. Interesting that the high voltage affects corrosion, the other pins look fine.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: BrianTRice@gmail.com on July 13, 2017, 10:57:02 PM
Nice. I've added this to http://zeromanual.com/index.php/Advanced_Modifications#Charging_Off_Bike (http://zeromanual.com/index.php/Advanced_Modifications#Charging_Off_Bike)
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 14, 2017, 12:35:31 AM
I happened to see that in the manual just as I was telling a friend about it, thanks Brian. I have to say it is a thrill to light up a 100W bulb from a pack and know it will stay lit for a long time. I also like the work you did on the charging options table, very nice.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 14, 2017, 07:02:09 AM
Here's how to measure the voltage and get a rough conversion to state of charge. The graphs are approximate, derived from MBB log file data.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Cama on July 14, 2017, 12:11:54 PM
Here's how to measure the voltage and get a rough conversion to state of charge. The graphs are approximate, derived from MBB log file data.

Thanks for sharing your knowledge, Doc and Keith.

Is the link between voltage and state of charge different from 2 brick to 4?

My 4 brick (Zero SR 2016) is @ 88,8 V by 0 % stafe of charge.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on July 14, 2017, 09:04:16 PM
Here's how to measure the voltage and get a rough conversion to state of charge. The graphs are approximate, derived from MBB log file data.

Awesome!

But isn't there a difference between voltage under load and voltage when charging? I think the chart should have two lines.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 14, 2017, 10:48:50 PM
Maybe two lines isn't enough! The red line is this morning's very careful attempt to get super accurate data. No load, no charge current, identical conditions. I started with a single full pack and stopped every time the dash indicator dropped by 5%. Left the bike on, verified the dash display, read the voltage at the external charge connector twice, wrote down the reading and rode the next 5%. Took it down to 0% and rode some more. 22 data points with 4 digit accuracy. Except it isn't that simple. I'll get the log files of this ride and subsequent charging and scratch my head some more later.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on July 15, 2017, 12:10:36 AM
Maybe two lines isn't enough! The red line is this morning's very careful attempt to get super accurate data. No load, no charge current, identical conditions. I started with a single full pack and stopped every time the dash indicator dropped by 5%. Left the bike on, verified the dash display, read the voltage at the external charge connector twice, wrote down the reading and rode the next 5%. Took it down to 0% and rode some more. 22 data points with 4 digit accuracy. Except it isn't that simple. I'll get the log files of this ride and subsequent charging and scratch my head some more later.

Awesome!  Thank you!

A cluster of lines in a chart representing different discharge and charge conditions would be most informative.  I've had the biggest SoC drifts when I've had a variety of riding conditions and partial charges, definitely constant highway driving draws with a very differnt level of accuracy vs stop and go or mountainous twisties, but I haven't been able to coorelate.  Thank you so much for your systematic approach, and for sharing the results.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 15, 2017, 06:57:49 PM
Here is all of the glorious voltage data from my MBB and BMS logs during my test ride and charging. Conditions are a single pack, 2016 FX, riding between 5% SOC dash increments from 100% to 0%, and charging at 18 amps. Note that the dash SOC display does not match the log SOC numbers as can be seen in the stopped points. MBB, BMS and DVM voltages agree closely. This was done in sport mode. I am surprised by the amount of regen shown in the battery amps but the test was done on mountain twisties. I now think that the slight rise in voltage seen at lower SOCs is probably due to the raised pack temperature. So a more accurate voltage to SOC conversion table for off bike stored packs would require controlling the pack temperature for each measurement.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on July 15, 2017, 11:24:59 PM
Here is all of the glorious voltage data from my MBB and BMS logs during my test ride and charging. Conditions are a single pack, 2016 FX, riding between 5% SOC dash increments from 100% to 0%, and charging at 18 amps. Note that the dash SOC display does not match the log SOC numbers as can be seen in the stopped points. MBB, BMS and DVM voltages agree closely. This was done in sport mode. I am surprised by the amount of regen shown in the battery amps but the test was done on mountain twisties. I now think that the slight rise in voltage seen at lower SOCs is probably due to the raised pack temperature. So a more accurate voltage to SOC conversion table for off bike stored packs would require controlling the pack temperature for each measurement.

Oh, this is awesome. Thank you so much. Did you use any spreadsheets or scripts to collate log info, and can you share them?

I notice the 90v with still fairly high reported SoC in your riding graph. Did you run out of juice? Is that a case of SoC inaccuracy, do you think?
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 16, 2017, 01:02:25 AM
This is a quick and dirty spreadsheet but why not share https://docs.google.com/spreadsheets/d/1zHsNWRYzPgohigwvZqp1881x9xyLLXoOs1yElWzPCnM/edit?usp=sharing
It has fragments of log files and hand entered measurement numbers but maybe it shows something about how I did it.
The lowest riding voltage I saw was 94.8. I rode about 5 minutes with the dash at 0%. Torque was very limited, very noticeable above 20mph but the bike never stopped. I had never been below 7% before, this was just for the test.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 16, 2017, 05:10:51 AM
I'm considering changing my pack charging and storage routines based on the revised Zero recommendations and general battery wisdom about not charging fully unless necessary. It is very convenient and easy to just plug in the bike or externals, let them charge to 100% and forget it. But that leaves my extra packs stored at full 100% charge and stressed when they don't need to be. So now that I know how to control the contactor it shouldn't be too hard to design something that can automatically stop charging at some lower preset level, maybe 60 or 80%. Perhaps the same gadget could also check for too low of a charge while stored and alert or even add some charge. I'm still thinking about the possibilities but this seems like it might be worth the effort. Or not, maybe I won't be using these packs at all in 4 years. Manually stopping the charge short of full or draining and not charging isn't too difficult. And a simple AC timer could also do much of this charge management without further attention. But doing it that way would take some thought and planning and remembering every time so back to the gadget idea. Maybe one gadget could manage multiple packs and chargers too. Food for thought...
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on July 16, 2017, 11:04:19 PM
Thanks for helping me with a similar problem. I would like to use a single pack in a go cart, but couldn't get the contacter to engage, so I've been bypassing the BMS system while testing. Not something I like doing. So now I have a couple of questions: when I do this, is the Bms still active? Will it disconnect when battery is fully charged/discharged? And where can I buy the Anderson connectors I need to connect the battery to the Go cart? And lastly... is there a pin diagram on the packs? Thanks!


Sent from my iPhone using Tapatalk
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 16, 2017, 11:46:13 PM
Well I can't say for sure, but I think so. The fake enable signal is the same as what comes from the QuiQ chargers. The contactor stays closed when they stop charging but I assume the BMS is involved, it does wake up and show charging activity and charge level on the LEDS, but I'm not sure if it really stops the charging or if that decision is done by the charger. I'm going to do some more investigating to see what happens with charging on the bike and controlling the enable line. I do notice that the BMS logs don't say much about QuiQ charging so there's that.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on July 17, 2017, 11:25:35 PM
I'm considering changing my pack charging and storage routines based on the revised Zero recommendations and general battery wisdom about not charging fully unless necessary. ... automatically stop charging at some lower preset level, maybe 60 or 80%. ... Food for thought...

For an electronics guru, it might be fairly straightforward to set up a circuit that closes a relay with a momentary switch and opens it when it hits a particular voltage.  I'm thinking a flip flip, a transistor, and a zener diode would be most of the circuit...
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 18, 2017, 11:13:34 PM
Quote
it might be fairly straightforward to set up a circuit that closes a relay

I'm sure I could design a circuit like that and it might be the best approach but those components probably cost more than a single board computer today. Since the enable line is just a low current logic signal, no relay is needed. The voltage can be measured very accurately with an ADC and you could easily change the cutoff set point. The tradeoff between sbc computer and a simple hardware design approach might be mostly about design time rather than parts cost, but a software based solution would probably cost less and could certainly do more.

I did some testing today to make sure the contactor can be controlled with packs on the bike charging while externally. I found no surprises, opening the enable line during charging causes the contactors to open and charging stops. The same battery and resistor enable connection works at the external connector. Charging will not resume after stopping the enable unless the key is cycled. The key must always be switched on to close contactors and begin external charging but the key can then be turned off. That differs from the pack behavior off bike since they will close the contactor whenever an enable signal is provided.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on July 19, 2017, 03:06:25 AM
I'd be tempted to adapt this circuit.

Obviously the 4.7k zener would have to be something like the target voltage, 112v? 114v?  Can you stack zeners to get the value you want?

Also you'd have to get components tolerant of the higher voltages and Power FETs capable of the current.  And some fuses, and probably some LEDs and resisters so you know what's going on.

Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on July 19, 2017, 08:05:13 AM
I have ordered the parts to try this design. Just add a little code, I hope.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: togo on August 28, 2017, 10:41:57 PM
I happened to see that in the manual just as I was telling a friend about it, thanks Brian. I have to say it is a thrill to light up a 100W bulb from a pack and know it will stay lit for a long time. I also like the work you did on the charging options table, very nice.

A cool test, but I don't recommend seeing how long it will stay lit.  Light bulbs will drain well below safe minimums for lithium batteries.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on August 29, 2017, 02:02:46 AM
I ran a 1500W oil radiator heater for a while just for fun. I learned that 110V DC is very different stuff than 110V AC. I noticed an arc when I switched the heater power level, blue spark inside the switch. Interesting! But it still surprised me when I unplugged it while it was drawing 13 amps of DC. BIG ARC! WOW :o Every time. That little spark you see when disconnecting AC is nothing, this is a BIG SPARK! So that's why a lot of switches and relays are rated for lots of AC current and voltage but much less for DC. I'd seen those ratings but now I've seen the Reason. For those who doubt here's a video https://www.youtube.com/watch?v=Zez2r1RPpWY (https://www.youtube.com/watch?v=Zez2r1RPpWY)
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on August 30, 2017, 11:45:28 PM
Quote
A cool test, but I don't recommend seeing how long it will stay lit.  Light bulbs will drain well below safe minimums for lithium batteries.

I'm doing more testing now. I found that the enable line trick does not work when the pack is not fully charged. I don't know the cutoff point, but a 102V pack charge would only keep the contactor closed for about 30 seconds before opening, while driving that 100 watt bulb. I've got my Arduino running the enable line now and it works fine keeping the contactor closed for about three hours now, dropping from 116 down to 111V. My point is that the BMS is looking out for the pack so it should be safe regardless. But if the voltage gets down to 96V, and if my code is correct, the Arduino will shut it off then. But I'll keep an eye on it! I've got a serial port log so I should get a number for a BMS cut off if it happens.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on August 31, 2017, 03:33:14 AM
Contactor opened after about 4 hours closed, 108V, 6 hours since full charge, did a few code edits. After opening, contactor would then not stay closed for a minute on restarts. Put the pack in the bike, read 79% SoC, went for a quick ride, now it is happy driving the 100W bulb again. For how long? kWhs used is about right but of course my "load" is not really constant power. Would I need CAN bus to convince the BMS to stay closed for longer? I'll look at the logs later, wonder what mode the BMS is in, 2 second flash code is for charging according to the Zero owners manual. So it waits 4 hours to get some charge current and then gives up?

Huh, stopped after half an hour. Seems very dependant on SoC.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Shadow on August 31, 2017, 04:20:53 AM
30-minute timeout is normal, and is reset by closing throttle. There's a way to signal the bike to stay in charging mode using AUX port signal lines.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on August 31, 2017, 05:55:34 AM
I guess you mean using settings by serial com to the OBD connector, right? Maybe this: ov_chg_dis Override charger disable? I could but for now I'm doing my tests with FX packs off the bike so no communication is possible unless I connect directly to the BMS, maybe I will someday, I haven't found a suitable connector for that. I did see 30 minutes mentioned in the unofficial manual contactor section but so far from 80-100% SoC the timeout is 4 hours. I'm now testing with a much heavier load (1600W) to see if that makes a difference. Is it time or SoC that caused the 4 hour open event? Not SoC, it is now down to 104V after 50 minutes and still closed.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on August 31, 2017, 08:49:03 AM
Discharge was stopped by Arduino after one hour and forty minutes discharging at 1600W, went from 100% to 32%SOC, no timeout occurred. Nothing to see in BMS log, shows key off, entered charging state, entered idle state after 1:40. So off bike rapid discharge using enable pullup works fine as long as pack is fully charged to start. If I could find a 100VDC inverter...

Just to gripe, I was unable to get battery logs in three tries with current app, progress bar froze. Used a very old app version to get them.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on August 31, 2017, 12:44:57 PM
I'm queues, how do you read the BMS log? Can you connect to the BMS board directly? Do you know if the contactor pre charges before closing, when you use the pull-up method?


Sent from my iPhone using Tapatalk
Title: Re: Single Brick off bike Pack SOC tester, close contactor, INVERTER WANTED
Post by: Keith on August 31, 2017, 06:26:04 PM
I'm getting BMS logs using the Zero App (with difficulty >:() and decoding with the online parser. I've seen that Dr. Bass connects directly to the BMS but it requires a special cable. I'm not sure about precharge but I don't think it matters on closing. I am a little worried about opening under load, that might hurt the contactor so I plan to switch AC loads (post inverter) off before removing the enable. This is all academic unless I find a suitable inverter for the 96-116VDC input range, no luck so far. But I can run DC loads like light bulbs and heaters! Here's the full BMS log from my 1.6kW test. It doesn't even mention that the contactor opened due to removal of the enable.

Code: [Select]
09287     08/30/2017 18:38:54   Charged To Full            002 AH, SOC: 89%,         L:4027,         H:4030, B:003, PT:031C, BT:042C, PV:112769
 09288     08/30/2017 19:09:33   DEBUG: Switching to voltage SOC mode. SOC: 100%, VSOC: 100%, Ihall: -1605mA, Iext: 0mA   
 09289     08/30/2017 19:09:52   SOC adjusted for voltage   old:   173418uAH (soc:100%), new:   0uAH (soc:100%), low cell: 4147 mV
 09290     08/30/2017 19:10:57   Key Off   
 09291     08/30/2017 19:10:57   DEBUG: Entered Idle State   
 09292     08/30/2017 19:11:03   Current Sensor Zeroed      old: 2522mV, new: 2521mV, corrfact: 235
 09293     08/30/2017 19:11:04   Discharge level            000 AH, SOC:100%, I:000A, L:4130, l:4130, H:4133, B:003, PT:032C, BT:041C, PV:115693, M:Idle
 09294     08/30/2017 19:11:08   Key Off   
 09295     08/30/2017 19:11:08   DEBUG: Entered Charging State   
 09296     08/30/2017 19:11:08   Contactor was Closed       Pack V: 115722mV, Switched V: 0mV, Prechg Pct: 0%, Dischg Cur: 0mA
 09297     08/30/2017 19:11:08   Contactor drive turned on  Pack V: 115722mV, Switched V: 0mV, Duty Cycle: 34%
 09298     08/30/2017 19:11:09   SOC adjusted for voltage   old:   0uAH (soc:100%), new:   0uAH (soc:100%), low cell: 4117 mV
 09299     08/30/2017 19:11:09   Discharge level            000 AH, SOC:100%, I:006A, L:4117, l:4133, H:4121, B:004, PT:032C, BT:041C, PV:115344, M:Charge
 09300     08/30/2017 19:11:13   SOC adjusted for voltage   old:   0uAH (soc:100%), new:   0uAH (soc:100%), low cell: 4115 mV
 09301     08/30/2017 19:20:10   SOC adjusted for voltage   old:   0uAH (soc:100%), new:   2340000uAH (soc:91%), low cell: 4027 mV
 09302     08/30/2017 20:51:29   Key Off   
 09303     08/30/2017 20:51:29   DEBUG: Entered Idle State   
 09304     08/30/2017 20:51:35   Current Sensor Zeroed      old: 2521mV, new: 2519mV, corrfact: 237
 09305     08/30/2017 20:51:35   SOC adjusted for voltage   old:   2340000uAH (soc:91%), new:   16900000uAH (soc:35%), low cell: 3577 mV
 09306     08/30/2017 20:51:36   Discharge level            016 AH, SOC: 35%, I:000A, L:3578, l:3578, H:3584, B:006, PT:033C, BT:038C, PV:100238, M:Idle
 09307     08/30/2017 20:51:59   Voltage Across Contactor: 100458mV (Okay)
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on September 01, 2017, 12:12:41 PM
I planed to use cheep eBay parts, for my first setup. Going from a 54v panel to a zero battery. From there to a 12v 200ah Thundersky battery, and from there to 220ac and 5v D.C. Not the most efficient way, but a way to get started. But the first step up crept overheating, and finally it blow up. But now I'm planning to use two zero batteries in series, and run a switch mode charger directly from there. And a D.C. D.C. Converter to a 12v battery. Making 220vac and 5vdc. This will make it possible for me to charge all my Ev's from the battery, without a executive 220vac inverter. What do you think?


Sent from my iPhone using Tapatalk
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on September 01, 2017, 12:14:53 PM
Sorry for the auto "correct ".... ;)


Sent from my iPhone using Tapatalk
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Keith on September 01, 2017, 06:39:50 PM
Two Zero batteries in series might be a good idea, I am considering it but probably for the inverter source. So far it doesn't look like the Zero Quiq chargers that  I have will run on DC, I know other chargers will. I wonder if your 12v battery will supply enough power.
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on September 01, 2017, 07:11:42 PM
I think diginow has a charger that might work. ;) the 12v battery is just a buffer. The plan was just to run the garage/office, witch only has a small 220v consumption. My main draw comes from charging my Ev's. and this way I can make a mean fast charger.


Sent from my iPhone using Tapatalk
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: Shadow on September 01, 2017, 11:49:34 PM
I think diginow has a charger that might work. ;) the 12v battery is just a buffer. The plan was just to run the garage/office, witch only has a small 220v consumption. My main draw comes from charging my Ev's. and this way I can make a mean fast charger.
I'd heard DC input for DigiNow SCv2 would be detected by firmware and shut the unit down as a safety measure. There's no published results nor support for this functionality based on what is known about the modules and the DigiNow SCv2 product. Are you suggesting that you've tried this successfully?
Title: Re: Single Brick off bike Pack SOC tester, close contactor
Post by: motornissen on September 02, 2017, 12:41:46 AM
No, I just remember someone telling me that it might be possible. But I've done it with a lot of other chargers.


Sent from my iPhone using Tapatalk