Wiring and Assembling the “Zephyr” BMS Unit

August 28, 2011

Building the Goodrum-Fechter “Zephyr” BMS – Part 3

The completed Goodrum-Fechter ‘Zephyr’ BMS unit (board available here)

Assembling the case, PCB and end-plate

If you’re building a 16s BMS, then in your parts you get one long case to house the PCB, but for the 24s version I was doing, I had two smaller cases that I had to put end-on-end. The end-plate that comes with the PCB is meant to replace the blank end-plate that comes with the case. Mine had to be sanded down a bit at the corners to make it fit in the plastic coupler that secures it to the case.

This done, it was time slide it together to see if it was a good fit, and that it allowed the PCB to slide in such that the resistors made thermal contact with the case. This was a bit tricky, as it was somewhat stiff and needed some gentle force to make it go in. In the end I took some sandpaper to the surface of the resistors smooth down some uneven parts, however I realised that this caused a few bits of bare metal on the resistors to show and I quickly stopped this. If any of the bare metal were to make contact with the case, then it could potentially cause a catastrophic short.

The PCB is slid into place in the case, with the status LED engaged with its hole in the end-plate

When I finally had it slid together, I took resistance measurements between the exposed metal of the case-end and the resistors, and no shorts seemed to be in evidence. The case itself is insulated by the black paint it’s covered in, but just as a precaution I got hold of some Kapton thermal insulating tape and ran a layer along where the resistors would be touching the case.

One of the two cases used to house the BMS board

Wiring it all up

The instructions don’t offer specific guidance on what grade of wiring to use for the battery main power coupling, charger power input or cell-tap wires, but the holes in the board give you a rough idea of what the designers have in mind.

The size of the wires you need depends on what kinds of power supply current you intend to use with the board. The designers of the Zephyr say that you can safely use it with up 20 amps (though you will need the Q3 FET in addition to Q2 installed on the PCB), but the guage wiring depends on how much power you are actually going to support.

Obviously the best policy is to ‘future-proof’ it if you want to leave open the option of upgrading to a more powerful charger, and that’s what I did. Although I’m only using an EMC-900 charger, which is capable of supplying 9 amps, I still wanted to be able to support the maximum rated current. Having the thickest wires possible also makes the whole thing more economical and efficient. There’s less energy lost on the way to the pack through wires heating up, and it all runs cooler.

Eventually I settled on the 6mm² wires (around 10 AWG) that the holes on the board were designed to accommodate. Apparently 12 AWG is enough to carry 20 amps, so these would more than enough. I used this grade of wire for both the power supply wires, and for the wires serving the main terminals of the battery bank.

The holes in the end-plate were not big enough to accommodate them, so I had to drill them out a little. Here you can see the wires threaded through their designated outlet holes.

For the cell-tap wires, I once again opted for the largest wires that would fit into the cell-tap holes, using 1mm² wire (about 17 AWG). This however caused difficulty for my choice of connector.

The parts list includes three 8-pin connectors intended for soldering directly onto the tap holes on the board. These would then be connected – via another connector head – to groups of eight cell-tap wires running from circuit board, out of the case and directly to the battery bank.  I assumed that the idea of this was so that you would be able to unplug the cell-tap wires, separating the BMS from the battery bank. However you wouldn’t be able to detach the cables completely from the BMS unit doing it this way: The tap-wires would be detachable from the circuit board, but not from the case itself because the connectors would still be on the inside of the end-plate. This approach also involved complications of the board-mounted connectors clashing with the positions of some of the shunts and other components, necessitating moving some of them to the underside of the board.

