Saturday, February 28, 2015

Assembling the Drive Unit

Over the last few weeks, and particularly this week of school vacation, I've put a lot of time into the bike and it's all coming together. What I'm calling the drive unit, the aluminum box to which the motor, jackshaft, pulleys, and controller mount to, is almost done. The assembly process is more complicated than I ever imagined, because each component blocks another from being installed, and so it took me a while to figure out the order to install them in. Although the CAD software helped me make sure everything actually fits, there is very little room inside for your hands to, say, tighten a screw. Tonight I needed to enlarge two of the holes with the drill press, and in order to have the drive unit sit flat, I had to almost completely disassemble it. An assembly guide like this is a good way to convey all the details that went into this design and construction, with the added benefit of being a reference for me and anyone who builds a bike based on mine to look back on. First, the end product.

To assemble the unit, you have to start with screwing the precharge button and the master switch onto the front of the box. They connect to each other with a JST-SM connector, which I use for all my signal connections, and are great except for the fact that they're not waterproof. The LED in the button is connected across the precharge resistor, so that it lights up in proportion to the current going through the power resistor. That is, it would light up when you first press it, and then fade as the controller's capacitor charges, except that I made the assumption that the button had a resistor built in for the LED, which it does not, and so it's burned out now.

Next come the bearings, which are mounted with #4 screws, instead of the #6 they were made for, to allow them to be aligned and make up for my inaccurate machining work.

After that, you install the intake fan, which blocks the switch from being removed. First you install the grill onto the output side of the fan, which keeps wires from getting in the blades, and then bolt the fan into the enclosure, with a filter to keep the dust and mud out.

The shaft goes through one bearing, you slip on the thrust bearings and shaft collars, and then you push it through the other bearing. I plan on adding wave washers to the sandwich to reduce the vibration of the thrust bearings. The shaft blocks some of the nuts on the fan, making that a pain to install or remove without removing the shaft. This is as far as I disassembled tonight, and so I should have pictures from here on down.

The negative wire gets routed between the fan and the enclosure wall, and then a piece of solid 22AWG wire is pulled through two holes in the aluminum and around the wires, keeping them in place and from touching the spinning outside of the motor. I just switched to the silicone jacketed wire from Hobbyking, and it's amazing. Extremely flexible due to it's hundreds of tiny strands, each of which is nickel plated to prevent corrosion, and the insulation is thick, similarly flexible, and rated for high temperatures. Seriously, I'm never going back to the terrible hardware store stuff again. It was surprisingly difficult to get the solder to flow through all the little strands, but the crimps came out strong.

After routing the wires, the first half of the HDPE clamps get attached, because the screws can't be inserted once the motor is in place.

Next, the motor. Can we take a moment to enjoy those beautiful copper windings?

It gets secured with a few Allen screws, which need to get replaced with flat heads and countersinked. I can't find my countersink bit, I think I have to get a new one. They're just so useful.

The brackets for the controller get attached with 4 #6 screws tapped into the box. Yes, I know the screws don't match, I didn't have enough pan heads.
Then the controller, which unfortunately covers the holes for the brackets, so removing the brackets is a two step process involving screws into the controller whose threads are barely holding. Aligning the brackets is even more of a pain.
I don't have a picture of the before, but the controller has very few of its original wires left on it. I opened it up and cut off all the wires I don't need at the circuit board, cut the power on and mode selection wires to an inch long and soldered them within the case, and replaced all the connectors on the wires I want with, from top to bottom, XT90 for the battery, 4mm gold plated bullet connectors for the motor, and JST-SM again for the throttle. The Hall Effect Sensor wires, which I don't need now but might later, were stripped of their connector, heat shrinked, and taped to the controller.

To protect the electronics from road spray, I used a 4" fence post cap to cover the bottom, with a hole in it for the wires to pass through.  I have to drill some more holes in this cap, to act as exhaust for the fan in order to route the air past the motor, and then cover them with a filter to keep the dust out. Unfortunately, there's not enough room between the top of the box and the bike's top tube to put a fence post cap on top, so I'll have to make a flat cover. The bottom cover is connected with 4 #6 screws, tapped into the aluminum. Did I mention I have come to love tapped holes? Not having to deal with nuts is amazing, particularly in situations like this where there is no way to hold them in place.
The final steps of assembling the drive unit are attaching the pulleys and sprocket. I got a #40 sprocket and chain when I should have gotten #410, so I'm waiting for the new one, and I still need to get the small pulley machined, but the large pulley attaches to the jackshaft with a a key and two set screws.
The drive unit fills the space inside the frame of the bicycle almost perfectly, and with some finagling, the other halves of the HDPE clamps fit over the screws to keep the drive unit in place. In theory, at least, because HDPE and painted aluminum are both very slick, and so I'm getting some grip tape to put over the seat tube to keep the drive unit from moving side to side.
That battery box is still precariously balanced on top of the bike rack, I'm going to bolt it down with wire rope clips. And I'm debating how to get the battery connections between the two boxes while keeping the waterproof seal on the battery box. The two options I can think of are bulkhead connectors, basically copper bolts that pass through the wall of the box that you can bolt wires to both sides, or a cord grip, basically a block of rubber with holes in it to waterproof the cables as they go through.

Although I haven't exactly been keeping to the schedule I set, the bike has been going surprisingly well. I hit a number of stumbling points where my plan didn't quite work out, but it feels almost done. I had a fun moment earlier today of sitting on the bike, gunning the throttle, and hearing the whine of the motor.

As far as what's left, there's just a few things. The big one is that I need to get the pulley machined. I also need that #410 sprocket, and a longer bottom bracket so that the chain doesn't hit the side of the drive unit. I need to secure the battery box to the bike, and then I should be able to ride it.

I'm probably going to have to build a belt tensioner, for which I have the design and the idler pulley, but I'm going to wait and see if it's necessary first. Lithium Ion batteries are probably in this bike's future, although the initial tests of the laptop cells are not looking too good. Freewheels on the crank and jackshaft would be nice, because they would allow me to motor without spinning the pedals, and pedal without spinning the motor, respectively, but like I've said about the batteries and many aspects of this project, I think I'm just going to get it working first.

I also recorded a video of me showing how to turn on the bike, and that the motor does in fact spin when I turn the throttle, but it came out shaky and the audio was poor. I'll try again tomorrow.

1 comment: