## Increasing the power of cheap eBay BLDC-controller

After installing sensors in the Turnigy 80-100 motor I needed a high current sensored BLDC controller. Since I’ve decided to use a 12 S LiPo battery the maximum voltage of the newly charged battery is 50,4 V with a nominal voltage of 44,4 V. Most high power e-bike controllers are designed to operate on >72 V and are quite large.

When i find the time I will build my own controller but for now, I want to modify a small 48 V 350 W controller, that I bought for \$25 from eBay, into something that is a lot more powerful. The key to increase power handling capability is to decrease the heat losses under high power. As a side effect, more of the energy in the battery will be used to move the bike and less to heat the controller.

the modification is done in a couple of steps described below.

## Replace transistors

The controller originally contained six STP75NF75 MOSFET which can handle a voltage of 75 V and (according to the datasheet) 75 A. The typical resistance when turned on is 10 mΩ which is quite high. Realistically I think six of these is capable of handling ~15 A continuously with decent cooling. I’m not even sure if they are genuine and 48 V 350 W will be ~7 A  so the original controller isn’t really pushing them.

Instead i will use six IRFB3006 which can handle 60 V and up to 195 A (again, according to the datasheet). The silicon could actually handle up to 270 A but the wire bonds between the silicon and the case limits this to 195 A. The typical on-resistnance on these are 2 mΩ, five times lower than the original FETs! Another popular transistor to use when modding e-bike controllers is the IRFB4110 which is capable of handling 100 V but not as much current as the IRFB3006.

## Beef up the PCB traces and wiring

The original high current PCB traces of the controller had some extra solder on them to increase the current capabilities. To increase this even further i added 3×1.5 mm copper wire to these traces. Compared to copper, solder is a pretty bad conductor so this will decrease losses and heating under high currents considerably.

There was one problem with this, copper and PCB laminate have different Coefficients of Linear Thermal Expansion, a view from the side reveals that the board got a little curved when soldering. I hope this doesn’t break anything.

The wimpy phase and battery wires on the original controller is replaced with 6 mm² wire instead to handle he increased current. And a lot of the special function wires on the controller are removed. I only need the throttle and brake inputs.

## Modify the current shunt

When I ordered this controller I was pretty sure that it were based on the Infineon XC846 ship as most china-made e-bike controllers are. These controllers can have the current limit and many other properties changed in software by connecting your computer ti the controller. Instead this controller is based on a STM8 microcontroller, maybe this is programmable but I haven’t found any information on how.

Instead of programming I can increase the current limit by decreasing the resistance of the current shunt. The processor measures the voltage drop across a short bit of wire with a known resistance to determine how much current the motor uses. If I for example decrease the resistance of this wire to half, the current will be twice of what the processor thinks.

Today I recorded two videos running the motor. The first one is just running the motor in sensorless mode. I actually got it running once in sensored mode but as soon as I started adjusting the sensor angle the controller fell back into sensorless mode. The throttle in this video is a tired 10k trimpot hence the uneven throttle signal.

I also made a small load test just holding the motor. In this video the motor is run on the lowest speed possible in sensorless mode. The battery used in this clip had a voltage of 46 V. Since the currentmeter maxes out at 5,5 A the load power I created is somewhere around 250 W

## Modifying the Turnigy 80-100 Brushless Outrunner – Part 1

The Turnigy 80-100 is a electric motor sold by Hobby King to replace gas engines in large RC aircrafts. To use this motor in my application two things have to be modified. Installing hall-sensors and re-winding the motor for lower speed. This motor is a BrushLess Direct Current (BLDC) outrunner. This means a couple of things:

• The motor does not have brushes like an ordinary DC motor. Instead the commutation (switching the current direction the motor windings) is done electronically with high power semiconductors (most commonly MOSFETs)
• It runs on DC power which is a little confusing since the motor actually is a 3-phase AC motor. But the motor+controller runs on DC.
• Outrunner means that the motor shell is rotating while the center is static. The center of the motor contains the windings and stator core while the outer bell with permanent magnets are rotating.

Since the commutation is done electronically the motor controller must know when to switch direction of the current. This is done in one of two ways:

Sensored commutation:
The motor is fitted with 3 hall-sensors which sense changes in the magnetic field of the rotor

Sensorless commutation:
Since only 2 of 3 phases of the motor are energized the motor back-emf can be measured on the third terminal to determine rotor position.

This motor is intended to be used with a sensorless controller and has no hall-sensors. A sensorless controller need to spin the motor up to ~10% of maximum rpm in synchronous mode before the back-emf is large enough to measure. Below this speed the torque isn’t very high which works fine for a propeller drive but not on a moped where full torque is required from 0 rpm.

In general BLDC motors and controllers intended for RC toys are sensorless and use sensorless controllers while motors and controllers for E-bikes are sensored. There are exceptions from this but it’s good to know since a sensored controller will not work with a sensorless motor, the other way around could work but the low-speed performance will probably be bad and there is a risk of damaging the motor and/or controller.

To get good starting torque and be able to use an ordinary e-bike controller I mounted hall sensors on my motor. This process is well described in a thread on the Endless Sphere forum:

To summarize the +20 pages thread there are two ways of doing this

• Internal sensors are mounted between the stator teeth at 120° spacing
• External sensors are mounted on a bracket outside of the bell, this uses the magnetic flux leakage to sense the magnets on the other side of the bell.

Another problem with using the motor in it’s original configuration is the Kv value. This is the constant that determines the motor maximum speed based on the input voltage. For example a Kv value of 1000 rpm/V will result in a maximum speed of 12000 rpm with a 12 V battery. This value depend on several properties on the motor but you can say that it represents the coupling between the current and the magnets. More turns of wire around the stator and/or stronger magnets will reduce the Kv value. The Kv value is also dependent on if the motor is terminated in wye or delta. The same motor have a Kv that is sqrt(3) = ~1,73 times higher if it’s connected in delta than if it is connected in wye.

When I bought this motor it had a Kv of 180 rpm/V and I want it to be ~90 rpm/V. Each stator tooth had 6 turns of copper wire around and the motor where coupled in delta mode. By rewinding the motor with 7 turns on each stator pole and couple the motor in wye instead the resulting Kv is somewhere around

$180 * \frac{6}{7} * \frac{1}{\sqrt{3}} = 89 rpm/V$

This is not an exact calculation since it depends on flux density, magnetic saturation of the stator iron and so forth but it will giva a hint. As i calculated in a previous post, this is enough for ~60 km/h using the same 44.4 V battery as I use on my E-MTB.

There is a thread on Endless Sphere about rewinding this motor as well
Re-wind of a Turnigy 80/100
Rewinding a motor is a tough job but the original winding is done with many parallel thin wires and in a pretty sloppy way. Instead, I used two parallel strands of 1.5 mm copper and it ended up almost as sloppy as before. I seem to have misplaced the photo of the stator with windings before the re-wind but it looked very similar to the pictures in the first post of the thread above. This is how it looked when i were done.

[Will replace with photo next time i disassemble the motor]

When mounting the sensors I choose the method of mounting them externaly. I used a CAD program to draw this mounting bracket.

Mounting the sensors 17,14° apart instead of 120° works because the motor have 14 magnet poles.

$\frac{120^\circ}{\frac{14}{2}} = 17.14^\circ$

A nice guy on a The Swedish electronics forum helped me print two brackets on his 3D-printer and they turned out great!

With wires mounted on the sensors and the sensors temporarily glued in with heat glue (I’ll use epoxy when i know that it works).

In the pictures above the motor is mounted on a plate that i made to test this way of mounting the sensors. Just to get it running I used a Hobbyking SS Series 190-200A ESC after the rewind this controller had a tough time getting this motor running. Using a 3S LiPo battery it managed to get the motor into closed loop back-emf sensing mod about one time out of ten. With a 6S LiPo it worked perfect and had loads of power! The no-load current consumption was slightly over 1 A, which is great but mostly dependent on that I didn’t re-install the skirt bearing. This motor have been reported to have a no-load current of ~9 A with the skirt bearing and coupled in delta. I also measured the Kv constant to ~89 rpm/V exactly as calculated.

My next post on this project will be about my modified eBay cheapo e-bike controller and hopefully a video of the motor running in sensored mode.

## Sunday afternoon robot

I had nothing to do today so I copied hubbens creation from the Swedish electronics forum. It is a two wheeled radio controled vehicle based on just two servos.

For wheels I used two wheels from an old Lego Technics truck I got for christmas almost 20 years ago (The best christmas gift I’ve ever got BTW). The wheels were bolted to servo horns from two HXT900 servos.

These servos are modified for continous rotation according to this guide.

Pretty simple:

1. Open servo and remove the gears and potentiometer.
2. Connect to your receiver and set your output to center. (or use another way to generate a 1.5 ms pulse every 20 ms)
3. Adjust the potentiometer to the center until the motor stops and solder it so it can’t rotate any more.
4. Remove the stop pins on the output gear with a sharp knife
5. Sand the top of the potentiometer axis so the top gear spin easy on the axis.
6. Re-assemble the servo

The servos are then glued back to back and some self adhesive velcro are mounted on both sides and the wheels are mounted.

The ideal would be to run both the receiver and the servos of a 2S LiPo but I only have 3S at home so I needed to use a Turnigy 8 V – 10 V 5A SBEC to power the servos and the receiver. Together with the DC/DC converter the über cheap Hobby King 2.4Ghz 6Ch receiver was mounted on the top of the servos.

On the bottom I have a Turnigy 1000mAh 3S 20C Lipo which is a little to large for this project but it was the smallest one I had.

I used channel 1 and 2 and mixed them 100% with each other. Since the servos are mirrored they need to rotate in the same direction for a turn and in oposite directions to move forwards och backwards.

This is what it looked like when it was ready.

My next order from HobbyKing will include a smaller 2S battery. And maybe I’ll put together a small controller board for this to make it autonomous.

## Output voltage adjustment on 240W Kingpower charger

I week ago i bought a bulk charger for my E-Bike, the idea is to use this to charge the battery fast and then once a week or so use a slower balancing charger to assure that the cells are in balance. I bought the charger from www.bmsbattery.com and they set it up for your requirements.

ALLOY SHELL 240W LIFEPO4/LI-ION/LEAD ACID BATTERY EBIKE CHARGER

This is a pretty common china made charger sold at various places under different names. I have seen names link Ping-charger and King Pan charger as well as Kingpower.

The charger uses a CC/CV (Constant Current/Constant Voltage) charging algorithm and i requested the charger to have the current set to 4 A and the voltage 49V with an Anderson SB50 connector for the battery and an European wall outlet contact. They got the current and the high voltage connector right but the voltage were set to 48.8 V and the battery connector was an Andersson Power Pole instead. I had a spare SB50 connector so that one was easy to fix

48.8 V for a 12 cell battery will result in 4.07 V per cell. Since this charger doesn´t monitor each cell independently a safety margin is required but that is a bit to much. I was aiming at somewhere between 4,10 V and 4,15 V per cell. I needed to set the voltage to somewhere above 49 V.

Four screws on the sides held the lid on and after exposing the PCB i was faced with 3 potentiometers.

I would have guessed that there should be one for voltage and one for current. Two of the potentiometers were located next to the current shunt so I guessed that they were for setting the current. Maybe one is for coarse and one for fine adjustment, if anyone knows please leave a comment. The third potentiometer were located below the output fuse holder and that one was my first guess for output voltage. With the charger powered up and a voltmeter connected to the output I tried the last potentiometer and I was right. I adjusted output voltage to 49,5 V resulting in 4,125 V per cell.

Be extremely careful while touching the insides of the powered up charger with a metal screwdriver!!!

## Repair of Humax CXHD-1000 cable decoder

A couple of weeks ago our cable decoder decided to give up. There was no signs of life other than a couple of horizontal thin red lines on the display when the power were plugged in. I bought the decoder from the cable company ComHem when i registered for their services about three years ago.

A quick google told me that the warranty for these units were extended to 3 years because of problems with the power supply. This gave me some hope so I called the customer service at ComHem who told me that I ordered the box 3 years and 7 days ago, and there was nothing they could do about it. Instead they tried to get me to sign up for another year of their most expensive cable service, register for a broadband connection and buy a new decoder from them. I decided to try a repair instead.

Since the warranty already was out I happily ripped open the “warranty void” seals and opened up the box.

The design was modular and the PSU were easily removed with a couple of screws. Like all broken electronics, the first to look for is swollen capacitors. As you can see in the picture below there are one capacitor which definitely is swollen at the top and one that shows some signs of giving up. Is there someone selling capacitors with a timer that destroy them a couple of days after the warranty runs out?

I decided to replace three of the capacitors that looked suspicious.

• C101 – 2200 μF 10 V
• C104 – 2200 μF 10 V
• C106 – 1000 μF 16 V

I noticed that the decoder were broken when i got home from work so the local electronics shop were closed when I realized I needed new capacitors. Lucky enough i had some old ones, that I salvaged from a broken motherboard, with the right capacitance and voltage rating. Make sure that the capacitors used as replacement are good quality low-ESR capacitors.

Heating up the soldering iron and replacing these large through-hole-mounted parts were easy, and we didn’t have to endure an evening of analog television. The decoder has been working flawlessly ever since.