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

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

Windows 7 – Windows Explorer stopped working

Wow, this was a fun problem. An Acer all-in-one computer, everything was great except for this annoying bug, everytime you copied a file (drag and drop, copy and paste, whatever) Windows explorer puts up the “Windows Explorer has stopped working” message. Tried all the standard stuuff, SFC /scannow, virus and malware removal, chkdsk all to no avail. Looked at the drivers, all looked good, but when I tried to update the drivers for the NVVIDIA GT 204M card it failed. Started the machine up on Ubuntu 14.04, and the graphics card just did not do its job. In Ubuntu 9.10 it was fine. It looked a bit like the video card was not 100%. On the web there are stories of incorrect video drivers causing this issue, so it sounded related.

I investigated the cost of a new card, and including shipping, fitting and GST the customer was up for about NZ$450.

As a last resort, I did a Repair Upgrade of Windows 7 Home Premium. This worked fine, and lo and behold, the drag and drop was working fine again! So I fixed the windows 7 update issue, and started rolling forward all the windows 7 updates, about 220 of them! At the end of it all, the problem was back!

OK, use the restore function to go back to the last check point, and everything works again. Only one thing for it, find out which update is causing the issue. I decided the problem was probably with the 80 or so “Updates for Windows 7 …” rather than the security updates or the .NET updates, so I did a binary chop installing half of what was left each time. Of course the issue was in the last 4, then the last 2, until I finally determined it was update KB3184143, not KB3182203 (an update to allow for a summer time change in Novosibirsk in Russia).

KB3184143 turns out to be the update to remove all the Windows 10 upgrade stuff, all that nagging reminders agro and nasty software that attempted to install Windows 10 even when you didn’t want it! As this was a clean install (well a refresh anyway) none of this software was present, so it sulked for a bit and stopped Windows Explorer working. After uninstalling, I hid the update, and carried on with the rest of the updates. It was probably related to the video card issue, as Windows 10 can struggle with video cards, but it is much too hard for me.

Posted in Computer Stuff

Electric Bikes – a quick battery check

When I got home on Friday, Lynn’s bike was on charge, whirring away (noisy charger!). As she only left an hour or so before me, this was OK. However, when I did the rounds at bedtime (4 hours later), checking doors etc, it was whirring away. The first thought is that it is “still whirring away” rather than just “whirring away”. I checked the voltage of the battery ,and it was at about 42v so I was a bit puzzled. I turned it off and made a mental note to take a look at it. As we had a bit of a busy physical weekend doing some landscaping, it got left until today (Monday). Lynn arrived at the shop with just 12km since the last charge, so I put it on the shop based charger, connected up the individual cell voltmeters, and checked the voltages. They were all roughly 3.3 volts (3.28 to 3.35v) which is acceptable, so we went out to lunch. When we got back, the battery voltage was approaching fully charged, so I sat and watched the individual cell voltages ticking upwards. After 10 minutes of watching all the cells creeping up at around 3.57 to 3.65 volts, at 43.3 volts the charger switched off. So while not perfectly balanced, no cell was getting more than 3.65 volts, so everything is good with the cells (and the shop charger). Good news, especially after nearly 6000kms with daily charging every 20kms or so!

Bad news, I still don’t know what happened on Friday! Two thoughts occur, firstly, the battery charger is faulty (I have already replaced one of this brand, which came with the Headway cells when I bought them from China). I can check that tonight by repeating the charging test with the home based charger. Secondly, it could be that the charger had shut down properly some hours before, but had just reached the point where the batteries had self balanced and discharged slightly through the charger, so the charger kicked back in again to top up the cells. If this is the case, it’s even better news. I will know that the cells and the charger are fine! Tonight’s test should confirm either way.

Given that the mileage is clocking up on my bike too (7220kms), I will probably repeat the tests on that bike too. I did 36kms on my bike since the last charge and it felt as good as new pedaling into the wind on the last 2kms to work, so I am confident there won’t be too many problems. Since fixing up the battery connections, swapping the Anderson power poles for some XT90s and MT60s, I have not really had much call to look at the batteries, so it is probably well overdue.

18/10/2016 – checked out the charge last night, and everything charged as it should and switched off, so all is good, and I know the battery is still OK! Checked mine this morning, and it is still withing acceptable limits, one cell is a bit low (0.04 volts down) but that is probably less than the errors in the voltmeters!

Posted in Electric Bikes

T-Shirts

We bought a T-Shirt press last year, second hand from a chap who was closing down his souvenir shop. A good, solid very old fashioned device. It came with sundry transfers and letters which he had left over from his days of making New Zealand themed T-Shirts. It also came with a supply of T-Shirt transfer paper.

Since getting it we have experimented with it, made some shirts for me to wear in the shop, and had a disaster making some work shirts for the plumber next door. These failed because the fabric was coloured using dye sublimation, and I also think it was silicone treated too to keep it clean. Whatever it was, the vinyl fell off in a few days. I learned a lesson there – keep control of what garments we are decorating.

So when the local cafe owner came along wanting two images of Chris Amon racing at Oulton Park put onto two shirts, I steered him towards the T-Shirts I would have bought, from my normal supplier. As with all jobs, I decided to try out the process before getting stuck in for real. One of the images was monochrome, and I printed it up, and transferred it onto an old shirt I keep for such trials. The result was a sickly green image, like a mouldy sepia print. The rest of the image quality is down to the print heads needing cleaning.

Green cast

Green cast

At first I suspected the Inkjet transfer paper was too old, so I tried all three types I had in stock with the same results. After a discussion with an expert from the Heat Press Media Ltd company, I ordered some new material to see if that worked. Still the sickly green cast! So I searched on the web for any information about it and found a page from a company in the USA  which contained the following words :-

“This paper was formulated to use with dye-based inks. Some of the new pigment Inks, like Epson Durabright, are causing strange results after the paper is heated, such as a distinctive green cast. Always test!”

and

“Some newer pigment based inks may react differently with various transfer papers, causing color shifts after heat setting. As always we recommend testing products, processes, and techniques before you start a large project.”

Bingo, I use an Epson Workforce WF7520 printer, which uses Durabrite pigment based inks! I have an HP printer at home, but I don’t want to be going back and forth to home to print out transfers, so I looked for alternatives. I had also been looking for a printer that would print CDs and DVDs, so I decided to combine the two problems. In the end one printer covered all my requirements, the Canon iP8760, which is an A3+ photo printer, which also prints DVDs. The inks are Dye based, with the exception of the black ink used for printing simple documents, which is pigment based. As this ink is not used printing on Inkjet Transfer paper, it is not an issue. It does make printing black and white documents cheaper though. Ordered on Thursday, arrived on Friday before I got to work, and took the whole morning to set up on three shop computers. Most of this time was spent sorting out my network, which seems to throw a tizzy whenever I try to connect anything via WPS.

I printed a couple of disks to see how good it was, and then printed a couple of trial images. These were applied to the test shirt, and the colours were perfect – problem solved.

Images from old (left) and new (two images on right) printers

Images from old (left) and new (two images on right) printers

The images were then applied to the two cotton t-shirts, where they look even better. So two t-shirts cost me about $500 to produce – hopefully I will get some value out of the printer and the extra paper I bought over the next few years!

Posted in Sign Making