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

Squirrel – the Mitsi Miev Minicab

Why Squirrel? Well it is small, red, quiet,cute and peoples heads turn like the dogs in the film “Up!” when they see a squirrel. It has already caused one nose to tail between two vehicles when the first vehicle stopped to look at it, and the second didn’t!

Bad news. The OBDII dongle I ordered does not work well with the Miev and Canion software. It works perfectly on my Honda Odyssey, but loses connection randomly and repeatedly on the Miev. A known common fault, so I have given up on that for the moment.

Good news, the Squirrel just gets better and better! We have done 1722 kms since we picked it up, and haven’t bought any petrol for the Honda in over a month. The electricity bill is currently below average (as you would expect in the summer), but it seems to be costing us about NZ$1 per day approximately. We have done a couple of long trips,140kms or so, and have charged at fast chargers a couple of times on each trip. Not cheap, sometimes as much as NZ$8 to charge from 40% to 100% (well 95% really), but cheaper than petrol.

I have been asked for a review of the vehicle, thanks Emanuele- here it is, enjoy.

If you need facts and figures and a sales pitch, open this website in Google Chrome, and use Google translate to translate it into English or your chosen language.

First off, comfort. I removed the cargo barrier behind the seats allowing the full range of movement for the drivers seat, moving backwards an extra 3cm and leaning back further than is required for safe driving. The result is a seating position for my self (a long limbed 183cm tall, 100kg weight) that is upright, comfortable and great for distances. Not the best padded seats, but they keep me located in the vehicle very well. My 153cm wife is equally comfortable, her legs reach the floor and pedals easily, and she also loves driving the car. The cab is narrow (as is the vehicle), but we are both broad shouldered and are quite comfortable sitting next to each other. If I ride as a passenger it is less comfortable, but adequate for reasonable journeys. All controls are easily reached. There is air con and a heater, which both drastically affect the range, but the heated seats have less effect on the range, and are more effective on cold days. Ours is a 2 seater model, so no rear seats to review!

Control – the steering is electrically assisted, and is light, responsive and a delight to drive with. The turning circle is excellent, as you would expect with a rear wheel drive vehicle 3.4 metres long. The brakes are firm and effective, but the regen braking tends to reduce the need to use the brakes. The initial movement of the brake pedal seems to activate the full regeneration mode, meaning that a lot of the time even using the brake pedal does not actually cause brake pads to touch the disks. Another saving. The “gear lever” has 3 settings, Drive, Eco (restricts throttle to lower power settings unless floored) and Brake (full regenerative braking – makes going downhill very slow!).

Windows, seats, mirrors are all fully manual, heater and air conditioning controls are at least 20 years old in design, but there is central locking. There are two cup holders, a few little pockets and cubby holes and a glove box. Interior light can be on, off or controlled by the doors. The engine is switched on and off with a key in the steering column, front wipers, rear wipers and washers are controlled by a stalk, and lights and indicators are on the other stalk. Hand brake is a lever between the seats.

Under the seats are the fusebox, windscreen washer reservoir and coolant header tank. Brake fluid is checked/topped up through a hatch in the top of the dash. The 12v battery is under a panel at the rear of the vehicle (inside the car), the space saver spare tyre is bolted to the wall of the van above where the whell arch would be if it had any. Tyre pressures are 35psi front, 65psi rear, 60psi for the spare! Wheel changing tools are under the “false” floor on the drivers side.

The dashboard is simple. The main meter is the “economy” meter, which shows how much power you are using or recovering, and it goes from charging, through eco into a zone which really sucks the power out of the battery. In the middle of this dial is the digital speedometer, which takes a bit of getting used to – best not to watch it too much! The fuel gauge shows the state of charge of the battery, with 16 bars being fully charged, and no bars too low to power the car. At two bars the meter starts flashing to tell you to charge it up. You can toggle through a bunch of meters and information panels on the final gauge. I usually keep it on the remaining range for the car, but it can show the odometer (total kms traveled), two different trip gauges, a setting to change the brightness of the display, and one which I don’t understand yet, but is something to do with maintenance.

The remaining range is interesting, as it measures at the state of charge of the battery and looks at how you have been driving recently, at whether you have the air conditioning or the heater on, and uses an algorithm to work out how far you will go if you don’t change one of these 3 factors. Some people call it the guessometer, or GOM as it can show what appear to be random results, but I like it and understand it, so when the range goes back up after a few kms of careful driving, I am quite pleased with myself. Use it with the fuel gauge to keep an eye on how you are doing and whether you will get home.

Outside dimensions and inside dimensions can be seen in this website, but if really want to, you can sleep in the back. With the seat forward, the load bed is flat, 190cm long and between 125cm and 135cm wide, a small double bed size. A nice futon mattress would make a nice camper van out of it!

Performance – well it is not going to make your heart beat too much faster. It will however apparently do 71 mph (120kph?). I once got it to 105kph when I was not paying attention, but the speed limit here is 100kph, so I am unlikely to try for the maximum speed. The 0-100kph figure is not as bad as you would think it would be, not a drag racer, but it will easily keep up with traffic away from the lights and out of junctions. It can run out of steam a bit accelerating up long steep hills. If you push it to match other traffic you can watch the remaining range drop by three times the number of kilometers you have done! A strong headwind will also drain a lot of battery power, but a tailwind can extend the range by 10km – this thing is a brick, especially from the back.

Noise – not as quiet as you would think either. A steady whine from the motor and reduction drive, a high pitched whistle from the controller. The controller and charger are water cooled, so occasionally you will hear a pump move coolant from the controller to the radiator at the front, especially during charging. Road noise is high, as there is no insulation and the wheel arches are in the cab. A futon in the back may reduce some of these noises! The vacuum pump to power the brakes can occasionally be heard, especially when starting after being turned off for a while.

Handling is excellent, if you understand that the tyres are 145R12, so are narrow and small diameter, and that the vehicle weighs about 1000kg unladen, so about 1200 kg to 1500kg with drivers, passengers and maybe some cargo. The weight is all down low, and all between the front and rear wheels. So there is no wheel spin or skipping at the rear as there is with other lightweight vans, but there is adequate weight at the front to get good turn in. Under steer would be a problem if you pushed it hard, and tyre wear would be high too. Today we drove it over a local road which is just 10kms of bends over the top of a very large hill, and it felt every bit as comfortable as our Honda Odyssey or my Mini Clubman! Surefooted, easy to drive, small so plenty of room on the road, and very responsive under power, braking and around the corners.

Charging takes between 3 and 8 hours at 240 volts using an 8amp EVSE. A 16 amp EVSE would reduce that. On the road a fast charge can take between 15 and 40 minutes depending on the starting charge and whether you charge to 80% or 100% (really only 95%)

Thinking of buying one – take it for a good test drive, think carefully about what you want this vehicle for. It’s not for everybody, but if it is the vehicle you need, and the price is right – go for it. Just make sure you are happy with the  battery choice – mine is a 16kWh, giving me an easy range of 80kms on the open road, but the 10.5kWh battery will have a much shorter range BUT has a far superior chemistry (Lithium Titanium) and the batteries will outlast the rest of the car and can be recycled into a home battery storage unit in 15 years time!

Dave Glover 25/11/2018



Posted in MiniCab Miev, Other Technology

First Electric 4 wheeled vehicle

We finally did it, after years of considering, and months of waiting for the right vehicle to come along, we have bought our first electric car – or van in this case.

Mitsubish Minicab Miev 16kWh

Mitsubishi Minicab Miev 16kWh

A slightly unusual vehicle, especially here in NZ. I can’t be sure how many MiniCab Mievs there are in NZ, but having watched the Trademe and AutoTrader ads for a few years, I can’t imagine there being more than 6 or so. Locally, there is a white 10.5kWh version, which we test drove many months ago. There are at least a couple in the Dunedin area, one of which has been in the dealer showroom for many months too. This one is unusual in that it is painted Red, as MiniCab Mievs are only available in White and Silver from the factory. Originally white, it was painted red and some modifications were made to it for the Japan Postal Service, who then cancelled the order. There are a few other examples in Sri Lanka and Australia, but only two in NZ that GVI imported (that I know of).

It is a 2017 model, and came with 25km on the clock, which was up to 55km by the time we took delivery (most of which was our test drive). The modifications to the vehicle (besides the colour) are (or were) 3 bars over each of the 4 side windows and the rear window, a cargo barrier behind the front seats, the cigarette lighter has been removed, and the ashtray has a blanking plate over it (obviously a smoke free workplace policy in Japan Post). Since we took ownership, I have removed the cargo barrier, which allows the drivers seat to go back another 3 centimetres, and allows the seat back to recline further, making the seating position very drive-able for a 1.83m slightly overweight person like myself. I also replaced the missing cigarette lighter with a dual USB port socket which fits into the same position (after enlarging the hole a little).

It came with an OEM Audio 8 Amp EVSE with a standard 3 pin NZ plug on it for slow charging overnight, and the car came with two sockets, a type 1 slow charging AC socket, and a ChaDeMo high voltage DC socket on the other side of the vehicle.

It is 3.4 metres long, maybe 1.5m wide, and about 1.9m high! The load bed inside is a minimum of 1.2m wide, but is up to 1.35m wide in places, and is 1.9 metres long with the seats pushed forward – room enough for a mattress or two e-bikes. This is the two seater version, so has a flat floor instead of a seat and a foot well, and there is some room under the false floor at the front of the load bed, room for charging cables, tyre changing tools, emergency triangles  etc.

Since picking it up we have done about 400km, have charged it at home about 4 times, and charged it at the Dowse Museum in Lower Hutt on the 25kW charger – as the cables on the 50kW won’t reach the charge port! It took 22 minutes to charge from 46% to 83% charge and cost $4.41. I have tried our local charger in Porirua (Serlby Place) and if I park on the right hand side, between the yellow post and whatever other street furniture there is, with the front wheels a few centimetres onto the curb, the 50kW charger cable will just reach the ChaDeMo port. Note to Chargenet – great service, great facilities, but as you replace chargers, can you put cables like the ones on the 25kW units on the rest of the chargers?

I have an OBD II dongle on order. This too has to be a bit special, as the software I will be using (CanIon) which allows me to monitor all aspects of the cars performance, including cell voltages and temperatures, needs quite a sophisticated OBD tool which can cope with large amounts of information all at once. When it arrives I can look at the battery state and report back. I will also be able to monitor electricity consumption and keep track of trips more easily.

As a daily driver, it is remarkably good. It is a tiny van, and in its petrol form it must be horrible, with a 600cc noisy engine and manual gearbox. But in its electric form, it performs like a normal car, accelerating away from lights and junctions faster than normal traffic, and with a top speed of 120kph. However, being electric and with a very prominent economy meter and range meter, one tends to drive a little more sedately. Plenty of room for driver and passenger, a bit basic in the equipment area, with manual windows, dial controlled heater and ventilation, and a radio with a built in speaker in the dash. On the good side, it has heated seats and air con if you have a short journey to your next charge point! This morning I turned the heater up until it was just between the blue and red areas, and the range went from 100km down to 78km instantly! Electric power steering, servo brakes and fly by wire throttle make for a very relaxing drive, and the upright driving position is really good at my age!  Adjustable headlights for when I put 35okg of junk in the back add a touch of sophistication.

Three “gear” positions, namely D for normal power and regeneration, Eco for more economical use of power (a bit limiting on hills) and B with a more aggressive regeneration setting, and normal power usage. I like this last setting, but it can be a bit too aggressive on most downhills, slowing the car down too much, where as the normal regen is not quite enough sometimes.

Noise is unsurprising – quieter than a normal van with very little motor noise, but quite a lot of road noise from the little wheels through un-insulated wheel arches front and rear, and odd noises from cooling pumps  (for the controller and charger) and possibly servo vacuum pumps. All those Japanese chimes and beeps are of course very loud in the quiet car, I worry about waking the neighbours with the reversing alarm when I leave the garage at 6:00 a.m.

Running costs – currently it looks like about $2.40 per charge at home, from which we can commute 3 times to work and back, or have a good day of pottering about seeing customers and taking Lynn for a coffee.

Next job is to sign write the van with some business details, and maybe some flash decals with an EV theme.

More soon!

Posted in MiniCab Miev

VPN – Virtual Private Network

I had been quite happily using another VPN for several years, mainly to watch some european sports channels I subscribe to. However, one day it stopped working, and when I queried the help desk they were little use, basically telling me that it was my problem.

So I looked around and found Airvpn.

Airvpn provides the number of servers I need, they provide a quality service, and they provide a user interface (called Eddie) which works in Windows and Ubuntu. The cost is very reasonable, with daily, weekly monthly and yearly options available. So far, after several months use, Airvpn looks like really good value. Click on the picture below to go to their site.

Air VPN - The air to breathe the real Internet

Posted in Computer Stuff

Another Unfortunate Scam

Its sad when someone tries their best to solve problems for them selves and get scammed by some lowlife. This customer of mine had a small issue with her log on to get her Yahoo Mail, just a bit of a password problem. So she went onto the yahoo website, and saw what she thought was a link to the Yahoo help desk. She contacted the organisation, and was given a local (Auckland) number to call.
These people apparently spent several hours working on her machine, and other than thick accents seemed reasonable people. But bear in mind this customer is probably well passed retirement age and so thinks any body who helps her is wonderful.
Anyway, the service technicians politely but forcefully told her that her software was out of date and had to be replaced otherwise they could not help her. Fair enough she was using Windows Live Mail, but I have no problem with that. So they sold her a copy of the full version of Office 2016 for $399 NZ (including Visio and Publisher). If this was a valid sale, and had she needed this software, this price is quite reasonable. They also told her that her anti virus was not good enough. When she told them she had Windows security Essentials, they told her that this no longer ran on windows 7 and she had to replace it. So they sold her a copy of Norton 360 with a 3 year licence. All this was paid for with a bank draft via her local bank, who actually allowed her to do it!
Office was duly installed, her account switched over, emails moved from windows live mail to Outlook, and her contacts moved over. Except the contacts weren’t moved correctly, the mapping between the two system was not done correctly, and no email addresses were transferred over. In the p0rocess of trying to fix this, the technicians created a second profile for outlook,set up a duplicate account on it, and half fixed the contacts.
What she ended up with was an outlook system that just did not work. It defaulted to a profile which dod not have any of her email folders moved over, and only had half her contacts. If you forced it into the other profile, the emails folders were an appalling mess, with gmail folders within her yahoo folders. This caused IMAP synchronisation to take 30 minutes or so, every time she started outlook.

