Accessing the celltopbmu repository
Our celltop BMU is "open source", hosted on SourceForge.net
, and can be freely downloaded and edited. The celltopbmu project page is http://sourceforge.net/projects/celltopbmu/
. Now that we've sent off the hopefully final artwork, it's probably a good time to document how to access the design files.
You'll need these ingredients; Windows XP or later are required:
1) A Subversion
client. Subversion is a source-code version control system that allows many people to access source-code stored in a central repository, in this case on SourceForge
. We recommend TortoiseSVN, which is freely downloadable from here: http://tortoisesvn.net/downloads.html
. There are plenty of other subversion clients, but I'll show examples for Tortoise only. For others Subversion clients, the key URL is svn://svn.code.sf.net/p/celltopbmu/code/ (changed late May 2013).
2) DesignSpark PCB design software, if you want to view and/or alter the PCB layout. Remember that our PCBs are designed for 40 Ah cells, and should work unmodified with 60 Ah cells, but we haven't tested this. DesignSpark runs under Windows only. It is not size limited, it is freely downloadable from http://www.designspark.com/pcb
(free as in no cost
, DesignSpark is not itself open source). 60 MB download; loaded in about 15 seconds for me (cable connection). Activation is required, free, and moderately painless. The easiest thing is to just download the software, install and run it, and follow the prompts. I have listed some tips on using DesignSpark here
3) Other useful software, for development: IAR Embedded Workbench
(free, when you accept a code size limit), TeraTerm
or other serial communications software, Cygwin
and GCC for MSP430, but these can be the subject of another post.
Here's how to get read-only access to our SourceForge repository, which has the PCB design files as well as the software that runs on the BMUs and the software that runs on the modified Tritium Driver Controls unit we use as our BMS master. If you want to save changes to these sources for others to use (e.g. you make a version for 100 Ah cells), you could send files to Weber or myself (PIM if you don't have our email address), or convince us that you are trustworthy so we grant you "commit" rights, or start your own project, on SourceForge or elsewhere.
I'll start with installing TortoiseSVN
. It's a pretty standard download and install, so feel free to skip the first few steps below if you already have it or know what you are doing. Start at http://sourceforge.net/projects/tortoisesvn/
. Wow, 118,000 download this week
. This is a popular client.
When you get to this screen:
and nothing seems to happen for a while, you might be tempted to press one of the circled links. (I did.) I run a Firefox addin called [url=http://noscript.net/getit]NoScript[/url]; it prevents unwanted problems when visiting some of the more hostile areas of the 'net. It works well, but the problem is you often don't realise that it's blocking something important. When I give this page the green light, it proceeds to the expected
Soon you should see the start of a fairly standard install:
You can accept all defaults, though as a point of principle, I disable the American spell-checker dictionary, and make sure that the British English dictionary is installed first up.
Here is the only slightly tricky part. First, choose a suitable parent folder for the celltopbmu folder to situate in. I use c:\Downloads, where all my Firefox and other downloads go. I suppose this isn't strictly a download. The example screenshots are from Windows XP; I'm a Windows 7 resister, and I won't say anything about Windows Vista, but the results should be broadly similar.
Create a new folder in the standard way, and call it celltopbmu (I don't think the actual name matters).
Right-click on the new folder to bring up the context menu and choose SVN Checkout... . The context menu is how you interact with TortoiseSVN; if you go to the start menu and run the "application", it just brings up a dialog box that tells you to use these menus, oh and read the manual
It took a died-in-the-wool command line user like me a little while to get used to, but with a subversion client, you really are dealing with files and folders all the time, so it really does make sense.
Finally, the most important part: you need to enter this URL into the "URL of Repository" edit box:
[url=svn://svn.code.sf.net/p/celltopbmu/code/]svn://svn.code.sf.net/p/celltopbmu/code/[/url] (changed late May 2013). If you click on this URL, it actually gives you a crude text-based traversal of the software. [ Edit: maybe it doesn't any more; now that I have Tortoise installed, it offers me to use that, or search for an application yourself.] You can get a slicker interface to the files here
Enter the above URL, press OK, and after a few seconds, you should see a dialog box like this:
This is near the start of the initial repository setup; eventually, the download should get to some 1123 kB transferred in 28 seconds (your download speed may vary).
When you get to that point, dismiss the Tortoise dialog, and double click on the celltopbmu folder to open it:
I'll run through each folder briefly:
is an internal folder that holds various files used by the subversion software. Ignore this.
: this contains a program for sending software to a string of BMUs at once. This is how you update the BMUs with the latest software revision, or switch from the debugger to the monitor, for example. BMUSend is written in C++ for Microsoft Visual Studio 2005. It compiles and runs only in Windows. See sendprog below for a command line C version that does broadly the same thing and can be compiled with the free GCC compiler.
[ Edit: It's now called CMUsend. It's also now written for Visual Studio 2010, which uses a .vcxproj
rather than a .vcproj
extension for the name of the project file. You can actually still use Visual Studio 2005 by double clicking on the .vcproj
. You may need this line after the
: #pragma comment(lib, "winmm.lib")
. This seems to tell the compiler to link in such a way that it loads winmm.dll
at runtime. ]
: this software writes the BSL, which is 256 bytes of highly optimised code that allows the software to update itself. It resides in flash memory that is usually reserved for calibration parameters (and there are a few bytes of that too), so it's more difficult to overwrite than ordinary flash memory.
: this contains some assembly language source code for the debugger/monitor/BSLwriter that are used by more than one of these pieces of software.
: this contains assembly language source code for the debugger, obviously. It allows interrogation of any cell's voltage, temperature, or link voltage, and these can be calibrated.
: this contains a small Forth
interpreter, the basis of earlier versions of the monitor software, which is so cute we couldn't bare to delete it. But it's not used directly by the main software at present.
: includes the BMS master software, and everything else that we put in our Driver Controls
device(s). The source code for this is in C.
: Assembly language source code for the monitor software, which is what ultimately runs in the BMUs.
: the DesignSpark design files for the BMU printed circuit boards.
: a C program to send software to a string of BMUs at once, like the GUI BMUSend, but for the command line. Only one of BMUSend and sendprog are needed. (In fact, neither is needed; you can use a program like TeraTerm
to send a few control characters then send the image in binary, with delays between bytes.)
: contains HTML and images for a web page that describes the BMUs. It has a pretty picture that is now quite dated, and the whole page needs to be brought up to date. Maybe soon.
If you double click on the PCB folder, then on the CellTopBMU.pcb file, and DesignSpark is installed and registered, you should get something like the following:
Don't be alarmed at the apparently mostly empty outline. There is a reason it looks like that! We get the BMU boards made in strings of eight, and it is convenient to start at the second lowest BMU in the string, and replicate it for final fabrication only after all the changes have been made (once, not eight times). Just put the mouse cursor near the middle of the coloured area and press "z" three times to get a more normal view.
Good luck with it all. Oh, one final suggestion: don't try to change the outline as the first thing you do in DesignSpark. You'll likely get frustrated. It's easier to muck about with components and tracks first, and work up to outlines later. Be assured that almost anything you want to do with DesignSpark it is possible to do; it just might not be obvious at first how to do it. So stick with it, and don't give up on it prematurely. After all, after an extensive search and several times where we almost gave up ourselves, we always found a way
to do what needed to be done.
When installing IAR Embedded Workbench
, if you are asked whether you want "dongle drivers" installed, click "No". (I chose custom install, and unchecked the dongle drivers option there.) On first launching IAR Workbench you are presented with a "License wizard" and asked to enter a license number. Click "Register with IAR Systems to get an evaluation license" and click "Next >". Follow the prompts in the obvious manner until you click "Register" and are taken to IAR's website. Under "Evaluation license type" choose "Code size limited". Complete the rest of the registration form and submit it with the license number blank, wait for the email, click the link in the email, copy the license number and paste it into the IAR License wizard and click "Next >". Then you should be up and running IAR Embedded Workbench, from which you can File / Open / Workspace / celltopbmu.eww.