Though this clearly must have served a useful purpose for some people, for me I couldn’t see any benefit of doing it this way. Instead, I opted to solder the wires directly onto board, and have them run to a connector external to the case. I was originally planning to use a 25-pin serial port connector for this purpose. Though these are usually used with computer peripherals, they’re perfect for the tap-wires many people are using in their BMS arrangments. These connectors, though, aren’t big enough to house the thicker, 1mm² wire I’d chosen, so I had to find something a bit chunkier. After much hunting around I settled on another PC-based connector –  a 24-pin ATX “Molex” connector. These were ideal: affordable and similar in design to motorcycle mini connectors, except with the many pins I’d need for my 24s Lithium pack.

I started my wiring for the cell-tap connections from the connector, then worked back to the circuit board, threading the wires through their respective holes in the end-plate.

The end-plate has three rows of nine holes, one row for each 8 cell-circuit bank on the board. For reasons I’ll explain, I arrange things so that I only need to use only 8 wires per bank so that it ties in nicely with my 24-pin connector. I didn’t like the colour of the end-plate, so I sprayed it black to match the case.

You can see the final form of  the unit starting to emerge, now. I decided I wanted about 12 inches free-play for the cell-tap wires outside the case, like I had allowed for the charger cables and master battery bank wires.

Once I had the wires all laid out close to their final arrangement, I measured and cut off extraneous lengths of the wires to minimise kinks and bunching of wires inside the unit. Then they were soldered carefully to the cell-tap points along the length of the board.

Once all the wiring was complete, I used cable ties to tidy it up and keep it out of the way of the orange LEDs, which I wanted to be visible so I could see what all the cell-circuits were doing.

The ninth-wire issue

One consequence of having lots of cells in series is that the wires in between the cells act as both the positives for one cell and the negative of the next cell along. The diagram from the Zephyr assembly manual shows how a Lithium Bank (in this case a 16s bank) is wired up to the cell circuits on the board. For reasons of architectural practicality, the cell-circuit sections of the board are split up into 8-cell sections, within which cell-circuit poles are shared with the cell-taps to either side (cell tap 2 is the positive of cell 1, and the negative of cell 2, and so on…).

External connection diagram from the Zephyr assembly manual

This means that each bank serving 8 cells of the pack, actually ends up with nine wires, one last one to seal of the unbounded cell in a series. The problem with this arrangement is that for each bank you end up with one extraneous wire – unnecessary as it goes to exactly the same cell pole as one other wire on the previous bank. From the point of view of using an external connector, I needed to keep a ‘rational’ number of cell-tap wires: While 24-pin connectors aren’t hard to come by, 27-pin ones are practically impossible to find.

To avoid having an extra wire per 8 cells to deal with, what many people do is simply put jumpers between the individual banks, connecting cell-tap connection 9 of one bank to the first cell-tap of the following bank. This is exactly what I did. I left the first cell-tap of each bank empty, adding jump-wires to connect it to the last cell-tap of the previous bank. To accomplish this, I just drilled a 2mm hole in the first and last track of each bank, connecting them with a short jump-wire on the back of the board.

Below you can see the back of the board where my jump-wires connect cell-tap 9 of bank 1 to cell-tap 1 of bank 2, and cell-tap 9 of bank 2 to cell-tap 1 of bank 3.

But what about the first cell-tap? Since this is the master negative pole of the entire bank, I decided it would make sense to just cross-connect it with the master negative cable which I connected earlier. The picture below shows the board before the master negative was connected. You can see the hole I’ve drilled for the jump-wire which will join them both here.

And here it is as it is today (below). You can see the black master negative cable on the far left, and the soldered jump-wire that connects these two on the back of the board. The first cell-tap hole therefore doesn’t need to be used, just like those in the other two banks.

The negative track of cell-circuit one is jumpered to the site of the pack negative (far left)

The end result is that I get to confine myself to a nice, ’round’ number of wires, and need only 24 cell-tap wires, rather than the awkward 27 that the end-plate allows for.

Once assembled, the final article is pictured below. The cases that house it (two of them, joined end to end) come with metal covers that can slot into the uppermost groove of the case, sealing it shut. But instead of using these, I ordered a single piece of 96mm X 320mm perspex to go in their place. That way I could see the LEDs while I was testing and fine-tuning the unit. It was also a nice way of putting my handywork on display so it could be better appreciated…

