Hello everyone!
This is my first post here on the Level 1 forums, so I hope you all enjoy it!
I’m currently a student in my third year of Electronics Engineering Technology. As such, I have to design and build some sort of project which will count as one of my class credits. Since I bought an old used Baja Bike during the summer, I thought I would do something fun and change it to a fully electric drive-train. I’ve been working on it since mid-September. Here’s my progress thus far.
Removing the engine
Here we have what I started with. It’s a 4-stroke 97cc Baja Bike, making roughly 2.8HP. It’s got a centrifugal clutch, and has a top speed of about 49kph (30mph). It’s a pretty fun little bike. Here I’ll be removing the engine and all the other components.
There’s the old throttle (just a cable to the carburator) as well as the engine kill switch.
Now that that’s gone, to the engine!
All the fluids and such were drained before I brought it out to school with me.
There’s the centrifugal clutch, with the exhaust sitting just above it. Removing this was surprisingly simple, just 2 bolts were holding it in place on the bottom!
Taadaa! She’s out! And incredibly filthy. Afterwards I had to scrape off all the crap from the frame, and my kitchen floor lol, but eventually I got it relatively clean.
Battery Modifications
So my lithium-ion battery came in finally! It’s a 48V/20Amp-hour battery. Unfortunately, the battery cables are too small to handle the current I’ll need (10AWG, which can only handle 30A, and I need ~50A), so I’ll need to swap them out. I already ordered some 6AWG for the rest of the bike’s wiring, so I can just use that.
On top we have the battery management system, sitting on top of all the battery cells.
Here we can see all the positive ends of the battery cells. I also made a really stupid mistake, and let the negative lead just hang off the side, causing a huge ass arc which melted a section of one of the spot welds. Thankfully the battery’s still fine, but man did that scare the shit out of my girlfriend and I lol.
Here’s the exposed BMS circuit board, where I’ll have to take out the old negative leads and solder in new ones. The positive lead was rather easy, but this is quite a bit more cramped.
Eventually I finally got them. I’m aware they’re not the cleanest solders, but it was an insanely tight fit, had to file out some of the board to get them to fit, but they’re firmly attached and should be fine.
Here’s the final battery. I wrapped it in electrical tape just to protect it a bit. The third smaller cable you see is the charge port for the AC adapter.
Configuration
Here, I need to hook up my controller to the battery in order to configure it, and figure out how the hell the motor hall sensors are attached. Here’s the connector for the controller’s low voltage wiring, which I soldered and wrapped up.
Here’s the entire setup. I have the battery connected to the controller’s 48V power on pin, and ground. Then, the controller’s hall sensors are connected to the motor’s via my breadboard (which is also supplying 5V to the motor’s hall sensors), and finally the controller is hooked up to my computer through a USB to serial connector.
This is what the configuration tool looks like (excuse the bad quality, I didn’t have a screenshot, and don’t have access to my controller at the moment). Pretty simple, just put whatever settings I want to use and it works.
Hardware Mounting
Here comes the fun part. Now I need to start mounting hardware to get my prototype done on time.
Here I just screwed on the twist throttle for the motor (1-4V Hall throttle), as well as a 0-5V thumb throttle for the regenerative braking, which I plan on implementing to maximize range.
Here I start the mounting of the main components. For both the battery and the controller, I managed to get some project boxes from my professor which I’ll be using (they’re normally used for an audio amp project I put together last year). This particular one is the battery, since I wanted the heaviest components as low and as centrally mounted as possible.
Here I’m making mounting brackets for the top of the project box from some L-brackets.
Welp, looks like I overestimated how tall the frame was, so instead of cutting more L-brackets and mounting them vertically, I have to drill new holes in between them. Thankfully it’s quite sturdy, and should be more than strong enough to hold it in place.
Mounting the second project box for the controller. I somehow really lucked out, and the controller mounting holes are the same width as my frame!
It’s all mounted and set. Wait… How am I gonna get the seat back on? O_O
Well that was a struggle lol, I spent like 20 minutes trying to squeeze the seat back on, before finally caving and just dropping the box a bit so I could squeeze my hand in to mount it.
We have a motor! the motor fit perfectly, and I was even able to reuse two old mounting holes!
I also put the battery in the box, drilled holes for all the wiring, and put the back of it back on.
Here I mounted the 50A/48Vdc circuit breaker on the outside to make some more room for the other components, and it’s waterproof! Thank you random marine equipment supplier on amazon!
Finally, we have the contactor, which will be switching on and off my main battery to controller cable.
Wiring
Now that all the main hardware is mounted, I need to get to work on the wiring. First, I’m doing all the 6 gauge wiring. I’m starting with the smaller bits since I didn’t have much time on this day.
Here I drilled a hole for the battery negative wire, and connected the positive to the breaker.
Then, I connected the negative to the controller, and another short wire going from the breaker to the contactor. Now all the large wiring is done, and it’ll get a little more complicated.
Before I started, I finished the connector by adding the metal screw-on piece to protect the surprisingly fragile connectors, and I labelled all the wires to save myself some headaches later on.
Then, I soldered on some solid wires to the throttle wires so I could plug them into my smaller breadboard and hopefully get it working soon.
UGH NOOOO!! I wired everything, and most of it seems to work. The contactor switches on, and the controller turns on and shows no error codes. But the throttle doesn’t do anything. I was busy troubleshooting this for a couple hours, discovering that no current was even leaving the battery when the throttle was turned. Odd… I asked my professor for some help trying to figure this one out. We analyzed my schematics and wiring for about 40 minutes, before we discovered that the regenerative braking switch (unlike the throttle, which is necessary for it to function), is actually another type of regen input, and since I had it connected straight to ground, it was just completely blocking all current. Once we got that fixed, the motor finally made noise! But it still wasn’t moving, just making a quiet clicking noise, but I knew what to do to fix it.
Since it’s a brushless DC motor with hall sensors, there’s only 2 way of wiring it correctly, forwards and backwards. If the 3 phase wires are in any other configuration, they either will not move, only making a clicking noise, or they will run incredibly rough, turning much less smoothly than it should and hesitating at low throttle inputs. Eventually I found the right configuration, and ditched my alligator clips and soldered on the wires for the keyswitch and the coil to switch everything on.
Here’s where I’m at right now. All I need to do is drill a hole for the keyswitch, size and mount the chain, mount the breadboard, and finally put the project box cover back on and my prototype will be done!
After the prototype stage, I need to add some final touches in order for it to be finalized by March.
Since my keyswitch has an extra wire in parallel in the second position, I plan on adding a DC-DC converter to power some 12V LED lights, turn signals (for which I already designed a PCB and programmed for an arduino Nano), some rubber grommets so I don’t have to keep using electrical tape to save my wires, and of course paint it. I’m thinking a nice dark purple for the frame with black on the project boxes.
Hope you all enjoyed my build thus far, and I’ll be posting updates for it once I get back to school next week!