New Modified Software Gives Voltage Readout

20 posts / 0 new
Last post
The Laird
Offline
Last seen: 2 years 3 months ago
Joined: Thursday, July 30, 2009 - 00:47
Points: 275
New Modified Software Gives Voltage Readout

Hi Folks,

Those of you following my posts will know that my charger failed (mains side only) just before Christmas.

I have looked inside the charger and, frankly, chickened out. No way am I going to repair that. So, Alternatives are the way out for me.

Being as the software side of the charger is intact and working normally, I decided that a quick, temporary solution would be to use 'Freddy' to charge the battery. 'Freddy' had to be modified. A charge at 0.3 amperes was going to be a bit slow, if fact about 80 to 90 hours is a long time to fill the battery so 'Freddy' had a quick and simple variation and the output was raised to 1.2 amperes. Still slow, but a full charge just under 24 hours is a start.

The next problem was that 'Freddy' does not fill up the fuel gauge, the 'bars', so another method was needed. I arranged that the programme would 'fill up' the bars to 11 bars when the battery voltage reached 145 volts. I can change the number of bars to relate to the battery capacity so no problem there.

The bars and the estimated miles worked as before, but the input to the fuel gauge is no longer accurate, it is actually guesswork and isn't accurate enough for me. What I felt was needed was a voltmeter so that I could keep a watchful eye on the battery volts whilst riding.

Well, I must have spent considerable time on that one. I haven't counted the hours, there are quite a few, but today I completed the task. I now have a reliable voltage readout, whilst riding, which is updated by the second and what a revelation.

Watching those volts almost bounce
around with the amount of throttle in use is a real eye opener. Starting with a 143volts level I took the bike out for a spin. Within yards the volts had dropped to 129 as the throttle was wound on. On a twelve mile journey I saw voltages vary between 145v, when using regenerate early in the ride, to 106v, when using full throttle later in the ride. As I have already said this is a revelation.

From the voltages visible under load, the state of the battery becomes obvious with low volts implying high motor current and/or high internal resistance in the battery. If the high motor current causes a large volt drop then you can be assured that there is also considerable heat being generated inside the battery at that same time.

The regeneration voltages also are revealing. Regenerate can produce a high charging current as demonstrated by the high battery voltage when regenerating. This can be most useful in that you can ease off the regenerate throttle when the indicated battery voltage climbs over 144volts and thereby prevent heat damage from overcharging when the battery is already full.

All in all, the software is doing what I want. I intend to offer the alternative of either the relatively accurate fuel gauge and estimated miles OR the relatively accurate fuel gauge with a Voltage readout replacing the Estimate miles display in the modified charger programmes that some of you are already using.

AND BEFORE ANYONE ASKS. NO YOU CANT HAVE BOTH AT THE SAME TIME AND NO I CANT MAKE IT SWITCHABLE. THIS IS CASE OF ONE OR THE OTHER. but definitely NOT BOTH.

Remember that this has been developed because my charger failed on the mains side leaving the software side working normally. So a failed E.S.D. charger doesn't mean that a new charger is the only cure. I have created a 'fix' or 'workaround' at a total cost of less than twenty U.K. pounds.

In practice, I am charging with a modified 'Freddy' and have reorganised the programme to fill eleven bars when the charge reaches 145 volts. The fuel bars run down as before and the 'new' voltage readout in combination with the distance traveled gives me an excellent idea of the available range. Primitive, but it works. I might just get around to designing a new charger one day BUT then again I might not.

Your Comments and interest are more than welcome, as usual, and I am preparing copies of this new software for issue in due course.

Have lots of fun and little cost, that's what this alternative energy thing a is supposed to be all about, isn't it?

The Laird.

Telling it like it is as usual

CO2
Offline
Last seen: 9 years 3 months ago
Joined: Sunday, July 24, 2011 - 15:04
Points: 110
Re: New Modified Software Gives Voltage Readout

I really admire your work,perseverance and patience...
Fantastic, and don't forget, we want more adventures.....

Anderson
Offline
Last seen: 8 years 7 months ago
Joined: Saturday, October 11, 2008 - 18:28
Points: 142
Re: New Modified Software Gives Voltage Readout

If you end up permanently removing the onboard charger and only use an external charger it would be interesting reading how that works out since I don't think anyone has done that before with a Vectrix. Personaly I prefer the idea of an external charger arrangement.

I have a question about the Freddy charger .3 amp version that I'm building. Because I live in the US and want to power it using 120 VAC I need to know what would be the best size 110 to 220 step-up transformer to use ? I have this 300 watt one already but I think it is to small.

ofx210p
Offline
Last seen: 8 years 10 months ago
Joined: Monday, October 20, 2008 - 03:22
Points: 377
Re: New Modified Software Gives Voltage Readout

Replaced my version of Laird's software this morning with the latest variant (see above) and it is fascinating to see the voltages whilst riding. The inaccurate estmated range is now replaced with an ever-so-more-useful voltmeter. Whilst the fuel guage that i actually like, remains (i missed that when it didn't work in some previous versions)

My bike seems to start (having sat a few hours) at 142v and instantly dropped to around 138v whilst jogging along through town.

Seeing the volts drop on long hills and increase on regen is quite illuminating. I can't wait til i get a chance to ride to the redlight to see at what point it kicks in and at what voltage the bike comes to a slow.

Interestingly I didn't miss the lack of range estimation at all to my surprise.

I'll report back if/when i have more info.

The Laird
Offline
Last seen: 2 years 3 months ago
Joined: Thursday, July 30, 2009 - 00:47
Points: 275
Re: New Modified Software Gives Voltage Readout

Hello Folks,

Time to respond to posts.

Hi Andrew,

I have been considering your question. 'Freddy' could actually charge your
battery direct from your mains supply of 120 volts BUT the capacitor would
need to be BIG, in the order of 60 to 90 microfarads to be precise and the
Power factor would be Low .

So, the transformer is the better way to go and for that you should be using
a transformer of 120 VA minimum (better to use 200 or more, it will run
cooler).

The current of 0.3 amps is common throughout the (secondary or output)
circuit, so as long as the transformer can withstand a continuous current of
0.3 amps (peaking at 0.42) on the secondary and 0.95 Amps or more on the
primary, there should be no problem.

I have just checked what is going of with my 'Freddy'. Bear in mind that I
am now charging at 1.2 amps, Freddy is taking 180 watts (400VA) from the
mains at a power factor of 0.45. The 400 VA means that there is a maximum
current flowing, in the mains supply wires, of 1.6 amps .

The Maths:-
With the original 'Freddy' charging at 0.3 amps there would be 45 Watts
(100VA and power factor of .45 resulting in a current maximum of 0.4 amps)
from the 250 volt supply. this would have to be multiplied up by the
transformer ratio, say 250/110, therefore the transformer current capacity
should be greater than 0.9 amps on the primary and a VA rating of 120VA
minimum.

If you have a choice, use an isolating transformer, it makes for added
safety.

Progress on the 'Failed Charger' front.

Just now I am logging the voltage against charge whilst charging with 'Freddy'. Just to make it easier and more accurate I have temporarily multiplied the display voltage by ten , so I now get a reading of, for example 439 instead of 143. I have 'lost' the hundreds and gained the tenths.

This is all so that I can arrange for the 'fuel gauge' to be filled up according to the charge that the battery has received. It certainly appears that it is practical to by-pass the failed (mains side) charger problem.

The solution I have adopted is to leave the faulty charger in the bike in order to use the software side, which looks after the battery monitoring, fuel contents gauge, and other useful items. I have up-rated 'Freddy' (so far only to 1.2 amps- next step is to 2 amps) for charging, o.k. it takes around twenty hours at the moment. That should go down to ten hours when 'Freddy' is further modified.

A ten hour charge time presents me with no problem and it saves the cost of a replacement 'Chinese' charger AND it allows me to continue the battery charge routine which I have developed to prolong the battery life.

All in all, a satisfactory outcome from what originally looked like a 'write off' situation.

Incidentally, I have produced the charger files, as before, with the facility of have the voltage readout now replacing the 'est miles' display. If you are interested , then just ask.

I should mention that there is someone out there who has successfully repaired a failed E.S.D. charger. So despite my 'chickening out' of doing a repair, there is someone who has more courage and greater skills than I have. Congratulations good sir, I really admire your skills.

