How Haven’t I Built One of These Yet? The Tale of Melonbike

Little do people know that back in mid-2019, I put together an e-bike to take some miles off Mikuvan when the Ol’ Vape Shop was still a few miles from my apartment (It’s now in Woburn, MA playing with all the other big companies!). This wasn’t a very publicized thing since it was purely utilitarian and consisted mostly of putting things in a box over a day or two, but I did take photos of the process. Hell, I didn’t even give it a smarmy name. It was always “the bike”. For the purposes of discussion, I’ll refer to it as the Untitled E-Bike.

It was an “F4WPEAK” 500W-class e-bike with a geared rear hub motor that I bought barely working. All I really did was swap out the integrated controller for a 350W Jasontroller hot-rodded to around 750W (yes… they’re still the same to this day), then put some used 12S drone batteries in a Pelican case (the stock 18650 brick was well past its prime). It did its job Just Fine™ and was nothing to really holler about.

When I moved, I did some mild upkeep on it including new tires and a quick lube n’ tune. It comes out regularly if I need to grab a thing or two from stores between a half to two or so miles away and don’t feel like booting up a van. It is truly the white 2016 rental-spec Dodge Grand Caravan of bikes.

You know what that means. I need the Spool Bus counterpart – something that’s abjectly ratted up and dirt-floor chop shop grade, and yet disturbingly practical. Melonscooter itself started this way with me basically appending things to a random (was it even motorized to begin with? I genuinely can’t remember) scooter frame but became my “daily driver” on campus for two and some years until it rusted in half.

Through this past decade, I have yet to put one of these C80-class “melon” motors on a bike. I’ve instructed probably dozens of people on how to, but I tended to stick with the scooters and go-karts. Yep, they’re still sold, now by more vendors than Hobbyking – for instance, Overhaul’s motors are from Alien Power and Flipsky. They’re still the “An Motor” of small DIY EVs. They offer you a solid 4-8 mechanical horsepower depending on how you feed them, and are extremely bare-bones otherwise. They’re not the best built things unless you do some aftermarket/homebrew bulletproofing. I’d liken them to the small-block Chevy V8s of random small EVs at this point. The proliferation of easy to use and robust ESCs for them (unlike 10 years ago) is probably like adding a FITech head unit onto your SBC.

Some time in June, 2022

Back in high school I used to make a somewhat regular habit of going to area flea markets (you know, before they all became shitty discount malls) usually hunting for tools and random R/C and electronic bits. At MITland there was no need for that, because I literally had access to more junk than I could possibly absorb. Then I worked at a company comprising several people who brought together all the junk they could possibly absorb. There was NO pressure to accumulate more junk.

I picked the habit back up recently, and I was stochastically wandering around at the Starlight when I saw this complete piece for sale:

I dunno what it was besides one of those chainsaw engine kit bikes, but the guy literally wanted 20 bucks for it. How could I say no to THAT? Just clearing out a side yard, apparently. Fine by me, in putting off rebuilding the 7.3 IDI in Snekvan for several months I was itching for a dumb fast-integration object anyway.

This thing has clearly sat in said yard for several years. The chain was practically rusted solid into an irregular abstract race track shape. Almost all of the socket-head hardware was corroded as well, and the tires… weren’t. It was missing a pedal, and most of the handlebar fittings as well.

At this point I haven’t gone “Full MITERS” in a very, very long time, so it was relaxing to start digging in.

I say “Chainsaw Bike” like these actually use chainsaw engines. They’re fairly specialized now and usually found between 50 and 100cc displacement, and all kinds of aftermarket accessories are available. They use a secondary drive chain that gets added to the spokes on the left hand side of the bike. While I’ve never owned and ridden one, a few had gone through MITERS when I was around.

Someone clearly had a sense of adventure and appended these studs to the fuel tank with blobs of Sugru.

The then-unnamed Melonbike was missing a lot of parts and needed even more replaced. I finally had an excuse to stop by the Bike Graveyard of Atlanta, the Sopo Bike Co-op. I heard about this place but had never Biked enough to stop by.

It’s a great place, and definitely gave me the full MITERS Bike Pile experience. From Sopo I picked up a new (used) handlebar, a use (used) shifter, some new (used) pedals, and assorted random hardware.

And so for a few days, I had An Bicycle.

I sincerely dislike the ergonomics of the cruiser-style handlebars so I got the mountain bike style straight bars. Apparently 6-speed shifters are extremely rare nowadays, so I just pressed a 7-speed into duty and have 2 gears on each end that are very…. ill-defined. I don’t give a damn.

Here’s where we go full BIG CHUCK’S GARAGE. The plan is to take an Overhaul spare drive motor, a C80/100-130kv, and mate it to a spare Chibi-Mikuvan 9 inch angle grinder drive gearbox. Yes, I still have those parts.

The CMV gearbox is 4.1:1, and it should play well with a roughly 2.5:1 chain reduction going to the rear wheel to give a ratio of about 10:1.

You might notice that at 12S (44V – more 46-47 during useful operation) and with those numbers, the top speed of this thing is something like 45 miles an hour. This is fine by me. I don’t care to gear for acceleration so much with a bike because you’ll just fall over backwards anyway, and current-gen ESCs can provide spot-on torque control.

It also has pedals, being a bike and all. Not accelerating fast enough? Well that’s your personal problem!

This is now where we start having fun. I had to somehow mount this CMV angle grinder head to the frame, which is made of a series of tubes with no right angles anywhere.

I began by making a “context model” of that part of the bike frame. This was made with calipers, tape measures, and eyeballs, so it’s far from perfect.

What it allowed me to do was pick up mounting and constraining features, such as the threaded inserts for what would be a water bottle cage or some kind of other lower accessory carrier. Besides that, I could test the viability of mounting to the bottom frame tube or the seat tube.

I’m growing a bracket now using the XY position of the gearbox axis, from its mounting nose all the way to contacting the seat tube.

The big plan here was to use the seat tube’s threaded inserts as two pin joints so I don’t need to rely all on clamping force to prevent the assembly from twisting.

Like so. The slots would allow me to adjust the final motor position up or down depending on what made more sense for the chain run.

The clamp elements for the seat tube are now being lab-grown.

With a little bit of optimization, here’s the main gearbox mounting clamp.

Pictured here is its companion clamp and a moped sprocket I found on Amazon after briefly surveying the space of shitty bike conversion kits. It’s a 22 tooth #415 plate sprocket that’s supposed to go on something that is not an angle grinder.

I bung out a prototype using a fast and dirty mostly-hollow PLA print. This was pretty much ONLY to get a visual on what to do next. I liked the positioning, so I went ahead and committed this part to the Markforged gods.

Next up was the hub for the sprocket. I was going to have to turn a plain steel plate bore into a D-flat bore for the angle grinder shaft, so this implied a small donut of steel to bridge the gap.

Using the angle grinder shaft to test fit the hub. The shaft doesn’t go all the way through – it gets stopped at a shoulder on the backside of the part which will be partially milled out to pass only the double-D flat portion.

Finished hub, test-fitted sprocket, and shaft all together for a family photo.

The reason I couldn’t just use the angle grinder nut to clamp the sprocket is for side to side clearance reasons. The shaft and sprocket would have poked out pretty far. The space constraint basically required using a flush-mounted hub.

I went ahead and cut the end of the angle grinder shaft off and threaded the end for a 5/16-18 retaining bolt.

The part was then set up on the Benchmaster, Master of Benches, and the D-profile milled out. I just used a 1/2″ endmill and went back and forth to expand the bore along the diameter of the D-shaft.

Finished sprocket and hub, ready to weld!

I finished off the retaining washer using the only 1″ diameter piece of steel I had: a chunk of keyed shaft. More awkward than it has to be, but I didn’t have another little steel bar handy.

The torque in this system is ESC-limited, and going through a larger diameter than usual, so I just put eight tack welds around the hub and called it good.

Here’s how the whole retainment setup looks. I was going to trade the hex-head bolt for a flat head one at some point in the future.

The next challenge is to convert the Chibi Mikuvan gearbox input shaft to one that would work with the C80. I made that 12mm shaft a hollow collet to be clamped onto an 8mm shaft but for this application it would need to join with another 12mm shaft directly.

I decided to machine off the split collet portion and extend the shaft with another solid region. I can then use a keyed coupler or something else that attaches to the extension. So the gear stump was first section off the input shaft…

…and then I took a random chunk of used C80 shaft, turned the concave alignment feature in it, and lined them up with some pressure from the tailstock. The big plan was to weld these two halves together as deep as I could (The chamfers on at the seam were made much deeper after this photo, by the way)

There is only 1 240V outlet in the garage, and Limewelder was stretched to the limit on both ends to try and get to Tinylathe.

It worked, though! I emitted steel in a few small increments and rotated the whole assembly by hand a few times to get full coverage.

After turning the region to clean it up, you can barely tell there was a seam here.

Except, you know, for the differently colored areas of metal…. from the likely different alloys used between the C80 shaft and the CMV shaft. I never took intro to metallurgy, see. The less you know…

The coupler is a 1″ aluminum round turned to the correct length, then bored out and keyed for 12mm shafts with a 3mm keyway.

It was going to be keyed only to accept the motor shaft. The “fixed end” as I called it, which was attached to the gear, was to receive a pin joint with a dowel pin. This involved setting things up on Benchmaster, Master of Benches. Then centering and drilling the indicated diameter through the whole thing, in order to use a 1/8″ dowel pin.

After the second attempt, here we are.

I missed the first shot.

By a lot, apparently.

This will be buried under aluminum. nobody will know the shame

Crosspin installed! This “fixed end” shaft is ready to reinstall.

The shaft has now been reunited with the gearbox. It’s a little wobbly because of the single bearing, but that’s why the motor shaft will be on the other side. The plan is to assemble the motor mount plate a little loosely, run the motor to let the system find its preferred barycenter, and then tighten everything down.

(If the grinder had a double bearing setup at the input, I’d just run a spider coupling or other flexible coupling, but alas, it does need the external support.)

With the gearbox assembly finished enough for a test fit, I was able to run the new #415 chain and get a feel for where to move the tensioner. The chain tensioner these kits come with is very rudimentary, and is just a wide flanged plastic roller. The bearings on this one are pretty disintegrated, so I’d need to remake it anyway. This was when I decided to get extra.

This is a Sprocket Churro. It’s a regular ol’ sprocket tooth model that has had the tooth profiles removed, such that only a small circular section remains at the root, and then scaled a little to match the size of the chain side plates. I could then extrude this profile out to make a wide tensioner roller that semi-actively engages the chain profile (and spins the tensioner roller) instead of dragging across it.

It’s a churro because I put an approximately 5 degree helical twist in it. Why? That tensioner bracket mounts to the rear frame tubes… which are not square with the chain. They’re about 5 or so degrees skewed with respect to the chain midplane.

So, with the angular twist, where the chain comes up from the drive sprocket and meets the roller is then going to be perpendicular with respect to the chain’s midplane.

Its sole purpose is to make me feel better – the OEM roller is completely smooth and the chain just drags across it and everyone was none the wiser.

This is the end result after trimming the Sprocket Churro stock and adding my own flanges. The inside pocket is for two regular 608 size skate bearings.

Here’s what the new modified tensioner roller looks in real life! It’s a little larger in diameter to sit lower on the bracket, and helps push the bracket forwards into undamaged metal (the previous owner(s) having somewhat crimped the section of frame tube it was mounted to before)

The motor mounting plate is another Chibi-Mikuvan spare. I made 5 of those for some reason, and this is the 2nd one being used. I had to open up the mounting holes to accept the C80 motor, and I also put in different mounting holes for the ESC…

…which is a Trampa VESC 6 that was stolen from the Overhaul crate.

Truth be told, this VESC 6 class is undersized for the motor, which can handle quite a lot more amps than it can put out on a continuous basis. Realistically, even for Overhaul, to leverage these C80 motors I need the Big Honkin’ VESC size.

That’s why I mentioned earlier that this design will be ESC-limited; even if it’s capable of ripping it to 45mph a lot quicker, the ESC won’t output the current to do so. It’ll be a smooth cruise to my untimely demise.

With the motor mounted, I noticed that the thing sticks out to the right-hand side a lot. The positioning was kind of forced by the chain alignment plane. It’s not as bad when you sit on it, but certainly something to think about.

Wiring this thing up was almost comically easy compared to Overhaul. I dug up a Hall-effect knob throttle from my stash of go-kart parts, which feeds into the multipurpose COMM port’s ADC pin. The motor Hall effect sensors needed an adapter cable to go from the JST-ZH standard R/C motor sensor cable (1.5mm pin pitch) to the JST-PH 2.0mm pitch connectors that VESC standardized on.

Initial commissioning time! I didn’t have any battery power wiring yet, so I did this on a big ol’ Soviet era lab power supply. It doesn’t need to draw a lot of current, just be of the right voltage.

The VESC commissioning is fairly straightforward nowadays with the “wizard” tools. I first used the FOC Wizard to perform the motor identification (resistance, flux linkage, indutances, etc.), and then set up the ADC port as the throttle. No changes were made to the motor tune besides upping the Min/Max motor currents all the way to 150 amps.

After digging up an XT-90 Y-harness cable from the discarded robot wiring pile, I was able to take Melonbike on its maiden voyage around the area. Overall impression? Suspiciously practical. The acceleration is brisk but gentle at the same time, as expected. Also, the old dry-rotted rim brakes do precisely N O T H I N G. To keep the thing pedaling-friendly, I disabled regenerative and idle (neutral) braking in the settings, so I don’t have regen to help this thing stop.

Having the two unused leftover batteries from Overhaul powering this was funny enough to start with, but bungee cords aren’t a long term mounting solution.

I decided to replicate the Pelican case battery enclosure that I made for the Untitled E-Bike. Except this thing doesn’t deserve a real Pelican. Straight to Harbor Freight I go! Also picked up one of the battery key switches to act as a more legitimate on-off solution.

The big key switch will be mounted on the bottom of the case (when it’s mounted in its final position) as a way to keep it weather resistant and casual idiot camouflaged.

I had a rear rack to clamp the case to again, so I freelanced some clamps out of 1/2″ bar stock aluminum. I drilled a cross hole that was the diameter of the wire which made up the rack structure, then bandsawed out the material to make two fingers. One finger is then drilled and threaded, and the other gets a clearance hole. I can then thread a screw in to clamp on whatever is in between. The case will be bolted into another drilled hole with tapped threads

Here’s the assembly in place. Because the rack structure is angled, wherever I drill the holes in the case is basically where it will end up since it can’t slide up and down. For now, I didn’t bother with a 3rd low-mounted block.

The internal wiring is fairly straigthforward. A set of 2×2 (series-paralllel) harnesses will join my four spare 6S 6.0Ah packs into a 12S, 12Ah configuration, which should provide quite a lot of range. I run a set of small cables from the pack to a charge port. Main power is derived from the other side of the battery switch, and all grounds get bolted together in one place and are continuous to each other.

I decided to make a tie rod clamp setup for the batteries. I actually made these two parts from Overhaul 2 remnants – a never-installed battery clamp plate for it and chunks cut out from the Anti-Chomp polycarbonate pauldrons that covered the drive chains.

The polycarb is more flexible than I’d like a clamp strap to be, and may be replaced with an aluminum bar in the future. It got the job done fine, however.

Here are the batteries installed and all the wiring run.

Putting everything in wire loom made it a pretty clean visual integration as well. The open connector on the battery case is for a charge cord.

And here it is, fully completed and posed in front of the derelict Citicars that I HAVE YET TO DO ANYTHING WITH BESIDES TAKE THE WHEELS OFF.

