New proof of concept ideas, projects, inventions > New proof of concept ideas, projects, inventions

My Victron BMV-600S is now posting it's data online!

(1/4) > >>

kibi:
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.

SeanB:
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:
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:
Good luck on the extension, you are doing well there it seems.

kibi:
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!

Navigation

[0] Message Index

[#] Next page

Go to full version