Rebuilding an Ebike Battery

ebike-batteryA few of our members and visitors use Ebikes. We were presented with an Ebike battery which had a dead cell. The plan was to replace the cell with a new one. This is not ideal, since you end up with a mix of old and new cells, but the balance circuit should make it usable. On further investigation we found that there were a number of dead cells. So we set about rebuilding the whole battery with new 10Ah cells.

The cells are 10Ah LiFePO4 type…. 12 of them in all. The new ones are a little bigger than the old ones, so we will have to modify the case a bit, but that won’t be a show stopper. Drop in during our fortnightly electronics night to see the build in action.

Forge Maintenance

forgeA few years ago, we built a forge based on Larry Zoeller’s designs. We’ve used it a few times and now it’s time that the forge itself gets a bit of maintenance. This is nothing more than recoating the inside with a refractory coating to help keep the insulation in good shape. We did a quick test fire after letting it dry for a week and all was well.

Machining Brass

brassThe cooker door wouldn’t snap closed properly. A quick disassembly of the hinges showed that a brass disc had a flat spot from years of wear and tear. Replacements were no longer available. Time to make some new ones on the lathe.

Took some measurements and started with a length of brass stock. Turned it down to the required diameter, then drilled a 4mm centre hole. Next cut a groove and parted off the new disc from the bar.

Brass is interesting to work with. It kinda crumbles off in fine particles, unlike steel. Drop in sometime and have a look at the lathe.

Project: Seven Segment Display and an Arduino Mega

Seven Segment Display standing on a table

Everyone has one in their house, a clock on your VCR you never set, a timer on your cooker or your microwave, a digital clock. The seven segments of LEDs that light up to form numbers are made up of Seven Segment Displays.

There are all sorts of projects you might want to add these to, but this is a basic introduction with one number.

The pins on these displays may differ, on mine, the first pin did nothing and the middle pin on the top and bottom connected to ground. Each of the other pins was a positive for a different segment on the display.

Seven Segment Display in Breadbord

First things first, look up the data sheet of your display and figure out how much current and voltage it should take, no point burning it out. You will probably need to hook up a resister for safety.

I’m using an Arduino Mega, but you could do it with any Arduino boards or a Raspberry Pi.

Put the display in a breadboard so each pin can be powered separately and first wire up the ground with a resister, then connect it to the Arduino ground.

Then, connect a jumper line to the 3.5V on the Arduino and connect it to each pin on the Display in turn. If everything works, each segment should light up as you power it up.

Seven Segment Display in Breadboard, being tested

To make it more interesting, wire up each segment to a digital pin on the board. For Arduino, I used pins 1-7, which is a bit interesting.

Seven Segment Display with all pins connected to Arduino

Firstly, you can’t connect pin 0 or pin 1 to anything while the sketch is uploading to the board. Once the program is uploaded, you can then connect these pins.

I used pins 1-7, and connected them to the display, skipping the ground pins.

The below code has 2 parts, and is derived from the blink program.

 

// the setup function runs once when you press reset or power the board

void setup() {

pinMode(7, OUTPUT);

pinMode(6, OUTPUT);

pinMode(5, OUTPUT);

pinMode(4, OUTPUT);

pinMode(3, OUTPUT);

pinMode(2, OUTPUT);

pinMode(1, OUTPUT);

// for each pin we want to use, we need to set it to output.

}

// the loop function runs over and over again forever

void loop() {

digitalWrite(7, HIGH); // turn on whatever segment is connected to pin 7

digitalWrite(6, LOW); // turn off whatever segment is connected to pin 6

digitalWrite(5, HIGH);

digitalWrite(4, LOW);

digitalWrite(3, HIGH);

digitalWrite(2, LOW);

digitalWrite(2, HIGH);

delay(4000); // wait for a 4 seconds

digitalWrite(7, LOW); // now whichever segment is connected to pin 7 will turn off

digitalWrite(6, HIGH); // now whichever segment is connected to 6 will turn on

digitalWrite(5, LOW);

digitalWrite(4, HIGH);

digitalWrite(3, LOW);

digitalWrite(2, HIGH);

digitalWrite(1, LOW);

delay(4000); // wait for 4 seconds

}

The display is really simple, it is made up of seven LEDs and you can turn on and off each part at the same time to from numbers. This is a basic introduction, you can add more displays for more advanced features.

Swollen Lithium Batteries

battery swolenLithium batteries are in the news for all the wrong reasons at the moment, and not for the first time.

We noticed that one of our batteries was a little swollen compared to the others. It seemed to be working OK though. We decided to open up the outer wrap to see if it was one cell or all of them, and to see if anything was obviously wrong. The battery was an 11.1V 1300mAHr LIPO. Check out some pics of us cutting off the outer black covering, to reveal that all three cells were swollen. There appeared to be no external sign of damage however. The cells feel as if they are swollen with gas.

 

We hooked it up to the  IMAX charger to see what kind of capacity our battery had. This battery is about five years old. Its nominal capacity is 1300mAHr. We fully charged it and then discharged it. We were pleasantly surprised to find it at 1095mAHr. That was discharging it at 200mA which is about C/6. By the time the charge and discharge was complete, the pack had swelled even more.

 

The question now is what to do with this battery. The Internet is full of videos of people doing all sorts of crazy things to lithium batteries too. We won’t be doing any of that here. We won’t be keeping this battery indoors, thats for sure. It could still be useful for some completely remote outdoor application, away from any kind of combustible material. We should probably dispose of it safely though. Note that all of the disassembly, charging and discharging was done outdoors and with lots of PPE.