Hi I am designing a BMS for my electric bike, it has 20 cells in series, 3 in parallel.
I would prefer to monitor each cell individually as if the cells are joined in parallel if one cell goes the whole bank of cells in parallel go down as well, this gives me 60 cells to check!
I want to use ADS115 device’s to mesure the voltage, I’ve worked out how to float the ground by using I2C isolator chips but I am limited to 4 ADS1115 device’s after that I run out of addresses for the modules.
my only thought is to have the bus wired up a bit like a tree with 4 ADS1115’s on each branch having a solid state relay disconnecting the branch from the trunk so the ADS1115’s were only readable when the relay was closed and all others were open.
Is this possible and what lines of the I2C bus do I have to put the relays on, I think it would be just the data line and not the clock line as the data line sends out the address of which device to speak to.
Kendrick
Hi
I’ve read up on this multiplexer and I think it wil be just the job.
With a maximum of 8 multiplexers allowed on one I2C bus each with 8 ADS1115’s on them since the ADS1115 has 4 A to D converters on it that gives me a maximum of 256 posible cell checks. I’ll still need to use isolator to stop damage from the floating ground I will be using but it looks like the multiplexer will be a lifesaver.
I’ve found them on eBay now all I need / hope the library to go with it.
Have you by any chance got a link to one.
Kendrick
With these types of boards, I find it useful to buy one legit from the source before trying to work with a knockoff; then keep the legit board for further development.
I think he meant a library. He already found them for sale on eBay.
You don't need a library for these, other than the Wire library which you are already using. To "dial-up" a particular i2c multiplexer channel, you just send a single byte to the multiplexer's register.
hi
From what I have gathered from the various stuff I have read you first connect to the multiplexer and activate the I2C output lines from the multiplexer you want to use then you address the device you want to talk to as normal.
For example besides an Arduino on an I2C bus you have 1 multiplexer. Attached to 2 seperate output channels on the multiplexer are 4 devices, 2 per channel. the addresses of each device on one channel are different but are duplicated on the other bus.
Would this mean that to talk to all 4 devices you would do the following:-
Tell the multiplexer to activate channel 1.
Send out the address of device 1 you want to talk to and do what you want with that device.
Send out the address of device 2 you want to talk to and do what you want with that device.
Tell the multiplexer to activate channel 2.
Send out the address of device 3 you want to talk to and do what you want with that device.
Send out the address of device 4 you want to talk to and do what you want with that device.
in this example device 1 and 3 would be the same address, device 2 and 4 would be the same address.
I'm starting small. Making a device very similar to one that is no longer available I still have a working version that I can use to replicate the functions.
The device is a Cellog 8 much used by the ebike community years ago, it came in 2 forms a more expensive version that can store reading then send them to a computer and a cheaper version without the logging and computer linking part. I will try for the cheaper version.
It is a small device that can measure up to an 8 cell lithium battery pack it can also measure a whole battery pack with the first 2 pins (that feature I will not have thought I could put it on different pins).
There are low, high and difference voltage alarms working at a cell level, they can be altered and different alarm settings could be stored under different names.
my problem will be linking the small units into a central unit. the Cellog copies will all have an arduino as the master of its own I2C bus.
the link between units will be through the I2C bus to prevent voltage problems and address problems I2C isolators will be used and to prevent address duplication i will be using a multiplexer.
my problem is with masters on an I2C bus a remember reading that there can be 2 masters on the bus the multiplexer can limit it to 2 masters at any one time, how do the 2 master arduinos talk to each other?
this is how I intend to put the first part of my project together the cellog. each cell input to a ADS!!!% will go through a voltage divider (except the first) to not blow up the ADS1115.
in this device a multiplexer will not be needed as only 2 ADS1115 will be used. The code i make from this device will help me for the next stage a battery pack monitor that is modular measuring 4 cells in series at a time.
To insert your image into your post, attach it and post, like you just did. Then right-click on the image link and copy the address. Then modify your post, use the insert image icon and paste the address.
What is that "i2c isolator"? Its that the i2c multiplexer? Also you already to have made some mistakes between the "8 cell load balance", the ads1115s and the step-up convertor.
PaulRB:
What is that "i2c isolator"? Its that the i2c multiplexer? Also you already to have made some mistakes between the "8 cell load balance", the ads1115s and the step-up convertor.
The I2c isolator is a device that isolates the 4 wires of the bus allowing a floating ground look at these spec for the ADuM1250.
I do know I have missed out the voltage dividers between the cell terminals and the ADS1115 I will amend that.
I can't see any problem with the step up converter, it takes in between 2.7 and 4.2v and sends out 5 v perfect voltages for a 5v arduino may have to be a bit careful with the display.
for this device a multiplexer is not needed once I have more than 4 ADS1115 modules going on to the same bus that's when the multiplexer will become needed.
I'll do a few more schematics that should make what I am doing more obvious.