Let's make an #e-bike out of garbage. You will need.

* One dumpster bike (free)
* One cargo rack (free)
* One hub motor (dumpster dived, but about $200 new)
* One motor controller (about $20-$50 new)
* A battery (recycled, but about $100 new)

I'm going to rewire some used 12v lithium batteries to make a 36v battery with a smart battery management system (monitor charge from your phone).

I started by installing the front wheel, installing the cargo rack, mocking up where I'll mount the battery, controller and throttle.

Next I'll wire the key components, get the wheel turning, then look at which of the other wires need to be connected. (Some brake cutoffs, pedal sensor, maybe a key lock to see if a wild @alice appears).

This happens to be a folding bike, because that's what was at the front of the bike pile.

@Unixbigot you should use your awesome e-bike powers to develop a way to charge the batteries over USB-C! It would greatly increase the range of all existing e-bikes and make me personally very happy.
@danielquinn I could totally make you a usb-c bike charger out of parts i have on hand. It’s gonna take 8-10 hours to charge your bike tho. (The difficult we do immediately, violating the laws of physics takes a little longer).

@Unixbigot assume for a moment that I know nothing about electricity (this isn't too far from the truth). Where does this limitation come from, and how might we reduce that from 8-10 down to around 6?

I mean, my laptop has a 110W USB-C power supply. Isn't that good enough?

@danielquinn USB-C chargers are often 65w, 100W or 140W. I presumed 100W. My bike battery is 36volts with an advertised¹ capacity of 30Ampere-Hours. Assuming a perfectly spherical electron, thats 1080 watt-hours so at 100W it would take 10.8 hours to charge from dead flat. But you never run it dead flat voltage regulators are only maybe 90% efficient and there is always heat loss, so 6-10 hours is a ball park figure for an end of trip charge. Not impossible over USB.

¹ lies