Stealing power from my Ebike for lights


Okay, so I want to take power from the bikes main battery to power various devices, but mainly my light.  The bike provides USB output, but it's low current, and isn't meant to be perminantly connected.  For one thing, it's not waterproof.  

When taking apart the bike and looking at the wires coming from the motor, there were three sets. 
1. The sensor wires, used to detect how fast the bike is going. 
2. The controller wires, which lead to the display
3. The wires coming from the battery. 

The sensor wires certainly aren't going to help us.  The display wires might, but I don't have the pinout for those yet, nor can I find anyone who sells the almost-5-pin-jwpf-but-90-degrees-rotated connector used in the Yamaha bike.  I'll keep working on that, but the lowest risk way to take power for now is from the main power line going from the battery to the motor.  

Since this has a higher voltage than my lamp can handle, I will need a dc to dc converter.  I've procured a suitable one already, and have some smaller ones in order. 

The best and most reversible way to take power would be to use the existing connectors.  There is a the wire connector near the motor where the power comes in.  There are far positive and negative wires (with the power), and a skinnier one, which I assume is a sense of control line. I don't have a good photo on that connector yet, but you can see it in the background here. 
Basically, you just have to build a short extension cord for this connector, with some extra wires coming out which allow you to draw the power you want. 

Searching online, you can actually find many such cables for motorcycles, but none seem to have the same connector. 


I did, however, manage to find a connector which looks like the one in my bike.  Since quite cheap, I ordered one, on the off chance it might fit.  Even it it does, though, it's quite bulky.  It's already a tight fit inside the down tube to fit all the connectors used.  I'm not sure if I would even be able to add a new one.  

so what about the connector that plugs into the battery at the top? That one is also an oddball. 
I thought maybe I could just solder some additional wires into the existing pins, but they are waterproofed with something like epoxy. 
The final option short of cutting wires is to use a splitter.  I found this one in the auto parts section of the local Don kihote. 
The idea is you pop them over an existing wire you want to steal electricity from, slip in the wire for the thing you want to power, and then crimp it shut.  It will cut through the insulation, connect to the wire, and share the power. 
The good thing is that these are 99% reversible.  Sure, they make a small nick in the insulation, but you could remove this, put a dash of paint, and a smaller dash of epoxy, and it'll be good as new.  You never have to cut any wires, solder anything, etc. 

I picked a pack of these up, but once I got home and started thinking about it, I realized that these aren't waterproof.  Yamaha has very carefully waterproofed every part of the system, so I don't want to add something that isn't. 

So why is water proofing so important?  Well honestly, the main reason is corrosion.  Not much power will flow through reasonably clean water (like rain), but the power that does flow will cause hydrolosys, which generates oxygen in one side, which will eat away at the metal.  

It occurred to me that I could still use these connectors, and just inject them with epoxy, or the water proof compound often used for circut boards (Conformal Coating).  That would be easy, and should work, but it would also make removing the connector later a much more difficult task than it needs to be. 

It actually took quite a lot of searching, but I did find some water proof connectors from the same manufacturer as the red ones above. 

To be honest, I can't tell from the photos why these should be waterproof, but I'll check in more detail once they arrive. 

Update: these have no rubber gromits, the water proofing depends mainly on the shape of the case and the pressure between the wires and the case.  As a result, they are only rated as IPX3. 

Other considerations:

I need a place to physically mount the DC to DC converter.  There is very little space inside the bike to put it.  I consisted bolting it to the bottom of the display, but I actually found a spot near the top of the mud guard (beat the fork) that should work fine.  I'll use industrial strength velcro. 

This converter can handle input voltage up to 80v, and outputs 5v.  I would have preferred 12v for the light, but on the other hand, this will allow my to handle high power USB devices as well if I decide to add that in later. 
I'm assuming that the wires from the battery always provide power, even if the bike is off.  If that's the case, then there needs to be a switch so that the light doesn't run down the battery.  The DC to DC converter will also use power, so it has to be after the switch in the circuit. 

I found this rather heavy duty waterproof aluminum switch for motorcycles.
if the battery wires are indeed always live, then it'll be very important to make sure this is off when parking the bike - especially if the battery's internal electronics don't prevent undervoltage.  I seriously doubt that's the case, but better safe than sorry.  If the wires are not live when the bike is off, then I'll connect this switch just that it just controls the lights. 

I also got a fuse holder and 5amp fuse, to be safe.   We don't want to be burning up any wires if anything goes wrong. 

Finally, I want to have some plugs, rather than soldering all of this stuff directly together.  2 pin JWPF connectors would be ideal, but not many places sell them with pre-crimped wires, and the places that do have huge order sizes, or long lead times.  A proper crimp tool is also over $500, which is a bit above my budget for this project.  

I ordered the JWPF connectors and crimp pigtails, but also some AMP automotive
 connectors in the meantime. 


This well let me get started in a few days, and I can upgrade to the smaller DC to DC converter, etc., as things arrive. 

The Supernova light mounted is mainly for road use.  I will still use my PWR light for off road use, but honestly, I do most of my off road riding during the day and much of my road riding at night. 

Also, I ordered the light that I did because it was specified for Yamaha motors, but knowing what I know now, I would have purchased a light that can natively accept a higher voltage in order to avoid the need for the DC to DC converter at all. 

Here is a closer look at the connector between the battery and the motor.  This turns out to be a common motorcycle connector manufactured by Kojima.  This is a 3 pin 080 MT waterproof connector. 

I was able to easily buy one of these online for around $5.

Since it didn't come with wires, I had to crimp the pins myself. 

I used crimpless waterproof wire to wire connectors, but I don't trust the solder in there, so I soldered these manually before shrinking them. 
you can see the water seals behind each pin before they are inserted into the connector housing. 
I tested the continuity to make sure that everything that should be connected is, and things that shouldn't be connected aren't. 
Below is the harness wired in between the battery and motor. 
I checked to voltage and got 39 volts even with the system off. (The battery was around 80% charged).   There is enough room for the MT connectors and the AMP connector inside the bottom of the mud guard, but it is a tight fit. 

I think the cable could use a little more protection, so I'll probably add some nylon braid on the outside of the cable. 

By the way, here is the diagram from the service manual for the wires that connect to the motor. 

The next step is that I'll have to make a wire that can run from the bottom up to the top near the stem. 

After that, the power will go through a fuse and switch, and then the DC to DC concert and lamp.  The horn may be able to run directly off the battery power.  (I need to check whether the rated 36v is actually 36v, or referring to being suitable for a 36v battery).

Here is the DC to DC converter wired up as we need. 
Here is where I plan to mount it on the bike.  It looks a bit obvious here, but it isn't actually very visible from in front or above. It should also get plenty of air flow in that position. 
I have some much smaller Ebike specific DC to DC converters on back order, but this will do for now. 

The toughest part by far was getting the power cable from the motor up to the stem.  It looks like it should be easy to follow the original power cable back up from the battery, but that doesn't work because there is no way into any of the tubes from there.  

It is possible, however, to follow the display cable, which is routed inside of the frame and comes out near the motor.  Space is cramped, there is excess display cable shoved in there, and it tends to snag.  Eventually in order to overcome this, I cut a long piece of 3D printing filiment and managed to feed this through from the bottom until it came up near the top.  I grabbed that with a pair of needle nosed pliers and pulled it out of the frame.  Next, I used electrical tape and heat shrink tubing to attach the cable I had prepared to the end of the filiment, and then I slowly worked it up the internals of the bike until it came out the top.

One mistake I made was to attach the connector without checking the cable plate first.  I'll need to cut the wire to fix that, so I'll do it when I replace the connectors later. 

I soldered a connector into the top, which was less than fun since I had to do it outside in an awkward position. I tested for continuity and shorts, and then plugged in the DC to DC converter for a quick sanity check.
Seems it passed!

Time to wrire up the switch. 
Here it is, mounted on the bike. 
And here is the switch in line with the DC to DC converter, and the output going to the light. 
Now, this is a lot of excess wire and connectors, but it's better to have extra wire that I can cut shorter later than have them be too short.  I can hard-wire the connections later if necessary. 

 Another thing you might notice is that most of the wires I am using are thicker than necessary.  Again, overkill isn't necessarily a bad thing, since the length of wire used here is longer than typical. The wires that came preinstalled to the light are surprisingly thin, but the reason is because at the end of the day the light only draws less than 10 watts.  The horn only draws 2 watts.  This means we are only drawing a little over 2 amps at 5 volts, which most phone charging cables can safely handle.  Since the DC to DC converter is not 100% efficient, the wattage drawn from the battery will be higher, yet given that the inport voltage is much higher, the amperage on the high voltage side will be even lower, and so think wires are not necessary.  (I am using a much higher rated converter than necessary, so the preinstalled leads on the converter are also considerably thicker than the conductors on the wire coming from the lamp). The various connectors are also overkill, but they were what I could source quickly to avoid loss of manual crimping.  I will probably swap out the AMP connectors with less bulky JWPF connectors for "production" use.

So the JPWF wrote connectors I ordered arrived. I will try to crimp these directly to the relevant cables using a cheap manual crimper.  In case that turns out not to work out so well, it just so happens that I also received my order of pre-crimped cable leads which I can use. 

I will start by converting the low voltage side of the System, meaning the headlight, followed by the switch, and the output side of the DC to DC converter, etc.  Note that although these connectors are physically much smaller than the existing ones I used for testing, they are still rated for 3 amps at 100v.  The light draws around 9watts, which is less than 2 amps at 5v.  The horn only draws around 2 watts which means that even combined, the draw around 2.1 amps, or 67% of the rated capacity.

 I also want to convert the high voltage side of the system, but I hesitate to use the same connectors for both sides. 

I tested the system out last evening but riding around 10km in various conditions and adjusting the angle of the light, etc.

I adjusted it so that it is high enough to light up the bottom half of most fences close to a block away, but low enough so it won't shine in anyone's face. 

Conclusion: Electrically, the system is fine.  It is also a tangled mess of wires at the moment.

Here is the light from a bit of an angle so you can almost see the bike. 
Here it is closer to head on. 
The light isn't bad, even on dark trails. 

Here you can see the orange strap I used to hold the ghetto mess if wires from flapping around. 

Now it it doesn't rain on the weekend I will fix everything up proper like. 
  

Comments

Popular Posts