Electric Bikes – odometer

7th February 2017 – 7631 kilometres

4th November 2016 – 7432 kilometres

18th October 2016 – 7245 kilometres

5th October 2016 – 7080 kilometres

20th September 2016 – 6910 kilometres

7th September 2016 – 6803 kilometres

22nd August 2016 – 6703 kilometres

12th August 2016 – 6610 kilometres

5th August 2016 – 6553 kilometres

22nd July 2016 – 6389 kilometres since June 2014

Posted in Electric Bikes

Electric Bikes – a new addition to the stable.

After 3 years of building and maintaining our two Giant Elwoods with Bafang 8Fun rear hub motors, I have decided to purchase a new e-bike to act as a company vehicle for my computer repair business. My existing e-bike is having a few issues with rear wheels, mainly caused by the rider being tall and wide (183cm tall and 103kg). Add to this all the paraphernalia and gear I carry to keep warm, dry and to maintain the bike, then add on the battery and panniers for the electric motor, and then the electric motor itself, and I am overloading the rear wheel by at least 30kg.

The first cheap Chinese wheel that came with the motor broke a few spoke nipples, mainly because of the two cross pattern of spokes and the bigger diameter hub causing the angle of the spokes to stress said nipple, and also because the spokes were a couple of mm short, leaving the head of the spoke nipple without the spoke through it. The rim also wore thin because of heavy breaking, and got damaged when I hit a pothole.

So I decided to replace the rim with the original rim that came with the bike, and laced it to the motor. To avoid stressing the rim and nipples too much, I went for a one cross spoke pattern. However, as yet I have not had the wheel professionally trued, and I am breaking spokes at the hub end when I ride the bike. I am not giving up on it, and the rear wheel will become a project! I intend to use this bike for cycling holidays etc.

To avoid the weight problems, I decided I needed some thing a bit beefy. As it was also going to be used for my newly relocated business, I decided it also needed some carrying capacity. The answer is a cargo bike of some sort. Not wanting to look any more of a dork than I do already, I decided a long tail would suit best, which are specifically designed to carry 180kg or more on the rear wheel.

I looked around for a ready built electric cargo bike, and while there are some great bikes out there by Surly, Felt, Pedego and Yuba, here in NZ they are all exceedingly expensive, in the $5000 to $6500 range.

A lot of self built electric cargo bikes are based on the Yuba Mundo, which seems to be a really easy bike to work on, so I looked around for one. Bicycle Junction in Newtown, Wellington NZ sell two Mundo versions, the V4 and the V5. The V4 is the budget entry model, with 7 speed freewheel derailleurs,and V brakes, whereas the V5 has all the bells and whistles, 24 speed shimano cassette  gears, hydraulic discs, hub dynamo, but costs $1000 more! As I was considering a Bafang mid drive motor, it seemed a bit pointless to pay for the front derailleur and three chain rings, and a hub dynamo on an electric bike really is a ridiculous idea! Both bikes use a 48 spoke rear wheel, have a 120kg weight limit for the rider, and can carry vast amounts of cargo. The V4 forks have attachment points for discs front and rear, so I can upgrade in the future if I need to.

So, Lynn and I went into Wellington, and visited the cutest little bike shop in the world, and had a test ride of the Yuba Mundo V4. I found it comfortable, Lynn could ride it at a push – if she was careful of the cross bar! Bicycle Junction were having a 10% off sale, and upped it to 15% as an incentive, so after an hours walk and talk we decided to go for it.

I was going to order a Bafang Mid Drive motor directly from Chine and use my battery off my old bike, but Bicycle Junction sell the Lekkie Summit kits, and while they sound expensive at at $1790, when you add in the risk of ordering from China, the hassle of sorting out all the parts required and you factor in a new battery and charger, it is not a bad deal. And if is costing a couple of hundred more, the convenience probably makes it worth it. So we negotiated another $90 off, and purchased a complete electric cargo bike for NZ$3400. I have some assembly to do when it arrives, so will document the arrival and conversion in detail in the next post or two.

I have some plans for upgrades and customisation, the bike needs mudguards and I would like the centre stand rather than the side stand, and I will sign write the wheel protector boards for the business. On the electric side, I prefer left hand half grip twist grips for the throttle as we use on our existing bikes, so one of those will be ordered, and I also want to try the Gearsensor, which detects when the gear shift is being operated, and switches the motor off briefly. This saves excessive damage to the gears.

Everything I have learned during the build and use of our existing bikes will help to make the build smooth and slick (hopefully).

Here is an artists impression of the signwriting, but my bike will be orange, not black.

Posted in Electric Bikes

Electric Bikes – hub motor torque/spacer washers

I originally posted this for someone who called asking for advice, but I am leaving it here in case it helps anyone else.

When you get a bafang hub  motor, it comes with two “torque” washers, which fit over the axle and have a tab that slots into the drop out. They firstly help to stop the axle turning, and secondly act as a spacer to bring the wheel width up to the width between the drop outs.

The following photographs show the location of the washers before putting the wheel into the frame, and in situ in the bike. See how the washers are between the frame and the wheel, and how the tab goes into the drop out AFTER the axle. This ensures the axle straight sides get maximum purchase inb the drop out to stop axle rotation, and the torque washers add their bit of anti rotation.

If you put them on the outside, the freewheel will jam against the frame, and will stop the wheel aligning in the dropouts and brakes properly.

Posted in Electric Bikes

Stuck in Windows update – restarting forever

I am working on a customers laptop, and got rid off the problems it came in with (seizing to a stop as soon as he logged on). As a favour, I let the outstanding updates install. First of all the updates stuck at 99% updating for an age. But eventually it went into the restating phase, and stuck there forever. After a few restarts, it decided that the updates had failed, and started backing them out. This took a long time, and eventually it got in the restarting phase, and stuck there forever again.

This turned into an endless loop, each restart went through the same process.

In the end, I forced it into the automatic repair function, by powering down as soon as the windows logo appears – twice is the magic number.
Automatic repair of course failed (has it ever worked for anyone?), but I then went into the troubleshooting options, and restarted in safe mode. After a brief foray into completing the updates, windows 10 started in safe mode successfully. This gives me the option of documenting what apps and programs are loaded so that if a rebuild or reset is finally required, I at least can get somewhere close to what was there before.

Restart again from safe mode into normal mode, and it starts fine, but the original problems are back! Just 3 days taken so far! At least I have a machine that starts again!

The seizing issue may be connected with the updates issue, I will work on that assumption for a while.

Posted in Computer Stuff, Windows 10

Thunderbird to Outlook

For obvious reasons, Thunderbird does not provide any easy way of exporting emails into Outlook, I suppose most people would not want to do it.
Recent stuff ups at Spark seem to have made accessing (sending specifically) my third party emails via my spark account impossible to do in Thunderbird, and when I tested Outlook it worked fine. So I needed to move my existing inbox and folders to Outlook.
There is an import-export add-on in Thunderbird, but it is a bit crude, as it will not export in EML format and retain the folder structure.
A program called Aid4Mail has two versions, the paid for version, which does all the hard work for you, transferring from Thunderbird directly into the Outlook.pst file (I think). It also has a free version, which (for this task) extracts all the email messages into eml format, retaining the folder structure. You can select the highest level folder (i.e. the account level – one above the inbox) and extract to a folder.
The next part involves downloading and installing a copy of Windows Live Essentials 2012 Mail program. If you are using Windows 10, this seems to be a bit tricky as the Windows Essentials program is no longer supported, and the normal link does not provide a download. This page provides a link to the web set up, and this page provides an alternative.
Download and install just the Windows Live Mail. Use the import messages option, and browse to the location of you saved EML folders and files. After they have been imported up into Windows Live Mail, just use Live Mail to export them to Microsoft Exchange, which includes Outlook. Choose your profile, and it all happens automatically. Don’t forget to export your contacts from Thunderbird in CSV format, and import into Outlook. This part is relatively easy, just check the mapping of the email addresses.

Posted in Computer Stuff

Electric Bikes – Wheel Building part 2

In the previous post  I mentioned the delay in getting the spokes I needed, well they finally arrived last week. Lacing the wheel was reasonably easy, and stress free, other than the slightly disturbing way the wheel goes together, so loose and floppy that you think the spokes are too long again, when suddenly and miraculously the wheel tightens up, with just a couple of threads of the nipples still to go. All nipples were adjusted so that the threads on the spokes just disappeared into the nipple, this is best determined with a thumbnail rather than my poor eyesight!

Next job is to true the wheel – for which most people would either use their local bike mechanic, or at very least buy a wheel truing stand. But this was my first wheel build, and I really wanted to try it myself without a large investment in extra equipment. So over the course of the next few evenings I designed and built a stand exactly tailored to my 700c rim on my 135mm wide rear hub. It was carefully crafted out of a plank 140mm wide, some 50mm square framing, and some right angle profile aluminium extrusion.Remarkably, once built and the wheel installed in it, this device was accurate and stable, with the wheel exactly centred between the uprights. Using an adjustable set square as the “finger” I was able to determine exactly how out of true it was, dish, roundness and sideways. Below are some photos showing the home built stand, and some detail of how the axle is held accurately in it.

Once the wheel is held securely, the whole truing process becomes quite simple and straight forward. Using the set square set to approximately where the rim will be when trued, dishing the wheel just involves going around the non drive side of the wheel, tightening the spokes 1/4 turn at a time, pulling the wheel over. This tightens the drive side spokes too, and at one point I loosened the drive side a 1/4 turn to ease the tension a bit. As the dishing gets close, it is time to start making the wheel run true, by adjusting the spokes just where it is furthest away from the finger as it rotates. At some point, the finger can be adjusted by turning the wheel around in the stand, and checking the wheel for being centred, and the dishing can be tweaked again to the new measurement. Part way through, the spokes are “stressed” as seen on Bruce’s video, and tweaking continues. The wheel was little out for roundness, so the spokes were tightened on both sides at the point where it had the biggest radius, pulling the wheel into perfect roundness. Eventually, the wheel came right, was shod with a tyre, and replaced in the bike.

This morning was my first real ride on it after the wheel build, and my first for over a month while waiting for the parts to arrive. It felt great, smooth, strong and gave me a lot of confidence, which had been missing for several months of riding the old wheel. Even riding in the rain felt good.

The appearance of the bike has changed too, it now has matching front and rear rims as I have laced the original rim to the motor. More subtly, both wheels are laced with a single cross lacing rather than the rather strained looking two cross lacing the rear wheel had previously.

Only time will tell, but I am hoping this wheel will be stronger and longer lasting than the cheap wheel supplied from China with the motor.

Personally, I can now add building electric bike wheels to my accomplishments and skills, and look forward to building more wheels in the future.

Our bikes forks have lugs for disc brakes, so the next job may be to lace our front rims onto disk capable hubs, and install disks on the front of our bikes!

Posted in Electric Bikes

Windows 10 and inverted ASUS webcam

This issue is worth repeating here, if only to help anybody else looking for the fix.

The issue is that after a Windows 10 upgrade of an ASUS N61JA laptop, from Windows 7, the webcam image was shown upside down.

The cause appears to be that ASUS mounted the cameras upside down in the screen, and used a registry entry to flip the image the right way up. This is great until you move to Windows 10, which replaces the ASUS specific driver with the generic Windows 10 USB Camera drivers. This driver does not have an option to flip the image.

Searching the web comes up with one fairly obvious solution, download the original drivers and reinstall them. This I duly did, but the drivers did not recognise the camera, and it would not work. This is a fairly frequent result of this solution!

Fortunately, someone much cleverer than me found a good solution (thanks Manfred), as detailed in this post . Basically in involves downloading a driver that does work, namely the Sonix driver 6.0.1223.1 for a FJ Webcam. This I downloaded from the Fujitsu site, they seem to use the same camera in various models of laptop. The main difference is the driver has been made to work in Windows 8.1, so will work in Windows 10.

After installation, the webcam works but it is still upside down. Fortunately this Sonix driver has the ability to flip the image, which is done by using REGEDIT to modify the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000\Settings entry “Flip” value to 1 from 0.

Webcam now works fine.

Posted in Computer Stuff, Windows 10

Electric Bikes – wheel building

It’s close to 3 years since I started the process of building our electric bikes, going through a decision process, followed by researching suppliers, followed by taking the big leap and ordering a lot of parts.

The major part of the order was the motors, the only part of the conversion that goes into the bike, everything else goes on to it. At the time the best option for us was rear wheel hub motors. If we were doing it again, I would probably choose mid drive motors. However, we chose to buy Bafang (8-Fun) 36V motors, specifically the cassette version. These have worked very well, I have replaced a nylon planetary gear in each motor, but this is just a 30 minute job, and both motors have been great since I did it. Since I got the wiring sorted, the motors and all the other electronic and electrical parts have worked faultlessly.

However, the motors came already laced into wheels. When they arrived I was not very impressed with the quality, I had to get them trued twice when they arrived, the first mechanic had no idea what he was doing, and the second did a great job.

Over the 32 months I have had them I have worked out all the things wrong with them!

Firstly, these rims sell for US$8 each, and I assume they are making some profit on them! They are deep rimmed, black with really ugly decals on them.

Secondly, they are made of substandard materials, over the two years  or so, the braking surfaces have worn down to the point where they are too thin, and are buckling.

Thirdly, they were laced in a 2 cross pattern. Given the strength of the hub, this was not required. It also meant that the angle of the spokes into the wheels was much too great, putting a strain on the spoke nipples and the spokes. Several nipples have failed and been replaced.

Fourthly, the wheel and hub combination calls for 233mm spokes, but 230mm spokes were used. This means the spokes do not fully engage into the head of the spoke nipple, causing fracture of the nipples between the head and the shaft, adding to the problems mentioned above.

For the last few months, my back wheel has been deteriorating rapidly, and as well as being out of true, and the brake surface a little buckled, have started to feel a little unsteady around corners. I weigh over 100kgs, the motor is in the back wheels, and 10kg of batteries and panniers sit over the back wheel, so there is a lot of stress on the wheel.

So last week I started the process of repairing the wheel. I spent almost a whole day reading Sheldon Brown’s wheel building page and all the pages it points you towards. I also found Bruce Teakle’s page about building an e-bike wheel. I learned about how to determine spoke sizes, measuring hubs and rims, and different lacing patterns. My main problem was finding a rim to replace the useless one I was using.

Now I love living in New Zealand, but sometimes it can be a real pain, especially when it comes to buying stuff, especially weird stuff. For instance, buying a ‘standard’ 700c rim for a normal bike is almost impossible! Bruce Teakle recommends a Sun Ringle Rhyno lite rim, so with nothing to lose I tried to find a supplier of these. These rims have really great reviews, particularly where the rims are going to be abused by overweight riders etc, so I was quite keen to find one. I finally found a supplier in the US who was prepared to send it to NZ, only to work out that the rim was going to cost US32, but delivery about US$68! This was  just too much. Shame, because the effective rim diameter of the wheel is 612mm, which matches my hub and the 230mm spokes exactly!

I have the original wheel off the bike, which is in really good condition, so I measured it up, and calculated the ERD to be 611mm – a bit of a coincidence! Cheered up a bit, I spend an hour or two breaking down both wheels, and building a wheel with the electric hub and the original rim.

But something was wrong, I was using single cross pattern, so it is a fairly simple lacing – but it just didn’t work. So I checked the spoke lengths – all 230mm give or take, checked the hub matches the diagram provided by the wheel manufacturer (see diagram below) – which it did. Finally, I took the newly laced wheel apart, and measured the rim again, twice – using two different methods. It appears I can’t add up, the actual ERD is 601mm, not 611 – I think I was hoping for it to match the diameter of the Sun Ringle Rhyno lite rim, and just missed a “carry one” doing my sums. So I now need 36 225mm spokes, in 13 gauge. Once again, being in New Zealand strikes again,  and I have ordered the spokes from China, with a 2-3 week delivery.

So once again, my bike is off the road for a significant part of the summer.

Below is a picture of the dimensions of my motor, which saved me a lot of awkward measuring.

Bafang motor specs

Bafang motor specs

Posted in Electric Bikes

Wireless Broadband

I went to a customer a few days ago who wanted an “all house wifi” system installed. When I got there I realised she had signed up for Spark Wireless Broadband, and had received her modem through the post. I have never come across this offering from Spark before, so was quite interested. Installation is a doddle. Make an 0800 call from the house phone, and a voice tells you you have activated the new modem. Plug the new modem into the mains power, plug the phone into the new router, and the modem, router and phone are up and running. The phone socket in the wall is now completely redundant, phone calls and internet are now all through the Spark 4G mobile network.