Keep smiling folks, as Mik says 'there's always a way if there's no other way'.

The Laird.

(telling it like it is as always)

Mik
Mik's picture
Offline
Last seen: 8 years 8 months ago
Joined: Tuesday, December 11, 2007 - 15:27
Points: 3739
Re: New Modified Software Gives Voltage Readout

Great work as usual, The Laird! Thank you for sharing all this.

Incidentally, I have produced the charger files, as before, with the facility of have the voltage readout now replacing the 'est miles' display. If you are interested , then just ask.

Do you mean the software version intended for a fully functional stock charger, but with added real-time voltage display? That sounds nice...I never found the estimated range display of any use, even with your software modifications. It changes too frequently from equally unrealistic high to low values to be of any use. I think it's due to the terrain where I ride - it is hilly, causing constantly changing energy requirements to cover the same amount of distance.

The real time voltage is a much more useful number, I have been enjoying the "revelations" that it offers for years now, because the manual BMS allows me to see the entire battery voltage and also partial voltages down to cell level. The revelations you get from watching the weakest cells in the pack are even more important than the overall pack voltage, because they let you see the cell reversals that will before long kill the weak cells.

Thanks again, Mik

This information may be used entirely at your own risk.

There is always a way if there is no other way!

Anderson
Offline
Last seen: 8 years 7 months ago
Joined: Saturday, October 11, 2008 - 18:28
Points: 142
Re: New Modified Software Gives Voltage Readout

Thanks The Laird for the help on the Freddy charger and great work fixing NiMH battery problems for the Vectrix. Unfortunately I'll be switching over to lithium because my NiMH battery is too far gone also I plan to use the Freddy charger to automaticaly maintain the lithium batteries voltage.

The Laird
Offline
Last seen: 2 years 3 months ago
Joined: Thursday, July 30, 2009 - 00:47
Points: 275
Re: New Modified Software Gives Voltage Readout

Hello folks,

In answer to Mik's question. Yes I have incorporated the Voltage readout into the software for the fully functional charger. So instead of that estimated miles display you get a constant readout of the battery voltage. It is also possible to fit it into the Lithium Charger software that I have modified for one or two users. We're down to that point where I remind you. that if you want to know if it exists or is it possible, then you really do have to ask.

I'm in agreement with Mik over the usefulness of the estimated miles display. It doesn't take the skills of an Einstein to work out that if 17 bars gets you 36 miles then if you have 8 bars left you are likely to get another 18 miles. Still, for the really stupid, then it may have had some value.

Once again, I hope that all of the software issues are now dealt with to a satisfactory conclusion, BUT I suspect that there may be something in there that could stand improvement.

On my own 'DEFUNCT' charger front, I intend to continue using a 1.1 amp 'Freddy' for charging. O.K. it takes too long, but I shall up-rate 'Freddy' again to 2.0 amps soon and I shall accept a ten hours charge period. And talking of 'Freddy', the efficiency of 'Freddy' is about 98% which compares very favourably with the Vectrix charger's 86%. I'm getting to be really 'green' with this, unfortunately, I don't somehow think that this will save the planet but I am trying.

I have also arranged for my fuel gauge to fill up according to the battery voltage rise whilst charging, I have a display which gives me 1/4 full = 3 bars. 1/2 full gives me 7 bars, 3/4 full gives me 11 bars and FULL = 14 bars. The display runs down as 'fuel' is used and, of course, I have the voltage display to confirm the state of the fuel tank.

I am currently getting about 28 miles per full charge with a battery which has a capacity of around 20 - 22 ampere hours. A battery rebuild is called for but that will have to wait 'till I have more time.

One slight complication with the voltage display is that because I am using the estimated distance display and the programme is written around Kilometres, it is necessary to keep the distance displays in kilometres for the voltage readout to be correct. If the odometer display is in 'miles' then the displayed voltage is reduced to 0.62 of the correct value, again it's just something to live with.

One more point.
I no longer ride to the 'red light'. With the old motor controller the 'red light' shows up at 102 volts under load. This is no big deal when the battery is well balanced but is something to avoid if the battery is not well balanced, So having the benefit of the voltage display, I now ride it down to 120volt minimum regardless of the loading, on the sound basis that this should never send any weak cells into a serious reverse charge state. No doubt there will be other views on this topic.

I will also recommend that those of you using modified software e-mail me requesting a copy of the 'voltage display' version then you too can watch the volts bounce around and further protect that battery.

Looking forward to your comments and criticisms,

Have fun,

The Laird.

P.S. Sorry about the double post on this topic BUT the forum site seemed to 'lock up' and when I did a 'go back' to try again the damn thing did a double post. I have asked the webmaster how to remove one copy or can he do it, but so far, no reply.

R
R's picture
Offline
Last seen: 2 months 1 week ago
Joined: Thursday, June 18, 2009 - 09:46
Points: 1768
Re: New Modified Software Gives Voltage Readout

Hi folks,
Yesterday I could install this firmware with voltage readout.
Staring at how the voltage bounces uo and downis really impressive, during an hi acceleration my voltage dropped to 115v! It is changing my driving pbehaviour, because I try to avoid going under 120v, as master the Laird mentioned.. But i'm asking: why 120V? Why not 115v? In your opinion, what is the Minimum safe voltage for our NIMH batteries? many thanks in advance,
R
pd: I sincerely recommend to all NIMH users to upgrade to this firmware, or at least, to install a voltmeter... You'll discover what's going on inside the battery!

Cor
Offline
Last seen: 10 years 2 months ago
Joined: Sunday, February 12, 2012 - 22:18
Points: 38
Re: New Modified Software Gives Voltage Readout

Hi Anderson,
I am not sure that it is wise to use a Freddy with Lithium,
unless you are using a good BMS and it can cut the charging of
your Lithium pack, because it cannot take overcharging like
NiMH can.
The 300W transformer should be plenty if you indeed are charging at 0.3A
However, you can charge directly from 120V AC by just using
a fuse, a rectifier and a light bulb.
This also works at 230V but the efficiency is lower.

Cor
Offline
Last seen: 10 years 2 months ago
Joined: Sunday, February 12, 2012 - 22:18
Points: 38
Re: New Modified Software Gives Voltage Readout

The readout of voltage is *very* useful, especially on packs such as NiMH that change voltage with SoC (State of Charge) so from averaging the voltage (or measuring only when little current is drawn) you can quickly get an idea of the actual SoC of the battery, as long as all 102 cells are playing along (some people had to jumper over a bad cell and this will reduce voltage by about 1.3V for each cell jumpered).
I do not think that voltage readout will have any use on a LiFePO4 pack, because it spends almost all its useful capacity at the same voltage, only falling off sharply when it is (too) close to death and only going up sharply at the top end of the charge where you should soon stop charging anyway.
So, for this favorite Lithium chemistry to display a SoC or "distance remaining" you *must* count current and time (multiplied) in and out of the pack to maintain the Ah level, since voltage will almost not vary between about 20 and 90% SoC or so. And that is exactly where you will be using the pack...
BTW, the webmaster is the only person who can remove unwanted/redundant posts, as I found out when I got an error on an earlier post and clicked again, only to end up with multiple entries. He will take care of it.

In the future I may be interested in this software (with a NiMH pack) also, since I am working on a Vectrix with a bad charger. I received another bad charger from another Vectrix, so I am trying to dig into it but time is not permitting now. Since a Freddy is a non-isolated charger (unless you use an isolation transformer) and charges typically at low current, I am planning to use an isolated power supply to set up an alternative charger - one that can even be carried with the bike, because it is light enough while still charging it in a few hours.
I have a couple of MeanWell 240-48 which I plan to connect 3 in series and adding a "current limit" modification to one of them, then trim them so that the two unlimited will each deliver 45V and the current limited one will go up to 53V for a total 143V 5A charger.
I was dreading not having any pack feedback when installing this external charger, but with the voltage feedback this will be relatively useful as a daily driving solution.
Note on the SoC level: the Ah counter will need a re-sync moment as it will tend to drift by integrating errors, what has often been done is to get a trigger from either detecting the max charge voltage and resetting the SoC to "full" or seeing the BMS shutting off the charger and taking the same action. You will find variants of this on most Ah counters such as the E-meter.

oobflyer
oobflyer's picture
Offline
Last seen: 6 years 9 months ago
Joined: Friday, August 8, 2008 - 09:12
Points: 383
Re: New Modified Software Gives Voltage Readout

I intend to offer the alternative of either the relatively accurate fuel gauge and estimated miles...
It is also possible to fit it into the Lithium Charger software that I have modified for one or two users.

Since I have the Cycle Analyst that displays the voltage and AHs I would like to update to the version that displays the fuel gauge/est. miles.

Will this new software still allow my onboard charger to charge the Li-ion pack to 50 AH?

If I have understood correctly the fuel gauge will display 14 bars when the pack is full - this would be very nice.

I'll send you a 'PM' with my email address.

We are lucky to have you Laird! The Vectrix is getting better and better thanks to you.

R
R's picture
Offline
Last seen: 2 months 1 week ago
Joined: Thursday, June 18, 2009 - 09:46
Points: 1768
Re: New Modified Software Gives Voltage Readout

We are lucky to have you Laird! The Vectrix is getting better and better thanks to you.

I completely agree.
I don't know how long my battery last, but thanks to The laird I've recovered 15km of range, and now the display gauge is 100% reliable.
Galago
Offline
Last seen: 1 month 2 weeks ago
Joined: Saturday, October 11, 2008 - 09:00
Points: 122
Re: New Modified Software Gives Voltage Readout

...
So, for this favorite Lithium chemistry to display a SoC or "distance remaining" you *must* count current and time (multiplied) in and out of the pack to maintain the Ah level, since voltage will almost not vary between about 20 and 90% SoC or so. And that is exactly where you will be using the pack...

Curious about your thoughts re:
For dynamic loading what resolution or sample rate would you use, or at least recommend? Too fast and the processor spends
too much time performing needless calculations, too slow and results do not accurately reflect power use (SOC)....
At what point does accuracy meet sample rate?

Regards,
Galago

Cor
Offline
Last seen: 10 years 2 months ago
Joined: Sunday, February 12, 2012 - 22:18
Points: 38
Re: New Modified Software Gives Voltage Readout

I guess it depends on what accuracy you need.
I have heard of the E-meter (which was originally designed for use in RV to measure the state of the house battery
but later was modified with a 1:10 prescaler to measure EV packs up to 500V) has a feature to ignore very small
current readings, because for example a continuous 0.1A reading corresponds to an error of 0.1A/500A for example
so that 0.02% error requires very accurate A/D sampling, but still if accounted for 24/7 this means that the
reading drifts more than 2Ah each day.
On a 200Ah house battery that is recharged to full every day (resetting the meter when battery voltage above a
certain threshold is found) this error is insignificant.
On a 30Ah pack that may sit for days without recharge, that error is fatal.
So, the workaround was to ignore very small readings and only account the readings above a certain threshold.
That will still accumulate the error, but if there are no loads running 24/7 then the accumulation is only
during the "ON" period, reducing the size of the error.
Having a way to recalibrate back to "full" or another known state on regular basis is also mandatory for a
successful Ah counter.
In case of Nickel batteries and Li-Poly and other chemistries that have a voltage that depends on SoC (State of Charge)
you can use a calibration table to correct the error in an Ah counter after the battery has been idle for a while
(you may need to measure and correct for battery temp also and tell the counter which battery config you use).
Frequency of sampling probably depends on how you measure, if the shunt you use to measure the current is connected
to an RC circuit to average a fast changing value then you can relax the requirement to sample faster than the changes.
But I think you need to match RC time and sample rate, or you can accumulate errors from the RC circuit not showing the actual value but the value plus a decaying history. This is not something that I have studied too much, so do you own due diligence before building something and relying on it for your pack health and range estimation.
Note that current measurement is bi-directional, positive and negative, due to either re-gen or charging.

X Vectrix
Offline
Last seen: 1 year 9 months ago
Joined: Tuesday, August 4, 2009 - 05:20
Points: 298
Re: New Modified Software Gives Voltage Readout

A couple of other things to consider when designing the SOC gauge..
The battery current is drawn in very fast pulses. The IGBT is switching at 15Khz thus the current is flowing at roughly 15khz pulses. These pulses of varying width are used to build up a sine shaped current wave in the motor windings (using the inductance of the windings). In order to be accurate the SOC routine should sample the current while the IGBT is conducting current, otherwise you will miss some of the current. The VX1 MC does just this. The A/D sampling is synchronized with the IGBT switching. The current samples are integrated over 1 second interval and transmitted on the CANbus for the charger. Like you mentioned, the MC processor does not have enough time to do the actual calculation so it just integrates for 1 second (an easy summation) then lets the charger processor do all the grunt work. During charging, the charger handles the current integration into the battery since it has an accurate low current sensor.
The Li SOC is reset to 100% when the battery is fully charged as opposed to the Ni pack which is reset to 0% on full discharge.

Galago
Offline
Last seen: 1 month 2 weeks ago
Joined: Saturday, October 11, 2008 - 09:00
Points: 122
Re: New Modified Software Gives Voltage Readout

Thank you for the insights.

I am considering an active battery management system.

martinwinlow
Offline
Last seen: 2 years 7 months ago
Joined: Monday, March 26, 2012 - 05:48
Points: 244
Re: New Modified Software Gives Voltage Readout

I am delighted that we have a knowledgeable ally on the software front in The Laird.

Personally I find current as interesting/useful to see as voltage and I guess ideally I should install a Cycle Analyst but it's a lot of hassle and not insignificant cost especially when both are already being measured by the standard system - just not displayed well or at all.

I was wondering if The Laird would be able to provide a mod to use one of the user inputs to alternate his voltage display with current flow - ideally switch them momentarily when first pressed, up to 2 seconds and then semi permanently by pressing the input for over 2 seconds, say.

This begs the question of which control or combination of controls could be used to provide the signal to switch. It would have to be one that will not cause any issues such as brakes etc and that are close at hand. What about the turn signal cancel input? Is this connected to the controller?

Any thoughts, anyone?

Thanks again to The Laird for his time and effort.

Regards, Martin.

Regards, Martin Winlow
Isle of Colonsay, Scotland
evalbum.com/2092

Mik
Mik's picture
Offline
Last seen: 8 years 8 months ago
Joined: Tuesday, December 11, 2007 - 15:27
Points: 3739
Re: New Modified Software Gives Voltage Readout

This begs the question of which control or combination of controls could be used to provide the signal to switch. It would have to be one that will not cause any issues such as brakes etc and that are close at hand. What about the turn signal cancel input? Is this connected to the controller?

There is no turn signal cancel input. The turn switch only closes a circuit when the switch is pushed to the left or the right. The indicators remain on (= contacts remain physically closed) even if the Vectrix is turned off and on again. Once the indicator is turned off, pushing the indicator-off function does absolutely nothing.

I think it is a lot harder to program user-modifiable input signals into the firmware than to "just" change the charger behaviour.

However, it should be relatively simple for a programmer to develop a custom made device for the Vectrix that displays voltage, current and battery module temperature. All this data is transmitted about once per second to the Canbus connector in the glove box. When I was younger, dumber and had more free time, I spent a few days figuring out waht the signals meant. The results are in the Vectrix collaborative handbook, in the Canbus chapter: http://visforvoltage.org/book/ev-collaborative-hand-books/6916#comment-40745

This information may be used entirely at your own risk.

There is always a way if there is no other way!

martinwinlow
Offline
Last seen: 2 years 7 months ago
Joined: Monday, March 26, 2012 - 05:48
Points: 244
Re: New Modified Software Gives Voltage Readout

I see. I had been thinking about that with a view to porting the serial data to a GSM smart phone with GPS so I could access the Vectrix's status remotely and also its whereabouts, should it go 'walks'. I had such a system on my van which I DIY converted to an EV but I had the space for a car PC which made it all relatively straight forward. Using a smart phone will be more of a challenge, I suspect. Perhaps I could use the phone itself as the display for the can bus data - weatherproofed, obviously - perhaps use a satnav unit designed for motorcycle use that runs under WinCE - I think they are out there... MW

Regards, Martin Winlow
Isle of Colonsay, Scotland
evalbum.com/2092

Log in or register to post comments

Use code"Solar22" and enjoy 12% off for all solar Kits.


Who's online

There are currently 0 users online.

Who's new

  • eric01
  • Norberto
  • sarim
  • Edd
  • OlaOst

Support V is for Voltage