Battery monitor

I want to give the battery monitor a little more attention. I developed it myself. It started more or less as a proof of concept, and I developed it further to a full working version.

The problem for a battery monitor where you want to monitor all the cells is the wiring. Especially when the batteries are scattered all over the place/boat. Every battery needs two wires to the monitor, so 32 wires in total, all carrying a different voltage. And more: shorting to wires will almost immediately lead to (very) high currents.
My solution: a distributed measurement system, where every battery has its own monitor, and where the batteries are connected in series, the monitors are so too. Monitor 1 measures the cell, and tells monitor 2 its result, monitor 2 tells monitor 3 the result of number 1, measures the cell, and tells it also to number 3, etc.

Circuit diagram of the cell monitor

At the end number 16 receives the results of 1 till 15, measures its own cell and tells all these results to….
….a final ‘device’. This device collects all the results, evaluates them and sends them via LoRa ( to a website. On this website the results are stored, can be monitored, can send alarm messages via email, etc. The end device is also capable of generating alarms, switching on or off the battery charger and displaying the result on an LCD-display.
The cell monitors measure both the temperature and the voltage of the cells, they even have a possibility to switch on a small load to balance the cells when one of the cells is loaded faster than the other cells. All cell monitors are calibrated, and the calibration results are stored in EEPROM. It is possible to inject calibration messages in the string of monitors to alter these values.
The power of the cell monitor is delivered by the cell it self, so power reduction was one of the main requirements, when in quiescent state they use 50 µA. And they become active once every minute for a fraction of a second. There is no regulator the ATTiny 85 processor can run on voltages from approximately 2 Volt upto 5 Volt. A resistor of 68 ohm is used for the balancer, so approximately 50 mA will be balanced. Not much, but it will be used rarely, it’s more a matter of just in case, and it was easy to create the option.

PCB of the cell monitor.

Because the ATTiny runs on an RC oscillator and not a crystal oscillator, the timing is less accurate, especially because of the wide range in power supply from the cell. When a normal (e.g. RS232 or NMEA0183) would be used, problems may occur when transmitting a couple of bits with the same polarity in succession. To prevent this I implemented a Manchester encoding, every bit changes its polarity halfway the bit time. A ‘1’ is a zero to one transition, and a ‘0’ is a one to zero transition. (Or the other way around, I’m not sure 🙂 ). The base of the software was the NeoSWSerial library for Arduino, but it is modified to Manchester encoding, and stripped to the last bit to save memory.

The end device is an ATMEGA 328P based Redboard, connected to a Dragino (LoRa) shield, connected to my own ‘shield’ with connectors to the LCD display, the relay to switch the charger, and the connector to the cell monitor. It is also optimized for low power consumption, and uses approximately 3 mA. It runs an image with mainly LoRa software, combined with some software I wrote myself, including the NeoSWSerial-Manchester code.


Again a good hint from Daniel Boekel, he bought a batch of used Winston LiFePO4 batteries, approximately 155 – 160 Ah capacity left. So, I bought 32 of them, to have approx. 15 kWh of battery capacity.

The batteries, Winstons LiFePO4

The batteries were used in electric buses, some of them failed, so they replaced the whole batch. I bought them for approximately one third of the price of new cells.

To make the connections between the cells I use strips of aluminium 30 x 2 or 4 mm. Of course I could have used copper, but that is harder to get, more expensive, and a thicker slab of aluminium has approximately the same resistance. Oh, always use a little bit of silicon grease between the connections, to prevent corrosion.

Motor controller

To control the speed of the motor, you ‘ll need a controller. And some additional hardware… Of course it is possible to build these parts completely yourself, but the currents in part of this hardware is so high, that any small mistake will lead to a small cloud of smoke. Remember, the motor is 10 kW, at appox. 48V, this gives a current of 200 A! To prevent to much smoke (after the magic smoke has escaped the things don’t work any more) I went looking for a controller, again on I found a Sevcon MOS90 controller, again this is from an old fork lift. The only problem was, I couldn’t test it and couldn’t get it to work. So I contacted HSCT and they helped me. It proved that I didn’t connect it correctly, because when I connected it according to there circuit diagram it worked perfectly. They also adapted the settings a little bit (ax current 300A e.g.). It seems that I also have the most robust one, the one that can handle up to 400A!

Sevcon MOS90 motor controller.

So that is the base of the controller, but with that controller, it can only run in one direction, so you need a heavy relay (and heavy relays are called contactors) to switch the polarity of one of the windings in the motor. In a series motor there are two: the stator and the rotor, if you change the polarity of one of them, the motor runs in the other direction. If you change both, the motor runs in the same direction again.

Motor with modified connections for stator and rotor. Also visible the contactor to change direction.

Because this motor was build to drive an oil pump, it was not possible to change the polarity of one of the windings, only both at the same time. That doesn’t make sense, so somehow I had to break the connection of the two windings, and get the wires to outside the motor, to connect to the contactor. Luckily this was not to difficult, the wires were easy accessible and two connections were made on a small piece of trespa. So now we had the possibility to let it run in two directions (with a switch), and control the speed with a potentiometer. Not optimal, but workable.

On a boat (and also on It Paradyske) it is normal to have a single lever throttle control. If you move the lever forward, the motor runs forward, and if you pull it backwards, the motor spins the other way round, the further you push the lever, the harder it spins. Yes, fine, but the potentiometer doesn’t work that way, it only controls fast and slow, and the direction is controlled via a double throw switch, how to adapt this?

One way is to solve it in a mechanical way, but wait, I am a software engineer, and also studied electronics, so why not…?
Yes, solve it in a smart way. Get a microcontroller, a throttle lever, and some nice gadgets (remote control), do a little bit of mechanical modification to the lever and write some software to glue it all together.

Mechanical push pull wires removed, and potentiometer added to throttle lever. This is an almost identical throttle control as mounted on It Paradyske, so I hope this one will fit flawlessly.

One of the options I didn’t mention yet, is the possibility to use a 0-5V voltage level to control the speed of the motor via the MOS90 controller. So basically the microcontroller reads the position of the lever, determines which side of the direction contactor should be activated, instead of a double throw switch some relays are used to control this, and controls with an analogue output the speed of the motor.
Of course there are some nice to have things: Standing on the pulpit, and controlling the speed when docking! So a simple remote control was added.

And some temperature sensors to measure the temperature of controller and motor, and a hall effect sensor to read the speed (rpm) of the motor, and an LCD-display to show all these parameters.

The electro motor, how it all started.

In a lot of electric conversions people use permanent magnet synchronous (electric) motors. So that is where I started. Well known motors are the Golden Motors. They are fairly cheap, available in a range around 5 kW, and fairly easy to control (read, controllers are available).

But all those engines have one big disadvantage, to be able to use the maximum output (e.g. 5 kW), you need a very high rpm, up to 3500 or even 5000 rpm. Because the output of these engines is torque x rps * 2 * pi, and the torque is determined by the current, and that current is limited by the controller, so the output is limited. Also when the output voltage drops of such controllers, the heat losses increase. And of course you need a reduction to convert those high rpms to something around 1000 rpm to adapt to the propeller. This reduction, the losses and the fact that the prop need to fit very precisely in terms of diameter and pitch makes this a less favourable motor for me.

From Daniel Boekel I got the advice to look for a motor from a fork lift, these motors are serial motors, which have a much better torque / rpm relation. The maximum power is already achieved at low rpms.

With this in mind I started searching on marktplaats (the Dutch equivalent of eBay), and already after a couple of days, a batch of 5 motors caught my attention. They were 10 kW, and were used to drive a hydraulic pump. Oh, and they were heavy… (approx. 70-80 kg). And only EUR 200 each, but they were sold as a batch of 5. So I contacted Daniel to ask if these were alright, and if so, he could have 4, but I wanted number 5 :-). He agreed and I collected number 5 from Alkmaar. So it finally had started, time to prepare all the other steps.


Welcome, on this site I want to log my experiences of converting our Feeling 29DI sailing yacht “It Paradyske” (Little Paradise) from diesel to electric propulsion.

Why electric?

“Because it is possible?” “Why not?”
“Because it is silent!”
Because I like to build things and this is a beautiful challenge.

Because we are sailors and love sailing. The silence, being propelled by the wind.

But you’ll have a limited range, not enough power etc.
Yes, our motor range will be limited, but on the other hand, we hate motoring. We sail when possible, even if the wind and the tide is against us. Last year (2018) we only had 25 engine hours. This years holiday we had days we didn’t use the motor at all, sailing from anchorage to anchorage.
And a diesel is so old fashioned technology (1893). (OK perhaps the electric engine is even older, 1837). But a diesel is smelly, noisy, and lots of vibrations, every year you have to change oil, winterize etc.

So yes, I like to go electric.