This is where I got called in. At this point she was still convinced that these people were honest and decent, but just a bit frustrated with her account set up. I spent a couple of hours analysing what they had done. I deleted all the profiles created by the technicians, created a new profile, set up her yahoo account in it as a pop3 account, and moved her emails and contacts order from windows live mail, giving her a usable email system on outlook. All well and good so far.
I also got rid of LogMeIn GoToOpener, their means of getting access to her PC. I changed her email password to as they had access to that at some time.

As a follow up I looked at how office had been licenced, and did not find a COA on her system, nor had she been sent one. And this is where the real scam comes in I think. Office has been installed and activated using a microsoft account, probably belonging to the organisation. If anything goes wrong with office she will have to get back to them to fix it. More importantly, they can, at any time remove her computer from there microsoft account, and her version of Office will not be activated.

So these low lives have taken NZ$500 of this customer and given her nothing. If office continues to work, we have no idea if it is a legal copy or a pirated copy, but I doubt if it is a real licence in her name.

So who are these people? They go by the name of MacGeeks PTY Ltd, and are supposedly based in Australia, but have offices in the USA too. The name of the owner of the domain name and the accents of the techicians makes me think this is just another Indian scamming company. They have a web address that is no longer working macgeeks.com.au, and they also use this web address for emails https://www.mycsdesk.com/

Posted in Computer Stuff

New Home Computer

It’s not often I splash out on a new computer, normally my computers are Frankenstein machines rescued and upgraded using stuff abandoned by customers.
However, the last computer I bought for home, about 10 years ago, was starting to show its age. It is an Acer L3600, with a dual core E4600 processor, originally with 1GB of ram and a 500GB HDD, running Vista Media Centre edition, to make use of the Yuan TV card installed in it.
It served for 10 years as our “entertainment” PC, placed in the home entertainment system cabinet, and connected to the TV, VHS player, amplifier etc. When new it was reasonably quiet, and being small form factor (3litre – the size of a wine box) fitted quite nicely.
Over the years it acquired more ram, eventually reaching 4GB, moved from Vista to Windows 7, 8, 8.1 and 10, was dual booted into Ubuntu 12.04, 14.04, 16.04 and 17.10 at various times, and the HDD went from 500GB to 1TB, and eventually back to a 240GB SSD! I think I have sworn more at this computer than any other computer I have used!
Any way, I finally reached breaking point. After cleaning up windows 10, sorting out my router, and using a new VPN provider, I finally worked out that the dual core processor was not up to streaming full HD TV. As some of the sports we watch most frequently (cycling, WRC rallying, Formula 1) seem to only come in HD nowadays a change was due.
But money is tight, what to do? It had to be small, quiet, and fast enough to show full HD on our TV, streamed from sites in Europe mostly. I reckoned I would reuse the 240GB Kingston Solid State Disk, and that some where on my spares wall I would have any sort of ram required, and I would transfer Windows 10 from my existing system to the new (with the SSD), so a bare bones box was required.
I had a customer bring an Intel NUC i7 device in a few months ago, which was nice but a bit overkill. But, PBTech could supply me with a NUC6CAYH barebones computer. The spec of this is Intel Celeron J3455 Quad core ,up to 2.3GHz (but actually 1.5GHz),1 X SATA3 Support 2.5inch Drive , 2 X DDR3L SODIMM HDMI 2.0 / VGA, 4 X USB3.0, SDXC Slot, Intel Wireless AC 3168/ Bluetooth 4.2. Into this I slotted 8GB of PC3L 12800 ram I had sitting in an abandoned laptop, and my SSD as mentioned before. Its main features however are its size (120 by 120 by 40mm or thereabouts) and its silence. I don’t think is has a fan, but the BIOS and all the reviews mention fan speed – I haven’t heard it yet!
The build was easy, first of all if you use PC3 ram rather than PC3L ram (or DDR3 instead of DDR3L) it just shows a blank screen – nothing, no beeps. PC3L is 1.35V instead of 1.5V hence the L I suppose. Once you get the right ram, away it goes. SSR just fits in into the base, easy to get to.
I backed up my SSD and bit the bullet and ran a Windows 10 install for Windows 10 Pro, then an upgrade to Windows 10 1709 – Fall Creators, and then got it up to date with all outstanding updates. The only real issues were with PCI Simple Communication Controllers – as usual with Windows 10 installs. The other issue was reusing the license key from the Windows 10 Pro 32 bit installation on the SSD for a fresh install of Windows 10 Pro 64 bit. It was very keen on me buying a new key. But with a bit of persistence, I manage to attach the license key to my Microsoft account, and then had the option of going through the updated hardware path, where I could register that the PC was actually the same one as the previous PC with changed hardware, which it is (well the SDD is the same, and it is a replacement for it). So all legal and activated – Microsoft say so!
Then I installed Ubuntu 17.10, and set the machine up as dual boot. The drive is partitioned 200GB for Windows, 40GB for Ubuntu. As Ubuntu can see Windows files OK, but Windows can’t see Ubuntu files, this split of the disk works for me.
Windows and Ubuntu have been set up to be just entertainment devices. Most stuff runs on Ubuntu well enough, there is one TV channel in the UK that insists on using Adobe Flash and DRM together, which cannot and does not work on a Linux based machine, so Windows will persist on this machine until they sort that out.
Both OS use the HDMI as the audio output, so all sound goes via the Panasonic 40″ TV, but the optical audio out from the TV goes into my Onkyo amp and some good speakers, so picture and sound are good, without having to change my amplifier settings.
So far it is really an excellent set up. I am using AirVPN as my VPN service which so far has been faultless (much better than Private Tunnel, which stopped working when I swapped my router). The old Spark router (HG630B) was swapped for a better Spark router (HG659B)that a customer asked me to dispose of as Spark had sent them two! This router has a 5G channel, and this makes the WIFI connection for the new PC much better – as everything else in the house is 2.4MHz only.
We watched 2 hours of the China Formula 1 last night, no hesitation, full frame rate, full HD from start to finish. First time I have done that ever! We are looking forward to coverage of the Giro d’Italia and the Tour de France later in the year, F1 races either in highlight or full form as supplied by the UK channel and the rest of the WRC season from now until November.

