Output voltage adjustment on 240W Kingpower charger

Kingpower 240 W charger
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.

Charger voltage adjustment
Three potentiometers where the voltage setting is identified.

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!!!

Some catching up to do

No posts for a couple of days since I’ve been busy with other things. As you may have noticed, to this point, I have only written about some old projects I’ve done in the past. There is some catching up to do but I will mix old projects with new stuff until all my old projects are well documented here (at least the interesting ones).

Here are a list of projects I will try to write all little about in the near future.

  • One more Depron RC aircraft. (SAAB J-35 Draken)
  • More about my quadrocopter
  • At least two electric bikes, one MTB and one Puch Maxi Moped conversion
  • Electronics for electric bikes, controller and motor modifications, BMU, DC/DC converter, LED-lights…
  • Mechanics for electric bikes, motor mount, battery box…
  • Maybe some pure programming projects for either Android, Windows or the web

Quadrocopter controller

Since my first control theory class at the university I’ve been thinking about building a quadrocopter. There are several “off the shelf” kits you can buy that handles stabilization of the quad, KKMulticopter being the most popular one. As usual I did not want to use anything someone else made so I started building my own controller. This post will focus on the electronics of this controller but there will be more posts later on about the controller software and the mechanic construction of the quad.

Starting by defining the requirements on the controller

  • 4 PWM inputs from the radio receiver
  • 4 PWM outputs to the ESC
  • Power supply from one ESC
  • Processor capable of handling floating point Kalman filter
  • 3-axis Accelerometer & Gyro sensors (digital)
  • Capable of flashing several LED
  • Capable of measuring battery voltage

The ESC (Electronic Speed Controller) is a controller for running 3-phase BLDC (BrushLess Direct Current) motors. It takes a standard RC radio PWM pulse as input and outputs a synchronous 3-phase trapezoidal voltage to the motor. Most ESC of the size used in this project includes a 5 V 2-3 A linear voltage regulator to power the receiver from the main battery. This power will be used to power the controller as well through a 3.3 V LDO regulator.

The three axis accelerometer and two axis of the gyro are needed to estimate the pitch and roll of the quadrocopter using a Kalman filter. The third axis of the gyro is used to implement a simple heading hold control loop.

Let’s just say that I’m more of a software, than electronics, guy. Electronics is really fun and interesting but I’m no professional. If someone sees any errors or strange things I’ve done in this design, please tell me and let me learn from this.

If i start with the processor, I have previously used the Microchip dsPIC line of processors and like them very much. They are easy to work with and the student version of the C30 compiler works fine for my needs. I had some dsPIC33FJ32MC204 laying around at home from an old projects and these have a motor control PWM module with 4 outputs and 4 input capture modules capable of reading the signal from the RC receiver. A simulation of the Kalman filter code I’ve written told me that performance wasn’t an issue either.

I used the Free Version of Eagle Layout Editor to draw up a schematic

Schematic
Schematic

And create a PCB layout from this schematic. The layout was adapted to a 50 mm x 50 mm pcb since I found the extremely cheap PCB manufacturer ITead Studio which could make 50 mm x 50 mm PCBs for less than $10. The layout used two layers and looked like this.

Top Layer
Top Layer
Bottom Layer
Bottom Layer

The sensors are from Sparkfun and mounted on breakout boards, since this is my first PCB order I played it safe and didn’t want to solder the extremely small packages of the sensors.

ADXL345 on breakout board
ADXL345 on breakout board
ITG3200 on breakout board
ITG3200 on breakout board

ITead Studios is based somewhere in China and it took several weeks to get the PCBs but when they arrived the all seemed to be of good quality

Quad PCB from ITead Studios
Quad PCB from ITead Studios

I have a couple of these boards left, contact me if you want one.

I used a toothpick to apply solder paste from dealextreme to the PCB, placed the components and heated with an ordinary soldering iron. Quite time consuming but I’m pretty sure that the end result was better than if I would have used ordinary solder. Not the prettiest soldering job but it was my first using this technique.

Quad PCB Top
Quad PCB Top
Quad PCB Bottom
Quad PCB Bottom

Now the “only” thing left to do is build the mechanical part of the quadrocopter and create the software. But I save that for another post…

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.

Humax CXHD-1000
Humax CXHD-1000

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.

Humax CXHD-1000 Disassembled
Disassembled with the PSU removed

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?

Humax CXHD-1000 Power Supply
Power supply, note the bulging capacitors.

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
Capacitors
Two of the capacitors are clearly swollen but I change all three just in case

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.

First try on depron RC aircrafts

This will be my first project post on this blog starting with something I made a year ago. A RC aircraft made out of depron.

Depron is a foam material intended for insulation and sound dampening of floors. I bought a 10-pack of 6 mm and a 10-pack of 3 mm at Hornbach, a local hardware store, which will be enough for several planes. At this store the foam was actually called Ebisol instead of Depron, but I guess those are just two different brands of the same stuff.

There are thousands of freely available plans for such a model only a google search away but I had to design my own. Some time behind a CAD program I ended up with this.

Final CAD model of depron aircraft
CAD drawing of depron aircraft

If I were to build this model again i would definitively make some changes to the plans. Some parts of the model were very hard to assemble due to their complex shapes.

A couple of evenings of assembly and some inspections from the chief engineer

Wing inspection
The chief engineer inspecting the wing construction

The model were done.

Foamie done
The aircraft is done, waiting for electronics to be installed
Topside done
Electronics installed
Ailerod servos installed
Aileron servos installed
Elevator servo
Elevator servo installed

Almost all parts I used for this were bought from Hobby King

Radio – Hobby King 2.4Ghz 6Ch Tx & Rx V2 (Mode 2)
Motor – Turnigy 2217 20turn 860kv 22A Outrunner
ESC – Hobbyking SS Series 25-30A ESC
Servos – HXT900 9g / 1.6kg / .12sec Micro Servo
Battery – Turnigy 2200mAh 3S 20C Lipo Pack
Horns & hinges – Plastic Parts Set 29pc (horn hinge)

Apart from this i bought some carbon rods and some piano wire from a local RC store.

The only thing left to do were the test flight

That was the end of that aircraft. I’ve heard people say that the center of gravity was off making the plane unstable. I believe Murphy was trying to teach me a lesson that I should try to walk before I run. Maybe I should have used one of the existing plans known to work with a well defined spot for center of gravity.

As I said this was a year ago. Two weeks ago I visited Aeroseum which is an aircraft museum here in Gothenburg. By now my emotional wounds, from seeing hours of work crashing to the ground, have healed and i feel ready to make a new try.

More about that in a future post…

Test post

This is a first test. Later on I will post about my DIY projects here.

Trying a little code: