This post shows and explains the design of the eBike I built myself. I decided to post it on this specific forum because this is where it all started, by stumbling on another post, as mentioned in my entry.
This is fantastic, well done! I love the simplicity of the kit.
I'm extremely surprised to hear that soldering the XT90s was hard. Even a $20 Pinecil (well, maybe I shouldn't say "even", it's a fantastic iron) can handle those no problem.
Also, what cost 1200 EUR? That motor costs 30 EUR, an ESC another 40, and the batteries maybe 80 EUR for Li-Ions (less weight). Were the CNCed plates that expensive?
EDIT: Added the praise I meant but realized I forgot to actually write.
A lot of people have a soldering iron chosen for working with PCB components and AWG 26 wire, where 30 watts is plenty of power output and a nice small tip is to be prized.
But if you take that perfectly good soldering iron and apply it to AWG 10 wire, you're going to have a bad time - because the wire will conduct heat away almost as fast as you can apply it.
Yeah, maybe. I have been spoiled by the TS100/Pinecil, it's the first soldering iron I've owned (besides a $5 trash iron) so I don't know how bad other (otherwise good) irons are.
I never knew about the Pinecil before this post. Thanks for that.
Personally own the TS100 and absolutely adore it for mostly building keyboards.
Yes you are absolutely spoiled by both of these. Before them were super terrible irons or the expensive brick sized ones with minimal optionality. Having come from the 'dark ages' it's night and day.
I just got a pinecil and it’s great! I have a long workbench and I mostly use the pinecil with a usbc battery because I can put that in my lap and have the power cable totally free from my work.
The debug board, which I don’t have is a great example of using usbc for development and debug (as opposed to test contacts inside the device).
It does need a version 2 though as the tip holders are not great.
Its not that people consciously choose bad soldering irons, its more of an awareness problem and flood of chinese hakko 936 clones. Nobody knows why 60 year old technology (heater behind separate tip) is bad until they meet their first ground plane on modern multilayer board.
It's great to see good builds like this - I keep saying "one of these days". In my neck of the woods we have a pretty resource in the form of GRIN[0]. I believe Justin is a longtime participant on endless-sphere.
My latest build (on a Walmart special) was a BBS02 that probably rings in around the same cost but without the openness of this build.
It is very hard to tin the cable ends well and tinning is key to soldering. I have a proper soldering iron, but no special device to only tin cables (I’m blanking on the right word).
Hmm, you don't need a device though? Hold the wire somewhere, touch the iron onto the wire and then touch the tin onto the wire as well. Wait a bit, it'll tin thoroughly, (maybe change the position of the tin to tin all sides more easily).
Yes, this is how it works on thin cables, but the ones on the ECU are very thick and very hard to tin with soldering iron. I finally managed it, but it was a fight. I’m using the TS100 pen.
Oh hmm, I see. Did you try pressing the button for a boost? I just tinned 12 AWG wire very easily, were yours much thicker? Also keep in mind that if you don't run the TS100 at 24V it'll have more difficulty keeping the temperature.
I'm an embedded hardware engineer, so I don't have much experience with wire for high-current applications, but I was surprised to see soldering as the method for the connector. Can anyone working with high-power devices chime in on if this is more common than crimping at this gauge? Maybe solder is more accessible to the hobbyist at this wire thickness?
I build RC planes/quads, where 80A currents are not uncommon, and I use XT60 with 12AWG wire. I don't know if there's a crimped XT60 connector, but all the ones I've ever seen are soldered. I don't know why you'd crimp, it seems to me that soldering would be more efficient for high currents due to the larger surface area that makes contact, but I don't have specific data one way or another.
By chance I just soldered some 10 awg wire to an xt90 connector earlier today, using a Pinecil no less. It was super annoying to get right. Few cold joints before I got it. The problem was with the stiffness of the wire I used. It made it difficult to keep in the exact right position until the solder cooled down. Would have been easier with thinner or higher quality wire though.
Hmm, were you pressing the button to get the 400C boost? With that, first you tin the wire VERY WELL, then you put some solder in the nook of the connector (fill it about half), and then you push the wire into the nook with the iron. That will melt the solder on the wire and then the connector, and it should give you a nice even connection without any over- or underflow.
Once the wire goes in, you remove the iron, hold the wire there for a second or two until the solder solidifies, and you're done. I used 12 AWG but it should be pretty close.
EDIT: I just did it again, make sure you hold both the wire and the XT90 firmly with helping hands or something similar.
Soldering heavy gauge wire is more about having thermal mass in the iron tip than high temperature. That is part of why you can buy different tips - selecting the tip with the right thermal mass will allow you to quickly get the workpiece up to temp without overheating anything nearby.
You can hack it by just turning the temperature way up, but there are a number of drawbacks to doing so. It's better to use the right tip.
From the paragraph above the photos it seems to indicate that the bike itself was part of the cost, but it's not totally clear to me.
> Being on a tight budget, I was able to procure/purchase all parts month by month and finish the build within a year. This includes all parts for the kit, as well as building the bike itself, which I did not have prior to starting the project. You can see the final build below.
* A VESC based ESC instead of the HobbyWing one will give a lot more control and telemetry, including a phone app and detailed current use logging. I know from RC planes that HobbyWing ESCs are very high quality, but VESC is specifically written for drive systems and has a lot of features.
* LiIon or LiFePO4 round cells are safer and more energy dense than LiPo pouch cells, at the expense of current sink capacity you don't need. They're also cheaper.
I've designed industrial mechanisms, but not bikes. Sometimes, over-spec'ing the motor makes sense. You don't have to feed it all 2400 W. But the bigger motor might be easier to cool, have other advantages such as more convenient mounting and the right size spindle, and so forth. Counterintuitively, below a certain size, motors start to get more expensive. And using a catalog motor avoids having to spec a custom motor in order to get everything you actually want.
The decision to select this motor was mainly driven by what is available, price, dimensions and the size of the output shaft. The gearbox would not fit anything that has an output shaft smaller than 6mm. I knew that I'm not going to need all the power and also top speed.
They're designed for planes and the prop drives significant air for cooling. You could replicate this if you wanted, but it would be really hard to draw enough power to overheat this. You'd have to be going up a long steep mountain or be going ludicrous speeds.
Not sure why you're being downvoted. Though it's not JUST about hills.
I have a 2500W Luna Cycles fat bike (52V BBSHD mid drive motor and 12 speed drivetrain). It climbs hills effortlessly. It powers through sand and snow. It's been a lifesaver on uphill technical singletrack when I've had to stop and a blip of the throttle gets me going when I wouldn't have been able to just with pedal power.
I have no idea what the top speed of the bike is and don't care. 90% of the time I'm doing under 20 mph and almost all of the remaining time I'm doing 20-30 mph. I've ridden 750W hub drive bikes and they're not even remotely comparable. This is what people who cling to the antiquated eBike class ratings and watt limits don't understand. It isn't about top speed (I think doing >35 mph on a bicycle is crazy) it's about torque application in circumstances that demand it. I'm considering upgrading it to a 72V battery and 4000W controller.
I should have added heat as well. Having a motor rated for twice what you actually use helps keep things cool and running longer. Luna Cycle is a great company BTW.
I've got a 750w and it handles hills pretty well. To the point where you don't need to actually pedal unless it's a long steep one but even then it's like pedalling on a straightaway (using pedal assist is of course is always optional).
Before I got the bike I wanted the most powerful one available but I realized after getting one you don't really need that. And it's actually kinda dangerous, even for a experienced cyclist who's used to speed.
Even the standard tier batteries are more than enough for any urban biking in terms of distance. I rarely use even 20% at 48V, 10.5A.
An average "likes to do a couple 40 mile sporty bike rides a week" cyclist probably can do around ~150-200W continuous and maybe peak for 10-15 seconds at around 750-1000w. A hill that takes 20-30 seconds to climb, less than 500W most likely. Depends on their weight and training.
Cargo e-bikes tend to be at or less than around 1kW. 750W is still considered fairly powerful, and 500W is much more typical and still plenty enough for even a cargo bike to get up a hill, with appropriate gearing. 250W is about the standard for low-end e-bikes.
2.4KW is gross overkill, especially if you're not doing direct drive. More watts just means you can go up the hill faster. This assist motor is driving the wheel through the rear derailleur so it potentially has a pretty wide range of gearing.
250W pedal-assist only is all you can (legally) get as a bicycle in Europe.
I have only one friend that can sustain 250W for hours (on a road bike), and he's a serious everyday "bicycle is the default vehicle" type.
250W is plenty for casual rides. Not judging the choice here, though, must be quite a beast ;)
To note is that these 250W are a relatively weird "continuous/average power" rating. There is lots of leeway in calculating this and peak power can be a lot higher, so a legal pedelec might easily deliver 750W while you accelerate or go uphill.
That is true, 250W-rated electric engine can supposedly make 1kW for some time without damage. But if I understand correctly, EU law prohibits the "power driver" to deliver more than 250W.
A small correction here, generally the power output of climbers is measured in W/kg, not pure Watts, because their weight heavily influences their ability to climb. I think top climbers have around 7-7.5W/Kg. Even in these conditions, the power output of that motor is orders of magnitude higher than what a human can do.
You're right about the numbers often being expressed in W/kg, because power to weight is more important than power when going uphill. For big climbs (more than half an hour or so), that number is closer to 6W/kg for the best, or maybe a little more (especially if you go back in time a bit for some reason…).
Hey there! Nice work, looks great!
I've built a few of these and the biggest concern with those motors (I've tried them before) is that they aren't made to handle the torque of even small hills. They'll burn out on mile 25. It's not the wattage that's the problem, they just start to slip and burn out unless you gear them down a lot, but then you lose a lot of their speed. Maybe I've just always bought cheap stuff. Also worried about the tension on the chain, is it adjustable?
I also had trouble with XT90 in the past. I would melt them. Proper soldiering iron fixed that.
Nice build! It's super unique!
Sure, for these absurdly powerful e-moped conversions. But even ordinary bicycle chains need to be able to handle 1000W, which is more than the vast majority of ebikes.
Nice work. I'm still clinging to my conventional bikes, but anticipate when something will eventually push me over the edge, such as old age or a long distance commute. I've been reading whatever I can learn about e-bike technology so I'm ready.
So far the simplest assist I can think of would be a front wheel hub motor and a switch that turns on a constant amount of torque. This would still let me control my speed by how hard I pedal. Of course I'm scratching my head over how I would control it, since it would probably not be an off the shelf controller. But I'm also fascinated by the electronics, and having to design my own controller would be a benefit, not a liability. I also have an obsession with knowing how things work, that I have to contend with.
Of course all of this is until I think of something better.
Yes, I have a long commute to work (18km one way) and this was my main motivation for building the bike.
On the controls side of thing, I have the ECU and an Arduino Nano. The Arduino uses the BEC port of the ECU as a voltage supply to run a simple routine translating the analog output (potentiometer) from the throttle handle to a PWM signal that the ECU can understand.
The way that the assistance work is that while you are pedaling, you can turn the throttle and adjust until you get the assistance you want - pretty simple. After a while it becomes natural.
For a controller, look at the Cycle Analyst from Grin Technologies. It is somewhat hackable, can hook up to a crank based torque sensor, or use a cadence sensor. Personally I just use a throttle that "remembers" a given setting when you hold it in a given position for a couple seconds, and throttle enough to bring me up to say 8 mph, then peddle to get to 15 or so. Basically I peddle about how hard I want to, then adjust the throttle to give me the speed I feel like going. But you can also do fully peddle-based (cadence or torque) assist to make it feel more natural (then it would be like riding with a strong wind at your back).
Torque is related to current so it’s not difficult to control, at least if you’re building your own device from procured IC parts. Hobbyist motor controllers for drones etc probably don’t often have that feature however.
So far the simplest assist I can think of would be a front wheel hub motor and a switch that turns on a constant amount of torque.
The simplest: sure. However if you're used to cycling chances are you're not going to like that front wheel hub all too much. It feels weird overall (might depend on geomerty though) and has the tendency to slip on upwards sloped unless you do an effort of getting weight over the front. For my personal taste, hub in the backwheel feels the most natural.
Excellent build, also very beautiful to look at; I hope to see a video of it in action. It's strange that the author encountered difficulties in soldering XT90 connectors; I actually never soldered more than a few of them but never had any problems; it is possible that either they were of dubious quality (far east clones with possibly sub par copper contacts?) or they weren't clean enough. Nothing that a good solder iron, as the author suggest, and good use of flux can't cope with.
For those in need of a good solder iron, avoid cheap no-name ones or Hakko 936 and similar clones and all those using the same stylus (there are at least a dozen different rebrands) because they all are bad: they indeed work with very small solder joints but will fail with bigger contacts or larger pcb tracks, although the power should allow them; the reason is always the same: too small thermal mass and bad thermal contact between the internal heater and the tip. Any used Weller WTCP will perform a lot better roughly for the same price, or check the Pinecil, which for the price performs really well and is also a 100% Open Source Risc-V platform.
About bicycles, unfortunately I'm too big for them; even if I wasn't overweight, my mass would exceed 100Kg anyway, but hope to see 3 wheeled EVs imported or produced in Europe. Someone here mentioned Arcimoto a while ago and now I'm in love with their Roadster model after seeing a video. Unfortunately, high price aside, it's US only at the moment.
> It's strange that the author encountered difficulties in soldering XT90 connectors; I actually never soldered more than a few of them but never had any problems; it is possible that either they were of dubious quality (far east clones with possibly sub par copper contacts?) or they weren't clean enough.
Or simply use too small an iron for the job. XT90 isn't the problem here, more likely it is the fact that the wire drains heat so fast that you don't get to a nice temperature.
Cool build, but it doesn't look like it would actually stand up to the typical stresses of mountain biking (rock strikes, water, mud, debris, etc). On super smooth singletrack I could see it being fun though.
I used 4mm thick, black anodized aluminum plates. I'm not a machinist and do not know the specifics of your CNC machine, but you will most probably have no problems machining these plates.
Did you try to print with nylons and carbons?
I am currently in the progress of designing a fast robust RC car. I am very pleased with the durability of it. With standard pla/abs and pet I kept getting broken suspension parts. With nylon I haven't had a single failure during testing (+100mph). You have to design your stuff with plastic in mind, but you can make strong parts for sure. No doubt metal is better for most applications, but still it is doable.
Speaking of (hobby) 3d printing and loads, why don't I see printed parts combined with extruded aluminium profiles (rectangular tubes or T-shaped), threaded steel rods and some nuts+washers more often? Those reinforcement elements are cheap as dirt and should be almost as easy to work with as legos when you can guide all the difficult connections with bespoke printed adapters. What am I missing? (I have zero experience with 3d printing, I barely get beyond kneading a pack of Sugru...)
I work in robotics and this is very common for prototyping and also common for grad student projects. Here in Japan, Misumi will machine things like that to length and add whatever features you need, or even configure an entire assembly (eg a 6 sided box) and get all the parts delivered. I don’t recall the name of similar sites in other countries but they exist.
Other easy things to get a good result is use nuts or inserts instead of threaded holes when you can, and try to keep printed plastic parts in compression, not tension.
I think not enough people use sheet metal. Doing as you described plus sheet metal to put some material on the outside of the cross section not only looks professional, it adds a lot of stiffness. And for aluminum sheet 0.5mm or 1.0mm thick you can literally cut it with a knife and straight edge, and use a couple of pieces of wood or even books to make surprisingly nice bends. For thicker or more complex parts, it’s pretty easy/cheap to make or buy a decent brake, and also pretty cheap to get parts made from sites like I described above.
I think a lot of 3D printer hobbyists turned to 3D printing once it got good enough because we don't have space or easy access to even cut things or have a stash of parts. You're right, I can get a M6 x 1200mm stainless steel rod for AUD$5. But then to cut it accurately would need a few more tools. So you kinda try and limit things to what you have. And you can do quite a few useful things with just 3D printed piece and the odd screw here and there.
Yeah, I think the thing with the more exotic filaments is that it's a more specialized used case for when you still need to retain the lightness of plastic. With something like this, the weight doesn't really matter and you want the big increase in strength or durability that you get with metal. Otherwise I find that correct design in your parts provides enough strength in most 3D printed parts to just use PLA or PETG. Nylon is quite a bit stronger but not worth the effort to try and print.
The carbon fibre nylon is worse than the plain nylon in terms of strength. Which makes sense to me. If you grind up carbon and put that into your filament why would that make it stronger? Maybe for compression forces?
I love that you focused on commodity parts. That is excellent, I really like the placement of the system. Do you intend to take it trails riding? I would just be careful of those XT connectors and be mindful that you've reduced the clearance when traversing over ledges or rocks by moving the lowest point farther forward (you'll hit it quite a bit sooner essentially).
I also love that it's internally geared, I've always felt this made way more sense for mountain bikes anyway given the weather protection. Good stuff!
It looks like it has a chainring clutch, though without a chainguard cover, you have the risk of clothing, body parts, shoelaces, etc getting sucked into the chain, yeah.
The motor sticks out uncomfortably close to the pedals and particularly on a MTB I could see a rider accidentally stepping on it...and it looks like an outrunner, so that would also be quite bad, as the foot would get launched backwards pretty violently.
This is a lot of effort compared to just bolting on a Baofang mid-drive motor. The components are also placed such that unless you have a pretty good front fender, they'll be covered in crap in no time.
The basic idea for the freewheeling chainring comes from tandem bikes, where one person should be able to pedal, while the second one doesn't do anything. I have never ridden a tandem bike, but this is where I got the idea.
There is also another detail, that you need to know, in order to understand how it all works.
Trial bikes (not trail bikes) usually have a special kind of drivetrain, where the freewheel is mounted on the crank and not the rear wheel. This allows for a very small rear wheel sprocket and extremely high gear ratios.
So to make this work, I used a trial bike crank [1] on which I'm mounting a special purpose freewheel [2]. The chainrings are mounted to the freewheel using this adapter [3].
That contraption looks a bit scary of course but it goes to show that building a e-bike is not that hard. Which is I guess why there are so many companies doing that right now.
This one is really nice though.
I live in a big city (Berlin) and e-bikes are perfect for getting around town. You see a lot of the delivery services using them. Also in a weird bit of investor inception, you see drivers of one VC funded company basically using the e-bikes or scooters of other VC-funded companies.
I would love to understand how the motor works out to adjust its component to torque so its assistive and not replacement. I guess a stage=1 is to make the throttle and the smarts are human (and its PBCK if it doesn't pick up right to conditions) and stage=2 is to move some of the smarts down the foodchain a bit.
The high-end E-Bike I rode briefly did a marvellous job of detecting road conditions and maintaining semi-constant speed. The ones I use on the street are more crude, they use pedal effort as a primary guide to intent but back off aggressively, I guess to limit risk to pedestrians. I am pretty sure off-road wouldn't want that. (not a big e-Bike rider, just fascinated)
The torque is not adjusted I any way. I really designed it in a very simple way - you turn the throttle and adjust until you get the assistance you desire. The human brain is an excellent controller and after a while you stop thinking about it.
Cowboy bikes (from Belgium) has the best assist system I’ve seen. After a minute or two it feels completely natural, to the point where you just feel like you lost your own leg strength if the power goes out. I think they recently expanded to the US, recommend trying one if you can!
There's a lot of regulations around e-bikes already, that enforce speed limits to the assist, after which it's all human power, zero assist. It is of course about safety, but it's also about dividing up the regulations between e-bikes and e-mopeds, the latter coming in so many shapes and sizes. That is also why the regulations usually specific that it must be pedal assist, not throttle controlled.
If it walks and talks like a bike, and only goes as fast as the average cyclist, it is probably a bike. But if it has a throttle and goes faster than your average cyclist, it's probably closer to a moped at which point you need a license, different kind of helmet, turn signals, registration, so on and so forth.
To clarify why I posted that, I was referring to the mention of the power cutting out suddenly on commercial e-bikes. They only do that because of the regs, and commercial mountain E-bikes do the same thing, because of the same regs. They are not limited by their technical capabilities, just the regs.
Older bikes used the circumference of the wheel and a count of rotations to calculate the speed, so people could de-limit them by changing the stored circumference constant in the eeprom. Modern e-bikes use a combination of sensors at various locations to detect motion, acceleration, pedal force and tilt angles to decide how to apply the power but I think even with those added sensors, the speed is still detected via the wheel rotation sensor.
Seems some people don't like the regulations as the parent comment got downvoted, rest assured I did not single handedly write the global regulations, and I don't like the speed limiter either.
Keep an eye on those bolts, they're right next to the shaft where shear forces are huge and from the looks of it they are only M6. You may want to use a harder grade to reduce the chances of them being sheared off.
What is the max velocity?
I sometimes see people on new fast e-bikes and it seems a bit scary. And sometimes the rider also looks a bit scared or not really in control.
I designed it for 40km/h max, but this is way too fast.
Given the KV rating of the motor and your max voltage you can calculate the max rotational speed of the motor = KV*V. From there it is just a matter of multiplying by all gear ratios along the drive train to calculate the rotational speed of the rear wheel. Knowing the circumference of the 26" wheel gives you the max speed.
This was confusing to me as well. I have a CNC router, and I, along with most readers, would probably equate these things. For all intents and purposes, CNC === CNC router, or at the very least expensive, uncommon equipment in a home shop.
I haven't bought much aluminum lately, but I used to go to Alco in San Leandro (Bay Area). Steel I get from Bay Steel, which is right next to my shop. it might be up to $.90 (?)
It's a conversion of an existing bike to be electric, right? Or did you design and build the frame, too? Either way, nice work!
I think we're about to see a lot of innovation in scooter- and bike-adjacent mobility things - I don't mean the motors, but the frames etc... eg we might see more cargo e-tricycles?
I like the friendly message from the person running the website to the author:
>Hey, congratulations. Traffic is flooding in from ycombinator to this thread and we're getting slashdotted :shock:
I just now had to upgrade the server to a huge one temporarily.
It’s just a zip tie. It only needs to support part of the weight, the moment from the kit is reacted by the frame itself, e.g. the motor pushes the kit against the frame, when it drives the chain.
Curious why there is a derailleur, but seems to be only one fixed gear at the back? Guess you trust that motor to have enough torque to not need any rear gears?
on rear suspension bikes with a changing chain length you need something to account for that change in chain length so it doesn't go floppy at certain points of the rear swingarm motion.
On a full suspension bike like this, the distance between the rear wheel and bottom bracket changes when the suspension works, so you need a way to compensate for this.
I think you did a great job designing and implementing this. However if you are in Germany unfortunately electric bikes and other personal electric vehicles with a top speed over 15 km/h (off the top of my head) need to be registered with the traffic authority and carry a license plate. It’s basically impossible to do this for DIY builds, as far as I know.
I have a home-brewed eBike here in Sydney, where the rules limit you to 200W (or 250W if it's pure pedal assist without a throttle).
Mine will pull almost 750W going uphill on a freshly charged battery.
It has a very prominent "200W" label on the outside of the battery holder.
If I rode it like an asshole, doing 45kmh on sidewalks, I doubt my "200W" label would do me any good. But I've had it eyeballed by police when they're doing their semi-regular "fine everybody without a helmet or a working bell" crackdowns on CBD commuters and have stopped me to check my bell works, and never had the power questioned.
Note that this applies on public roads/bikepaths only. You're free to ride on private property as fast as you want (and anything you want, with or without licenses).
I have no manufacturing capabilities at home. All custom parts where procured by external workshops. I designed it, so that I can order parts and put everything together at home.
They probably don't have access to a welder and so they can't weld. It looks like they have a router table and a sheet metal bender so that's what they used to make it.
Technically yes however home cnc's that are aluminum capable are so much more common than when I first started back around 2008. Taking inspiration from but not achieving the precision found here: http://oneoceankayaks.com/madvac/madvac_index.htm
also bear in mind that just 100w added to someone which is already sportive is quite sufficient for commuting. going harder would put excessive wear on bike chains that for me are already excessively thin.
now, tires and brakes. did you use bicyle grade tires that are way too soft or some ebike rated tire that are much harder ? also brake, olease check your brake, you don’t need to be electric for make the brake suffer, so that you need bigger discs, ceramic pads…
Thank you! Yes, brakes are important and I have 203mm discs front and rear.
After building this, I'm dreaming of building something very elegant - a 50W to 100W torque generator that is tiny in size and very lightweight, and it fits within the hub of the wheel. Maybe not using batteries at all, but supercapacitors the are charged when you brake and discharged when you accelerate.
I'm extremely surprised to hear that soldering the XT90s was hard. Even a $20 Pinecil (well, maybe I shouldn't say "even", it's a fantastic iron) can handle those no problem.
Also, what cost 1200 EUR? That motor costs 30 EUR, an ESC another 40, and the batteries maybe 80 EUR for Li-Ions (less weight). Were the CNCed plates that expensive?
EDIT: Added the praise I meant but realized I forgot to actually write.