Lithium Battery Communications

by Ben N on August 26, 2019

I just got my laptop to communicate with the Valence lithium batteries in the Ford Ranger EV pickup truck!

The truck’s instrumentation is pretty basic – just a “Miles to Go” and “Percent Charged” meter, which were designed to work with lead-acid batteries. I wanted to be able to communicate directly with the lithium batteries to make sure they were balanced and that I was getting the full state-of-charge and other information from them.

Data Connections of the Valence lithium batteries

These Valence U27-12XP batteries (specs here) contain an internal BMS and communications system. Each battery has a male and female 5-pin Tyco Amp connector on it. Those cables are daisy-chained together and connected to a BMS interface device. Normally, that device would communicate to the batteries and then connect to the vehicle to do things such as sending a CAN signal to the battery charger to turn it off when the batteries are charged.

Home-made RS-485 to USB adapter

By instead plugging in my laptop, I should be able to read data from the batteries. To do so, I got a generic RS-485 to USB adapter (
and ordered a kit of Amp SuperSeal connectors.
I simply cut four short sections of 18 gauge wire and connected them between the plug and the UBS adapter. The 5V power is on the outside two pins (pin 2 & 5 on the Amp connector) and the communication signal is on the inside two pins. Pin 1 on the Amp connector is for shield and I left it unused.

The battery communication string had a terminator on the far end (from the original Smith truck battery pack.) I pulled it off and measured it. It read as a 120Ω resistor. However, I found out later that it didn’t seem to make a difference whether or not the resistor terminated the string. Here’s an article on why that it.

The software for the Valence batteries is Windows only. I have a Mac laptop, so I had to do a little work to get Windows running on it. I used Virtual Box to run a trial version of Windows 10. There are other ways to run Windows on a Mac as well, but this was free and pretty straight-forward to use. Of course, if you have a PC laptop, you can just skip this.

The main challenge was just to make sure the correct drivers were installed and permissions were granted. I had an issue at first with the USB adapter. A friend gave it to me (thanks, Eric!) but I didn’t have any documentation and Windows 7 didn’t recognize it. It ran fine on Windows 10 and identified using an FTDI chip driver. To prevent errors when the Valence software is running, permissions must be manually changed on the root folder of the software to full Administrator permissions.

At this point, I was finally able to use the software! My adapter was plugged in to the computer with RS-485 cable going to the most positive end of the battery pack, with the rest of the batteries daisy-chained together. In the Valence software, one last quirk was that there were NO COM PORTS listed in the drop-down box for which communications port to connect to. In my settings and drivers, it looked like the USB adapter associated with COM3. I had to manually type “COM3” into the drop-down and hit enter. NOW it connected! After closing and reopening the software, COM3 would stay as the selected port.

The Valence software lets the user view information about each individual battery, such as cell block voltages, state of charge, current in or out of the battery, and temperature. Users can also rename the IDs of each battery.

When I first connected, the software only connected to 24 instead of the full 26 batteries. The reason why is that two of the batteries had repeated ID numbers. I located a battery, renamed it from ID3 to ID25, and then got 25 of the 26 batteries to show up. I did the same thing for the last battery, (#4 to #26) but then the original #4 wouldn’t show up. Why? I have no idea. I did the exact same thing as the first battery with an ID change. Oh well, I’m sure I’ll figure it out…

While it’s very interesting to be able to get the data from the batteries, it’s NOT terribly useful while they are just sitting there. What WOULD be useful is seeing the detailed battery data while CHARGING and DISCHARGING. In other words, WHILE DRIVING! I have an extension cable that should reach from the back of the truck up to the passenger seat. I can put the laptop in the cab and connect to the batteries while driving. I’ll have to keep my eyes on the road, so I really won’t be able to watch the battery data as I do it. Fortunately, the software also includes a logging feature. I should be able to log the data as I go. I’ll just want to shoot some video so I can sync the data to what’s going on in the real world – accelerating, braking, going up or down that really big hill.

That’s it for now. I’ll need to play with the software a little more and get set up for doing a test drive while logging data.

Until next time, stay charged up!

{ 33 comments… read them below or add one }

1 Richard Bruner August 28, 2019 at 4:13 pm

Have you done anything with the battery communication with batteries in parallel? I looked at the page in the manual as you suggested. If I’m reading it correctly you parallel the negative RS485 and read on just one positive RS485? I would have to fabricate jumpers between the four negative cables. Do you think I would also have to parallel the positive data cables, the diagram doesn’t look like it.

2 Chris.m September 1, 2019 at 9:49 pm

Your ranger is really awesome and your new lithium battery pack is the perfect compliment for it. Since the batteries communicate with each other over a can bus you really should use the termination resistors which are are needed to suppress signal reflections as well as return the bus to its recessive or idle state.

3 Greg September 11, 2019 at 8:34 pm

Richard – Nothing special has to happen, you just hook all communication cables up together. We have 4Sx4P so effectively 4 banks of 48V (~53v). We have all 16 battery communications hooked up together and are able to read all of them in the same way Ben explains it above. We are monitoring a bank for solar backup/charging from our MPPT controller. We have even automated the capture every 10 minutes and graph it in grafana/mysql.

4 DL September 12, 2019 at 9:51 am

this is awesome. i hope to pick up some second hand Valence batts soon. and this will be a way to “demystify” what’s happening inside the black box. Er…..uh….Green boxes.!


5 Ethan Turner September 13, 2019 at 3:04 am

Hey Ben, thanks for the very informative blog post and video. I’m about to purchase 8 Valence U27-12XP batteries for a 24V setup (2x series in 4 parallel strings) on my expedition truck. I will definitely follow in your footsteps to ensure good battery health. I’m also wondering if I can daisy chain the data cables on all 8 batteries in my series parallel configuration or if I can only data link the series pairs?

Thank you!

6 admin September 13, 2019 at 8:42 am

Another YouTube viewer said that he had Valence batteries in a series/parallel configuration and that the data link did just fine seeing ALL the batteries.

7 brassmonkey001 September 18, 2019 at 5:21 pm

Thanks Ben, I’ve just managed to get mine communicating after a few hours of head scratching! I couldn’t have done it without you!

8 Richard Bruner September 20, 2019 at 9:03 am

Thanks for the awesome video. I got everything working. For reading in parallel, I had to read each battery individually to see which module it is. Then I was able to chain them all together to read each one. I then changed Ids to match my setup ie: 1-4.
When using the log, how do you separate the comma delineated CSV file so that the headings match the data?

9 Donnie Brewer November 3, 2019 at 11:39 am

Thanks for this post!! I am still attempting to connect my laptop, can you tell me what baud rate COM3 is running on your Windows 10 setup?

Mine is setup to the default of 9600 in Device Manager.


10 Donnie Brewer November 3, 2019 at 12:05 pm

Nevermind, found the issue. I would get an error when I would click “Start Read” – the error said to check the COM port or Module number. I immediately thought of a baud rate error, but all I had to do was click on “Locate Battery”. This option will tell you the module ID of the single battery you’re connected to, and the application would automagically set the Module ID for you and then you can click the “Start Read”. My module IDs showed as 10 and 16 for my two batteries. After clicking “Stop Read”, I selected a new Module ID under “Change Module ID” and clicked on the “Change ID” button. It asked if I wanted to change Module ID 16 to Module ID 1, which I clicked the affirmative. Bam! Module ID 1. I did the same for the second battery but chose Module ID 2.

Pretty slick!!

A quick question for you, I was thinking of making the software available on my personal website. Do you think Valence would have any issues with that?

Again, thank you for sharing this!

11 Rick Lambert November 15, 2019 at 2:00 pm

So none of this covers using a BMS to communicate and maintain balancing or protection. Is there a related article on doing any of this?

Thanks in advance folks.

12 Thomas January 14, 2020 at 10:45 pm

Thank you so much. Your a life saver!!
In playing around with the logging, is there a way to log data from all of the batteries simultaneously? The log looks like it only logs one battery at a time. Any thoughts?

13 admin January 15, 2020 at 10:06 am

That’s what it looks like to me, too. I didn’t see any obvious way to log all batteries at once.

14 Travis Sanders January 20, 2020 at 3:42 pm

Glad I found you guys. Where do I get the software and what is it called? I ordered the connector using the link here and already have the rs-485 adapter for my old inverter I can use. I bought 240kwh that’s 150 u27-xp like the ones in his videos and anxiously waiting to find their condition when they arrive.

15 admin January 20, 2020 at 4:14 pm

Hi Travis, I sent you a link to the software.
What are you doing with 150 batteries?!! Sounds like a massive project, whatever you are doing! We always love to learn more about the projects people are up to. Let us know more about it when you can!
-Ben Nelson

16 Travis Sanders January 20, 2020 at 5:01 pm

What kind of project am I doing? The get in over your head kind. I invested a lot of money for unknown quality. I really won’t know their condition until they arrive from their thousand plus mile journey across the ocean. Basically my family of 4 lives in off grid cabin in the jungle in Hawaii. 7kw solar. I’m so tired of lead acid batteries. Flooded, AGM’s nano this, carbon that what a bunch of garbage.

17 Travis Sanders January 20, 2020 at 5:09 pm

One thing I noticed is that when you’re hooking a lot in series which I might do Valence says they’re additional BMS that balances one 12 volt battery to the other is required. I see there’s 7kw all-in-one off grid capable grid tie inverter charge controllers that utilize 450 volt batteries for dirt cheap. I’m wondering if anyone here knows how these bms’s actually work? I’d rather not fully charge the batteries because the higher percentage charge deteriorates lithium batteries faster. And the internal cell balancers apparently don’t activate until full charge because it’s a top balancing design. But I’m not absolutely positive there seems to be a lot of mystery going on in this green battery. So how would the additional BMS function? Would it communicate with the battery and somehow turn on the resistors on the u27 that was higher voltage? Or does it actually pass power through itself back and forth from high batteries to low batteries?

18 admin January 20, 2020 at 5:25 pm

On that Valence system, the BMS is inside the battery itself and takes care of balancing between the 4 series sets of cells inside. There’s also temperature sensors and some other components as part of it.
The external BMS box communicates between multiple batteries and pulls data from all of them. It allows current to either bypass or burn-off (resistors) one or more batteries in series. That external box also does things like turn off a charger if one of the batteries it too high, or disconnect the motor if one is too low.
With a big series string of batteries, you want some sort of controls for those batteries.
Here’s a new BMS that’s especially for the Valence cells, and supports a pretty good range of voltages. You might need two of them if you go high voltage.
High voltage is great in that it matches up with solar systems, so there are starting to be some good inverters out there for it, and high voltage means LOW current, also a good thing.

Check out this BMS:

19 Travis Sanders January 20, 2020 at 5:56 pm

So the external BMS can command the u27’s to bypass power through it? I’ve seen there’s mosfets inside so I guess it could be capable of that which is pretty cool. I read the link about the third party version. I guess it’s sort of the same thing but they go into a better description about its capabilities than Valence does and I think I’m assembling a picture in my mind of how this stuff actually works. but what about the internal cell balancing? Am I really going to have to fully charge my batteries in order to balance the cells? It’s going to take me six months to charge this battery Bank because I’m already using most of the power I get from the panels.
High voltage is awesome but for the DIY I’m afraid there will be some charcoaled people out there.

20 John E Gibson February 10, 2020 at 5:47 pm

Hello, silly question but where did you find your short battery connection cables with the overmold. I have been trying to locate just such a jumper for some time to avoid hand making all I need. Many Thanks.

21 admin February 12, 2020 at 12:15 pm

The power cables that I used with these Valence batteries were the ones from inside the Smith Electric Truck battery packs.
I did NOT make them, nor mail-order them. I simply reused what was already with these salvaged batteries.

22 ben March 1, 2020 at 1:12 pm

Has anyone had success with the muller industries bms? I really like this video but it would be great if there was a manner to set charging profiles for a solar system. I am using 8 valence u27s in 4s2p configuration with an all in one charge controllor and inverter from MPP solar.

23 Ben N. March 1, 2020 at 2:25 pm

I’ve contacted Muller Industries, and I’m hoping to get one of their BMS for setting up a 48V solar battery system. When I do, I’ll shoot some videos on it.

24 Ian Keegan March 13, 2020 at 1:36 am

Thanks for all the info! Btw where can i get those tyco amp extension cables? I’ve looked everywhere!

25 admin March 14, 2020 at 1:42 pm

I got those cables by taking apart an entire Smith truck battery pack.
You might just want to make your own. All you need are the end connectors. Put a male on one end and a female on the other.

26 Travis Sanders May 11, 2020 at 4:00 pm

“So the external BMS can command the u27’s to bypass power through it? ”
“I’ve seen there’s mosfets inside”
“Am I really going to have to fully charge my batteries in order to balance the cells?”

27 Travis Sanders May 11, 2020 at 4:12 pm

I have the rs485 working like you have here but id relly like to have the canbus logging working as well. Its more capable with charts and can show info from all batts in one place. The logging software does not seem to want to connect to my aftermarket usb com adapter. I think it needs a valence serial number or the actual usb com port hardware that comes in the CANbus monitoring kit valence sells to work. Part Number 1005931.
Any one have one for sale?

28 Travis Sanders May 31, 2020 at 1:37 am

Does anyone know what kind of connector the bms has as its 16 pin connector? I need to get some of the metal connectors that go in the wire end.

29 Paul Ouellette July 7, 2020 at 12:55 pm

I am thinking of purchasing 4 used valence lithium batteries for a RV project I’m doing.
I noticed the patch cords coming off batteries have been cut so my question is do I need those and if so can they be purchased ??
Thank you

30 admin July 7, 2020 at 12:57 pm

Patch cords? Do you mean the BMS (Battery Management System) cables?

If they are CUT, there is no quick and easy way to replace them.
You CAN use these batteries as stand-alone 12V replacements, but when you start running them in series, it would really be better to have some data from them, and use a BMS.

31 Ralph Smith August 16, 2020 at 3:13 pm

I purchased one of Muller’s Valence BMS’s. Seth sent me a rebranded Valence manual for it. I have 20 U27-12XP wired 5 groups of 4 for a 48V system. Seth indicated he had to program it for 48V? Anyhow still trying to figure it out for my install to be sure I’m not going to fry something. Sent this email to Seth to get some clarification as the manual was not very useful for an off grid install as it leans to the vehicle application. If Travis or anyone who actually bought one of these like I did have it installed any help would be appreciated. Also you charging ranges for 48V would be cool. Here’s a link to the BMS manual I have from Seth.

Hi Seth
Trying to nail down the install of your BMS. Please read and verify (respond) to me if this is correct or changes need to be made.

J2 (Battery Interface) RS-458 male and female to each end of the daisy chained battery bank? The Remaining J2 wires: #5Gr 12VDC Pos remains open so BMS stays in charge mode; #9Yel 12VDC Neg; #10Red 12VDC Pos always on; #23Red 12VDC Pos always on for Charge Enable and #24Red 12VDC Pos always on for Wakeup.

J1 (Vehicle Interface) #8Yel 12VDC Neg Contactor 3 and #22Red 12VDC Pos Contactor 3……..#12Yel 12VDC Neg Contactor 1 and #26Red 12VDC Pos Contactor 1.
Question: In regard to Contactor #1 and #3 are they over/under voltage and hi/low temp cutout and which does what?

Also can I tie into the female RS-459 pin outs 2,3,4,and 5 to USB to use the Valence software on my computer like I do now? (

32 Jack Hunt August 30, 2020 at 2:15 am

Hi Ben,

Do you know where I can buy a new or used Valence BMS unit, as you show in your video, to interface with the Valence u27’s, or is it simply better to buy the Muller version?

33 admin August 30, 2020 at 9:28 am

As far as I know, there IS no source of a Valence BMS unit, other than something like pulling one from a Smith truck.
That’s why Muller Industries came up with their version, just to be able to make them available.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Previous post:

Next post: