Monday, June 20, 2022

Adding air-conditioning and tidying up the wiring (at least a bit)

This is a bit of a belated post to document how I added an air-conditioner to my bakfiets for my long rides to work in the summer.  I used to work quite near by, but now work several days a week out the other side of the city -- 32km in each direction.  

The big battery upgrade I did last year has been a wonder and joy for this, because it takes me about 3 hours return for the 64km, which I can do on a single charge. With the original battery, I wouldn't have even been able to make it one way, and then it would have taken 6 hours to charge it up during the day at work, and just generally would have sucked.  But instead, I can charge the big battery in 2 hours easily over night, and be confident that I will get several hours of support from it.

But that's now what we are here to talk about today... Instead, it's adding air-conditioning for the ride home from work on hot summer days: Where I work now, I typically work 8am to 4pm. So summer mornings arriving by about 7:30 for a shower are lovely, but riding home in Adelaide summer between 4pm and 6pm means riding in the hottest part of the day.  

Long-time readers might remember that this is not the first time I have added airconditioning to my bakfiets. The last time, I added a fan, because my commute involved a 10% grade clime, which meant that airflow was lacking. This time, I am typically sitting at 25km/h most of the time, so airflow isn't the problem, which means I can just make a simple evaporative cooler.

Also, last time, I had to add a power system, because the bakfiets had not yet received its electric assist system (yes, I used to ride up at 10% grade with a purely human powered bakfiets. It kept me very fit).  But now, my bakfiets has a 28v electric assist system, which is within tolerance of truck battery voltage.  I already have various other contraptions powered by this, including a 139dB truck/train air-horn, proper headlights made from a ditch-digger's flood lights and a rear flashing light that is the same model the Victorian police use on their field van to warn aircraft to avoid their mast and is so bright it reflects off of black bitumin roads. 

I thought I had made blog posts about those, but it turns out I haven't. I'll fix that at some point. It is very therapeutic to have a horn that every motorist or music-listening pedestrian can hear when the need arises.

Anyway, the point being, I have truck DC voltage available. So I figured the easiest way to make an air-conditioner would be to get a truck window wiper washer bottle and pump, and connect it to a garden mister.  Then I would be able to press a button to provide a water mist to damp me down, and thus provide the moisture for evaporation.  And it works very nicely.  I holds about 2L of water, which is more than enough for a 1.5 hour ride in 40C conditions.  Typically I need to press the button for just a few seconds every couple of minutes to do the trick.

There is enough clearance at the back of the crate on the bakfiets to attach the bottle externally, which avoids any risk of 2L of water sloshing about next to a 1KWh lithium battery. This then connects to the mister on the handlebars and to a motor bike handle bar switch set:

The bottle I bought as a generic replacement part for trucks from one of the various online trucks parts places here in Australia. Cost me about AU$65

Here you can see the red mister in a re-purposed irrigation system T-piece to attach it to the handle-bars. It's not the most elegant thing, but its also not as ugly as it could be.  To the left of that is the motor bike switch set I bought. At some point I should re-wire the air-horn and headlights to connect via this, to reduce the number of things I have on the handle-bars.

Finally, as this was making the wiring in the bakfiets crate even messier than it was before, I finally bit the bullet and totally re-wired it.  90% of the wiring now terminates into this nice long black tray that sits above the battery.  It's actually the fuse box from an ancient Holden Commodore car from the 1980s that I bought at a wreckers for AU$20.

Using an automotive fuse box was a great idea, not just because it was cheap, but because it has lots of spots for relays and fuses, and existing heavy-gauge wiring.  The shunt relay for the air-horn (because of its 250W power consumption, with up to 1KW in-rush power) fits in there nicely, and is much more reliable in stead of the old hacked-up arrangement I had previously.

This is what the inside of the fuse-box looks like:

Most of the work was ripping out all of the wiring that I didn't need from the loom. All that's left is the black shunt relay for the horn, the three main fuse blocks near the bottom for the motor, horn and head/tail lights, and the smaller fuses at the top that separately fuse various of the minor systems, including the 12V accessory plug, cooling fan for the motor controller and USB charging ports.

The bakfiets is now almost exactly 10 years old, and has been ridden well over 30,000km, and continues to evolve together with my life.  Hopefully, I'll get a few more years out of it, yet, before I have to replace the whole thing.  With a newer cargo bike, of course...


Thursday, January 14, 2021

Total rewire and 1KW-hour LiFePO4 battery conversion

While the blog might have been idle, life hasn't stood still. My dear old Bakfiets is still going, even if it got a break for a year when we were living in the middle of the Outback, where you just needed to look at the ground to get a puncture.  

Its done well over 25,000km now, and after the third battery pack dying, I got sick of this happening, and decided that I wouldn't buy another one of the standard packs. Also, they are no longer made, as Bakfiets switched from the Azor electric kits to the Shimano electric systems. I looked at replacing the dead cells in the packs, but that's also a pain, as it requires un-spot-welding and re-spot-welding an awful lot, and I don't own a spot-welding machine.

But with COVID19 messing with importing bikes, the Australian dollar being low again and all that, I figured I didn't want to fork out a pile of cash on a new e-Bakfiets, either.  So I decided that I would completely replace the battery pack with something custom, and fix several annoying problems that always annoyed me:

1. The standard battery pack was only ~400W hours, which means <2 hours of full boost.  Church is close to an hours ride away, so a return trip would typically result in a flat battery, and that was before the batteries start losing their capacity, which they would do quite quickly when used every day, because...

2. ... the official battery packs were LiPo-based, which while lovely and small and light, are not the most long-lived chemistry. Also, I don't really like having a battery system that can go critical easily if I have an accident.  I much prefer LiFePO4 batteries for their much longer useful life and intrinsic safety.  The weight and size are not really an issue when you are talking about an e-Bakfiets, since I have this 100L box on the front, and the kids are now too big to ride in it, so I rarely need the full volume.

3. The original battery packs have to be removed to be plugged into charged.  This is just plain annoying, especially as the sled can be a bit sticky at times, and is just a bit fiddly to move when you get home in the cold rain in winter etc.  So I wanted an approach that would be as simple as possible to plug into charge.

4. The original charger is also as slow as a wet week: 6 hours of charging for <2 hours of riding.

5. After adding an airhorn, front flood-light and rear super bright red LED light, the wiring was a mess, with everything having to connect back to the battery tray on the rear carrier.

So I looked around at what batteries I could order directly from China, and found a nice 40A 7S (~27V) LiFePO4 battery pack, i.e., 1,080W hours, for less than the list price of the original ~400Wh LiPo packs.  In fact, the LiFePO4 battery itself was about 1/3 the price, but then air freight to Australia for a single battery doubled that. This more or less matches the 8S LiPo for voltage, so can be used without an adapter. For another US$90 they included a 20 Amp charger: That's right, I can recharge this 1KW hour monster in 1/3 the time of the original.  At 250W maximum power I should get around 4 hours of full-assist riding, for only 2 hours of charging.  Much more civilised.

It took a while with COVID and postal hilarities caused by ordering while we were living in the middle of the Outback, but the battery and charger finally arrived last week, and today I finally had the time to start stripping everything down, and rebuilding with the new wiring.  I decided that I wanted to put as much as I could in the cargo box at the front, and have only the bare minimum wiring visible externally. I ended up being able to reuse almost exclusively the existing holes in the cargo box, including a couple of the drain holes that don't get much use, now that the kids don't ride in it.

The whole episode only took about half a day, including remembering how I had the various things connected together, including those add-ons I mentioned earlier, which are controlled using a cheap motor-bike handle-bar control which has a momentary horn button and click-on-click-off headlight button.  In the process I also discovered that the old airhorn had given up the ghost, so I replaced that as well (I had a spare on hand, as I had suspected that the old one was dying). 

The only thing that isn't working perfectly is the battery level indication on the Azor handle-bar display.  I assume that this gets the voltage from 3-pin connector that came from the original battery, and which I haven't connected.  Alternatively, it might determine it from the primary battery voltage.  Either way, it is showing empty. But then, it has been doing that with the original battery packs for years, as soon as they drop a single cell, thus lowering the maximum voltage. So that's not really a big inconvenience. That said, I have ask Dutch Cargo Bike if they can get me some more information on that 3-pin connector, to see if I can find a way to get the battery level showing on the handle bars. The big LiFePO4 pack does have a display, but you have to press a button on the battery to activate that, and it goes off again after a few seconds.  Also, with my setup, that's inside a battery box under the flat tarp cover of the Bakfiets, so not accessible while riding.  Anyway, if I charge it up every night, I shouldn't ever have a problem with it going flat on me.  And if it does, I can now recharge about 8x faster than the original charger.  

So, in short, I'm pretty happy with the result.  Here is the battery pack and wiring after all the work:

 

The battery is in the big black metal box, to make sure nothing falls across the big fat terminals of the battery, since fully charged it does contain enough energy to boil about 30L of water... The black box to the left of that is the charger, which fits conveniently in the gap. The relay screwed into one of the hold seat-belt harness holes is for the airhorn, which draws 20A at 24V, i.e., almost half a kW -- it is really loud --  because the handle bar switch can't carry that much current.  The handle bar switch comes in through the other hole.  At the moment there is one cable that just comes in over the top edge, which I would like to tidy up further, which is the cable to the absurdly bright rear light (its the same type you put on portable antennae to ward of low-flying aircraft).  But all up, I'm pretty happy, and it is miles better than it was before.

And now the pictorial journal of the process I went through...

 

First, remove seat and original battery, so that I can get to the little electronics enclosure: 

Here is that insanely bright rear LED light.  It draws 10W on average, with a 25% duty cycle or so, so has a peak power consumption of around 40W of LED.  Cars now leave a nice gap behind me when stopping at the lights at night.

Then under the battery compartment, we have the actual motor controller:

This doesn't need to go there, since the motor is at the front of the bike. So if I move that into the box, we can avoid having a lot of wiring going to the rear carrier and back again.

Next step, sit the battery in the bike and think about where everything will go:

Here is the nice little integrated display on the battery. If I could make it stay on, it would be really useful.

Now, originally, I was going to use these big fat leads to hook everything up, since we have to deal with peak currents of up to 50A (full boost plus that 20A air-horn). But in the end I didn't need to.

So here is the 20A charger with its nice big fat alligator clamp fittings.  I removed those later and put eyelets on that I found in the shed, and hard-wired it onto the battery, as you will see later:

Again, a quick fit test and further think with the cover for the battery box in place. The battery box is there to avoid problems if a bit of water gets in under the cover.

Now, speaking of the old ugly wiring, here is where that relay has been sitting for the past three years:

Completely function, but completely ugly. You can also get a hint of the general mess of the wiring prior to today's work.

Now, back to pulling apart the wiring loom for the original battery system. Most of it is hidden in that little compartment behind the seat-post, and connected to that little black controller box we saw earlier:

Its a bit of a pain to get out through the hole in the bottom, but its just a case of fiddling with it for a while. I also had to start removing the 5 connectors to the big battery interface terminal. This blessedly used spade-connectors, which I was able to just slide off, and make mating connectors for, later:
After all that. I had the controller box out and alone:
And the rear carrier was now looking like this: The metal plate and wire running on the top are for the rear light:
One of the enduring mysteries is what this brown-yellow-blue 3-pin part of the battery connection interface do.  It has a 2A fuse inline on the blue, and connects to the Azor luxury display on the handle bars.  Is it backup power? Is it battery level indication? Both? Or something completely different? I'll let you know when I find out:
Next I removed the key lock that cuts the power from the battery to the controller.  I like the idea of having a key-interlock for the power, especially since I have a 139dB airhorn switch on the handle bars that kids love to press if they figure out it is live. So I decided I would keep that, and hook it up with the new battery. Unfortunately it can't stay on the carrier, because the battery is not there, so I will need to have two separate keyrings with me in future. A bit of an inconvenience, but nothing major:
Then we have a bunch of wiring modifications I made when I hooked up the airhorn and bright lights.  I used vampiric crimp connectors, so that the result would still fit in that tiny electronics compartment:

However, with the new setup, that wasn't a problem, and they were both ugly and a pain to work with, so after I removed them to be able to disassemble the wiring loom, I re-wired without them.  The Deutsch connectors at the top of the picture above I added when adding the lights and airhorn, to make the loom easier to disconnect, which I was rather thankful of today.

And here are more pictures I made so that I could make sure I ended up with functionally equivalent wiring at the end:





So now I was more or less at the point of having a bunch of suspiciously similar looking cable ends, that I had to start matching back up, to reassemble:


So more gazing in the box to think about how I would hook things up, and removing the bench seat and seat belts to make more space:
This was when I had the brain-wave to use the holes from the strap mounts to hold the relay in place, and to feed one of the cables through:
So now that ugly patch of wiring with the relay etc, is no longer visible from the rear:

Around by the front-wheel, there was also a mass of wiring, which I was able to shorten and simplify, feeding it through one of the front drain holes. The other front drain-hole is taken by the mounting bolt for the airhorn. The airhorn itself can be seen in the lower-right of this image:

From the other side at the front we can see the flood-light, and how I did still have to feed one of the cables over the top of the front of the box. This goes over a slightly damaged part of the box, that was roughed up by carrying the kids bikes on top of the cargo box every day for three years. I might file a small notch in this area in the future to let the cable sit out of harms way.

So now the wiring was starting to get joined up, but was still unsettled in the cargo box, and I had to come up with a plan for how and where to mount the controller box:

The controller is the heart of the rats-nest of wiring, and eventually should probably get a nice tidy box to conceal the rats nest:
But for now, I used one of the bench seat supports, and just put the rats nest of wiring on the floor below it. It can't really go anywhere else, unless I want to cut and lengthen the speedometer and pedal crank sensor cables, which were really made assuming the controller would be right next to the crank and rear wheel. We can also see the eyelets being used to connect the wiring to the battery. I salvaged one of the 30A fuse holders from one of my dead original battery packs to protect against short-circuit:
So now its all really starting to come together. The lid can fit on the battery while it is connected, and I have decided on using the spare space to fit the charger:
The charger is, as I mentioned, hard-wired to the battery as well, via another pair of eyelets. These also act as spacers to enable the screw terminals to hold solid.  Writing this now, I just realised I should put another fuse block on the charger leads for complete safety...
And finally, with everything hooked up, and a retainer strap over the battery, using the bench seat supports as anchor points.
So apart from a couple of odd wires, from the outside, when the cover is on the cargo box, there is not really anything to give away that the wiring and battery system has been completely re-built using a custom battery and charger solution.

Let's see how it goes over the coming months. But for now, I'm just glad to have lights and a horn again for safely traversing city traffic, and a battery that works to let me use the motor when the need arises.

Tuesday, March 10, 2015

Rebuilding the back wheel in a hurry

A few months ago I had my back wheel rebuilt by a local bike shop.  At the time, they were unable to get the thick Dutch spokes, so they kindly did what they were able, and fit the thinner Australian spokes, and to accommodate those spokes, put a normal rim on.

However, the thinner spokes just aren't up to the ~250kg gross vehicle mass of the Bakfiets when fully loaded, and so I have been popping spokes and really just fire-fighting on the back wheel since then while I ordered new Dutch spokes, which took a little while longer than hoped to get here.

However, this morning they arrived, which turned out to be not a moment too soon, as I had popped another couple of spokes in the last few days, and was faced with the prospect of pulling the back wheel out again, just to keep it going.

This afternoon at work, however, I noticed that I had a completely flat back wheel, which I had presumed was due to a spoke-head poking a hole in it, since the thin spokes have to be tightened quite hard just to keep the wheel reasonably straight.

Thus I was faced with absolutely having to pull the back wheel out and sorting it all out again. I was much happier to do this going back to the 10 or 11 gauge Dutch spokes rather than persevering with 12 - 14 gauge Australian spokes.

My tyre was very flat, and I couldn't pump it up faster than it was going down, so I assumed a spoke had pierced from the inside.  (I later found the problem was, ironically, the rim tape that is supposed to protect against flat tyres caused by spokes had split, and the sharp edges of the rim tape had made the hole.)


Spot the broken spoke in this image:


And in this one:


After I pushed the bike home, it was time to dive in and start removing the hub from the Australian rim:


Once removed, it was able to stand on its spokes, looking like the Martian battle machines out of War Of The Worlds, emerging after they, too, had extracted themselves from their transportation:


After spraying for martians, the hub was all nice and alone:


I then set about lacing the new wheel up using this really helpful video as my guide.  It was the first time I had actually laced up a wheel, and although I had to back-track a couple of times, it wasn't that hard. It probably helped that I have been changing a lot of spokes recently, but even so, it just isn't that hard.

The next challenge was to true the wheel.  With the bakfiets you can't really sit the bike upside-down and pedal to see how the wheel is wobbling and then fix it.  But I also don't have one of those really nice wheel truing stations.  So I built one out of half a dozen bricks.  After all, you only need something to hold the axle of the wheel, and then something to act as a reference so that you can see how the wheel is wobbling all about.


For the reference, I strategically placed one of the bricks on the ground, so that I could see how the wheel was moving.  Here it is wobbled to one side ...

... and to the other.


Once I had it roughly right, I put bricks more closely on both sides to see if the wheel stayed in line.


Then it was time to put the tube and tyre on, and put it all back together:


I then had to spend another 15 minutes or so tweaking the tension on the spokes because it was sitting a bit too far to the left and rubbing.  But after about five hours, I have managed to rebuild the back-wheel, so that I am not bakfiets-less for the school and work run in the morning.