# Range calculation Orion BMS and Torque



## Elegancec (May 23, 2012)

Hi,

I would like to calculate the range of my car with the orion bms via torque.
Did anyone do it before?


----------



## halestorm (Apr 28, 2009)

No, but I'm just thinking about this myself. I just got Torque installed last night. I'm thinking if it knows distance traveled (it does, right? through GPS?) and the energy usage (which it gets in my case from Elithion) then it ought to be able to calculate Wh/mi and from that you could get range.

I think.

Maybe.


----------



## Sunking (Aug 10, 2009)

Torque does not tell you much of anything unless it is specified at some RPM. With Torque and RPM known still does not tell you much unless you know the speed. Torque does have a relationship with current, in fact a direct relationship. and once you know the current, you can calculate range. 

Hopefully by now you should see where I am going with this. Use current, not torque. I have an Orion Jr, and the Orion Jr has a Coulomb Counter. I use it as a Gas Gauge as it can measure Amps Hours (counts up) going into the batteries while being charged, and then counts down Amp Hours on the discharge. 

So to determine range drive say 5 to 10 miles and see how many Amp Hours you used. 

Example if you have 100 AH batteries, drive 5 miles, and say used 10 AH, then you know you should get 50 miles if you discharged to 100% which is a huge No-No. In practice you only want to use 80%, so taking 80% into consideration 50 miles x .8 = 40 miles.

From that you can determine efficiency if it takes 10 AH to go 5 miles using say 144 volt batteries your efficiency = 144 volts x 10 AH / 5 miles = 288 wh/mile
As a sanity check when you know efficiency you can determine range. If you have a 144 volt, 100 AH battery, with 200 wh/mile then Range = (144 volts x 100 AH) / 288 wh/mile = 50 miles.


----------



## halestorm (Apr 28, 2009)

I'm actually not so interested in range. I have an SOC display and that is more useful, unless it could dynamically calculate range. Otherwise range depends on driving conditions. I use at least 75% more energy driving home from work when there is no traffic on the freeway, for example.

I'd like to have a live, dynamic display of Wh/mi.

Torque Pro has a resettable trip meter of distance, which it gets from GPS. My BMS controller outputs power used, which Torque Pro can read. But can it read and accumulate that as an "energy trip meter"? If it could, then maybe I could combine those two into a running Wh/mi.


----------



## evmetro (Apr 9, 2012)

The Torque app displays gps speed, but the gps is in your Android only, and the Orion has nothing to do with it. There is enough data for the Orion to create very nice state of charge and depth of discharge gauges, and you can taylor them to your own personal taste or needs. I like to have my SOC gauge read 0% when I still have 30% remaining, but you can also make it read 0% when you still have 40, 50, or whatever you like remaining. You can program the DOD gage the same way. It is nice to program in some reserve in case you get in trouble, but since I have built and programmed my cars, I know better to believe the lies that I programmed in. I also display lowest and highest cell voltages on my dash, so when I am in trouble, I can see the lowest cell real time if I need to limp home. The safest thing to do is to link the Orion to the controller and let the Orion and the controller work things out via canbus, since they do a flawless job in preventing any cell from ever going below your specified limit.


----------



## bigmotherwhale (Apr 15, 2011)

Sunking said:


> Torque does not tell you much of anything unless it is specified at some RPM. With Torque and RPM known still does not tell you much unless you know the speed. Torque does have a relationship with current, in fact a direct relationship. and once you know the current, you can calculate range.
> 
> Hopefully by now you should see where I am going with this. Use current, not torque.


They are talking about the torque android application not the unit of measurement.


----------



## halestorm (Apr 28, 2009)

evmetro said:


> The Torque app displays gps speed, but the gps is in your Android only, and the Orion has nothing to do with it.


That's fine, I realize Orion (or in my case, Elithion) has nothing to do with it, and it need not. Torque Pro is getting distance traveled from the GPS. It is displaying a trip meter of distance traveled, and I can reset this trip meter. So Torque Pro is getting data and keeping a running tally. What I'm asking is, can it not do the same with some other input, for example, power? If it kept another "trip meter" of power, now I have power, time and distance; it should be able to calculate Wh/mi.


