Author Topic: My Victron BMV-600S is now posting it's data online!  (Read 23144 times)

kibi

  • Full Member
  • ***
  • Posts: 121
My Victron BMV-600S is now posting it's data online!
« on: March 09, 2013, 02:01:23 PM »
Martin has done a video or two on the Victron MBV-600 series battery monitors. It really is a fantastic little unit, regarded by some as one of the best battery monitors about these days.
I while ago I posted how I hacked a cable to get it to work with the free software.



The interface is good and does what it should do, the software can log to a .CSV too, but you need a computer on all the while, burning energy.
I also stated at the time that it would be better to have the data presented online - cheaply. Victron do have a solution, but you must pay, a lot.

So, I finally got around to it and I have used an Arduino with an Ethernet Shield to grab the data that spews profusely out of the back of the BMV-600S and present it on Cosm's IoT website. Now I can view the data wherever, whenever. It could even be interactive, so I could switch things on or off via Cosm on the Arduino. I have not done this yet though.
Whats more, I can download the data from Cosm in CSV, XML or JSON. I think free Cosm accounts will store three months worth of data.

I looked everywhere for some code that I could load onto my Arduino to do the job, but it seems that nobody else has done it. So I had to write the code myself armed only with the datasheet supplied by Victron. I hate writing code. I like soldering irons and bits of old wire.
I got 99% of what I need to do done in the Arduino sketch, but after many many hours of wailing and gnashing of teeth I was stuck with one last bit. I got around this by using a soldering iron and some bits of wire - job done. Basically I needed to block the data stream into the Arduino at certain points, but I couldn't figure out how to do it in the sketch, so I soldered a crusty old BC547 in open collector mode to pull the Rx pin down to ground externally. The transistor gets turned off by the Arduino when it is ready to receive data. Crude, but it works.

This is what the raw data looks like as it comes out of the BMV-600



So here is a link to my Cosm feed where my BMV-600S is currently posting data live. Unfortunately, nothing too exciting is going on at the moment because I dont have my solar system set up yet. The inverter is just charging the battery continuously for now. Annoyingly you have to keep refreshing the Cosm page to see the latest data.

https://cosm.com/feeds/116608

I hope to set up my solar system early in the summer time and then things will get interesting. I'll also wire my temperature sensors to this Arduino and modify the code to suit at some point.

I'll attach the Arduino code too if anyone is interested, it's a TXT file, but just paste into the Arduino IDE. I have a lot of comments in the code, so that should explain what I did in more depth.

Not much to see here, just the hardware lashup.




EDIT: I forgot to include the screen shot of the raw data feed from the Victron.
« Last Edit: February 19, 2015, 12:00:18 PM by kibi »

SeanB

  • Administrator
  • Hero Member
  • *****
  • Posts: 1017
Re: My Victron BMV-600S is now posting it's data online!
« Reply #1 on: March 09, 2013, 02:33:20 PM »
Very nice there. My little solar panel is not really attached to any monitoring other than a basic voltage and current sensor, but I did notice today that in the rain that this was the first day where I have actually drawn more energy out of the battery than I put in. Normally the charge limiter will kick in in late afternoon, or even at noon, but today nothing, I have been using lighting off it for half the day and it is slightly discharged. Max draw is 1.2A though, 4 3W LED lamps at present. I hope to power the workbench lighting from it soon as well, along with doing cordless screwdriver charging as well ( seeing as they all are provided from the same 12V supply it will be easy to change over).

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #2 on: March 09, 2013, 04:04:19 PM »
That is good to know. It's always interesting to find out what other people are getting away with in terms of solar sizing. It's amazing what you can do when you start being sensible with energy.

I plan to run my workshop with two 250W panels to start with and provision for another if required when winter time swings by.
I'm going to go with a Midnite Classic 150 charge controller which can log data for 380 days and it has a web interface. It'd be nice to incorporate some of it's data into the Cosm stream, although I might need to use the Arduino MEGA for that one. This current code has gobbled up 22KB already and I still have to put my temperature sensors on it. 10K is enough for the temperature sensors, but I don't think it'll be enough once I start having to do web queries on the Classic. Maybe I could use the Classic's RS232 interface instead.
This is all talk for now, I stop getting paid in two weeks time. I hope for an extension on my contract then I can go ahead.
I hate coding.





SeanB

  • Administrator
  • Hero Member
  • *****
  • Posts: 1017
Re: My Victron BMV-600S is now posting it's data online!
« Reply #3 on: March 10, 2013, 12:16:51 AM »
Good luck on the extension, you are doing well there it seems.

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #4 on: March 10, 2013, 03:50:51 PM »
Thanks you. It should be alright as there is still lots of work coming up.
I just don't want to spend a load of money without having a bit of paper that says I will get paid for the next six months.
One thing that was pretty cool about this battery monitor project is that it didn't cost a cent!

SeanB

  • Administrator
  • Hero Member
  • *****
  • Posts: 1017
