Master Board Version 3

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Wed Oct 20, 2010 7:10 am

Thanks for the prompt reply. I added on the list, one more relay control for heating/cooling is that possible to fit in V3 (this could be a commercial standalone unit ala gardening thermostat/sauna timer with its own settings to make it easier)? Also, let me explain the ODBII question, I was just thinking along the lines of displaying standard library information, i.e. from the list of known PIDs on the bus. So, there shouldn't be anything tricky or above your planned Honda IMA/BCM functionality, is that going to be Insight2 comapatible too (or that's V4 and beyond stuff - I've seen the related threads on insightforums)?

PS I think the approach of "recycling" older pda for touchscreen dash has got multiple advantages, firstly you can done this same task by dedicated carputer+7" touchlcd, but this is more cheaper and compact package.

Imagine you can not only display, log the data, but relatively easily redistribute (clone) the incomming [serial] information from the pda over existing home LAN/wifi network, or bluetooth and such by some 3rd party tools/applications already done/available for this platform, e.g. look for incoming serial data -> redistribution data on LAN kind of application (I run it myself in the GPS data cloning area of interest). We simply piggy back on this existing user friendly stuff. Another advantage, we are not dependent on the pda's frontend anymore, you can hook it up to any data crunching-user interface visualisation type of application there is be it for PC, could be bare web browser based stuff (incl. mobile web browser) or mobile (JAVA) capability.

Simply, put the BMS_Master serial data on the LAN via PDA = great potential for remote monitoring (V3). And perhaps in later stages and with some more coding or just customization of existing tools even operating some advanced bidirectional on/off functions (charger, temp manager, A/C control, ..), or simple RSS channel, since these need running server based service application (on your router) lets call that (V4) for a moment, although some of these could be done easily with V3 already.


        Internet remote monitoring (via RSS channel) - watching your EV/PHEV from the other end of the globe (V4)
       /
      /
    ⁄
   Remote EV/PHEV monitoring user front end on local network - later upgraded to bidirectional on/off functions (V4)
    based on existing notebook/PC and/or wifi internet browser enabled phone ala midrange Nokia with ~3" display
   /
 ⁄
Home router (often already in place for your family LAN/shared inet connection)


└--- wifi link -»- (bridged router in the garage) -»- dashboard PDA inside EV/PHEV (wifi/bt/serial enabled ala Ipaq 4700)
                                                                                              │
                                                                                              │
                                                                -/+ Batt pack ----- BMS MasterV3 ----- TEMP heating/cooling on relay
                                                                                              │
                                                                                              └--- Charger

                                                                                             »»EVSE on short range radio PLC dongle
                                                                                                (SCADA/PLC car version)
Last edited by Fufunka on Sat Oct 23, 2010 8:51 am, edited 1 time in total.

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Wed Oct 20, 2010 10:03 am

This is survey post for both needed area of software packages: serial com and actual displays..

1/ Looking for serial port-LAN, serial port server, serial port redirector and serial port tunneling over (TCP/IP, UDP, and more), and virtual port applications for Pocket PC 2003SE, WM5.0, WM6.0, some payware, others freeware:

http://www.fileguru.com/apps/windows_mobile_serial_port
functionality overview of Network Serial Port Kit by Fabula: http://www.fileguru.com/Network-Serial-Port-Kit/info
! http://www.fabulatech.com/serial-port-redirector.html http://www.fabulatech.com/serial-port-r ... -tour.html

http://www.serialporttool.com/CommOpPPCInfo.htm http://www.serialporttool.com/CommPalInfo.htm
http://www.devx.com/wireless/article/38030/1954

//There are also several hw solutions available for connecting serial device via rs232 to ethernet network (no intermediary PC/pda needed), some dongles even include wifi and some are also webserver based, so the bidirectional communication capability is right there. Lots of brands and systems, e.g. (there are cheaper or more advanced brands): http://www.gridconnect.com/net232-dte.html wifi/bridge router version: http://www.gridconnect.com/wi232.html

For adding serial device to the local (wireless) network or higher functionality like extending the range via bridging router with Master BMS attached, it's possible to utilize older yet very quality router WRT54G, which is modable to have upto serial ports (e.g., #2 as gps). Flash it with german-quality DD-WRT firmware, add some sw modules to enable serial port action. Little money, but some work needed, for almost the same functionality these new standalone wifi dongles like gridconnect.com offer.
http://owfs.org/index.php?page=wireless-router kits: http://jdc.parodius.com/wrt54g/serial.html
How-to directly from DD-WRT site: http://www.dd-wrt.com/wiki/index.php/WR ... 232_Serial
recent ones, incl. kit: http://www.curiousinventor.com/kits/spk ... structions http://hans.liss.pp.se/work/wrt54gs_serial.html http://www.dpeddi.com/wrt54g:wifi_rs232
Serial->WRT54 could be even connected via APRS radio (ham license), perhaps as security tracking only/beacon, emails, the radio internet is too slow for other application: http://www.dimebank.com/cak/k6dbg/k6dbg_igate.html

Starting w. Java devices, what's needed is at least a basic "serial logger" p.24:
http://java.sun.com/developer/Books/jav ... ook/11.pdf
or "Java classes that allow for real-time data acquisition from serial ports": http://thermal.gg.utah.edu/~gettings/source/SerialDAS/
more projects, serial library: http://users.frii.com/jarvi/rxtx/projects.html
!example, links: http://www.kuligowski.pl/java/rs232-in- ... -windows,1
dev package Eclipse Mobile Tools for Java: http://www.eclipse.org/dsdp/mtj/develop ... arted.php/
http://www.javamidlet.com/2008/01/18/ho ... pment.html
!opensource library: http://java.giovynet.com/Giovynet/

LiveGraph, web, API: http://www.live-graph.org/index.html
(MIDP ver?) very good example tiny (12kb): http://www.brucelawton.org/Monitor.html

Excel/oo calc sheet to RSS feed tool (e.g. Gigaset application), Google it, good start: http://www.google.com/search?hl=en&q=ex ... =&gs_rfai=
!gigaset rss tweak: http://copyandpastecode.blogspot.com/20 ... -s68h.html
http://www.automateexcel.com/2004/12/15 ... ith_excel/
http://www.automateexcel.com/2005/09/20 ... g_xmlhttp/
http://digitalimprint.com/misc/oooexport/#install

G: serial data to excel: http://www.google.com/search?hl=en&sour ... =&gs_rfai=
COM Port Data Emulator - freeware: http://www.aggsoft.com/com-port-emulator.htm
serial data parser, exporter, excel, local database, tutorials (ASDL):
http://www.aggsoft.com/asdl-excel-real- ... arting.htm
http://www.aggsoft.com/asdl-capture-ser ... -excel.htm

Using Microsoft EXCEL to log and analysis serial port data.
http://code.msdn.microsoft.com/Caspar

Abyss webserver: http://en.wikipedia.org/wiki/Abyss_Web_Server
http://logix4u.net/Python/Tutorials/How ... cript.html

--

2/ GUI interfaces or frontends for PC/mobile to read/plot/analyze that serial data stream:

- Matlab/LabView/Simulink environment and similar or opensource
  (~6:00) http://www.youtube.com/watch?v=e2eRq3vF ... re=channel
- PLC/SCADA/HMI frontends?
  !There is OpenScada/OSCADA? (object environment tool, check the gallery and modules): http://oscada.org/
  In addition to OpenScada, here +2free SCADAs in russian, lol: http://translate.googleusercontent.com/ ... jcwLCP0BmA
  recommended "cheaper" hw: http://www.icpdas.com/products/Products-list.htm#P7
- custom application for a given hardware platform (Windowsmobile, XP, Java)
  e.g. Mindaugas (Honda HR-EV) http://hr-ev.blogspot.com/2010/05/3e-ec ... ctric.html

Moreover, even simpler solutions exist to get user friendly frontends, we input raw data over network from the original serial source, so what's next? In order to display info via web browser it's possible to greatly simplify the coding task by using premade libraries, for assembling graphs, gauges etc. Here comes http://raphaeljs.com/
google spreadsheets automatic -> into graphs http://blog.jeremi.info/entry/creating- ... preadsheet
online example (+ 1-wire system): http://owfs.org/index.php?page=javascript-raphaell-js http://www.rjconway.homeip.net/

More visual libraries: http://sixrevisions.com/javascript/20-f ... libraries/
!very cool one, "jQuery plugin generates sparklines": http://omnipotent.net/jquery.sparkline/
(tiny & compact, perhaps best for browser on mobile phones - can OperaMobile handle it?)
!best graphs (+print, save pic): http://highcharts.com/ http://highcharts.com/demo/?example=lin ... me=default

"Dynamic - Through a full API you can add, remove and modify series, axes or points at any time after chart creation. Numerous events supply hooks for programming agains the chart. In combination with jQuery's or MooTools' Ajax API, this opens for solutions like live charts constantly updating with values from the server, user supplied data and more."

"External Data Loading - Highcharts takes the data in a JavaScript array, which can be defined in the local configuration object, in a separate file or even on a different site. Furthermore, the data can be handled over to Highcharts in any form, and a callback function used to parse the data into an array."

Peter, hopefully, no more excel graphs, you can feed your raw number data into simple local webserver, and with these libraries, add few lines of code (look at the highcharts.com documentation/how-to section) have nice presentable frontend for your IMA experiments. As next step it could be all automated and placed online (BMS Master -> serial -> PC or direct rs232toEtherNet dongle -> webserver -> JavaScript libraries and default HTML page with code -> dynamic frontend at specific web address via PC screen for everybody to see or login protected as private area).

So, in the most advanced-final scenario, one could monitor the real time status of his vehicle being charged, with all the BMS stats plotted, sensory inputs, temperatures, .. be it on PC, pda or mobile phone, around the globe. And with two way communication also able to physically shutdown or restart specific circuits within that chain.
Last edited by Fufunka on Sat Oct 23, 2010 12:04 pm, edited 37 times in total.

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: Master Board Version 3

Postby retepsnikrep » Wed Oct 20, 2010 5:29 pm

Fufunka :shock:

I don't understand 75% of that. I appreciate the info and I'll spend hours reading it, but perhaps for Master V10 we might be where you envisage. I'm no electronics or computer wizard sadly. I'll keep plodding away with V3 and add a cooling fan/heater output if we have spare IO capacity, as we are going with a 40 pin pic we should have.

I'm working on lots of projects and have found feature creep to be a serious problem especially when trying to please numerous users. :wink:

The odbii stuff would hugely complicate the master software, i want that to concentrate on the batteries and ancillaries, the standard odbii stuff is available via a multitude of comerrcial and freeware software/hardware etc already.

The insight IMA ODBII stuff is not accesible except via the Honda ODBII device, and my device will be specific for the insight Mk1 and a standalone unit.
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Wed Oct 20, 2010 6:45 pm

As mentioned above, most of the stuff is already there on the table, it's just matter of connecting a couple of existing applications, setting up your router in case garage/parking spot is far away (and additional bridging router is needed), perhaps in your case you can run the ethernet cable from car directly to your bench table laboratory, depends on your home LAN, upto few dozen meters it's no prob.

These frontends are subprojects to be played and improved on long winter evenings, most importantely the default functionality, i.e. cloning of the raw BMS Master data over network should not be a problem. Don't worry there are effectively no demands to be placed on the BMS V3 (or V4) itself, as long as it's capable of sending/receiving data over rs232 serial bus regularly.. I'll try to put up some demo soon 8)

OK, to include ODBII is not that crucial at the moment, Prius people can get it from Norman's boards, or Scangauge or its opensource variants we mentioned are available on ecomodder, it can always remain as a separate display as we have it today.

The very first task, however, might be politely asking Mindaugas Milasauskas as to whether his pda software is available for diyers and/or non-commercial application. As posted before any such application can be dry tested beforehand without even owning the device, microsoft provides demo tool for these devices/pda operating system. I guess these used Ipaqs run for ~$150, and everything is included: large touchscreen display, computer/operating system, serial device port (*cable optional/not in the package?), BT & Wifi connectivity, .., obviously it could be a much cheaper used pda with clunkier specs, this one is just the best. And if the answer from him would be negative, we shall at least get some hints about the software enviroments he based that project on.

* How does it look? Serial rs232 cable only:
http://www.serialio.com/products/adapto ... _RS232.php http://www.martgreat.com/hp-ipaq-hx4700 ... cable.html
but we need combo: serial cable w. charging, ... , ? http://www.ipaqrepair.co.uk/ipaqpart1292.html
or something like rs232<->BT dongle https://serialio.com//store/product_inf ... cts_id=280

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: Master Board Version 3

Postby retepsnikrep » Wed Oct 20, 2010 8:53 pm

Serial I/O is not a problem so any of those should work
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: Master Board Version 3

Postby GregsGarage » Wed Oct 20, 2010 10:16 pm

Nice ideas about displays and interfacing with the vehicle and/or networks. I think all that should be done separate from the bms. One way to do this is with bi-directional serial communications with the bms. With the bms sending a serial data stream, if you add the ability to receive commands over the serial connection then you can do away with the display and buttons, basically making a "headless" bms. Then any fancy integration with the internet, can bus, obd, etc., can be handled by a separate car-puter monitoring and controlling the bms over its serial port. Hardware wise, even V2 of the master would support this over the picaxe programming port. All it needs is some changes to the software, mainly in the buttons and menu routines. I don't think Peter or myself would devote any time towards this in the foreseeable future, but the source code is there for anybody to modify for their own needs.

The best plan is to keep the bms as simple as possible and get it working fully. :shock: I have been looking at different strategies for getting a 1 second loop in the program and have come to the conclusion that the best option is to go with the 1 second tick from the watchdog. Trying to do it directly in the master is proving tricky. Can't use interrupts as they would disrupt the cell data from the slaves. I have found some RTC code that doesn't use interrupts but that requires checking for timer overflows at least 30 times a second, which is possible but messy. Anyway this really belongs in the software thread so I will post some ideas I have been working on in the next couple of days.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Wed Oct 20, 2010 10:50 pm

