Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Engineering & Systems > Electrical: Batteries, Generators & Solar
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 23-10-2017, 13:56   #46
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by john61ct View Post
I don't think their simplicity is based more on the market not caring for that level of detail.

All the shunt-based ones I'd use work with up to 1000A currents, far more than most even recent model large sailboats use.
the shunt is safe bet ( I originally planed to use on ) but it ios not very acurate eighter... but this si not the issue - I'm prety happy with the battery monitors as amp meter or voltmeter - the thing that I want more is the way how the SoC is calculated, some summary data and multiple points ( I want at least 5 of measure and of cource the option to play with teh software myself
vtomanov is offline   Reply With Quote
Old 23-10-2017, 18:16   #47
Moderator
 
Dockhead's Avatar

Cruisers Forum Supporter

Join Date: Mar 2009
Location: Denmark (Winter), Helsinki (Summer); Cruising the Baltic Sea this year!
Boat: Cutter-Rigged Moody 54
Posts: 33,873
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by vtomanov View Post
the best and only 100% exact state of charge is based on volts - BUT a BIG BUT - the batteries shoudl be left to rest for about 24h !! e.g. in practice cannot work whne batteries in dalily use the current implementation is based on apms in and amps out + coeficient for the loss ( e.g. as starting coef to get 1ah out you need to charge 1.25ah) , the coef is adjusting every time the bateries are charged in full or the batteries has been in rest and the ciorrect state of charge can be determined based on the voltage - and the coef can be adjusted based on the actual amps in and out , the calculated state compared to the actual state.

battery capacity - the current version is not adjusting it as the only way to adjust it dinamicaly is again whne batteries has been resting for good amount of hours - and calculate the capacity based on the actual charge state compared to the exact charge state and the amps in and out ...

e.g. the current implementation is doing the best as it can to determin the actual state of charge dinamicaly and adjusting its calculations whne possible by actual state from voltage when fully charged or resting for enough time
Did you think about integrating some SOC data derived from other methods besides counting amp/hours? Like system voltage after no charging has been going on for long enough to know that the surface charge is off? Current during absorption charging? I would think you could get greatly increased accuracy if you could cross check the SOC calculations against these different measures and let the system "learn" and anticipate.

I would think that the system voltage response to particular loads could also indicate SOC very accurately in some cases -- no? And you will have very good data since you are measuring loads in different places.
__________________
"You sea! I resign myself to you also . . . . I guess what you mean,
I behold from the beach your crooked inviting fingers,
I believe you refuse to go back without feeling of me;
We must have a turn together . . . . I undress . . . . hurry me out of sight of the land,
Cushion me soft . . . . rock me in billowy drowse,
Dash me with amorous wet . . . . I can repay you."
Walt Whitman
Dockhead is offline   Reply With Quote
Old 23-10-2017, 18:43   #48
Registered User
 
hzcruiser's Avatar

Join Date: Aug 2008
Location: Sydney, Australia
Boat: Roberts 45
Posts: 1,037
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by vtomanov View Post
Thanks!

Simple Kalman filter does a very good job( actually mandatory) for amps/volts and GPS measurment :

/ make sure you use the Kalman to the raw data - e.g. on the pin readings and the raw GPS coordinates - not on the final calculations /

example for GPS - from one of my other projects ( you can see the volt/amps in the merix project)

//
Thanks, I've looked at your other github projects yesterday, really good stuff!
__________________
Fair winds,
heinz

https://www.timantra.net
hzcruiser is offline   Reply With Quote
Old 23-10-2017, 18:59   #49
Registered User
 
hzcruiser's Avatar

Join Date: Aug 2008
Location: Sydney, Australia
Boat: Roberts 45
Posts: 1,037
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by Dockhead View Post
Did you think about integrating some SOC data derived from other methods besides counting amp/hours? Like system voltage after no charging has been going on for long enough to know that the surface charge is off? Current during absorption charging? I would think you could get greatly increased accuracy if you could cross check the SOC calculations against these different measures and let the system "learn" and anticipate.
I'm sure he has thought about it and so have I. The question then arises how to combine those values to the "real" SOC, even though the SOC itself can be a misleading or at least a somewhat evasive number if someone just wants to know how long the batts will last under the current load (or maybe even an average load based on the pattern of the last x days?). Also Peukert plays a big role for LAs, but less for LFPs.

That's what a "learning system" could do but by the same token other people will be quick to bag the numbers the system gives you when they compare it to their "trusted" old system. Hence you can't win either way.