The EMC-900 came with a pair of red/black Anderson connectors to be used with whatever the charger was to be connected to, and these were duly attached to the charger input wires. For the main battery bank terminals, I used a 50 amp Anderson connector to connect to the one I have on the battery pack.

This is the BMSBattery EMC-900 charger, which I have nothing but praise for. Its voltage and current can be fine-tuned, and it has a digital display telling you exactly what it’s doing. The charging cycle can be read by the amount of current that it’s drawing, which starts out at 9.o amps, and slowly reduces during the final few minutes of a charge cycle.

The BMSBattery EMC-900 charger

Once I put it it into commission, there was a certain amount of fine-tuning with the BMS end-of-charge (EOC) cut-off point and the charger voltage. I’ll cover this in a separate section shortly…


Building the “Zephyr” Circuit Board

August 28, 2011

Building the Goodrum-Fechter “Zephyr” BMS – Part 1

The completed Goodrum-Fechter ‘Zephyr’ BMS circuit board (PCB now available here!)

Once I had my LiFePO4 Lithium Pack, the next stage was to find some way to charge it, and also to manage the LVC (low-voltage cutoff) at the cell level. LiFePO4 cells are lighter and have much better lifespan and performance than SLAs, but they can only survive if their voltages are kept in a certain range. If the cells are charged beyond 3.65V or are discharged to below 2.0V, they can be permanently damaged, and have their lifespan and performance significantly impaired. Once this happens, the cells of the pack need to be replaced.

It’s therefore essential to keep the pack properly balanced. A charging system needs to be in place where the individual cells are charged only up to a certain point (usally 3.6 or 3.65V), and while using the pack, the cells need to have their levels monitored so that an alarm or throttle interrupt is triggered once they fall below a certain point – usually 2.5V or 2.0V. Lithium cells quickly fall out of balance at the end of a discharge cycle, so just measuring the pack voltage is not good enough to warn the user about individual cells. A system needs to be in place that responds to this too.

The Goodrum Fechter Zephyr PCB

To do both of these jobs, you need a battery management system (BMS). It is possible to find off-the-shelf BMS systems, but usually – like much EV hardware – these items need to be imported from Chinese vendors, and documentation is notoriously poor. I’d heard stories of people coming unstuck and ending up with useless, non-functioning boxes, with no technical support to turn to for help. Users were often left high and dry with no option but to try and return the items for a refund.

Because I wanted a tried and tested product with a strong user base and good support, I opted for the latest incarnation of the Goodrum-Fechter board. At the time of writing, this comes as a kit that you have to solder together yourself, so some soldering skills are required. However the board comes with solid assembly and testing instructions, and a spreadsheet containing a parts list that can be drag-and-dropped into the on-line shopping cart of electronics vendor Mouser. Mouser is a U.S. based company, but has outlets worldwide, so I was able to get my own order in from their European division.

I wanted to build my own so that in the process I would understand more about how the board worked, but – more importantly – so I would have technical help if I ran into problems. The Endless Sphere forum has a ‘Zephyr’ thread dedicated to the ongoing development of this board, and troubleshooting of any issues that people might have getting it working. It is well-attended by the board’s designers Gary Goodrum and Richard Fechter, who have been immensely helpful and patient with all of my questions.

I ended up with version 4.4 of the board. It came with one 8-pin chip already in place and wired to fix a ‘bug’ with the tracks on this version. This has been rectified on newer versions of the board.

The Goodrum-Fechter ‘Zephyr’ PCB as purchased – now available in the shop

The PCB comes with two end-plates for use with the case (which is included in the parts list). There is an end-plate for 16s and 24s pack configurations, with holes for the respective numbers of tap-wires. The forum thread offers links to the spreadsheet with the parts list, and the assembly, testing and operating instructions:

Zephyr LiPo-LiFePO4 BMS BOM-v4.4a.doc

Zephyr BMS Assembly-Test & Operating Instructions-v4.4a.pdf

The board is clearly laid out and labelled, with component names and values stamped where the components need to go. Any polarised components – like diodes or capacitors – get a square pad (the mounting for the hole on the board) where the negative end needs to go.

Mounting the Surface Components

Once my parts had arrived from Mouser, it was simply a matter of soldering a lot of components onto the board. It’s best to start with the smaller components, and then move onto the larger ones. Below the cell tap holes (those holes along the middle of the PCB which link to each cell in the Lithium pack), each cell circuit has seven resistors, a diode, an LED and three transistor-type pieces to mount.

I started by mounting the resistors and small capacitors to the control circuit and the individual cell circuits, and the cell-circuit diodes. Next I added the larger, metal 47uF capacitors above the cell-tap holes. On my version of the board the negative terminal for these wasn’t indicated by a square pad on the PCB, causing some confusion. Not that these capacitors should go with the white stripe on their case (negative pole) pointing right. Note that the illustrations below show only two out of the three banks – 16 out of the 24 cell circuits on the full board.

Stage 1: Resistors, capacitors, and cell-circuit diodes mounted

Next I mounted the orange LEDs, the two ‘TO-220’ FETs (top-left), and the 8-pin U1 and U3 chips (far left). Each chip has a white dot on it which indicates the negative pin, and this goes in the square pad. I also added the diodes to the control circuit. The diodes have a stripe at their negative end, which likewise needs to be mounted on the square pad.

Stage 2: FETs, diodes, 8-pin control circuit chips and orange LEDs mounted

Next came the shunts, which are used to divert the ‘overflow’ voltage away from fully charged cells to the power transistors. These need to be installed with the nomenclature (the little writing on the components) face-down.

Stage 3: Shunts mounted

Finally, the ‘TO-92’ transistor type components needed to be added to each cell circuit. Once again care needs to be taken to put them in the right way round, but this is easy to tell by just making sure the flat faces of the components point in the right direction, as shown in the pictures. I also added the 1KΩ pot (blue-capped variable resistor), shunt resistor (that metal bar to the left) and the 24 8-pin chips at the bottom of the cell-circuits. Once again, the white dot on the chip tells you which leg goes on the square pad.

Stage 4: TO-92 parts, pot, shunt resistor and remaining 8-pin chips mounted

The main tri-colour LED also went in here, however I found I had to mount this on the underside of the board in order for it to meet up with the hole in the end-plate.

The Underside Components

In earlier incarnations of the board, the power resistors were mounted on the top of the board, so they sat on top of those empty rectangular pads you can see. But later someone came up with the bright idea of using the case as a heat-sink by mounting the resistors on the underside of the board in such a way that they would make contact with the side of the case once the board was slid into place.

Getting the spacing just right calls for some precision in mounting the components, but is aided by the suggestion of using a piece of old PCB as a spacer to hold the resistor the exact 2mm above the board it needs to for the resistors to touch the side of the case once the PCB is slid into place on the correct ‘rung’.

There were 48 of these things to solder on for my 24s board, so it was some job! The resistors can go either way round, but it’s nice to have them all the same way so that it looks pretty…

Testing the Board

At this point, the board should be ready to start testing. For this stage I slid the board into its case for support, and gave it a temporary power connector in the form of a couple of ring connectors bolted to the holes for the main charger input wires.

The next section (coming soon) will deal with testing and callibrating the board prior to assembling the final unit.

Part 2 – Testing and Callibrating the “Zephyr” Circuit Board

Part 3 – Wiring and Assembling the “Zephyr BMS Unit

Installing a Speed Control Switch

August 15, 2011

Three-way Speed Control Switch

N.B.: This upgrade is only suitable for bikes with “infineon” type controllers with an EB-206/212/218 board, such as the LYEN Edition Controller and  eCrazyman controllers. Check that your controller type supports speed control settings before going ahead with this upgrade! You will also need the USB/TTL programming lead and software that enables you to program the controller settings.

The Switch

The first thing you need is a suitable three-way switch. A handlebar-mounted, three-way switch exists specifically for this purpose and is now available from my shop. Other similar switches are available from various China-based vendors.

The custom, three-way switch, available here

To fit the switch, you remove the throttle control by loosening the alan bolt that secures it, and sliding it off the handle. You then slide the switch onto handlebar so that it sits next to headlight switch mounting, and secure it by tightening its alan bolt. The throttle is then slid back into place to its right and similarly resecured.

The switch is connected by a good length of cable to a standard three-way mini connector.

To feed the cable through to the rear of the bike, I removed a side panel to route it through to where it was within reach of the controller, using cable ties to secure it.

The Controller

At the controller side, the EB-type boards support three speed settings, which can be set via the Parameter Designer software that is used to program the controller. The speed settings can be found in the “Speed Mode” panel on the right of the settings screen. Three speeds – Speed 1, 2 and 3 – are listed which are all set to 120% default. Modifying these enables you to customise the amount of power that is delivered by the controller in response to throttle movement.

In effect, lower speed setting values decrease the throttle sensitivity, making it so that more rotation of the throttle is required to deliver a set amount of power. In addition to letting you set up an ‘economy mode’ which restricts the amount of power you use, it is also hand for creating a ‘low-gear’ for manoevering at low speed. This is particularly handy if you are running at very high current and voltage, which can make the throttle twitchy and oversensitive.

The Parameter Designer Screen

The key to rigging up a three-speed switch is understanding how the EB board sets its speed mode at a hardware level. The way it does this is fairly straightforward. There are two terminals on the PCB, X1 and X2, which are simply shorted to GND (battery bank negative) to set the controller’s speed mode. Shorting X1 to GND puts the controller into Speed 1 mode, shorting X2 to GND selects Speed 3 mode, while leaving both of these terminals un-shorted keeps it in the controller’s defaul Speed 2 mode. Effectively the bike is always running at the Speed 2 setting, unless it is told to do otherwise by wiring up a switch to short X1 or X2.

In terms of the physical layout of the connector attached to the switch, it looks like as below. The black wire goes to GND, while the green and red go to X1 and X2 respectively.

Adding a Connector to the Controller

The main part of the job that needs to be done is to add a connector to the controller. To do this, the case needs to be dismantled and the PCB carefully removed. The X1 and X2 terminals are clearly marked and simply need a couple of suitable, small guage wires to be soldered to them, These wires can then be fed through the end of the case by threading them through the hole with all the existing wiring. A two-way mini connector can then be added and the case re-sealed.

The EB-212 board seen with the X1 and X2 terminals (here with wires soldered in place)

This is the final arrangement on my bike. A two-way connector feeds through to X1 and X2 on the controller board via grey and purple wires. If you wanted to use a GND (battery bank negative) connection from within the controller, rather than somewhere else on the bike, you could have an extra wire here and use a three-way connector instead. I chose to only run wires for X1 and X2 from the controller, and found a place elsewhere on the bike, to earth the GND wire directly from the switch itself.

The X1 and X2 connector for the speed control switch.

The only thing that remained for me to do was to assemble a short length of cable to join the three-pin male connector from the switch tothe two pin connector I had wired up to the controller. The remaining GND wire was routed to a connector on the loom that served the negative terminal of the main battery bank.

Try it out!

This done, it’s simply a case of programming your controller with suitable speed settings. For testing purposes you should make sure that the settings are far enough to be clearly noticeable when you switch modes. I set mine to 40%, 70% and 120% for Speed 1, 2 and 3 respectively.

You can test it on its stand easily enough by holding the throttle open a set amount and switching between modes. If you’ve got it right, the motor will slow and speed up accordingly.