Re: My Victron BMV-600S is now posting it's data online!
« Reply #5 on: March 10, 2013, 04:13:34 PM »
Preferable to have a longer term as well, but as they say.............. Holding thumbs for you, never know when I might want a TTI power supply delivered to a UK address.

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #6 on: March 10, 2013, 05:18:59 PM »
It's one of the disadvantages with being a contractor. The maximum term is usually six months.

MJLorton

  • Administrator
  • Hero Member
  • *****
  • Posts: 817
Re: My Victron BMV-600S is now posting it's data online!
« Reply #7 on: March 12, 2013, 06:43:21 AM »
Holding thumbs for you as well Kibi...I know how that waiting on a contract / extension used to feel.

Excellent work on that hack and getting around the fees Victron would have charged....that's something I did not know...glad you raised it.
Play, discover, learn and enjoy! (and don't be scared to make mistakes along the way!)

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #8 on: March 12, 2013, 06:14:18 PM »
Thanks Martin.
The financial holdup has been a bit of a blessing actually because it has given me more time think about and design the system properly, making a few savings along the way :)
At the moment it's looking like a 800Ah - 1000AH bank, 750 - 1KW array (space permitting) and the Midnite Classic MPPT controller. The Classic is more powerful than a FM 80, the Classic 150 will charge at 96A giving just over 1KW charge capacity for a 12V bank. It'll charge a 48V bank at nearly 4.5KW!!!! I believe that it'll accommodate higher voltage banks offering even more power. The classic also has all the bells a whistles built in the that Outback doesn't. The Classic is more expensive than the basic FM 80, but considering the extra power and toys it's well worth it I think.

MJLorton

  • Administrator
  • Hero Member
  • *****
  • Posts: 817
Re: My Victron BMV-600S is now posting it's data online!
« Reply #9 on: March 15, 2013, 03:36:10 AM »
Brilliant, I've seen a video review on the Midnite and it looks very good....especially with all the features. Look forward to seeing how it all comes together.

Cheers.
Play, discover, learn and enjoy! (and don't be scared to make mistakes along the way!)

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #10 on: May 14, 2013, 02:28:31 PM »
OK, so today Cosm blew up. They sold out to LogMeIn. Their IOT thingy is called Xively.

My old Cosm feed was ported across as a legacy feed, but I have created a new Xively feed because in due time the legacy Cosm feeds will no longer be supported I expect.

So, my new Xively feed is as such:

https://xively.com/feeds/611817707

The Xively feed updates the values without having to refresh the page, which is nice. Unfortunately however, the brain surgeons at Xively have not thought to have their graphs plot negative values. This is a big problem which I hope will be resolved soon. Also, you can't select the resolution of your timeline and there is no scale on the Y axis.

I have also had to amend the code to write directly to Xively. It is attached below, it only works on an Arduino MEGA, but you'll get the idea. This code also includes my DS18B20 sensors which my previous attachment did not.
« Last Edit: March 04, 2015, 04:01:49 PM by kibi »

sail

  • Newbie
  • *
  • Posts: 1
Re: My Victron BMV-600S is now posting it's data online!
« Reply #11 on: May 31, 2013, 06:19:27 AM »
Hi kibi,

in your first post you notice about cable hacking. Unfortunatey I can't find this post. Victron write about galvanic isolated cable. Can you give me a link to the cable hack. Is it TTL  5V or 3.3V Level on the BMV-602 side?

By the way the WIN Software  seems to be download fro free on http://www.victronenergy.com/upload/documents/BMV-602BatteryMonitorV1.1.zip

So for first testing normaly only a cable is needed, best a ftdi USB cable solution or something like this. Who has a RS232 connector today.

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #12 on: June 09, 2013, 12:14:13 PM »
Hello Sail

I did not go into any details about the cable hack. I basically used a MAX3232 which is a 3.3V TTL  to RS 232 converter. The BMV is TTL 3.3V. You could then use a FTDI USB to serial converter to connect to a laptop or whatever. It is most unfortunate that manufacturers are omitting the RS232 ports these days.
Yes, the Windows software is free.

glynhanmer

  • Newbie
  • *
  • Posts: 1
Re: My Victron BMV-600S is now posting it's data online!
« Reply #13 on: June 02, 2014, 10:51:01 AM »
Hi, great post.
I'm hoping to connect a Victron BMV 700 or 702 to an Arduino for a similar purpose.
Just wondering though, what is the physical interface on the BMV side?
Did you buy it extra or did it come with the BMV?


This is what's provided on the Victron website but it doesn't really give any other clues. Shame, because if it said the exact interface, I'd be much more likely to give them the business.
Is that what yours looks like?

kibi

  • Full Member
  • ***
  • Posts: 121
Re: My Victron BMV-600S is now posting it's data online!
« Reply #14 on: June 08, 2014, 05:55:27 PM »
This is what it looks like on the back of my BMV-600. It's a standard 2.54mm pin pitch, so I just used a header plug to connect to it.