Quote:
I would think that the system voltage response to particular loads could also indicate SOC very accurately in some cases -- no? And you will have very good data since you are measuring loads in different places.
System voltage response to a load is a similar can of worms. It could be influenced by the age of the batts as well as temperature in addition to the "estimated SOC". In the same fashion as above it comes down to "how to combine all those sensor data flows into a useable and reliable number"?
__________________
Fair winds,
heinz

https://www.timantra.net
hzcruiser is offline   Reply With Quote
Old 23-10-2017, 23:12   #50
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by Dockhead View Post
Did you think about integrating some SOC data derived from other methods besides counting amp/hours? Like system voltage after no charging has been going on for long enough to know that the surface charge is off? Current during absorption charging? I would think you could get greatly increased accuracy if you could cross check the SOC calculations against these different measures and let the system "learn" and anticipate.

I would think that the system voltage response to particular loads could also indicate SOC very accurately in some cases -- no? And you will have very good data since you are measuring loads in different places.
the implementation already adjust the SoC besides counting amp/hours on :

- when voltage is >= 14 and not charging is going on
- based on voltage after no charging/discharging has been going on for long enough( configurable)

good idea about how system voltage is changing on particular loads ! - the issue that I have is that the project is designed to handle multiple battery banks for example in my case I have two - one at stern and one at bow - to the bow I have directly connected bow thruster and inverter - everything else is of the stern one - and the bow battery bank generally has normal voltage drop of 0.5v from the long cable connecting the both.. e.g. all will become little bit tricky but worth a try thanks!
vtomanov is offline   Reply With Quote
Old 25-10-2017, 10:29   #51
Registered User

Join Date: Feb 2016
Posts: 143
Re: Free Open Source Advance Battery Monitor System

Thanks for sharing your project!

Definitely interesting. My own setup is ADS1115 for voltage and ina219 over shunt for amps, wired to a RPi and Signal K server.

Have you considered anything else than a self contained unit, like connecting the sensors to wifi and making the data available in Signal K format? That way you could for example
- log all the measurements in InfluxDb time series database and have flexible graphing options with Grafana (or some other database/graphing system)
- publish the data to be viewed remotely, directly off the boat or via a cloud system
- have the data available on your smartwatch or smartphone at the helm


Another point about modularity is that many people have rolled their own SoC calculation implementations. They are often locked away inside dedicated projects much like yours.

Now imagine a world where you could plug an algorithm like yours into a hub that can receive V and A measurements from different sources, like NMEA2000 and i2c connected sensors. Then we could share & improve the algo, independent of the exact setup people have.

Signal K » Welcome
https://github.com/influxdata/influxdb
https://grafana.com/
teppokurki is offline   Reply With Quote
Old 25-10-2017, 22:34   #52
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by teppokurki View Post
Thanks for sharing your project!

Definitely interesting. My own setup is ADS1115 for voltage and ina219 over shunt for amps, wired to a RPi and Signal K server.

Have you considered anything else than a self contained unit, like connecting the sensors to wifi and making the data available in Signal K format? That way you could for example
- log all the measurements in InfluxDb time series database and have flexible graphing options with Grafana (or some other database/graphing system)
- publish the data to be viewed remotely, directly off the boat or via a cloud system
- have the data available on your smartwatch or smartphone at the helm


Another point about modularity is that many people have rolled their own SoC calculation implementations. They are often locked away inside dedicated projects much like yours.

Now imagine a world where you could plug an algorithm like yours into a hub that can receive V and A measurements from different sources, like NMEA2000 and i2c connected sensors. Then we could share & improve the algo, independent of the exact setup people have.

Signal K » Welcome
https://github.com/influxdata/influxdb
https://grafana.com/

yep I have all this ideas in mind but I have seen soooo many projecta starting with "Latest and Greatest" idea and dead before they even have started that's why I started from a simple easy to go and cheap to make thing that if nothing else happened will do a great job for at least my own boat and another 2-3 friends

btw for future improvments my plan at this stage is :

1. adding a bigger screen ( whith charts and other extras) :

TFT LCD 3.5 inch Display for Arduino Touch Screen Module UNO R3 Board Plug | eBay

2. addinga bluetooth connectivity to a mobile phone and having a mobile phone app that ca display log and share all the info

https://www.ebay.co.uk/i/26298798208...7332737&crdt=0

3. addiniang a LoRaWAN module communication for sharing the information remotely.