Again, disturbingly practical was an accomplished goal. This thing is quite tame at low speeds because of the controller minding the motor current – it accelerates faster than the Untitled E-Bike but not by that much, and is very pleasant.

However, hold the throttle down and the “Geared for 45 mph” very quickly reveals itself. After 6 to 7 seconds, you realize the old shitty rim brakes no longer have any effect on your speed.

The top speed I recorded on a lunch run to get tacos was 37 miles per hour. It still had more to give – I ran out of courage as well as clear roads with enough line of sight for an imminent collision to hurt slightly less.

Here’s the two of them together! Melonbike lived for about 3 weeks before I blew out the old machined taper lock on that Chibi-Mikuvan angle grinder gearbox, and then stole all of its batteries back for Overhaul. I’ll crack the gearbox open and weld that pinion on at some point.

(The yellow Citicar is in great original shape so it’s under a soft cover and a tarp. The white one marinated outside for 20 years and I will continue letting it marinate; should I get it operational, the moss and lichen paint job shall stay)

The Return of a Legend: ChibiKart Reunion Tour feat. Brushless Rage

Brushless Rage is moving along quickly! I’m really hoping now to do a limited release (to people with known loads and needs) in time for Detroit Maker Faire. I’ve been working on it more sporadically in the past month due to other… obligations? but now I see the tunnel’s end. Here’s what’s been going on with it in the past few weeks when I haven’t been hiding under a van.

So that 2-way optocoupler salad was good in concept, but it ended up being incompatible with its purpose in life: to communicate bidirectionally so I could use the servo cable as a programming cable for SimonK/BLHeli enabled bootloaders.

It seems that the protocol requires the ability to tri-state, or at least assert both high and low logic levels. The circuit I modified can only drive high (or low) and otherwise has to rely on a pullup resistor, and that might not be playing nicely with the needs of the protocol. That is something I haven’t studied in depth due to its poor documentation, so if you know the specifications for the protocol, chime in!

Either way, it was looking like the final board revision would just use a single unidirectional optocoupler for the R/C signal input, and another galvanic-coupled pin on the same line but on the microcontroller’s side of the optocoupler as a programming header.

When the optos were bypassed (….again…. sigh) I was able to use the AfroESC programming dongle to re-upload firmware and change settings at will. The first step in this process is to flash the ATMega microcontroller with a socket and use the Enable Bootloader setting in KKMulticopter. Then I can just use the USB dongle instead of breaking out the socket every time.

I prepared two units this way, and also had heat sink plates cut. These heat sinks were designed a while ago for the Half-Rage that doesn’t exist yet – it has exactly half of the spacing of the mounting holes of RageBridge! So it was a good pick for the 6-FET power board for Brushless Rage. I cut out a square of silicone pad to fit underneath. In the ‘production’ version they’d obviously be die-cut to shape.

So now I have two mini Brushless Rages. What would I ever test them on!?

 

It’s back! I reclaimed the D.P.R Chibikart from the MIT shop not long ago, since they were refreshing a lot of the space displays and I’ve been gone a full year and a half now (…). This thing was kind of the pinnacle of my design class years, it having won an Instructables contest and all, and serving as a foundation for not only my next few years of students but for about a dozen or so builds worldwide (possibly more – those are just ones who wrote home).  A lot of tricks and hacks were used on it to make things easy to build for people without machine shop access. It’s also just stupidly fun to drive, and before the MIT IDC became populated extensively, we had stupid indoor go-kart races in it.

Over the intervening 2-ish years after my EV building class finished its run and now, it had been on display in various forms, so it wasn’t operational. The batteries had been removed and the motors’ sensor boards (which were partially designed for vehicle projects like this!) were broken off.  So I was just going to rewire it from scratch to accept two Brushless mini-Rages!

I focused on mechanical restoration first, like retightening some bolts. I had to add a new chain on the right side since the old one fell off (with the sprocket) a long time ago.

The sprocket itself is also quite well used, and the set screws are no longer very tightenable without stripping. I’ll likely have to drill these out to rethread them later due to the much higher potential torque going through them now with Brushless Rage.