Posted in Computer Stuff, Windows 10

Ebikes – DBMS issues with counterfeit parts

The DBMS worked fine for 50 or 60 km, but the behaviour of the various components – batteries, motor and controller and DBMS started to get erratic, and it started to get difficult to tell what was going wrong. I slowly removed items until I was back to a normal set up on both bikes, which seem to worlk normally with their own batteries and no DBMS. The DBMS seemed to be the main factor causing issues.

So having taken it off the bike I started bench testing with the lid off.

With just one battery connected, the Arduino fired up normally, and +5v was delivered to one of the relays, so the 50v-5v dc-dc converter appears to be working fine, and probably the diode too.

However, neither operating light was on on the relays. I tested the output of the relay which was receiving the switching signal, and it was giving 40V across it’s output terminals. However, when I tested the other relay, so was it!

When I disconnected the battery, I tested the resistance across the relay outputs, which should have been open connections, however I was getting zero ohms across both. So when the battery was connected, even without the computer connected, both relays were in the “On” status, so power was  passing through one relay, to the common output, and back through the other relay.

I removed a relay from the DBMS and opened it up. This is where it gets disturbing. Firstly there was signs of overheating around the terminals of the MOS Field Effect Transistor (MOSFET) which provides the main switching. When I tested the MOSFET, it was a dead short across the output terminals.

I moved the MOSFET so that I could read the part number which was IRFP250N. This is an interesting device, but is only rated at 30amps, and that at only 10V for continuous use. Given that the relay is supposed to be 60V 40A, this single MOSFET was not going to manage that very well!

The rest of the circuitry is interesting. When I ordered the part from https://www.ebay.com/usr/fashionstyle6?ul_noapp=true I assumed I would get a Fotek device like in the photo. Now the Fotek device has a couple of good attibutes. Firstly, Fotek has a reasonably good reputation, they provide good equipment at good prices. Secondly, the SSR-40 DD is an optically isolated device. This means that the control circuit, which is 3v to 32v and which I drive at 5v from my arduino, is completely isolated from the swiched output side, which I put up to 40V 10A though. The isolation is done with an opto-coupler which is an LED and a photosensitive cell in a tiny device, the input circuit causes the LED to shine, and the output circuit detects the LED shining and switches the relay terminals on and off.

One of the big advantages of this is it removes the need for a common earth – the two circuits can be completely separate. The other advantage is that if anything goes wrong, like a huge current surge of the output side, it will never ever get back to the input side and my arduino microprocessor.

What arrived was a CNMF part. When I took the failed unit apart and saw the under specced MOSFET, I wondered what else was wrong. It all looked quite good, well soldered, lots of resin around the parts etc.

The first thing I looked for was the Opto-coupler. While I am not an expert, I am fairly certain that there isn’t one on the circuit board. In fact there is a small transformer like device which seems to take its place. I examined the circuit further and I realised that the two sides of the relay were not isolated at all.

Power from the 5V input passes through the LED power indicator, and connects directly to the signal terminal  of the MOSFET, For this to work, both circuits must use a common ground, and when you trace the circuitry, this is in fact the case.

The result of this is that this is not a Relay at all, just a simple electronic switch. There is no isolation of the two circuits. A bit disappointing really, total rip off by these people https://www.ebay.com/usr/fashionstyle6?ul_noapp=true

