Page 41 of 68

Weber and Coulomb's MX-5

Posted: Fri, 10 Feb 2012, 16:00
by coulomb
Nevilleh wrote: Your "diary" certainly makes interesting reading ...

Thanks for the kind words.
I could eliminate one of the comms wires by connecting the 330R resistor which is presently from V+ to the opto anode, from there to V- instead! That is because the V+ of this cell is connected to V- of the next and so the heavy bus connection between cells becomes one of the comms wires.
Something similar occurred to us too. There is the problem of an exception at the end of every battery box; all packs have an end (we currently have two) that has to talk to the BMS master, and many have at least one break between boxes (we have six or seven, depending on the configuration).

But the show stopper is when you consider the voltage that appears across one of those heavy current links should it become open circuit, even for a millisecond, when the vehicle is running. Even if it becomes high resistance (as in hundreds of milliohms), it gets pretty scary. For that reason, we decided against any scheme that "made use of" the link between cells.

[ Edit: I meant to add: certainly, a link going open is a fault condition, and you can't drive when that happens. Yes, a link going high resistance is a problem, and could cause localised heating and so on. But these things could happen, and probably will once or twice in the life of the conversion; that's one of the reasons that we monitor link voltage (and we try to be careful about that, and never measure it between boxes). The thing is, it's difficult to make a compact printed circuit fire-proof in the presence of high voltages and/or extreme overload, so any design decision that removes that possibility should be taken if at all possible, in our opinion. ]

Weber and Coulomb's MX-5

Posted: Sun, 19 Feb 2012, 19:10
by weber
Last EV day I was unable to contribute much, due to the need to recover, as quickly as possible, a ceiling-painting disaster I had created on the previous day, in my family's kitchen. The Sistine Chapel she aint.

The limp wrist on the left is mine, after all the overhead paint scraping. The one on the right is Coulomb, pointing and saying "Haa haa, that'll teach you -- doing home maintenance on EV day."

But that didn't stop Coulomb from working away diligently and doing a beautiful job of modifying a Tritium Driver Controls Unit (DCU) to talk to both our charger and our string of Battery Monitoring Units (BMUs) using Industrial Fibre Optic (IFO) connectors, in a much neater way than before, and trying to avoid the paint flakes in his lunch.


Previously we had modified the Tritium DCU to talk to the charger and BMUs using an RS422-style interface over twisted pairs. At that stage the DCU also became our BMS master, after some major additions to its software by Coulomb. That was a fairly complicated hardware mod since the comms went via the DC-37 connector you can see in the photos above, and we had to repurpose a bunch of CMOS inverters inside the DCU, changing their power supply voltage and reversing the direction of some and changing the value of pullups.

But this IFO mod only requires the addition of one resistor per IFO connector -- a 47R in series with the LED (blue connector) and a 680R pullup to 3V3 on the phototransistor (PT) (black connector). [Edit: We later changed the pullup on the input from the charger to 2k2 because the current the charger could deliver to the IFO LED was internally limited to a low value]

We did not use CAN bus to the Elcon/TC-Charger-brand charger because its so-called "CAN interface adapter" is a joke -- a Clayton's CAN interface. It passes everything to the charger at 2400 b/s and so cannot cope if CAN data arrives faster than that, even CAN data it's not interested in. And it's fixed at 250 kb/s on the CAN side.

You can see the schematic Coulomb worked out for this CAN interface in this earlier post in this thread. Scroll down to see the schematic. But before you do, scroll up to see another version of the Sistine Chapel image.

You'll notice that it uses optocouplers (the CAN interface, not the Sistine Chapel), although bizarrely, any isolation they might have provided, is completely voided by connecting the GND references together from both sides of the optos!

Anyway, a fibreoptic link is effectively a stretched optocoupler. You separate the LED from the PT and stretch an optic fibre between them. Anywhere you see a twisted pair connected to an optocoupler is a prime candidate for replacement by a fibreoptic link. You thereby eliminate any concerns about noise pickup in the twisted pair, or capacitive coupling, high voltage isolation, creepage or arc-overs across the opto.

So the IFO interface at the charger consists only of the IFO connectors and a resistor for each, as it did in the DCU. Only this time we used a 5k1 resistor on the PT and 1k0 on the LED, due to an 11V supply. [Edit: We later eliminated the 1k0 as the charger appears to already have a 5k1 limiting the LED current internally] As you can see in the following photo, we have built these into the shell of the 7 pin circular connector that previously connected via twisted pairs to the Clayton's CAN interface.


Notice how well the blue and black IFO connectors match the blue and black of the existing connector. It looks like it was meant to be that way. Image

[Edit: Changed 12V to 11V and added last paragraph. Changed 11V LED resistor to 1k0]

Weber and Coulomb's MX-5

Posted: Sun, 04 Mar 2012, 21:46
by coulomb
We're using DesignSpark to do the latest version of the BMU circuit boards. As NevilleH has pointed out earlier it's freely downloadable from here:

It seems to be pretty mature, capable software, with a well thought-out overall design, but dear oh dear some very commonly needed things are totally non-obvious (to me, at least).

So I thought I'd start a list of tips I've learned, in case anyone else wants to use it. The tips are in no particular order. My intention is to edit this post as I find more tips to add.

* Change current layer. To change the "current layer" (so subsequent tracks go to this layer), click on the Add Track toolbar button, then *before* you lay down any tracks, press "L" and it will prompt to change to the next layer. If you have only 2 track layers, it will default to the one you are not on. Just press enter to accept (or escape to dismiss if it turns out you were on the right layer in the first place). You can also "choose" the current track by starting with an entity (e.g. a track) that is definitely on the side you want (as opposed to something like a pad, which is on all layers). Hiding other layers doesn't cause it to start a new track on the only visible layer.

* Pads on special layers. You can use a variation of the above to put pads on special layers like the solder mask layer, or solder paste layer, or just on a copper layer and not on any paste layer. After selecting "Add pad" (F4) and before clicking to place the pad, use the context (right button) menu Change Layer (L) command to select the exact layer you want. Afterwards, you can only select from the "aggregate" layers like [All] or [Top]. (Note that [Top] really means three layers, top copper, top solder mask, and top paste.) We needed to do this to make a pad whose size was different on one side of the board to the other (to ensure maximum clearance to something that could have high voltage in a fault condition). We added the larger of the two pads last, on just the copper layer, then added another pad (enlarged by the usual solder mask enlargement amount) to the solder mask layer. That way, there is no hole in the paste mask for this pad, so solder paste won't ooze through the hole like spaghetti.

* Mitring tracks. To make tracks "mitre" (use 45 degree angles as normal), right click on any track and select Edit Segment, then right click again and choose Segment Mode / Miter.

* Deleting track segments. To delete a track segment, highlight it and press Control-U (Unroute).

* Terminating tracks (etc). When laying down a track, and you don't have something to terminate it to (like another track or pad), right click and select Finish Here, or simply double click, or better yet press the enter key. Note that if you press escape, you lose the whole track that you've added, not just the last segment! This sort of thing caused us almost to give up on DesignSpark a few times, but every time we've found that the alternatives are worse, and there is a workaround that is fine once you know it.

* Adding a corner. To add a corner to an existing track, use a double click. It doesn't always seem to do what you want; I hope that with experience I'll figure out what's different about the times when it won't cooperate. When it doesn't co-operate, you can often drag to one side, making the *next* corner, and adding another corner to replace the "borrowed" corner later. With practice, this becomes easy, though never natural.

* Moving a corner. To move a corner, first make sure that nothing is selected (e.g. click away from anything). Then click on the corner and hold the left mouse button down. It will then be able to be dragged in two dimensions.

* Start laying tracks. To start laying tracks, use the undocumented F2 key. (It is documented in the help, but is missing from the menu).

* Laying tracks mode. When adding tracks, there is an almost invisible mode, where further clicking will attempt to continue the track. Watch the "Add Track" toolbar button; it highlights when in this mode. Press escape to exit the Add Track mode.

* Dangling tracks. Occasionally, DesignSpark will display a track with a purple stripe down the middle. This is a track that it thinks has no connection at one or both ends. To fix these, you need to make a new connection to where the track is supposed to go. Often, you will need to use Unroute Track Segment (i.e. delete, using Ctrl+U) the last segment that is supposed to connect somewhere, like a pad, and redo that track segment. Don't be tempted to move the pad out of the way first; the only way to make a successful connection is when adding a track to existing elements.

* Select whole object. When selecting a rectangle or other compound object (made up of primitives like lines), use shift. (Otherwise, you select just the primitive, such as one line of the rectangle.) You can also highlight a whole net by shift selecting a track twice.

* Pad over pad. To add a pad over a larger pad (e.g. to add through holes to improve conductivity from a terminal connection or to improve heat sinking), I found I got pad to pad design rule violations. I could not change the net on the pads using properties; it was greyed out. You can however select the small pad, and use the right button menu to select "Add to net". It doesn't default to the net it is touching, so find the name of the large pad's net first. If you need many small pads like this, copy this pad and paste to wherever else it is needed to save time; the copied pad retains its net name. When you paste it over the larger pad, it will give you some grief about merging nets; just press enter to say yes and all is well. I have no idea what it thinks it is merging. This whole pad over pad logic applies also to copper over pads.

* Zoom around a point. Move the mouse cursor near the middle of the area of interest, and press Z to zoom around the cursor. Otherwise, it seems to zoom around the middle of the board. The companion command U unzooms. These can sometimes be the quickest way of getting to an area of interest.

* Show one layer. Double click the layer in the "layers" tab of the interaction window (use F9 to display it, if it's not there). To turn on a heap of layers, use control-1 or control-3 (perhaps twice if some are already partly displayed). For example, control-1 can turn on all the top layers: documentation, silkscreen, copper, solder mask, solder paste.

* Select covered entity. To select something that is underneath something else, just try to click on it, then use the N key to cycle through the things that are at that co-ordinate. Different things will highlight as you continue pressing N.

* Making a group. You can make a group, to make easier things like rotating a section of artwork. Make a selection, right button and select Group. There are "tight" and "loose" groups. Tight groups get selected any time you shift select any member, but you can't move any of the members of the group relative to each other. They become a solid "brick". But by un-checking the "tight" option when creating the group, you can move members, but you can still select the whole group by selecting a member and choosing "group / group select" from the right mouse button menu.

* Changing a group. "Edit group" seems to mean rename the group, but don't change the contents of the group. Remember that "Ungroup" really means "delete the whole group that this component belongs to". However, you can still delete a few components from a group without starting again, since the group information (which components, tracks etc are part of the group) is still present in the selection. So to delete one or more components, select any member of the group, context menu Group / Ungroup, deselect the appropriate components carefully using control clicks, Finally select one of the remaining components, context menu Group, enter the group name, and save.
To add a component to a group, you can use the context menu item "Add to group".

* Removing a "slot". On our board, we had a routed slot under an opto-coupler. For rotation reasons, we had another slot at 180° to the one under the opto, so when the whole board outline rotates, the other slot ends up under the opto-coupler. But we need a quick way to remove the unwanted slot in the north-west of the board. I found the easiest way is to move the arc west so that it meets the board outline, then while the arc is still selected, use the right mouse menu to select Arc / Arc To Line. It then disappears since it is contiguous with the board outline.

* Removing chunks of outline. Outline is different to ordinary track - you can't select a "track" and just delete it. The only way to remove complex shapes is to cause one line to line up with another line, thereby coalescing them, or editing a mitre to zero length. Arcs must be converted to lines to get rid of them. If they end up as a 45 degree mitre, select it, context menu, "edit mitre" and make it zero length. It probably helps for coalescing lines to make the grid visible. If converting from imperial to metric, every lines needs to be moved to the grid before coalescing is likely. Sometimes an arc won't convert to a perfect mitre, so "edit mitre" is literally not an option (not on the menu). Then you need to edit segment. Make sure the ends of the segment are grid aligned first. Use enter rather than a double click to stop editing the segment; this seems to result in far more successful edits.

* Copper pour keepouts. To keep a copper pour away from somewhere, define a copper pour on the appropriate layer (of the copper pour to be kept away), and tick the "Pour Keepout" checkbox.

* Repouring all copper pours. To re-pour all copper pours (e.g. after our rotation), make sure that nothing is selected and the mouse is not over any entity, and use the "Pour copper" context menu. You can also clear all copper pours analogously.

* Copper verses copper pour areas. Adding copper seems to not attempt to keep away from other elements like holes and pads. We used this for example where we wanted "snap off" lines with closely spaced holes, yet we wanted copper to connect through the holes. Keeping away from the holes meant the copper was discontinuous. However, we now use the method in the next tip.

* Copper over holes. Copper pours with copper right up to holes can be achieved by using pads (on the [all] layer) that have zero size, yet a proper hole size. The copper pour only seems to care about the size of the pad, not the size of the hole. Note that some manufacturers (e.g. PCBCart) will flag this as an error, unless you document it as a sort of expected aberration. Copper pours are easier to deal with than copper shapes in some cases, since they automatically stay away from edges, cutouts, and so on.

* Moving by a fixed amount. To move a component or selection by a fixed amount, use the "+" key. (Note that "+" is "shift-=", and the equals command sets the absolute position of a component or selection.) Now enter a relative amount to move the selection by. For example, to move the selection right by 1000, enter 1000 in the X box; to move down by 500, enter -500 into the Y box.

* Goto XY. The Goto XY is somewhat hidden as a context menu in the Goto tab of the interaction bar (note: not the Goto tab, the window/bar above it). To goto the origin, click in space (zoom out if necessary) and use the context menu "goto system origin".

* Different nets either side of a hole. In our celltop BMUs, we wanted to have two different nets on the two sides of the bolt holes, for measuring voltage drops at the bolts. We used two single sided (SMD) pads, each on different sides. This gave a design rule error, pad to pad, as if these pads were on the same side. We fixed this by making one of the pad holes zero size. We had to manually add a filled circle to the solder mask layer on the side with the zero sized hole. One of the networks had only one component connecting to the network; to prevent a "single pin network" (SPN) error, we had to create a component on the schematic with a pad (not a via), and place that pad away from the bolt hole. The pad can be an SMD pad (one layer, no hole).

* Converting to metric. There seems to be an "optimisation" such that if you attempt to move an object such that it ends up almost at its starting point, it will return exactly to that starting point. So to "metrify" a coordinate (following a units conversion from thou to mm, say), you seem to have to drag the object considerably away, then drag it back again, to get it to snap to the metric grid.

* Line over outline. Sometimes you want a line segment that exists exactly over a segment of an outline. How to select one or the other quickly? Use control-shift-click on the segment in question repeatedly. When you get the outline, the whole outline will select and highlight. CLick once more, and you seem to be guaranteed of getting the outline segment. You can now convert this to arc or whatever you need to do. When finally modifying a board outline with documentation lines over the top, say to finally convert lines to arcs, turn off the documentation layer to be sure you get the outline.

* Arc flipping. If when you convert a line to an arc, it goes just the wrong way, you can't fix it with any Flip or rotate commands. You need to use one of the Arc context submenus: Flip Arc. Obvious once you know it's there.

* Position "snap back". DesignSpark seems to have a habit of allowing or causing objects to "snap" away from where you move them to. This seems to disappear at higher zoom levels, so make it a habit to zoom before moving objects.

* Different router size. We are trying a new prototype fabricator, and they use a 1.5 mm router bit instead of the 1.27 mm we had been assuming, and 1.4 mm after that. So we did a lot of outline editing. Inside corners are most easily changed with the "edit fillet" context menu; it tells you what the present fillet size is as you adjust, and doesn't mess with the other co-ordinates.

* If deleting a component deletes heaps of tracks. This may be because you accidentally created a tight group; deleting one member of such a group deletes them all, regardless of selection. Check the tightness by selecting an object in the group, context menu Group / Edit Group; there is a check box indicating whether it is a tight group or not. Untick this checkbox to make the group not tight.

* Printed resistor. If you are using a long length of track as a resistor, you will need to insert a 0R resistor into the schematic, and delete it at the last minute. To prevent net naming and other problems, before deleting the 0R resistor, add a short length of dangling track. After the resistor is removed, drag the end (ensure no prior selection) of the dangling track to a via or other suitable place. It will have the coloured line down the middle of the track, but that can't be helped. This can avoid the frustration if having to re-lay out an entire net worth of tracks. Ask Weber how he knows Image [ Edit: unrouting a piece of track (not deleting it) seems to be a simple alternative. ]

* Changing designators. When changing designators on the schematic and you already have a PCB design created, beware!. The PCB editor can get very confused, and the result is that you can have many tracks deleted. The workaround is to use the Tools / Forward Design Changes menu item after changing a designator. There is no problem unless designators become swapped or rotated.

Library editor

* Adding pins to an existing component. To avoid a problem where the component doesn't update its pin count when you add pins, you should not be editing the component when making changes to the schematic symbol/gate. From the schematic, choose the "Book" icon in the toolbar, bringing up the library manager. Select the Components tab, if not already shown. Find your existing component, select it, and click "Copy To...". Give it the new name and click Ok. Now select the Schematic Symbols tab, find the existing schematic symbol, choose "Copy To..." again and enter a new name for the schematic symbol. Now click "Edit..." to add the extra pins (or whatever other changes are needed). Save the changed schematic symbol. Go back to the library manager, select the Component tab, and click "Edit...". Right click in the component area and select "Edit Gates". Delete the existing gate and click "Add..." to add in your new schematic symbol. Now the component should have extra rows for your extra pins, and you can assign pad numbers and terminal names for the pins. If you do things in the wrong order and end up with the wrong number of rows in the component table, it is actually possible to close the component and open it again to update the table size. You may not be allowed to save the changes without all pins being assigned, so you may lose some work this way.

To answer the inevitable "Why not use Eagle instead?", Eagle is commercial software. There is a no-cost version for not-for-profit use, but it is limited to fairly small boards, 100 mm x 80 mm. Our BMU board is smaller than that, but we want to join 8 boards with Squiggle Joins (TM), so that makes the "board" 360 x 78 mm.

Weber and Coulomb's MX-5

Posted: Mon, 05 Mar 2012, 17:56
by Nevilleh
Yes, it does have some annoying and non-obvioius features!
For my BMS master board, I used the autorouter and it did a pretty good job. I found that rather than editing tracks I didn't like (after it finished) I just "undid' it all, moved the part I was copncerned about and then autorouted it again.
You do have to learn the libraty editor right up front though.

Weber and Coulomb's MX-5

Posted: Tue, 06 Mar 2012, 08:54
by Adverse Effects

Weber and Coulomb's MX-5

Posted: Tue, 06 Mar 2012, 16:26
by weber
Adverse Effects wrote: you seen

No I hadn't seen it. Thanks. It certainly has a clean and simple user interface. But it is schematic and simulation only, and designed primarily for teaching. It doesn't do Printed Circuit Board layout at all.

What is it with the graphical user interface (GUI) in PCB apps? Why don't they ever use the standard vector-graphics or object-oriented-graphics editing paradigm that is used by practically every other non-bitmap graphics editor on the planet -- the one that is familiar to anyone who has ever used the Drawing Tools in Microsoft Word -- the one used in Adobe Illustrator, and its predecessor MacDraw?

Back in the early days of GUI, user interface design specialists tried all sorts of things, and tested them on actual humans, and found what actually works. There is one major overriding principle: "NO INVISIBLE MODES". You're in a "mode" when something you did previously (typing, clicking, dragging) now has a completely different effect. The number of modes should be kept to an absolute minimum and it should always be visually obvious what mode you are in.

For example, in the standard Apple/Microsoft/Adobe vector-graphics editing paradigm, when you select a "tool" to create a new object, the cursor changes to tell you what behaviour to expect. And when you select an existing object for editing, "handles" appear on it to let you manipulate it. How hard could it be to implement these behaviours in a PCB editor?

But hey, I'd settle for any kind of consistent, discoverable, learnable graphical editing behaviour that lets me do what I need to do to PCB tracks, with a minimum of clicks and drags. But I've tried four now, Protel, Eagle, KiCad and DesignSpark and none of them do this. And it's not only the oldies, cheapies and freebies that fail to do this. It's even the up-to-date ones costing thousands, like Altium, that Coulomb uses at his paid work.

Is it because they are all written by electrical engineers who don't have any training in software design, let alone graphical user interface design? But hey, how hard is it to google and find a checklist of basic GUI design principles? Or just follow the Apple or Microsoft developer guidelines.

Is it because all these PCB programs began life as command-line or keyboard-only programs, prior to the wide availability of mice or trackpads, and then had a GUI grafted onto them later? In some cases it is blatantly obvious that this is so. In all cases it's about as sucessful as grafting a pederast onto an Anglican bishop.

[Edit: grammar]

Weber and Coulomb's MX-5

Posted: Tue, 20 Mar 2012, 20:01
by weber
Coulomb and I haven't posted anything for the last couple of EV days because it has been all software development and electronic design. We have frozen the feature set of our open source cell-top battery management units (BMUs) and are close to sending a new PCB design off to be made (by PCBcart). Any revisions after this will be purely bug-fixes, but we'd like to get it right first time.

So before we send it off, we'd be grateful if any of you could cast an eye over it and make any suggestions that occur to you. Or if you just want to ask questions about how some aspects are intended to work, thats fine too.

Why build our own BMS when there are so many already out there? In our case there are two unusual requirements: High voltage (a 750 V battery) and inaccessible cells. Putting lots of battery power and energy into a two-seater sports car at reasonable cost means the cells have to be shoe-horned into some difficult-to-access spaces. We didn't trust that any of the existing offerings had been designed with such a high battery voltage in mind, and therefore with sufficient isolation, or with the ability to have their microprocessors reset and their software modified without physically accessing them.

Our solution to both the high voltage isolation requirement and the requirement for our daisy-chained comms to be immune from the huge quantities of electromagnetic interference in an EV, is to use low-cost optic fibre for communication to and from the master unit and in between battery boxes. Opto-coupled semi-flexible PCB tracks (and occasionally wires) are used between adjacent cells.

Our solution to the buried-ness of many of the cells is to (a) use a microcontroller that can write to its own flash program memory and to write bootstrap-loading software for it that allows new software to be sent to all BMUs at once via the daisy-chained comms, including a new bootstrap-loader if necessary, and (b) to make each BMU as autonomous as possible so that even if it is cut off from the comms it will continue to turn on its bypass resistors at the set voltage and continue to communicate any distress due to under/over voltage/temperature, or excessive link voltage, by means of an audible alarm.

Yes, call me crazy, but our design has a low-cost piezo-electric speaker on every cell. You can choose to leave it off, to save a few cents per board, but with it you could even have separate cells sitting on the shelf not connected to anything, or on the test bench connected to a uncontrolled charger, and they can still let you know if they are in trouble. Smart cells.

Thanks to Neville's example, we have got rid of the 3 through-hole 5 watt resistors for bypass and are using 8 surface-mount 1 W resistors while lowering our bypass current to around half an amp (to be determined on testing the new boards).

And of course the most important thing Image, for those cells that are on display, we now have 3 different colours of blinking lights! Red, blue and yellow. Here's the schematic. [Edit: To see its full detail, right-click, choose "View Image", then click to zoom in.]


Weber and Coulomb's MX-5

Posted: Sat, 24 Mar 2012, 02:07
by coulomb
Another day when we didn't get anything physical done to the car. We have however gotten quite close to submitting our first string of 8 BMU PCBs to PCBCart for manufacturing. [ Edit: we've added quite a few tips to the DesignSpark Usage Tips post. ]

Weber accidentally stumbled across the 3D View facility in DesignSpark. It's pretty good; we didn't put any 3D models into the software at all.

Here is a view of our eight-BMU string; click on the image for a larger view:


Just ignore the "matchsticks" sticking out of the cell terminals, and the blocky nature of a lot of the parts. Two of the processors are circled in yellow.

You can actually see through the slots in the squiggle joins:


You can see most of the 1W bypass resistors (there are 8 in total) spaced around the central circle (the piezo transducer/alarm).

So we're continually impressed with some of the capabilities that the totally free, unrestricted DesignSpark PCB software provides. Unfortunately, one of the things it does not yet provide is the ability to panellise multiple boards onto a single object that can have its Gerber and Excellon files generated for. We really want this ability, so we can have several BMU boards (with their alternating isomers to cater for the alternating cell polarity), and have them "squiggle joined" (TM).

When we initially did a copy and paste of one BMU PCB, we ended up with a myriad of Design Rule violations (but these can be ignored and even suppressed), but also it renamed all the components (can't have two "Q1" parts in a board, can you?). This would have made it rather difficult to populate with parts, or get populated and soldered with an outside board assembler.

Fortunately, there is a work around, even if it is a bit tiresome. We had to create a new value parameter for each component, with the name/designator/label copied to it. The original name is hidden, and the new name is displayed. When the software renames the component designators (say R1 to R21), we don't see the change, and still see "R1" on the silk screen overlay. We've done this, and it seems to work well.

The last hurdle for us is to create the quite complex outline for the "composite" of 8 BMU boards. We have eight separate outlines at present, but we don't think that this will get routed correctly. So we have to delete seven of the original board outlines, and extend one of the outlines to fit around the other seven. That should keep Weber off the streets for most of tomorrow.

Edit: added comment re ignoring the matchsticks; noted additions to the DesignSpark usage tips post; mentioned bypass resistors

Weber and Coulomb's MX-5

Posted: Thu, 29 Mar 2012, 04:20
by coulomb
Our BMU strings now have a postage-stamp sized daughter board, complete with postage-stamp like perforations:


[ Edit: I got some of the coloured lines wrong in the above image; it's easy to get the various board flips wrong. But the principle is right. ]

These are for the Industrial Fibre Optic senders and receivers. This daughter board, suggested in broad concept by me but designed in detail by Weber, has silkscreen information for the sender on one side, and the receiver on the other. It can be placed such that the IFO device is pointing up, down, east, or west, and even towards the middle of the BMU if the daughter board is placed above the IFO device (so the IFO device is hanging down). The daughter board is attached by either a right-angle or a straight-through 2.54 mm spacing "header", 4 pins with 2 pins removed (so 3 x 2.54 mm between pins).

Weber and Coulomb's MX-5

Posted: Thu, 29 Mar 2012, 04:35
by weber
We finally finalised the PCB artwork for the string of 8 Battery Monitoring Units (BMUs) today. And I paid the money and sent the files off to to get one made. We expect to have it in a little over two weeks. Then we'll assemble and test it, and make any minor changes that might be required, and order another 30.

You can see the copper and screen-printing for the top (blue and khaki) and bottom (red and yellow) of a representative sample of two BMUs. One of each isomer. This is replicated 4 times for the board. You can relate the part names to the schematic in a previous post.

A new feature of note is the snap-off daughter board for the Industrial Fibre Optic (IFO) connectors that we use at both ends of each battery box. These were a real group effort. They allow an IFO connector to be mounted to a BMU in any one of the 6 cardinal directions, using standard header pins, either straight or right-angled.

With the battery box design for the MX-5 we need them to point down the side of the first and last cells, but others may not have space past their end cells and may need the IFO connectors to be horizontal and within the cell footprint.

Some weeks back, Newton (Jeff Owen) dropped by for a cuppa and an EV recharge as Coulomb and I were agonising over the best way to get merely the one mounting orientation we needed. Our solution at the time involved finding or making some 8x8x1 mm angle and cutting it up into right angle brackets which would then need to be drilled and screwed to both PCB and IFO connector.

Jeff, not having an electronics background, asked whether it was possible to heat and bend a tab of PCB material at right angles. And we duly explained that it uses epoxy which is a thermoset plastic, and it is full of fibreglass specifically to stop it bending. But the idea must have haunted me because one morning I woke up thinking, "We can't bend it, but we can cut it and solder it at right-angles." Thereby turning a mechanical problem into a purely electronic one, although solder isn't very strong.

I emailed the idea to Coulomb who pointed out we could use header pins and make more than one orientation possible. I then implemented the idea in the PCB layout and it turned out to allow more options than even Coulomb had imagined. The screen-printing on one side of the daughter-board is for the IFO LED and the other is for the IFO phototransistor, only one of which will be populated on any given board.


Weber and Coulomb's MX-5

Posted: Thu, 29 Mar 2012, 05:27
by coulomb
We're also rather proud of having gotten a really quite complex shaped board (containing eight BMUs in a string), and getting it under (actually, exactly at) PCBCart's effective limit of 30 internal slots. With 30 internal slots or more, the price per board increases by over 50% (relatively much more with larger quantities), making the boards totally uneconomic for us. I suspect that this is a bug in the quotation software for PCBCart, but we felt that it was easier to work within the limits as they exist, rather than attempt to convince them to change their quotation software.

For our boards which measure 360 x 78 mm, every 30 internal slots starting at 31 cost an additional US$28 or so. Excluding the one-off setup charge, each string of eight boards was only about $50, reducing sharply with quantity. But the $28 extra did not reduce with quantity; with 31 slots or more, each board cost an additional $28. At 61 slots, $56 per board extra, and so on. So with quantity, each BMU board would cost around $1, but with 31 slots, it would cost around $5.

So for example, rather than have the LEDs shine through internal slots as before, they now will shine through a slot that is part of the outline (routing the outline is free, or at least, we hope it will be). So each board has two slots at the terminals (we considered making these join with the outline as well, but decided that since we can squeak it in under the limit, we're better off with the added strength of internal slots there), and two complex slots that separate the squiggle joins. There are eight pairs of terminals per string of 8 BMUs (16 slots), and 7 squiggle join slots (14), for a total of 30 slots. We'll get four daughter boards "for free" (it would have been wasted PCB area otherwise), at the slight cost of having to break off the daughter boards and probably file off the worst of the perforation remnants.

Weber and Coulomb's MX-5

Posted: Mon, 02 Apr 2012, 14:56
by coulomb
To all those who noticed the error in the artwork above, but were too shy to post about it, here is confirmation about the error:


The two GND (GrouND) tracks, fat and thin, are not supposed to touch. One goes to the emitter of the opto coupler OP1, and would be affected by ground currents in the fat track, especially to the bypass transistor Q1, which is just above the cyan oval. We were not alerted to this error by the design rule system, since as far as the PCB layout program is concerned, it is legal to connect all GND tracks to each other. Sometimes it complains about a loop, but not when a loop results from a change other than laying down a new track. (Protel/Altium is similar in this respect.) We can't be sure who caused this one, but I'll claim the blame, as I was poking around with GND tracks, and early on I found doing the rotations with DesignSpark quite difficult. (Now it's as easy, probably easier, than with Protel, so I don't have a good excuse.)

Fortunately, PCBCart picked up some other minor errors, and when Weber submitted the fix for those, he also submitted the fix for this GND short, and let them know about it. (He also added the "Danger high voltage" to the squiggle joins. (That strictly should read "Danger low voltage", but it doesn't seem to have the same force. The more sensible "Danger hazardous voltage" didn't fit.) ) This is a great service provided by PCBCart, where they point out possible manufacturing issues, and give the designer one opportunity to submit a last minute change.

So the boards have been "released to manufacture", and we should have them in about 2 weeks. (We opted for the shorter 8 day plus shipping turnaround, which is only a little dearer). We spent most of last EV day sorting out what usable components we have left over, what we need to buy to make two BMUs, and ordered them. As part of that process, we decided that our switch to a slightly cheaper bypass MOSFET was misguided; although we can easily get away with the higher on-resistance, the extra spread in gate threshold voltage would adversely affect the fail-safe design (where with a low cell voltage, the voltage drop across two diodes in series with the gate will prevent the bypass transistor from turning on. With the higher spread of threshold voltages, some might not turn off properly at low cell voltages, and/or some might not turn on fully under normal bypass conditions. So we're back to using an Si2312BDS.

The rest of last EV day... well, that will be the subject of another post.

[ Edit: missing paren; minor improvement to text of OP1 in the image. 8 day turnaround on the PCBs. Mention Hazardous Voltage.

Weber and Coulomb's MX-5

Posted: Mon, 02 Apr 2012, 23:10
by weber
But first a cute photo that we meant to post a while ago. That's Coulomb/Protel/Windows-XP on the right and Weber/DesignSpark/Windows-7 on the left. This is how we converted our BMS artwork from Protel 99SE (which doesn't work on Win 7) to DesignSpark. Thank god that's over.


Now that I've learnt its user interface I'm really very impressed with DesignSpark. For a free product it is very powerful (unlike the crippled free version of Eagle) and very reliable. Thanks RS Components! And thanks Neville, for recommending it.

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 03:21
by weber
coulomb wrote:The rest of last EV day... well, that will be the subject of another post.
And here at last is what you've all been waiting for (but possibly didn't realise it).

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 04:52
by woody
You blow things up so we don't have to!

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 12:28
by Nevilleh
Lovely stuff!
Anyone who thinks he/she might like to convert a "V" to an "EV" better be prepared to learn a lifetime's worth of things:
You have to be a mechanical engineer, an electrical engineer, an electronics engineer, a software engineer (and a programmer, don't get the two mixed up!), a fire safety officer, a draughtsman, a movie producer and on top of that, you must start with lots of money.
Well done, guys.

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 15:21
by Johny
weber wrote:And here at last is what you've all been waiting for (but possibly didn't realise it).
If I make a giant assumption that you placed the diode accross the whole BMS to stop back-biasing the BMS, what happens when the pack current is at 100 Amps when the cell goes open?

Again - assumption that you have a fuse - but is it a PCB fuse and will it blow without arcing?

Oh - and I enjoyed the video. The captions ere very helpful - and beautifully placed.

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 15:51
by Nevilleh
Actually, I assumed that you had placed the diode in series with the bms - I did wonder how you were correcting for the diode drop though.

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 20:10
by Renard
Nevilleh wrote: Lovely stuff!
Anyone who thinks he/she might like to convert a "V" to an "EV" better be prepared to learn a lifetime's worth of things:
You have to be a mechanical engineer, an electrical engineer, an electronics engineer, a software engineer (and a programmer, don't get the two mixed up!), a fire safety officer, a draughtsman, a movie producer and on top of that, you must start with lots of money.
Well done, guys.

That's why this forum is such a great resource!

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 20:11
by weber
Yes, it's time for a bit more explanation than can be given in a one-minute-20-second video. But it got your attention didn't it. Image

The board in the first experiment was protected by a PCB fuse in series and a transient voltage suppressor diode (TVS) in parallel, as shown in the top left of this schematic from a few posts back.

The 1.25 A PCB fuse, having only a 63V DC rating, utterly failed to quench the 240 Vdc arc and vapourised without a trace. There are some pieces of the TVS still in place, but one of its pads partly vapourised and a section of ground (Cell-) track vapourised. In addition to the TVS-Fuse path, the post-mortem shows there were two other main reverse current paths. One was via the body diode of the bypass MOSFET Q1 and the 5W resistors it switches. The resistors were unfazed but the top blew off the MOSFET. The other was via the microcontroller IC1 and its supply voltage regulator IC2. The regulator shows no visible signs of distress but the top blew off the micro.

Image   Image

The camera runs at 30 frames per second and the arc was visible in just two frames, which means the 10 A fuse blew in 67 to 100 ms. The time-current curve for the fuse tells us that it must therefore have been carrying 60 to 70 A. That's sufficient that, if the 10A fuse had not been present, all the little arcs would have soon joined up into one big arc between the cell terminals.

It takes 3 thousand volts per millimetre to start an arc across an air gap, but once an arc gets started, e.g. by a vapourising PCB track or component, it only needs 1 volt per millimetre to keep it going, provided it has enough current. And 60 amps is quite enough current for 240 Vdc to keep an arc going across the 60 mm between cell terminals. See Prof Sen's collection of graphs and formulae.

And 60A at 240V is over 14 kilowatts! As heat and light in a very small space. But this will not blow any backup fuse in real life, in an EV. The hot cell will vent and ignite its highly flammable electrolyte. The cell case will melt and then burn. There _will_ be a fire.

The best you can hope for is that the driver might notice the sudden drop in power and back off the "throttle" soon enough to allow the arc to go out before it has ignited too much else. But the driver is just as likely to push their foot down harder to compensate.

Mind you, this is an unlikely scenario because we have to imagine that the cell went high-R so suddenly (either through internal failure or loose terminal bolts), that the BMS did not have time to give any warning so the motor controller would automatically back off. Or the backing off relied on the driver and the warnings were ignored.

In the second (far less exciting) experiment a 1A 1000V diode (1N4007) was placed in series with the 63V fuse. So when the reverse voltage was applied, absolutely nothing happened. In fact we had to include a meter in the shot to show the voltage was really there. It read 239 V.

This photo shows where the fat track from Cell+ was cut and bridged with the diode. It also shows what an intact fuse, TVS and MOSFET Q1 look like. In the final version the diode will be a surface-mount type and will be inboard of the "wing".


As Neville alluded to, this diode causes problems for normal operation. It drops the voltage to the BMU by anything from 0.6 V (bypass off) to 1.0 V (bypass on), and also depends on temperature.

So why not just use a fuse with a 1000V DC rating? Mainly because they are huge (5 mm x 32 mm multimeter fuses) and they cost $4.40 each in quantity and so would significantly increase the cost of the BMUs (we need 228 of them).

So how do we compensate for the diode? There are two separate issues. One is meeting the minimum supply voltage requirements for the microcontroller, and the other is allowing the micro to take accurate measurements of the cell voltage.

The measurement problem is easy. We already had to allow for voltage drop across the fuse. You may be able to see in the above photo, that there is a second skinny track from the Cell+ terminal that was not cut. It runs under the diode and goes to R11 and R12. R12 sends the voltage on to the next BMU so it can measure the drop across the link between cells. R11 and R7 divide the voltage so the local microcontroller can measure it. The value of R11 is such that even with 240 V across it, no more than 2 mA flows, and the micro's built-in protection diodes can handle that. In future we plan to make R11 out of three 0805-size resistors in series so it might stand up to 900 V for short periods.

The supply problem is hard. Basically we just have to put up with the fact that while the BMU used to be able to operate down to a cell voltage of 1.53 V, it can now only operate down to about 2.1 V. A cell that is constantly at such a low voltage is very empty indeed, and this should never be allowed to happen. But a cell whose voltage droops to 2.1 V under a peak 10-second load of 6C is not unexpected, particularly in cold weather. So this could be a problem.

One idea is to use a 22 mF (22,000 uF) supercap to tide the BMU supply over these short-term droops. But these are also large (5 mm x 10 mm dia) and cost about $1 each in quantity. We'd love to hear any other ideas.

Using a diode to protect against going high-R under load may be all very well, but what about going high-R during charge ?

In that case we are relying entirely on the 63V PCB fuse, and it is not unreasonable to do so because the maximum voltage that can appear across it is the difference between the open-circuit voltage of the charger, and the open-circuit voltage of the battery. Also, the current available will be much less than that under load.

[Edit: Fixed Prof Sen's link]

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 20:42
by Johny
I'm not sure if this has any merit but I'll mention it anyway.
Way back in my colour television service days, a few brands used strange fusable resistors in the 330 VDC line. How they worked was about a 5W resistor with a piece of spring running up the side of the resistor which was soldered under tension at the top. When the resistor gets to solder melting point, the solder at the top melts and the spring suddenly moves about 10mm away from the point of contact.

I'm not suggesting that exactly, but a spring connection running OVER the top of the PCB fuse could be made to suddenly create a 5-6mm gap. Maybe add a high voltage MCP cap across the whole lot to help suppress the high frequency arc (not sure if that helps).

BTW I created an unexpected plasma arc when using a 240VAC fan heater as a 59 VDC charger temporary load last night. Small as it was - it woke me to the problems.

Leave everything as it is and place a suitable bright LED and resistor combination across the fuse such that it lights when the cell goes open and the fuse starts arcing. Seal all battery boxes to light and place a light sensor in each box that triggers the alarm. OR don't bother withg the LED and rely on the ARC light to trigger the alarm.

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 21:56
by weber
Great brainstorming. Thanks Johny. Image

Weber and Coulomb's MX-5

Posted: Tue, 03 Apr 2012, 22:03
by Johny
You shouldn't encourage me...

Pickup line or loop in each battery box with primitive Arc "squeal" EMF detector. This instead of light.
OR sense the squeal straight off the battery cables.

Generally useful in detecting connections going open as well. (Hmm - perhaps this is patentable.)

Weber and Coulomb's MX-5

Posted: Wed, 04 Apr 2012, 19:40
by Johny
I said I'd stop didn't I - last one I promise.
I am not sure about price/availability and of course it takes up space (they can be directly soldered as an SMD part), but these M205 fuses are rated to 300 VDC. They are a possibility for a future revision. ... MD-SPT.pdf

Edit: Hmm. The 300 VDC rating only goes up to 3.15 Amps. You would have to keep the bypass current under this.
You have to wonder how most cell top BMSs (or any for that matter) would cope with the test that you did!

Weber and Coulomb's MX-5

Posted: Wed, 04 Apr 2012, 20:18
by coulomb
Johny wrote: I am not sure about price/availability and of course it takes up space (they can be directly soldered as an SMD part), but these M205 fuses are rated to 300 VDC.
Yes, we've seen those. We've also found through-hole fuses rated at 450 V, which could be handy if we stay at 375 V and don't go to 750 V.

Alas, 20 x 5 mm is giant; our main PCB area is only about 37 x 41 mm, and we're packing a fair bit in there on two sides. The 450 V fuses are only 9 x 9 x 4.7 mm: . The problem is that they are over $4 each with GST, so that's around $1000 in fuses alone. But with the diode, we don't need the fuse to be able to clear pack voltage, only the maximum charger voltage minus the pack voltage.
Edit: Hmm. The 300 VDC rating only goes up to 3.15 Amps. You would have to keep the bypass current under this.
Heh, our bypass current, once over an amp, is now down around half an amp (the final current will be determined by how hot the bypass resistors get with the small amount of heatsinking we can afford).
You have to wonder how most cell top BMSs (or any for that matter) would cope with the test that you did!

Well, exactly. What happens to commercial BMS units when a cell fails open circuit under load? I'm guessing it won't be pretty. Though even if the BMS doesn't start a fire, interrupting traction current inside a cell with highly flammable electrolyte isn't going to be a good thing. Fortunately, going open circuit under load doesn't seem to be a common failure. Hopefully, it will first start going high resistance, which we should be able to detect with our BMS.