Repowering a KTM 640 Adventure

Discussion in 'Some Assembly Required' started by Z50R, Oct 19, 2017.

  1. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Time to shift gears for a bit. The last "difficult" task on this bastard child of a bike is the wiring harness. Before anything can be made, a really good plan is needed. I can fabricate steel like an old lady bakes a cake: a little of this and a little of that looks about right and taste good in the end. For most of what I make in steel, I don't need to make prints before I start cutting. The act of wiring is easy for me and I can make my own prints, but I have to write it all down before I start because I cannot work out of my head as I go.

    Before we go into the actual schematic, we need to talk about handlebar controls.

    When I went to test ride the Suzuki before I bought it, I couldn't find the kill switch. The seller explained that the light switch or the key would kill the engine and showed me a kill switch where the 640 Adventure has a trigger switch for flashing the brights. The handlebar control on the left is a Leonelli 074 that was used on some spanish bikes and included in Baja Designs dualsport kits prior to 2011. This switch setup is better than the KTM switch because in addition to the turn signal and horn, it integrates a kill switch and has a position designed for running without the headlight on. That means that this switch will do everything the left KTM switch will do, half of what the right switch does, and something neither switch will do. The drawback to the Leonelli unit is there is no trigger to flash the brights and it is much more difficult to rebuild the switch. I was worried about build quality but after rebuilding both switches, I am confident in the quality and happier with the more straightforward turn signal switch. The Leonelli turn signal does not feature push to cancel but is more robust.

    Here's a picture of the switch I'm using:

    IMG_0781.JPG

    One of the features that I want to include in this build is the ability to separate the essential circuit from non essential ones. Ideally, there should be a way to turn off or remove every circuit that isn't needed to get the bike out of the woods. This allows the bike to run even if something non essential is broken in a way that it is causing other components to fail. Using the aftermarket handlebar controls rather than KTM will make this task easier. Additionally, when kickstarting or bumpstarting a bike with a dead battery, it is much easier if the lights are off. The lights draw enough power from the stator that the spark to ignite the fuel is significantly weaker with them in play.

    I went on a mission to find a wiring schematic for the Leonelli 074 handlebar controls and was surprised that none were available. I found where others had asked for one and where others had a magic box on their schematic but no one had a list of which wires were connected when each switch was used. I busted out the multimeter and made my own.

    IMG_0800.JPG

    The problem for me arrises with my new headlight. The light has 3 wires in: hot for high, hot for low, and ground. I want the low beam and high beam on while high beam is selected, low beam alone when low is selected, and no lights when the switch is in what I am calling run.

    I have used a pair of relays in the past to make a circuit that acomplishes the above that I could attach to the Green/Blue and Yellow wires but I shy away from relays as much as possible. They are a moving electric part and therefore not as robust as a hard wired circuit. I decided that if I could remove the connection between Red and Blue in the run position, I'd be able to have power fed in via Red, out for all lights except high beam via Blue, and out Yellow for high beam.

    Some tinkering turned this:

    IMG_0805.JPG

    Into this:

    IMG_0808.JPG

    And now there are no completed circuits in the run position.
    thirsty 1 likes this.
  2. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Lets start the discussion on wiring schematics with a shot of the schematic for each bike in stock form so we can understand what is going on.

    First the Suzuki DRZ400e:

    IMG_0759.JPG

    Not too complicated. The CDI is the brains of this opperation. It has an output to the ignition coil to fire the spark plug on command. There are a pair of pickup coils telling the CDI both how fast the motor is turning (so it knows how much spark advance is needed) and when to fire. The CDI also has inputs from the throttle position sensor and kill switch. The stator connects to the regulator and provides power for the bike. There is a circuit to trigger the starter relay and in turn the starter motor so long as the clutch is pulled in. The lights are simple and always on and a single fuse protects the bike from a bad battery.

    As simple as this bike is, it can be made even simpler. Suzuki did so on the DRZ400 which everyone has taken to calling the DRZ400k

    IMG_0823.JPG

    The starter, clutch, key, and battery are gone. This is good news because it means the CDI Suzuki specified can work without a battery. This means the bike can be hurting quite badly but still run. The 400k circuit still includes lights though so more stuff that is non essential can go.

    When completely boiled down, this is what is absolutely necessary for the bike to run:

    IMG_0824.JPG

    13 wires and 7 components. Make a list, here's the spares you need to carry if you are riding this bike across the Darien Gap or to the moon.
    JagLite and Roofchop like this.
  3. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    And on the other hand you have the KTM 640 Adventure:

    scan.jpg

    Zoom in and soak up that mess of crap. At least they got it all on one page for this bike, KTM isn't always able to do that. Thank god it isn't a BMW or there'd be shielded twisted pairs and circuits that are designed stupid for the sake of being German.

    Everything that the Suzuki had is here too. This is a street legal motorcycle so it has blinkers and a plate light and high/low beams. There are switches to trigger brake lighting.

    The speedometer looks intimidating at first but in reality, it is quite limited in its ability to process and all of its inputs are binary signals save temperature and speed. No outside calculations are done so no need for CAN busses.

    The tach is simple and draws off the CDI pulses to the spark plug to calculate RPMs whitch are displayed via servo.

    The plug in the top corner is for a tripmaster switch to incriment or decriment tenths of a mile off the trip odometer. Handy for roll chart adventures.

    Working across the top are a pair of diodes. Austria is awfully close to Germany; some escapees brought their engineering prowess to KTM where they were able to successfully make this design un-necessarily complicated. These diodes allow the CDI (also unnecessarily complicated) determine if the stars and moon are alligned to keep the starter from being used if the clutch and neutral are not used appropriately.

    Below are two sockets for a GPS and a motorized or lit roadbook

    Back in the top row are handlebar controls. They look complicated because there are many lines but they are quite simple.

    Next is the key switch. Interestingly KTM shows it as a two pole switch but there is a third circuit as well.

    Below are 5 fuses. KTM and Suzuki agree that 20 amps is good protection from a battery. KTM felt that other parts of the bike were worth protecting as well and threw 10 amp fuses at all of them.

    To the right is a capacitor. This is to keep the clock happy when starting the bike where all power from the battery is diverted to the starter motor.

    To the right of that are the radiator fan and a sensor to turn it on.

    Everything up and right from here is the same as suzuki. Going down there is a sidestand switch that doesent exist on my bike.

    Down again is a bad gas plug. The one thing I wish the Suzuki could do that it doesn't.

    Left brings us to the fuel level switch. This is not a transducer, it only has a binary output: are you low on fuel? Yes or no.

    Below is the EPC, it is an emissions piece not present on USA models designed to keep europeans from having too much fun by reducing acceleration rates in lower gears.

    Left again is an overly complicated neutral switch to drive the fun-killing EPC.

    Normal horn and blinker relays above

    Left again is the temperature sensor for the display.

    And finally the clutch switch.

    In all my studying of this drawing, I find many un necessary complications but only one error. The blinker lights are crossed on the rear so if one were to religiously follow this drawing, the front left and rear right blinker would flash together and vice/versa.
    JagLite and dnrobertson like this.
  4. BergDonk

    BergDonk Old Enough to Know Better

    Joined:
    Nov 15, 2010
    Oddometer:
    10,728
    Location:
    Snowy Mountains Oz
    Goood stuff. FWIW the LHS switch block was stock on Husabergs, maybe from 2004, definitely on my 2007 FE650:

    upload_2018-2-6_10-10-51.png
    JagLite and Z50R like this.
  5. Lambo

    Lambo Been here awhile

    Joined:
    Aug 30, 2006
    Oddometer:
    730
    Location:
    Seattle
    Just lovely, nice work!



    After the hand work was done, the bucket went back on the lathe for cleanup. Both pieces got wire brushed and are complete for now.

    View attachment 1099451 [/QUOTE]
  6. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    So now it is time to winnow out the chaff.

    I am running a Suzuki engine. This means I have to run the Suzuki CDI, starter, stator, and pickup coil. The Suzuki ignition coil and regulator/rectifier fit nicely on the frame that was made for them so they stay too. Throttle position sensors stay with the carb: Suzuki carb, Suzuki TPS.

    KTM parts that port over to the new bike unmolested include the multifunction speedometer, speed sensor, front brake switch, trip master switch, GPS plug, blinkers, tail/plate/brake lights, fuse box, key switch, capacitor, radiator fan/switch, fuel sensor, blinker relay, and starter relay.

    The rear brake switch is aftermarket from the dualsporterizing of the DRZ and stays.

    Handlebar switches are the previously mentioned and modified Leonelli switch and a push button for a start switch.

    Headlight is the previously shown KC gravity light.

    Both the Suzuki and KTM neutral switch options are garbage. I will make my own and add that feature back but probably not until next winter when I do the kick starter kit.

    I (foolishly) sold the KTM engine temperature sensor with the junk engine. That is probably going to cost me most of the money I made to replace it. I need to take apart the engine to drill and tap it for the sensor so it probably won't get done until I am dealing with neutral and the Kicker next year.


    Being cut out of this mess are:

    The daytime running light (KC advertises the light as including a DRL but it does not as far as I can tell)

    the tachometer is too large for a bike with no dashboard.

    I don't need a lit or motorized roadbook

    No nanny crap on this bike so clutch, aux start relay, and side stand switches are trash. The Diodes and octane switch are unnecessary once all of that and the KTM CDI are gone.

    There never was an EPC so that can come off the drawing.


    I chose to keep the KTM drawing format. Colored schematics are easier to read on a computer but in the real world where schematics are used, black and white are better. Working by flashlight, after the schematic got wet, off copies so the original doesn't get damaged etc...

    I also adjusted component locations to reduce the number of times that wires crossed each other and to straighten the wire paths as much as possible for ledgability.

    440.jpg

    This is not the final revision. I will continue to touch this up as I find complications and errors (one is smacking me in the face as I post this). I also intend to change wiring colors. This will be a "black is ground" bike.

    Some things to note:

    The bike has been called a fakTM by my wife and KaTaZooki by my friends but I am going with the rather plain "440 Adventure"

    I added a ledgend to help me remember that Black is not BK as it should be but BL... that may change.

    I added switch position diagrams to make troubleshooting easier.

    The circuits have been designed such that pulling all but the middle fuse will allow a skeleton circuit to run the bike. All lights run on the left fuse, all aux circuits on the second from the left. The right fuse is for battery and second from right runs the clock and GPS which are powered even with the key out; it saves me 5 minutes of trying to find satellites everytime we have to stop and wait for someone.

    If you are reading this and see something, please "check my math" and tell me about it before I have to redo the job. I still have a lot of small stuff that gets done before I cut and lay wire.
  7. Cycleholic2010

    Cycleholic2010 Adventurer

    Joined:
    May 31, 2014
    Oddometer:
    37
    Make sure the locktite mods have been done to the drz motor. Nothing worse than realizing the fly wheel bolts have backed out into the stator and caused catostrophic failure in the middle of no where. Biggest drz flaw. Loving the build by the way! Been silently watching.
    Z50R likes this.
  8. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    So now that a road map has been made, the theory is if I follow the map, I should arrive at my destination. Step one as far as following the electrical schematic goes is get each of the components on the schematic mounted where they belong on the bike. I can't (or at least shouldn't) lay wires until I know how long I want them and how I want to route them.

    I have been trying to work on the bike every chance I get but life has been busy lately. I grabbed some more relatively low hanging fruit today. The KTM had a radiator fan and my kind of riding (both Boston city traffic and tight single track) tend to keep that fan in regular use. The DRZ400e so far as I know doesn't have a straight forward aftermarket fan. I decided the KTM fan I have is good for this application if I can mount it. The trigger for the fan is a thermo switch that screws into the bottom of the KTM radiator. I am not willing to try to tap the DRZ radiator because there is no where near enough metal to hold it for rough use.

    Looking at the cooling hose arrangement, the right radiator feeds the water-pump out the bottom, coolant is forced up through the cylinder jacket, and it is fed into the top of the left radiator. There are two crossover hoses top and bottom to complete the circuit. I decided to make a bung with hose barbs to inject into the lower crossover to mount my thermoswitch.

    IMG_0831.JPG

    I hacked off a piece 1" by 1 1/4" by 3", trued it up and placed it in the lathe such that the 1" by 3" face was facing the tailstock. I cut the aluminum leaving a 1/4" bung sticking proud of a 1" by 3" bar.

    IMG_0833.JPG

    I tapped the bung at m18x1.5 then turned 3/4" hose barbs in both ends of the bar. The remaining cube in the center was cleaned up a bit for weight savings and prettiness.

    IMG_0837.JPG

    With the sensor installed, there is no obstruction to the flow

    IMG_0838.JPG
  9. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    The lower hose removed shows the obvious mounting spot.

    IMG_0839.JPG

    And installed on the bike

    IMG_0840.JPG

    IMG_0841.JPG
    sasho, JagLite, scot_douglas and 3 others like this.
  10. Lesharoturbo

    Lesharoturbo Nerdly Adventurer

    Joined:
    Mar 23, 2009
    Oddometer:
    2,931
    Location:
    Austin TX
    Beautiful work and a cool solution!

    Keep it up!
  11. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Moar Content!

    The other day I found a pre-rolled ring for my headlight. Amazon sells rings for practicing Wing Chun Kung Fu. They just happened to be the correct material rolled into the correct diameter ring for less money than I could buy the material for!

    I stopped at the hardwear store for the opportunity to pour more money into this project and acquired a bunch of stuff.

    IMG_0843.JPG

    I also bought an adapter to mount a grinder disk on some kind of metric mandrel.

    IMG_0845.JPG

    Unfortunantly the hardwear store didn't get the memo that I am combining metric and standard crap and I'd need spacers that are metric on the inside and standard on the outside so I made my own.

    IMG_0844.JPG

    These spacers allow the headlight to be rubber mounted without crushing the grommets.

    Next step is to drill and tap the top of the mounting ring for a 5/8" by 11 screw. Another custom washer and the grinder adapter is loc-tited into the ring. The adapter is used so that aiming the headlight repeatedly won't wear out the aluminum threads. I chose the adapter because
    1, it is cheap at $5
    2, it had metric internal threads
    And
    3, I had a 5/8 by 11 tap.

    IMG_0847.JPG
  12. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Next the two pivot points were drilled and tapped for the m8 bolts. I drilled these through the retaining ring as well as the bucket. This allows the light to pivot closer to the focal point and also serves as a retainer to keep the ring from unscrewing without the use of loctite. I get an additional bonus of being able to use the bolts for a grab handle to loosen or tighten the ring.

    IMG_0848.JPG

    A pair of tabs are cut from 1/2" by 1" rectangular tubing and welded to the ring.

    IMG_0849.JPG

    And now the ring can be bolted to the light.

    IMG_0850.JPG

    The aiming screw is a bit tricky. It doesn't simply slide, it rotates through it's path. To make a slot capable of handling the stress of this job long term I decided to use both walls of the 1/2" by 1" rectangular tubing. To get the tubing to bend and follow the aiming screw's path, I started by cutting a series of slits in the tubing.

    IMG_0851.JPG
    JagLite and larryboy like this.
  13. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    The tubing was bent such that the slots closed

    IMG_0852.JPG

    And after a "that looks about right" the slots were welded shut.

    IMG_0853.JPG

    Much grinding ensued and the result is a tube that has a rather precise bend in it.

    IMG_0854.JPG

    An end cap was made out of a piece of scrap and a slot cut in.

    IMG_0855.JPG
    JagLite, larryboy and BergDonk like this.
  14. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    And after cleanup, welding, and more cleanup, I have a headlight in a ring that can be aimed up or down.

    IMG_0856.JPG

    The day isn't ever long enough. I had to call it quits here.
  15. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    I put headlight asside for now. I intend to catch the fender mount on the bottom triple clamp and move the ignition key to use those holes on the top triple clamp. Both require me to disassemble the front end. I need to change fork seals too but am not in the mood to do all of that yet.

    I made a list of all the components on my electrical schematic, crossed out each of the items that were already on the bike and copied the items not crossed out to a new list.

    IMG_0896.JPG

    The key switch is actually on the bike but it has to be moved so it is on the list too.

    Looking over my list the lowest hanging fruit might as well be on the ground. The tripmaster switch is literally a single bolt that is already on the bike. I pulled the top front brake pinch bolt, installed the tripmaster and crossed it off the list. So easy it isn't worth a picture.

    GPS and speedometer need the headlight farther along so skip all three of those.

    Neutral switch requires a case split to address and at least the oil drained to look at the situation.

    Temp sensor... maybe I can address that! I bought a new sensor because I sold the old one with the old engine. I was happy to learn it is a $30 part rather than a $100 part. It hurts to be stupid but it hurt a little less.

    The purpose of the temperature sensor is to display combustion chamber temperature. The engine heat comes from exploding gasoline and soaks into all other parts from that starting point. It would be difficult and prohibitively expensive to have a sensor in the chamber with explosions. KTM put their sensor in the water jacket around the piston just under the intake.

    When I bought my DRZ, it came with the 440 bore installed and the stock 400 bore in a box. I tried unloading the stock bore a few times but like everything that has been slow to sell, it usually turns out I needed it all along. I was able to use the stock bore to determine that Suzuki did not leave me enough space to install my sensor like KTM did.

    Google searching what everyone else has done finds mods similar to my radiator fan switch but commonly just before the water pump. This is acceptable for a fan switch (if not a bit exposed) but is problematic for a display temperature. The entire point of the temp sensor is to give me advanced warning that the water pump has failed or run dry and my cylinder is cooking. If I were to use that spot, a failed waterpump would give the false indication that everything is peachy.

    The other common solution is the Vapor style spark plug thermocouple ring. I am against this kind of device. On a lawnmower they'd be fine. On this moto, the spark plug is down a deep hole and usually full of shit. The only time a spark plug needs to be pulled in this modern era is after a bike has sucked water and the piston is at risk of hydrolocking. I don't want to deal with temp sensors while making gysers from my spark plug hole. Additionally, the KTM speedometer is setup to use the KTM sensor. If I pick a different sensor, I have to play games adjusting the resistance signal sent to the display. Not fun.

    So where to put the sensor? I decided the closest I could get to the waterjacket was the output elbow.

    IMG_0895.JPG

    The stock unit is an injection molded potmetal part. Very thin walls and not receptive to welding or solder. I am trying to steer clear of JB Weld type solutions. The easy answer? Make a new one that does what I want it to.

    I started with a piece of the 2" by 1 1/4" bar. I cut the output hose nipple first so that hole could act as a depth stop for the input hole. Since I didn't want to ruin the nipple with the 4-jaw, I turned a plug to spread the load around while it is clampped in place.

    IMG_0886.JPG

    IMG_0885.JPG
    larryboy and BergDonk like this.
  16. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Warning: The methods and tools you are about to witness are both unconventional and unprofessional.

    After I cut the intake hole I realized I had ruined a good piece of aluminum by failing to leave enough meat for an o-ring seat. I debated making a custom washer before deciding that half baked solutions lead to problems trailside and scrapping the part. Take two went the same as the first except the bar of aluminum was 1/4" longer.

    Here is the sensor test fit and layout for the mounting holes.

    IMG_0887.JPG

    Holes were drilled from the bottom and then an hour of headscratching began. The inboard screw is nearly inaccessable on the stock unit. I had to go at it from the opposite side of the bike with an open ended wrench. Probably an easy part to install on the bench but I am not pulling the engine to install this. I needed the screw seats to be about 1/4" away from the bottom of the flange and I needed access from the sides so a simple counterbore wouldn't cut it. My mill isn't an option since it is still collecting disability. My mill-on-the-lathe techniques won't work on this part since I have no way to hold it.

    I ended up drilling and counterboring on the press to give me something to aim at. I used a standard bit to get close and an auger bit to get a flat seat. You can see the tip of the auger on the left of the picture below. The rediculous stack of washers is a clamp I made for the press. The T-slots are unconventionally small so I had to weld the stud to what should be a T-nut. I figured a long stud could be shorteded with washers easier than a short stud could be extended to various lengths.

    IMG_0888.JPG

    Now's when I have to explain myself. I started working with hand tools when I was old enough to hold tools. I am not afraid of wasting my life away cutting by hand if that is what must be done. My friends call me amish because I am slow to spend money on power tools when a hand tool continues to do the job. I did buy a mill but she's a freeloader right now.

    IMG_0889.JPG

    Every time someone catches me doing metal work with wood tools I have to explain that aluminum works like a gummy hardwood. I have metal chisels too but wood chisels are more accurate and there is no need for the strength of a blunted metal chisel on aluminum unless you are taking way too big a bite.

    The aftermath:

    IMG_0890.JPG
    79thunder, larryboy and BergDonk like this.
  17. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Some time with the powersander and a wire brush has the piece looking presentable enough to be hidden behind everything in the back row if a healthy dose of mud is flung at it too.

    IMG_0891.JPG

    IMG_0892.JPG

    IMG_0893.JPG

    And of course, an on-the-bike glory shot.

    IMG_0894.JPG
    L84dinr, JagLite, larryboy and 2 others like this.
  18. xr-nut

    xr-nut Out Ridin' Around

    Joined:
    Oct 17, 2004
    Oddometer:
    110
    Location:
    who gives a crap?
    Just amazing. I think that I'm pretty decent with hand tools also, but if I was around you I'd just keep my hands in pockets!
    celger7 and more koolaid like this.
  19. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    No way, if you are in my shop, you gotta do something. At the least you can teach us your techniques for turning beer into piss but you know something I don't and I am not afraid to learn.
    CopyCat likes this.
  20. Z50R

    Z50R Not lost yet

    Joined:
    May 11, 2009
    Oddometer:
    1,537
    Location:
    Boston Mass.
    Several days off then some measurable progress.

    Lets start with the horn. I wanted it mounted more out of the way than this but there really isn't space elsewhere so here it will be.

    IMG_0910.JPG

    A simple tab with a hole:

    IMG_0911.JPG

    And there we are...

    IMG_0912.JPG
    Te Hopo and larryboy like this.