----------



## evmetro (Apr 9, 2012)

halestorm said:


> That's fine, I realize Orion (or in my case, Elithion) has nothing to do with it, and it need not. Torque Pro is getting distance traveled from the GPS. It is displaying a trip meter of distance traveled, and I can reset this trip meter. So Torque Pro is getting data and keeping a running tally. What I'm asking is, can it not do the same with some other input, for example, power? If it kept another "trip meter" of power, now I have power, time and distance; it should be able to calculate Wh/mi.


I don't know how to create the pid, but it would seem that the app has everything needed to create a custom PID and gauge.


----------



## Elegancec (May 23, 2012)

Hi, thanks for your replies.

Yes the torque (android) has the speed and can measure length.

Do you know how to calculate or program it in torque?

For example:
used energy kWh / Distance travelled since last start up

Estimated range: Energy content Amphours / energy consumption

My problem is, I don't know actually how to calculate in torque. There are equations how use these for the case above?


----------



## jaspersk (Jun 26, 2008)

I have the Orion BMS and Torque running in an Android. I love it. 

I will say that the SOC on the Orion is not great. Right now, it doesn't work for me at all. It keeps resetting itself in the middle of the drive. I probably need to send a note to Orion to figure out what is going wrong.

I like the idea of a mile counter but my allowable range varies a lot. It was 100 miles when my pack was new. I made it 100 miles my first summer. As the cells age and the seasons change, my range will be all over the place. There is much less of a hard cutoff in terms of how far I can go. I just can't push the gas nearly as hard when I am getting near the end of the range since it is so much easier to hit 2.5V with these older cells than it was when they were new and fresh. If it is cold, obviously range is much shorter.


----------



## halestorm (Apr 28, 2009)

Elegancec said:


> My problem is, I don't know actually how to calculate in torque.


I don't either; that's the question of the hour. I posted on the torque forum but there doesn't seem to be a lot of recent activity there.


----------



## Elegancec (May 23, 2012)

hi,

I took a look into settings / additional obd2 pids :
There you can see for example ((A*256)+B)/100 for the pack sum voltage.
or in the example you can see A*B+20 or [0d]+10+A or only [0d]

But what is A and what is B? The equation looks quite strange just for the pack sum voltage...


----------



## Elegancec (May 23, 2012)

http://torque-bhp.com/forums/?wpforumaction=viewtopic&t=352.0

a good explanation of the variables


----------



## halestorm (Apr 28, 2009)

Hey, great post, thanks for that Torque PID info!

Maybe you can answer this, too -- Torque is only allowing me to send 3 bytes for the PID but I need to be able to send 7 bytes. Any idea how to do that?


----------



## halestorm (Apr 28, 2009)

Elegancec said:


> hi,
> 
> I took a look into settings / additional obd2 pids :
> There you can see for example ((A*256)+B)/100 for the pack sum voltage.
> ...


Just to put this in the thread, for completeness, ...

A and B are the most and least significant bytes, respectively. The equations are simply to convert them from hex to base 10 (decimal), and to scale them, if necessary. Some PIDs return only a single byte, in which case the equation need only be "A". But if there are two bytes then you use the equation A*256+B, which is just the hex to decimal conversion. 

The /100 is the scaling. For example, I have a PID which returns a value in tens of millivolts, so if I want to convert to volts I do the hex-to-base10 conversion and then /10.

Anyway, all that is to say that these equations are just proper unit conversions; they don't take values or variables from other parts of the system. I believe all of the data are there, so it shouldn't be difficult for the developer to add this feature (of energy "trip" counters, Wh/mi, etc.) but it doesn't look like it's something we're going to be able to do on our own.

Perhaps someone who knew what they were doing here could write a plugin. That's less desirable (to me, at least) since the plugin is on a separate screen, and I'd rather see the information all on the main screen.


----------



## Elegancec (May 23, 2012)

Looks like normal programming language

http://torque-bhp.com/ITorqueService.aidl
so than we need to find out how to declare variables and send them as pids to create a new plugin for the orion bms (normally a job for the seller of the BMS...)


----------