Posted in Arduino, Computer Stuff, Dual Battery Management System, Electric Bikes, Other Technology, Yuba Mundo eV4

Ebikes – dual battery managment system more riding.

Two more days of testing, a week apart, building on the numbers from day one.

Total kilometres over the three days 66.4  and total time on road 3h22m, giving an average of speed of 20kph or thereabouts. The bike was definitely starting to get sluggish towards the end, and the gauge on the bike was showing either one bar or three bars depending on the battery.

Total Watt Hours used was 488.6, much less than the 1008 Wh calculated from 36 volts times 28Ah (13Ah plus 15Ah). Total amp hours used was 13.6.

Start voltage on the Lekkie on day one was 40.72, and it dropped 4.52V over the three days to 36.27 (at rest), and the Headway started at 40.2, and dropped 3.76 to 37.14.

If the total weight of me and the bike wasn’t close to 150KG, and if the climb each day was not 160metres, there might be some distance left in these batteries. On a long flat run without the hills I can see these figures getting closer to a 90 kilometre range. That should be another test in the near future.

Glitches with power drop, or Dead Spots are to do with the BMS or the state of one battery. Sudden heavy draw on the headway battery (twisting the throttle quickly, or switching batteries under full load) seems to make the Battery Management System switch the battery off briefly. This sort of implies a weak cell or a bad, intermittent connection somewhere internally, which is not showing itself in any other way at the moment. It takes a few seconds to recover, and it only really happens when the battery is really fresh, when the power is down a bit, its all good.

Swapping from one battery to the other becomes more obvious as the batteries lose power. The Lekkie battery is definitely much weaker than the Headway battery. There are still a few interesting features with using the two batteries together which I have to get my head around yet, but the DBMS and the Digital Power meter are both working well. Three full days travelling to Porirua and back is about as good as I could expect out of two batteries, 1.5 trips was about as good as I got out of each battery separately, and this bike is much heavier with a high rolling resistance!

The power meter is quite interesting in that at the end of the second day, the recorded Watt Hours used was 335.5, but when switched on at the start of the third day was 328.1. The only difference I can see is that a different battery was switched on with a lower voltage – implying the display is voltage dependent or it just doesn’t remember things very well. However, the bikes main display showed 66.4km total distance at the end of the third day, but when I connected the lower voltage battery read 65.8Km. Again, it looks like the display is voltage dependent. More analyses needed on these features.

I have uploaded a spreadsheet of all figures for the test here. DBMS Testing

Posted in Arduino, Dual Battery Management System, Electric Bikes, Programming, Yuba Mundo eV4

Ebikes – dual battery management system – first rides

I have waterproofed both the DBMS and the power meter, so am feeling a bit happier about going out for a ride or two.

I did my first ride just after I finished the basic unit, but it was all a bit short and hilly to get a grip on what was happening. I had a “dead spot” where power to the motor stopped for a few seconds, so wasn’t sure what was happening after that. However, I did 10-12km, and used power from both batteries, so something was working.

Today I went out with both batteries fully charged, the trip reset, and the power meter reset. Unfortunately, at the moment I have no data logging set up, nor do I have anyway of being sure which battery is attached at any instant. On steep hills, the new battery does suffer from more voltage drop, but normally the differences and the change overs are so subtle, I have no idea which battery is in use. Additionally, there is a good chance that at the point the processor decides to test the battery voltages I will be using no power, so the system may well stay on the same battery! Only when the first battery has been used enough to take the voltage below the second battery can we guarantee a battery change.

The power meter is excellent, easily readable even with polarised sunnies on, clear read out of volts, amps and watts, and 2 second scrolling through all the other various highs, lows and AmpHours and WattHours readings. In particular, the “uptime” is quite useful, I can work out when the next battery change might happen.

Start voltage on the 13Ah bottle battery was 40.72V, and on the 15Ah headway battery was about 40.2V.

I did 21.2Km, I was  moving for 62 minutes, and the DBMS was turned on for 69mins.

The whole system used 4.66Ah, or 171.8Wh. Peak amps was 14.97, Peak Watts was 551W. Lowest voltage recorded was 33V. Possible a connection not made properly, or a problem with the switch over algorithm.

At the end, Bottle battery was at 38.71, and Headway was at 39.76.

At the finish, the system was switched onto the headway battery, probably because the bottle battery had dropped below the voltage of the Headway. On a short ride like this one, balancing battery usage is not likely, but double the distance and we may start to see more equal usage of the batteries.

I got a couple of “dead spots” but I still have no idea what is causing it, some serious thinking and analysis required. The low voltage of 33V that was recorded may be some part of the problem.

I am not going to charge the batteries or reset the trip or Powermeter, so the figures may get more meaningful on the next trip.

The watt meter on the King Meter display unit from Lekkie was inaccurate most of the time, reading between 30W and 100W high. Even the battery bars indicator bore little relationship to the actual voltage being recorded.

Eventually, I would like to detect the ampage within the DBMS, and calculate watts and WattHours, and use these to make a more sophisticated battery switch algorithm, and also add a data logger to record volts, amps, time and battery selected, which I could analyse in a spreadsheet. This may help with ironing out the small issues.

Soon, maybe. 🙂



Posted in Arduino, Dual Battery Management System, Electric Bikes, Programming, Yuba Mundo eV4

Ebikes – dual battery management system – build and install


After a few months of designing, prototyping and waiting for all the components to arrive, I finally had enough to build a working, install-able prototype of my Dual Battery Management system.

DBMS installed on yuba

DBMS installed on Yuba

It is still a prototype, and like all prototypes is too big, too heavy and too expensive. I am not an electronic designer, and despite dabbling for over 50 years, I am still incompetent with most aspects. So this device uses pre-made off the shelf components. If I was to have a thousand made in a factory somewhere, it would be a single board in a tiny case.

Even when the components finally arrived, I was still adding ideas and concepts, the most recent being adding a power meter to aid testing and development. More about this in another post. But it did involve a rather large “shunt” – a device which copes with large ampages, has a very low resistance, and allows amps to be translated into millivolts for measurement.



As you can see, it is large, 130mm long, 30mm wide and 38mm high, and heavy (250g?). This spoiled my proposed layout even into the new larger case I am using.

This case is 140mm long, and its internal width is 108mm. It comes in two identical pieces, which slot into each other along the edges, and has two end plates which hold it all together. Not by design waterproof, but I can work on that.

So I spent many hours arranging and rearranging components until I was happy enough with the layout to commit to cutting and drilling stuff.

Basic layout of components

Basic layout of components

First in was the shunt. A fair chunk of the 130mm length was the plastic plinth. The case half comes with a slot for mounting printed circuit boards (PCBs) in. The actual internal width of the case is 110mm, but the “groove” consists of two ridges along the length of the case, about a 1mm high, one at 8mm and the other at 11mm from the bottom approximately. I very carefully cut the plinth to exactly 110mm wide, and then cuts slots in the ends to match the PCB groove. The shunt now slides into the case and is securely held by the PCB groove.

The two relays were fitted next. These have heat sink plates built into them, so are held securely to the base with 4mm countersunk setscrews and nuts, with a smear of thermal paste to make good contact with the case, just in case they get warm. As the are well overrated for the task, this is unlikely.

Next in is the DC-DC converter, from up to 50V to 5v 3a. This is required to power the Arduino microprocessor, yet to be fitted in this photo.

Finally, a rectifying diode (two diodes with a common cathode) was attached to a piece of heatsink, which was attached to the case with a 2.5mm set screw, and a smear of thermal paste, but again this is well over specified for the task, so it is not likely to get warm. Its purpose is to take power from both batteries without allowing the batteries to discharge through each other, but provide a voltage to the power supply regardless of which battery is attached, or if both are attached, whichever has the highest voltage.

At this point it looks quite nice, almost elegant!

However …

High Voltage, high current wiring added

High Voltage, high current wiring added

the next step was to drill the end plate and install the 3 main high voltage, high current wires. These feed the two batteries into the device, and feed power to the motor controller. The bottom two wires are the battery wires. The ground wire from each of these goes to the same end of the shunt, crimped into high current eye connectors, and bolted down very securely to the shunt (M8 bolt!). The live wire from each does to the positive connection of a relay, one to each relay. Again, high current eye connectors under the retaining screw of the relay.

The negative side of the outputs from the relays are both connected to the single live wire of the cable which goes to the motor controller. You can just see the red wire between the two relay terminals. The ground wire from the motor controller goes to the other end of the shunt. The motor controller gets power from whichever relay is turned on at the time, and the relays ensure there is no possibility of one battery discharging through the other (so long as only one relay is on at a time). The power returns from the motor controller, and passes through the shunt back to the batteries. The minuscule resistance in the shunt causes an equally minuscule voltage drop between the two ends of the shunt (50mV at 100A – so 5mV at the usual 10 amp usage while the motor is running).

Still looks pretty good, eh?

Low current wiring added

Low current wiring added

So here we have added most of the low current wiring. First of all wires are run from the positive connections on the output of each relay to the anodes of the rectifier diode. The cathode of the diode is connected to the input of the DC-DC converter. The negative of the DC-DC converter is connected to the battery end of the shunt, which is used as the common ground for the whole device.

The output from the DC -DC is 5V up to 3A, which is connected via a micro USB cable to a SparkFun ProMicro arduino clone (from now on called the arduino). This is tiny (30mm by 17mm) and I am using it without header pins, soldering directly to the board. The arduino and all its connections are shrink wrapped in clear tubing, and mounted to the top of the relay with a piece of double sided foam tape. The ProMicro does not have mounting holes.

There are minimal connections into and out of the Arduino. Firstly there are two inputs, which allow the arduino sense the voltage of each of the two attached batteries. Wires are attached directly to the positive side of the relays again, and are attached eventually to the analog A0 and A1 pins of the arduino. However, the battery voltages are in the rage 33-41V, and cannot be connected directly to the arduino, which operates at 5V maximum. To drop the voltage voltage splitters are used, these are simple a pair of resistors, 390k ohms (r1) and 30k ohms (r2) connected in series between the +ve from the battery and earth. A take off is taken from between the r1 and r2, which is connected to the analog inputs of the arduino. The splitter formula is

Vout = Vin (r2/(r1+r2)

or in this vase Vout = Vin * 30,000 /(30,000+390,000)

which works out to Vin/14,  or 3V maximum with a 42V Vin.

The splitters are the lumpy red shrink wrapped wires running from the arduino up the side of the shunt.

The second set of connections  is the output from the arduino, which is through digital pins D6 and D7.

These are set to high or low depending on the programming of the arduino. In this case, every 150,000 milliseconds, the arduino tests the voltages of the two batteries, and sets one of the two pins to high, and after a 20mS delay, sets the other to low.

D6 and D7 are connected to the positive side of the input end of the relays (the end at the bottom of the pictures, the thin orange and yellow wires). The negative terminals of the relay are connected to the GND pins of the arduino board.

The net result is that the relay for whichever battery has the highest voltage is switched on, and 20mS later the other is switched off. The slight delay allows the relays to do their job, but the time is not enough for the batteries to do any damage.

The last connection is a wire between the negative of one of the relay inputs to the common ground on the shunt, which is just an extra safeguard to make sure the arduino is connected to the common ground directly, not just through the DC-DC converter.

OK, one final connection …

Completed wiring

Completed wiring

In this picture an output cable to the Power meter has been added. This has three connections.

First is a positive connection, which as this provides the voltage for the voltage part of the meter, is connected to the positive wire of the motor controller, where it attaches to the -Ve connection of the relay output!

Second is a connection to the common ground at the bottom end of the shunt. This acts as the GND for the meter, as well as one of the ammeter connections.

Thirdly, a wire is connected to top end of the shunt. This is the other ammeter connection.




Fortunately, the Yuba Mundo has stacks of room, and as many 5mm lugs welded in to the frame as you could possibly want.

I chose to install it in front of the back wheel, behind the bottom bracket. This meant for easy, short cable runs.

The case comes with T slots down the side of the case, you can see them on top of the device above, and in the end view photo at the top of this post.

I got some 1/8″ set screws, and filed one side of the head so that the screws slid into the T-Slots, and were held secure when the nuts were tightened on them. 6 of these bolts, three in each side of the case attach the case to a piece of 3mm aluminium plate, 40mm wide, and 200mm long. Mounting holes and brackets to fit lugs on the frame were added, and the whole device is securely and neatly mounted onto the frame of the bike. Wires from the two batteries connect easily to the device, and the wire from the motor controller plugs in to its wire. The power meter wire is threaded around the bike, and connected to the power meter which is on a bracket in the centre of the handlebars.

Power meter

Power meter

At this stage the power meter is not waterproof, so will be taken off when used in rain, and the device itself needs a bit of waterproofing also, which it will need sooner rather than later, as it is not easily removed.

More to come on first rides, development of the software, the worth of the power meter, and plans for a data logger using the spare capacity of the arduino.

Posted in Arduino, Computer Stuff, Dual Battery Management System, Electric Bikes, Programming, Yuba Mundo eV4

Counterfeit Laptop Power Supplies

A few months ago, I supplied a Dell charger and battery for an older laptop. Because I wanted to get them at the same time, with a single postage charge, and the battery was quite difficult to find, when I found a site that had both available, namely adaptershop.co.nz, I ordered them both. I realised this is a Chinese site with an NZ website  address, but I have had no difficulties with these types of suppliers in the past, especially when dealing with hard to get stuff.

All this started to wrong when they contacted me and told me that the battery was not available, would I like a full refund or to just get the charger. Being impatient, I decided to continue with the charger and just pay for it. I ordered the battery elsewhere.

When they both arrived, the customer brought back the loan charger I had supplied, and took the battery and charger away untested. A few weks later I got an email about the charger and battery not working, and another few weeks later, the laptop and charger was dropped off. Simple testing showed that the charger was providing some volts and amps, but was not being recognised as a Dell charger, so it was faulty in some way.

The new charger weighs significantly less than an original charger, but I thought that was down to new technology. A closer inspection of the labels shows that all the Dell trademarks etc look genuine, but the English on the label is terrible – Techogogy instead of Technology, Inddor instead of Indoor and some other spelling mistakes. See the photos above

So Adapter Shop Co,. Ltd as their invoice reads, is selling counterfeit Dell chargers as real ones. I doubt I will get any money back on this one, so a lesson has been learned.

Posted in Computer Stuff, Other Technology