https://www.ebay.co.uk/itm/1-2-4Pcs-...53.m2749.l2649
vtomanov is offline   Reply With Quote
Old 25-10-2017, 23:51   #53
Registered User

Join Date: Feb 2016
Posts: 143
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by vtomanov View Post
but I have seen soooo many projecta starting with "Latest and Greatest" idea and dead before they even have started
+1 on that! And then there are so many projects that are never shared.

Quote:
Originally Posted by vtomanov View Post
1. adding a bigger screen ( whith charts and other extras) :
Are you quite sure Arduino/C++ is the best platform for charts and other extras?

Quote:
Originally Posted by vtomanov View Post
2. addinga bluetooth connectivity to a mobile phone and having a mobile phone app that ca display log and share all the info
Bluetooth provides point to point connectivity, Wifi would enable sharing with all connected devices.

Quote:
Originally Posted by vtomanov View Post
3. addiniang a LoRaWAN module communication for sharing the information remotely.
Yikes, that's like 3-4 times the price of esp8266 boards just for wifi
teppokurki is offline   Reply With Quote
Old 26-10-2017, 01:30   #54
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by teppokurki View Post
+1 on that! And then there are so many projects that are never shared.



Are you quite sure Arduino/C++ is the best platform for charts and other extras?



Bluetooth provides point to point connectivity, Wifi would enable sharing with all connected devices.



Yikes, that's like 3-4 times the price of esp8266 boards just for wifi

I'm sure C++ is the most difficult option for writing charts - but in the same time really fedup childish libraries taht one is available for one platform, next for another and nothing is awaylable together and in the end I need to write it again all by mysef and just generated a huge time wasting experimenting with this and that - the main issue is not C++ ot Arduino it is actually the momory and CPU speed to controla descent touch screen, but also if you write a good code ( for exmaple update teh screen in blocks not pixel by pixel) the job can be done pretty well

BT - I have a lot of gadgets on my boat and in home also which use wifi - and all of them wants me to connect to them as a access point - none of them supports connecting to existing access point - really annoiyng ! and in the same time somehow after in all of the EU countries you can use your home mobile data having a access point on the boat has bocome useless... and BT supports more then one device in teh same time ... hence going for BT

LoRa - it seems the world is moving towarsd LoRA and more and more gatweys are available - hence the plan to get teh external connectivity using LoRa - of course the exampel that I posted is just for one device - in really ty most likley I will just connect a LoRa PCB to the mail arduino-server ...


FYI : personally if I need to choose platfomr is Java, but I'm 47 years old and have about 35 years software development experince and I work on all languages all platforms almost daily e.g. it is not a problem to switch from one to another


offtopic :

in the everyday life I run the company : B2Net.net | Home - we do externally-hi-performance solutions for investment banking industry and other financial ogranizations ( the part of the banks and financial organizations which deal with FX, Equities, Indices etc. Exchanges, Trading etc.) and a small mistake in our software can lead to millions lost in a second... may be I have become tooo strict about the quality and thinking well ( overthinking/overengineering) before doing something stupid I don't know.... possibly ...
vtomanov is offline   Reply With Quote
Old 26-10-2017, 23:22   #55
Registered User

Join Date: Feb 2016
Posts: 143
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by vtomanov View Post
.. use wifi - and all of them wants me to connect to them as a access point - none of them supports connecting to existing access point - really annoiyng !
Since you're writing your own software I don't see how this argument applies. This problem has been solved multiple times and you can just use a library that solves it for you, for example https://github.com/tzapu/WiFiManager.

Quote:
Originally Posted by vtomanov View Post
and in the same time somehow after in all of the EU countries you can use your home mobile data having a access point on the boat has bocome useless...
My boat wifi is there to make all the data accessible to native apps and browser apps on my phone, watch, tablet and computer. Access point/local wifi is not the same as Internet connectivity.

Quote:
Originally Posted by vtomanov View Post
LoRa - it seems the world is moving towarsd LoRA and more and more gatweys are available - hence the plan to get teh external connectivity using LoRa - of course the exampel that I posted is just for one device - in really ty most likley I will just connect a LoRa PCB to the mail arduino-server ...
LoRa is something new for me, thanks for pointing it out. I guess it also explains the price for the adapter you linked earlier. GSM/4G is way more popular and ubiquitous here.

The part about PCB to mail arduino-server I did not understand.
teppokurki is offline   Reply With Quote
Old 27-10-2017, 01:20   #56
Registered User

Join Date: Mar 2013
Location: sailing south
Boat: Ericson 35-2
Posts: 330
Re: Free Open Source Advance Battery Monitor System

Nice code, doesn't look like this is your first embedded gig.
Few stupid questions if I may?

* How much current does each gauge consume? Haven't found any power management stuff in the first three minutes of looking, so would 50-100mA be a good guess?

* How many datapoints are you pushing to the hub per gauge, per minute?

* Have you tested this thing in some sort of noisy environment yet? What does a VHF or AIS transmitter do to NRF24L01 feeding from the same battery?
RedHerring is offline   Reply With Quote
Old 27-10-2017, 01:37   #57
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by RedHerring View Post
Nice code, doesn't look like this is your first embedded gig.
Few stupid questions if I may?

* How much current does each gauge consume? Haven't found any power management stuff in the first three minutes of looking, so would 50-100mA be a good guess?


* How many datapoints are you pushing to the hub per gauge, per minute?

* Have you tested this thing in some sort of noisy environment yet? What does a VHF or AIS transmitter do to NRF24L01 feeding from the same battery?
consumption - my measurments show around 40-50ma with 2 voltage sensors, 1 hall sensor and 1 NRF24 and arduino UNO - without using power down sleeping mode

the whole things is configurable by default every gauge is requested to send data once per 500msec , ( in case you have a slave gauge - then both will go together - exmaple I use one of my gueauges to measure all house consumers - volts and amps and consumption and volts of teh starter battery - starter batery is configured as s "slave" gauge e/g/ teh data will be send together with the master gauge data.

in brief every 500 miliceond teh server ask another gauge to send data - if you have 4 maser gauges like my setup every 2 sec every gauge will send data to the server module

I'm testing it is a marina between houses and blocks e.g. re;lativly noisy with all VHF, AIS, and other electronics ON - and sometime it actually take 2 retries to send/get teh data, but using the RadioHead RHReliableDatagram solves the issue - btw - it make huge difference where the antenna is pointing - need to pint to the sky -a s per the instruction in teh readme and also better be out of the box where all the electronics are sorted.
vtomanov is offline   Reply With Quote
Old 27-10-2017, 02:37   #58
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Free Open Source Advance Battery Monitor System

Quote:
Originally Posted by teppokurki View Post
My boat wifi is there to make all the data accessible to native apps and browser apps on my phone, watch, tablet and computer. Access point/local wifi is not the same as Internet connectivity.
You are probably well acquainted with MQTT but maybe others browsing might not be so ..

Similar setup here on a raspberry pi running openplotter running an offshore access point plus a mobile phone running one at anchor plus net access if close enough to a mobile signal. MQTT works well for mobile data as it's so small, the Pi runs a MQTT broker then node red spits it out to cloud MQTT - this can be handy as you can view from anywhere online using FRED online node red to view graphing etc.(Though free version shuts down every 24H if you don't re log on. ) I use MQTT a bit for esp8266 to talk to the Pi as it's so much easier for me to program, then Openplotter turns MQTT into signalk.

InfluxDB & Grafana got loaded onto the Pi yesterday, fantastic for viewing

conachair is offline   Reply With Quote
Old 19-11-2017, 04:10   #59
Registered User
 
vtomanov's Avatar

Join Date: Jan 2016
Location: UK , London
Boat: Jeanneau Sun Liberty 34
Posts: 225
Re: Free Open Source Advance Battery Monitor System

Video of a full setup :

vtomanov is offline   Reply With Quote
Old 19-11-2017, 04:44   #60
Registered User
 
martinworswick's Avatar

Join Date: Sep 2008
Location: southern denmark
Boat: naver 29
Posts: 190
Re: Free Open Source Advance Battery Monitor System

i'm about to order all the parts to build one as a winter project,i may have some questions once the parts arrive!
i suspect the answer is no but would it be possible to monitor the individual batteries within the bank?
martinworswick is offline   Reply With Quote
Reply

Tags
battery, monitor


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Battery-to-battery charger (independant of source charge voltage) ayates Electrical: Batteries, Generators & Solar 38 18-03-2018 05:48
Crew Available: Panama Canal Transit - Anytime in April with Advance Notice wildlawnc Crew Archives 4 26-03-2012 17:00
Dux or Advance Cats breakaway Auxiliary Equipment & Dinghy 3 24-06-2011 23:21
Cyclades Bareboat - Advance Scouting Request . . . Martigre Europe & Mediterranean 4 24-08-2010 07:54

Advertise Here


All times are GMT -7. The time now is 03:53.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.