A couple of quick connections of the laptop and printer to the wifi, and the whole house is good to go. Out of curiosity, I tried a speed test, and download speeds were equivalent to the Fibre30 offering, and the upload speeds were 3Mbs or so, more than fast enough for most people.

Coincidentally, the next day I went to another customer who had been offered Wireless Broadband, which in their case was a much easier option than the Ultrafast Fibre option, because of Geography problems at the house.

It would suit my house too, but it is not available here, or at my shop yet!

Posted in Computer Stuff

Spark internet connections and windows 10

In the last 3 days I have made 6 home visits to sort out 6 identical problems in exactly the same way each time. Customers report the same issue, the computer is connecting to the router OK, but not to the internet. Some are ethernet connected, some wireless, some are copper wire broadband, some UFB and one was Wireless Broadband. One was a Dell desktop, the rest were laptops (mostly Toshiba I think). In most cases, other devices can connect to the internet OK. Conversations with Spark last for an hour or so, and finish with them recommending they get a technician in to look at the computer, or download something from the internet!

At the first job I spent 10 minutes trying a few things, before choosing the right solution, the rest I just tried the preferred solution first, and was successful in all cases.

So what is going on. Windows 10 updates are probably the cause, but all 6 being Spark customers is a bit to much of a co-incidence, so I suspect a mismatch between the two processes. Other than that, I have no idea!

The fix by the way is

  1. open up the command line processor in elevated mode (right click on start, choose “Command Prompt(Admin)”)
  2. type netsh winsock reset
  3. type netsh int ip reset
  4. type exit
  5. restart computer
  6. surf the web and check your emails!
Posted in Computer Stuff, Windows 10

Arduino – multi-cell voltmeter

Right at the start of the saga which is my multi-cell voltmeter/potential BMS, I considered and rejected the simplest way of doing this, namely using voltage dividers to drop the voltage from the cells down to within the range of the Arduino analog to digital converter, and connecting all 16 cells to 16 analog pins and reading in turn. I programmed it, tested a bit of it, but in the end the 10 bit value of the digital voltage reduced the resolution to about 1/20 of a volt if I was going to allow for a 16 cell LiFePO4 battery. This was nowhere near accurate enough and I started looking at many, many alternatives, none of which works because of the need for a common ground!

Pondering possibilities the other day, I realised that the 10 bit resolution was possibly just a restriction of Arduino, and maybe I should be looking at other chips. Then a lightbulb when on in my head – what if all Arduino are not created equal? A quick search shows that the Arduino Due and Arduino Zero both allow for using a 12bit resolution – so instead of 1024 discreet steps, they can use 4096 steps. This might not sound like much, but when combined with another couple of changes, the resolution is down to 0.011 volts, or just a little bit more than 1/100 of a volt. Obviously 4 times the steps to not give 5 times the resolution, so what else have I decided to do? Well, if I go down the DUE path, the DUE only has 12 analog inputs, which forces me to build for just a 12 cell battery, not a 16 cell battery. If I am doing that, I only have to allow for a total voltage of 43.6 (call it 45) volts. Divide that into 4096 steps, and there is the 1/100 of a volt resolution.

So here I am back at the beginning, building another array of voltage dividers, to reduce 0-45v down to a 0-3.3v range, and using simple code to read the total voltage at each cell in turn, subtracting the previous cell value from this cell to give the cell voltage. Obviously there will be some tweaking for resistor variations in the voltage dividers, and we will need to adjust the measured voltage back up into the 0-45v range, but all should be good for measuring the individual voltages of 12 cells in series. The common Ground problem is resolved – in fact it becomes the main feature rather than a problem.

Later on I may re-introduce the MUX/DEMUX chip to read all 12 cells into a single analog pin, but only if I need to use some of the 12 pins for other devices (real time clock or GPS unit). I don’t think I will go back to 16 cells, I am now a confirmed 36v e-bike man, and 60v over 4096 steps reduces the resolution a little too much.

Posted in Arduino, Computer Stuff, Electric Bikes, Programming