Electric Bike Charger From Mean Well Power Supply




Introduction: Electric Bike Charger From Mean Well Power Supply

About: I can build pretty much anything I set my mind to building.

Got an electric bike? No doubt it came with a charger. Eventually, you'll need another charger, since they sometimes burn out. What's in that expensive box?

The core of a charger for Lithium batteries is called a CC(Constant Current)/CV (Constant Voltage) power supply. These will create a constant current, limited by a set constant voltage. A common and well respected brand is Mean Well (there are many others) and this instructable focuses on the Mean Well NES-350 power supply.

Why be so specific? Some modifications are in order to make this into a good charger for your electric bike. We'll focus on this specific model and diagram some mods that will make it work.

The first consideration is charging voltage. LiFePO4 (Lithium Iron Phosphate) batteries are finicky beasts, and like to accept charge at specific currents and voltage. Many bike batteries use 12 of these cells in series (12S) for a combination that adds up to about 39.6 volts (depending on state of charge). But people are stacking up batteries at higher voltages - mine use 24 series cells for a nominal voltage of about 79.2 volts. Since people are used to dealing with batteries in multiples of 12, these are sometimes called "36 volt" and "72 volt" batteries, although that is inaccurate.

LiFePO4 batteries have a working voltage of 2.5 - 3.3 volts per cell, a a safe float charge voltage of 3.45 V per cell, and are damaged if the voltage rises above 3.7V per cell or below 2.1 volts. These batteries come with electronics designed to enforce these limits by disconnecting the battery if any cell is too low or too high, or sees too high a discharge voltage. We are going to build a charger that provides 82.8 volts, or 3.45V per cell and 24 cells.

Step 1: Three Power Supplies Required

Why three supplies? I'd like a charger that can produce about 1000 watts. The Mean Well NES-350 is rated 350 watts, so three of them would be rated around 1000 watts after some adjustments. It is a power supply that is available cheaply through distributors or Ebay.

In order to achieve the desired 82.8 volts, I adjusted two supplies (NES-350-24) to 25V via a potentiometer located near the terminals of the unit. That's the easy part. The third supply was an NES-350-27 rated at 27 volts nominal. It is adjusted to 32.8 volts to achieve the total voltage (25 + 25 +32.8).

The third supply also needs to have a current adjustment. It will happily supply fully rated current (13 amps) at the higher voltage until it burns out or shuts down from overheating - 32.8 volts * 13 amps = 426 watts - too much power. We'll dial that down to about 10.8 amps. In series, the supply with the lowest regulated current governs all three. 10.8 A * 82.8 V = 894 watts, not quite 1000W but still a hefty charge. Many commercial chargers are only 250 or 350 watts. This is still within the rated charge amperage of my battery. It should charge a 40 AH battery in just under 4 hours, plus a little time for balancing. All this is automatic - just plug it in for the required amount of time.

Step 2: Safety Precautions

Ok, the pic above is another electrician's joke.

Remember you are dealing with dangerous levels of power and voltage. 82 volts DC could be lethal. 120V AC is also lethal. No argument between Edison and Tesla here - both DC and AC are deadly. Carefully insulate and isolate any bare wires and terminals before applying power. Also your battery is potentially a couple of kilowatts of energy that could go off all at once in a short. KaPOW! be very careful about having no bare leads that could possibly short while there is power present - and batteries ALWAYS have power even when discharged. Touching battery terminals could blow your battery BMS electronics, blast copper in your eye, or destroy the battery.

Wear safety glasses anytime you are dealing with live electricity.

Step 3: Tools and Materials

You'll need

  • (2) NES-350-24 power supplies and (1) NES-350-27 Power Supply
  • A sturdy case. I used an old case that came with a Makita Side Grinder
  • Some aluminum flat bar 1" X 1/4" X 3 feet
  • Several 1/4"-20 bolts, nuts and washers, preferably stainless steel
  • (3) M4 bolts and washers. Preferably stainless steel. I use stainless on all my bike creations, never rusts out.
  • A heavy 120V power cord, preferably 14 gauge or better
  • A charging cord. I used a 3-terminal XLR microphone jack (commonly used for bike chargers) and a heavy cord robbed out of some 120V equipment, 14 gauge.
  • Heat shrink tubing
  • Rubber self-fusing tape (preferred) or electrical tape (OK but can get gooey over time)


  • Drill
  • Hammer
  • Vise
  • Wire Cutters and strippers
  • Soldering iron and solder
  • screwdrivers
  • Metal saw
  • ratchet wrenches and box-end wrenches
  • try-square, ruler, pencil
  • Voltmeter
  • Ammeter capable of measuring up to 20A
  • Nichrome wire or 2 ohm heavy power resistor (optional but handy for testing)

Step 4: Adjust the Current

Here's the trickiest part - adjust the current on your highest voltage supply.

Pick the supply that has the highest voltage. Calculate the maximum current based on the wattage rating and the adjusted voltage. I have a 350 watt supply and it provides 32.8 volts, so my current needs to be no more than 350/32.8 = 10.67 amps.

Some Mean Well power supplies, the S-350 for example, have a resistor that can be adjusted to limit current. Not this one. These supplies are not adjustable current, and there is no handy R33 hack to adjust the maximum current. These supplies use an LM3845 Current Mode Controller as the heart of the power supply. This chip compares the voltage drop across a fixed sense resistor to a 1.0V internal reference, instead of a voltage divider, to set the maximum current.

Fortunately, the fixed sense resistor is easy to identify. It consists of two prominent thick jumper wires, standing about 1cm off the board, near the power terminals. A key indicator is these resistors show nearly 0 ohms to the negative power supply terminal - and the LM3845 datasheet indicates that it's sense resistor is to be connected to the negative supply. The rated max current on the NES-350-27 (27V version) is 13 amps. I had to turn the voltages to 25 - 25 - 32.4 volts to achieve my 82.4V output. At 32.4V and 13 amps, I would be producing 421 watts at the higher voltage supply, enough to maybe burn it out or cause it to go into thermal shutdown. The current must be adjusted down to make it stay within power rating specs. The two 24V supplies, adjusted to 25 volts output, would be within safe limits at such currents.

Since there are two sense resistors, a simple way to cut down on the output current is to snip one of the resistors. This cut the max current in half. I made up a 2 ohm high power resistor load out of some nichrome wire and ceramics I had laying about to test the idea. Sure enough, with a load, I could produce 12.5 amps max, but with one sense resistor cut, only 6.25 amps. What I'd really like is about 10.5 amps to keep within the power spec.

After playing around with the sense resistors a bit, I realized that soldering a 6" length of #22 wire in place of one resistor adjusted the max output current nicely to just under 11 amps. Then I had the bright idea of putting a switch in the middle of this 22 ga wire. Switch closed - fast charger 11 amps. Switch open - slow battery-pleasing charger 6 amps. Charging slower may increase the life of the battery, faster might get you down the road in a pinch without waiting around all day.

Step 5: Mounting Brackets

Add some mounting brackets to your case. I used a strip of 1" aluminum bar to fabricate them. One strip to clamp the power supplies down, and two more to act as dividers to keep them separated for airflow. Bend them to suit in a vise, drill holes that can be use to bolt them down and fasten them to the power supply mounting holes.

Grind off any sharp edges on the fabricated mounting bars.

It is important to maintain an air gap between the supplies, as they are fan cooled. The angle brackets are cold bent in a vise, and sit between the fan and the air intake holes, keeping the hot air from the fan from recirculating into the intakes. They also stabilize the supplies, which are then held down by the longer metal bar. The supplies come with an M4 threaded mounting bolt, so I used M4 stainless screws and washers to hold it all together. I like using stainless - although this isn't a weatherproof case, I'll carry it on the bike so some anti-rust measures are in order as it will be exposed to damp air.

Drill mounting holes in the brackets and matching holes in the case, bolt them together with 1/4-20 bolts and nuts, and wide fender washers.

These fan-cooled supplies must be operated with the lid open. Adding air intakes and fans to the case is a problem for another hack.

Step 6: Wiring

Many E-bikes use XLR "microphone" plugs as charging plugs. The common way to wire these is shown in the attached diagram - pin 1 and 3 are wired to the supply and pin 2 is not connected.

If I used the same wiring diagram, and forget, plugging my 82 volt charger into a 40 V battery would result in letting all the magic smoke out of the battery, and then the magic beans inside no longer work. (yeah, that's an old electrician's joke.) In other words, Kaboom! The 82V charger uses pins 2 and 3, and pin 1 is not connected, so it would be safe to plug this into the wrong battery - nothing would happen.

The 120V terminals (Did you remember to set the 120/240 Voltage switch to 120V ? or 240 if that is your flavor?) are clearly marked. They come with an insulating cover, I covered them with an extra layer of insulation (hot glue, which is actually a pretty good insulator but is also removable) just in case. The low voltage side is wired in series. Double check your wiring with a voltmeter - and check that the polarity in your male connector is the same as the battery female connector. Do this about three times, messing this step up would be bad news. Use wire rated at least 15 amps - #14 minimum.

Add a power cord and a switch. I used a heavy three position switch. These power supplies have a heavy inrush current - 40 amps apiece - when plugged in. That's a 3X40= 120 amp surge for a fraction of a second - enough to dim the lights on my bench. This could blow a breaker - if you are on the road, begging for a charge, and you blow the breaker, that would be embarrassing. This kind of surge will definitely false trip a ground-fault outlet. I put a pair of 5 ohm 5 watt resistors in series with the supply's 120V line in one switch position. This allows me to switch these resistors in for a couple of seconds, then turn the switch to full on after the surge is over. Insulate all exposed wiring carefully, or arrange them in your box so that the terminals cannot be touched.

Step 7: Optional: Add a Meter

Want to know your battery voltage? Charging current? How much charge you've added, ala' a battery gas gauge? Then add a meter.

The best meter I've found for the purpose is this dual volt-amp-power meter. The only source I am aware of is this ebay seller. I set mine up so the top display shows voltage, and the bottom amps. Other useful functions include "C" (amp-hours, or battery gas-gauge) current power, and # hours.

I made a simple bracket out of some thin sheet metal (If you've read this far, making such a bracket is probably trivial for you) and attached it to the meter with some zip ties.

Step 8: Assemble and Test

Presumably your box is big enough to store your cords inside, making a neat and compact package. Hopefully it also doesn't look like a bomb. This is a real concern - I've had people think my bike batteries and charger were some kind of bomb. People are paranoid. Also I have a beard - a key sign of a dangerous international pirate. OK I did tip over my brother's canoe one time, and said "Arrr". That's piracy, I think.

Use a voltmeter to test the output voltage. It should be 82.8 volts or so, or 3.45 volts per cell if you are using other than 24Series (24S) batteries. Check the polarity again, very carefully. A mistake here could be costly.

If you have a heavy ammeter, wire it temporarily in series with your charger, and plug it into an empty battery. Or better yet, hack up a power resistor out of nichrome wire, about 2 ohms. Check the amperage with the resistor first, then with your battery.

Bicycle Contest 2016

Participated in the
Bicycle Contest 2016

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    2 Discussions


    4 years ago

    Hi thr
    How u control temperature of battery


    Reply 4 years ago

    I don't. This type of battery usually has a built-in battery management system (BMS) that may or may not have that function. High battery temperature is an important consideration, and limiting the current to the battery manufacturer's spec is the first way to avoid overheating. Most chargers for LiFEPO4 batteries do not have any kind of temperature input. Better BMS systems will have a battery temperature limiter of some kind, and automatically disconnect from the charger if they sense high temperature.