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.

Ookay, part 2 of "dumpster e-bike", getting the motor running.

First, make sure you have the wheel the right way around. That's probably power cable on the right hand side. A hub motor has a clutch inside and only motorises one way.

Invert the bike, then hook up the three motor wires to the motor, connect the 5-wire hall sensor plug if you have one, and then join the "self learning" wire. Connect the battery and the wheel should turn slowly. Give it ten seconds or so, then power down.

Disconnect the "self learn" wires, and add a throttle. Reconnect the battery. Give the throttle a gentle turn (I've used a potentiometer for initial testing as then I don't have to fight against a spring). The motor should turn.

Spin your pedals and observe the back wheel. If the front wheel is turning the wrong way, swap any two of the motor wires and it should go the other way. Try another two wires if not.

Arguably, your bike is now rideable. But don't.

Things left to do are

* Mount the battery securely
* Mount the motor controller securely in a weatherproof cover (you can buy zip-up pouches for this purpose)
* Fit some brake cut-out switches
* Look through all the other wires on the motor controller and see if any of them look like fun.
* Maybe fit a speedometer.

Here's the motor running. Super quiet, the ventilation fan in the roof is louder.

This is my "daily driver" e-bike. Purchased for $200 as "battery does not charge", the battery was fine, but the controller was blown. The bike is so old it was clearly designed for lead batteries, the the lithium battery only fills one third of the otherwise empty battery. box. I ripped off all the plastic fairings, and sourced a new controller and throttle as a set. I fitted an anti-theft handlebar basket (should be a pink one for maximum effectiveness) and it just goes.

Electronics: https://s.click.aliexpress.com/e/_c2QulvH3 or https://www.aliexpress.com/item/1005008500641642.html
Waterproof cover for electronics: https://www.aliexpress.com/item/1005005475025309.html

Junkyard e-bike build part three: I have dozens of these 12-volt lithium batteries which were previously lightly used in solar lighting installations. I used three of them to test-run the 36 volt e-bike motor yesterday. Two of them fit nicely on the cargo rack, but that would only be 24 volt. So I am going to cut up two of these 12v 50Ah¹ 3S15P batteries (three banks of cells, each bank 15 cells in parallel), and use the 90 individual cells to make a 10S8P battery (36 volt, 25 Ah) that fits the rack space neatly and also has a modern smart battery management system with bluetooth connectivity.

The existing battery management boards in these batteries appear to be simple "overcurrent protection and rebalancing" modules, I'll be discarding those.

¹ All labeled battery capacity figures are lies unless proven otherwise.

Junkyard e-Bike build part 4: Reconfiguring a salvaged battery. Lithium batteries can be scary. The "negative" terminal is the flat end, and the entire outside of the case. The positive terminal is the small circle on the top. DO NOT USE METAL PRY TOOLS. It is easy to pierce the thin shrink-wrap coating of the cells and connect positive to negative. Do this and you will get sparks and/or fire. Explosion is unlikely due to the nature of cylindrical cells. Use a plastic or wooden spudger to open up space between the battery and any nickel bus-strips you need to cut.

Here I am using bamboo tweezers to allow me to safely (ish) cut the nickel strip.

The shrink wrap cracked during separation (again done with a non-conductive spudger) so these cells will need to be re-wrapped. At this point I am thinking that recycling these batteries is too much work for someone who doesn't already have all the safety wrapping materials to hand.

You can buy new or refurbished cells with intact safety coatings; for example from recyclers like Substation 33 in brisbane, and various local e-bay sellers.

For recycled cells, the welded nickel strip can be removed by grasping the loose end with some needle-nose jewelers pliers and winding the strip around the pliers.

Junkyard e-bike build part 5: switched to ceramic scissors for cutting the nickel. Used a heat gun to soften the adhesive on the barley paper to remove it. Inspected the cells, removed strip from any that are not well attached, started replacing missing insulation.
@Unixbigot you can also purchase ceramic-bladed cutters for a few dollars
@jpm oshit i have some. changing.
@Unixbigot Lithium batteries freak me the fuck out
@Unixbigot there are no cutters, only Zuul

@Unixbigot it isn't crazy to setup to do the dissassembly somewhere that if a cell goes POOF it is less disasterous.

Even if that means you do it in a park with a metal bucket of sand (maybe from the sand pit) next to you.

If that is the plan, do remember to think of how the seperate cells will be transported home for reassembly (which has less but no zero chance of POOF, so still think about doing it somewhere flames and smoke matter less)

@Unixbigot should one cell going POOF burn your house down? No.

But it can if you do enough things wrong.

@Unixbigot yeaaaah, not that I thought I was cut out for recycling lithium batteries, but if I ever did have that thought, you are certainly disabusing me of it here... this is mildly terrifying.

@aud it is definitely an “advanced technique”. Buying new is recommended, but pay attention only to the cell count, the capacity ratings from sellers are hilarious lies!

This looks like an ok battery pack close to what i’m making: https://s.click.aliexpress.com/e/_mOwa18N or https://www.aliexpress.com/item/1005009025710902.html

LIKEKALA 10S6P 36 V 68000 mAh wiederaufladbarer 18650 Li-Ionen-Akku mit hoher Kapazität, integriertes BMS, geeignet für Elektroroller-Akku - AliExpress 44

Smarter Shopping, Better Living! Aliexpress.com

aliexpress.
@Unixbigot youvcould propably even get more range with some drop-in #LiFePO4 cells designed to replace lead-acid batteries...
@kkarhan yeah when the battery that came with this bike expires I'll build a bigger pack that fills the whole box. It comfortably gets me to work and back on a single charge for now. Today I've been testing a boost regulator to charge my 36v battery from a 100W solar panel.

@Unixbigot makes sense.

@Unixbigot wait, but so you have room in the box for a flux capacitor!
@Unixbigot the giant old looking battery also makes people assume the bike isn't worth much. That helps it not get stolen.
@Unixbigot that's a thing of beauty. I love it how you made it your own!

@Unixbigot Pink Antitheft bicycle baskets remind me if my pink anti-forgetfulness Ethernet cable.

People in factories are always SO helpful in making sure it doesn't get left, any other cables would just get pocketed for their own use...

@Unixbigot I'm curious why you didn't stuff the battery box full of Lithium batteries for amazing range. :)
@szakib i’m still using the battery that came with the bike. When time comes to replace it, that’s exactly what i’ll do.

@Unixbigot @szakib

...raining on this parade slightly, what about safety / control parts for speeds people want ebikes to do and loads people want to carry?

Yes, upcycle, freecycle, build! Also consider physics and that these bikes are often originally made by someone smashing through as many as possible for [insanely low wage] per day...

@adamsteer @szakib Safety and speed concerns will be better-met-than-store-bought. As for quality, see one of my alt-texts "This is probably what bicycle snobs call a BSO a Bicycle-Shaped-Object meaning it came from a variety store and is of indifferent quality.". I am developing the thesis "start with the simplest thing that could possibly work, if e-biking works for you, then you can transfer your drivetrain to a better frame in time". For the acoustic bicycle I commuted on for years (and will electrify next), I went to "Bicycle Revolution" a (defunct afaik) local business that builds quality hard-wearing bicycles out of recycled classic parts; they built me a rock solid bike with new wheels and brakes on a classic frame and chainset for $350. I don't think anyone *needs* to spend $4000 up on a bicycle, electric or otherwise.

@Unixbigot @szakib

fair, just...BSOs may or may not stand up to daily driving, thay needs to be clear.

I'm not surprised bicycle revolution went under. A decade ago the parts alone for the job you described would have run close to $300. Refurbing a classic wheelset (full hub rebuild etc, without any new spokes) around half that price (in the place I worked, and we were cheap).

@Unixbigot @szakib

...I also think everyone should just get a free high quality, well designed pedal assist e bike adapted to their needs (one a professional mechanic will happily service) as an inalienable human right 🙌🏻