Agree, this is sort of upper cloud over the BMS..
The advantage of the most complex stuff like PLC components and SCADA is that it's one great package, including a database, which collects in one place all the performance data and sensory inputs, relay positions, (wall) energy consumption, issues daily/monthly automatic summary reports, web server capabilities and what have you. I think this is quite worthy as even today's oem EVs/PHEVs enjoy unknown reliability, calendar life longevity of batteries is questionable beyond ~5yrs etc. This would provide the ultimate user databank in relation to (mal-) performance of particular "experimental" project/vehicle.

Lets start exploring the easiest "one way street" - only monitoring incoming data from the Master via simple internet webpage log (serial rs232-2-ethernet); and/or that serial cable-2-pda link as shown in that HREV. Also with above described serial-2-BT module, one can progress such direct wireless mode by making relatively simplistic BT port "sniffing" Java application, dumping the list of incoming info from the Master onto most of the low-midrange mobile telephones from the 2000+ years. So, all in all, not much invested, I gather that hooking up only that dedicated fancy gfx lcd touch board for the Master, as discussed up to the development of V3, might seem as waste now.

In the later stages, considering the SCADA related development, the issue of I/O (menu structure) as you mentioned should be addressed for the two-way communication. Yes, I think most of the entry level serial-2-xyz watchdog dongles are 1sec update anyway, in their services.

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Thu Oct 21, 2010 4:34 pm

Finally watched your brand new BMS/DAQ videos, very exciting, pls. allow for a couple of questions and little suggestions:

- this is quite clever approach to offload the computation of raw -> corrected data onto higher cpu outside the BMS master, e.g. in excel script/macro or some related batch enabled application (note: seems online remote monitoring will have to use some own services to compute that on the fly)

- now for the first simplest frontends based on recorded master data, it might be desirable to externally compute all these additional values, like hi/low cell vdc, hi/low temp cell, high/low assist, high/low regen amps by similar excel makro or script. Or isn't it already stored in some kind of buffer inside Master, so it could be just added into the data output (dumped as the final single item/not necessary repeat them for each posted line)?

- are the error codes missing from the master data output or just placed into separate file? Would it be possible to add them into the main output as well? Alarm #, Alarm Cell #, Alarm Time #, Alarm Adress #

ps updated that "survey post" - seems spending almost $200-300 for rs232-2-ethernet wifi dongle (w. bridge router capability) can be realistically avoided by modifying "old" WRT54 router for serial port in little inexpensive kit, I got two, one for a song.
Last edited by Fufunka on Thu Oct 21, 2010 5:09 pm, edited 3 times in total.

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: Master Board Version 3

Postby retepsnikrep » Thu Oct 21, 2010 4:52 pm

Fufunka wrote:Finally watched your brand new BMS/DAQ videos, very exciting, pls. allow for a couple of questions and little suggestions:

- this is quite clever approach to offload the computation of raw -> corrected data onto higher cpu outside the BMS master, e.g. in excel script/macro or some related batch enabled application (note: seems online remote monitoring will have to use some own services to compute that on the fly)

- now for the first simplest frontends based on recorded master data, it might be desirable to externally compute all these additional values, like hi/low cell vdc, hi/low temp cell, high/low assist, high/low regen amps by similar excel makro or script. Or isn't it already stored in some kind of buffer inside Master, so it could be just added into the data output (dumped as the final single item/not necessary repeat them for each posted line)?

- are the error codes missing from the master data output or just placed into separate file? Would it be possible to add them into the main output as well? Alarm #, Alarm Cell #, Alarm Time #, Alarm Adress #


Yes alarms can be included in exported data. Master software needs a good sort out to rationalise it :roll:

Master has to do enough work to compute cell voltages and make necessary comparisons for alarms etc and to enable correct data is available to send to video display.
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

Fufunka
Posts: 28
Joined: Mon Jul 30, 2007 9:59 pm
Location: UnobtaniumVille, ThirdRockSolarSystem
Contact:

Re: Master Board Version 3

Postby Fufunka » Thu Oct 21, 2010 5:33 pm

Look at it from the longer perspective, it is benefitial, that master won't be running the display at all, rather concentrating all its sillicon power on doing batt. management, and sending out (serial) data. As the visual-dashbord-logger operation will be offloaded onto another sillicon muscule inside pda, carputer, ..

Just a couple years ago the first generation palmpilots where basically for free, now they are almost too rare, what a waste, hah. Quite many successfull serial protocol driven dashboard projects have been utilized for it in the past decade plus, e.g. dashboard application for RAV4 EV, GM EV-1, Ford Ranger EV, and many others lesser known one of a kind conversions based on Zilla controller.. Now, even the Windowsmobile PDAs which crushed Palm in 2000s are almost obsolete as everything seems to integrate on single device, shaping up as mobile phone/netcommunicator combo.


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 30 guests