Battery-wise, I decided to look for a 36V solution to make sure they can operate at 10S/36V reliably. I had some older 10Ah e-bike packs which were given to me with broken BMS cards. So I just removed them and soldered output wires in place. Classic!

The output wires terminate in XT-90 connectors, which were also retrofit to the existing wiring harness.

The Brushless Rage units are mounted with not much more than some Dual-Lock patches, and.

I had to pick through two boxes of random electronics to find my last working servo tester unit. In a pinch, these can be chopped up to accept Hall Effect throttles in place of their potentiometers. The Hall throttles typically put out between 1 and 4 volts instead of a full 0 to 5 volts, so the motor controller would need a calibration ability to get the full range out of it.

As expected, the Hall throttle’s 1 to 4 (well, about 0.9 to about 4.2) volt swing puts out somewhere around 1.13 to 1.85 millisecond servo pulse lengths. I set the Brushless Rages to accept 1.2 to 1.8ms as a result.

Everything’s bundled back up now!

Riding this thing has now become very interesting. Due to its very low gearing to the ground (only 3:1), it does have a hard start, but will always do so after a cog or two. This was actually a good test of how tuned out the SimonK firmware is; the mass-to-force ratio of an EV is usually much higher than that of a robot, even the 240b Sadbot, so it’s a tougher load to get going. The power is not unlike what BurnoutChibi ended up having, but more muted; BurnoutChibi had the advantage of being able to spin the motors much faster to get some ‘free power’.

I immediately ran into the problem of blowing the set screws right off the small filed flats on the motor shafts. This thing was originally designed for maybe 500-750W of power using the e-bike controllers, not an unlimited-current dump.

Either way, some replacement set screws and Loctite enabled some “road testing”. Here’s a highlight:

Results: My Starting-and-reversing optimized SimonK is okay in an EV application but only under some circumstances.

Specifically, you need to either turn down all the braking ramp speeds and magnitudes, or remove motor braking completely. In a robot drive application, the motor braking very closely following the command input helps decelerate the load and therefore reduce the momentum the motor has to start against the other way. In an EV application, that just means you decelerate as hard as you accelerate. It COULD be okay for some things, of course. I found that Chibikart drove well if I had the BRAKE_POWER setting cranked down to 1/8th of MAX_POWER, as well as the BRAKE_SPEED (ramp-down rate of the output PWM, basically) reduced to 3.

With these settings, I could modulate the throttle pedal to give a predictable regenertive braking effect. Too fast BRAKE_SPEED or too high BRAKE_POWER and you just end up impaling yourself on the handlebar here. I could see this on a tight Power Racing Series just thundering around never touching the brake pedal/handle, but it would still be a little annoying for a scooter or electric [skate,long,mountain…]board where you’d rather coast. In that circumstance, I’d just turn MOTOR_BRAKE off and forget about regeneration anyway.

For comparision, I found that Sadbot drove the best with BRAKE_POWER = MAX_POWER and BRAKE_SPEED at 4 (BRAKE_SPEED maxed out at 8 actually tried to slow the motor so fast it tended to either lock up wheels or slip motor poles on deceleration).

 

And with that, I sat down and pounded out board rev 5:

The main difference is removing the bidirectional optocoupler, as discussd, for a normal one. That’s still a 2-channel opto; I have yet to find a single channel (4-pin) opto in a package I like, but it does make more sense to use one here. Besides that, in rerouting some of the optocoupler traces, I got suckered into giving it better analog and digital signal separation (oh, boo-hoo…).

I also finally implemented the damned LEDs. SimonK actually has LED support, for signals that indicate throttle state and motor state. About time I figure out what this thing is doing!

Overall, I think Brushless Rage is ready to be fitted on something for Detroit Maker Faire. I’m not sure right now if I’m racing anything, or going to marshal and tech-safety-Stalin. I may choose to temporaily rebody Chibi-Mikuvan for funsies, since I want to keep the CMV shell in good shape after retirement.

Well, those are just thoughts anyway. There are also other thoughts: