BBSHD FOC controller -Stock Housing- Open Source

rolocretaw

10 mW
Joined
Jan 17, 2022
Messages
21
Greetings from Colorado

So after 2 years of scouring the internet at full nerd I think I've become frustrated enough to design my own version of BBSHD controller for the STOCK HOUSING. As far as I can tell right now we are stuck with either adding extra boxes to our bike(BAC 500, Phaserunner) or hoping that we're lucky enough to score one of Luna's Controllers (If I'm wrong please tell me). I can't believe this is still the case with a platform as widely used as the BBSHD, especially when you consider that the VESC tool/projects have come sooo far. The firmware is awesome and some of the open source controllers that have been built off it are insane.

So i think with a little (ok alot lol) of tweaking I can get one of these 100v/100+amp vesc controller designs to squeeze into the lovely crescent moon bafang gave us :roll: Id love some thoughts from you guys.

So far I'm basing it off of the a200s V3 controller by Euan Mutch. Sells retail at https://teamtriforceuk.com/a200s-v3/
The project files are over on Circuit Maker https://circuitmaker.com/Projects/Details/Euan-Mutch/A200S-V3

Ive already made some decent progress on the pcb end, and can share some fun stuff really soon. Everything will be open source so im really hoping to get you guys input on this project :) I know its gunna be a challenge to actually make something usable with the IC shortages, but I'm not scared :wink:
 
It is really bad to say it will be OpenSource as that raise an alert flag, like you are trying to get help and feedback but then nothing.

Do you plan to make a similar board size as original or in someway doing some kind of DIY expansion of the case to have a bigger board?? As the original seems really tight components / miniscule.
 
casainho said:
It is really bad to say it will be OpenSource as that raise an alert flag, like you are trying to get help and feedback but then nothing
Wut?

I see FOSS as a huge plus

 
Hey there,
What do you mean an alert. to who? about what? I'm saying that I want to put the ecad files up for anyone to tinker with and improve on. If that's bad please explain.

I'm working inside the original enclosure. Yes its tight but that's the challenge. Luckily the a200s is already designed with separate power and logic boards.
 
One of the reasons I chose the a200s after endlessly looking at VESC designs is that the larger power board is right at 3400mm^2 of PCB area, while the BBSHD enclosure allows for a PCB with total area of 3643mm^2. That's including a fairly generous 1.5 mm of clearance between the enclosure walls and PCB. The stacked logic board is pretty tiny for the a200s, so that's not causing any concern as of yet. I mean I would much rather layout a design on the 3400mm rectangle, lol, but 3600mm of weird crescent miiiight work. So far I'm not having issues with IC placement or nets, but I'm not close to finished by any means.


Area3.png
 
rolocretaw said:
The stacked logic board is pretty tiny for the a200s
I am curious about BBSHD, and I am being following the OpenSource firmware for it. I am also curious for your initiative and I have a similar one, but more generic:

I started developing a motor controller, based on Xiaomi M365 EScooter. The firmware is based on EBics FOC, which is also OpenSource as VESC but much more simple, so easier to understand for developers and to maintain it.

But my idea for motor controller is to reuse the same over different devices, as ebike mid drive motors as TSDZ2 or Bafang M600, and electric scooters as the Xiaomi M365.

My plan is to have the power electronics + logic board, where this logic board can hold other board with simple electronics, to hold the specifics of each device, like M365 uses UART 1 wire for display communication and Bafang M600 uses CAN.

My idea is to develop something that will be then easy to reuse right now and in future devices. The motor controller will probably be the same for the years to come and only the logic board need to be customized.

Here: https://github.com/EBiCS/EV_Motor_Controller_Customizable_Electronics

And once you have your motor controller developed, if you want an OpenSource display, check the DIY, easy to customize, and OpenSource EV display I developed and I am being using on my EBikes with TSDZ2: https://opensourceebike.github.io/



Very simple schematic for DIY:
 
I actually glanced at that project in you signature yesterday. I've been mulling over display options as well. Nice project btw. Thanks for keeping it OpenSource too.

Man I'm so anal about hardware design, I wonder how much it would cost to get a really nice CNC case for that puppy
Also, quick question.. I've been nearsighted AF since birth, would it take much to scale up the display size? :lol:
 
rolocretaw said:
I actually glanced at that project in you signature yesterday. I've been mulling over display options as well. Nice project btw. Thanks for keeping it OpenSource too.

Man I'm so anal about hardware design, I wonder how much it would cost to get a really nice CNC case for that puppy
Also, quick question.. I've been nearsighted AF since birth, would it take much to scale up the display size? :lol:
The firmware is only for the 128x64 pixels display. Someone experienced with firmware could make it working with other big and colors displays, in fact that firmware was developed by other developer and I participated, for the 850C and 860C displays: [youtube]eDENZS4pHvo[/youtube]

This firmware was developed to be kind of generic, to be easy and quick to change the layout and also defined the colors. HEre the source code: https://github.com/OpenSourceEBike/Color_LCD

The thing is that if I was going to a bigger display, probably today I would jump to higher processing microcontroller with other high level programming language as Python. Something to make easy and fast development. The 128x64 display firmware is to be like that, to not grow more than what it is actually.
 
I also need to start designing the BMS and building a test pack to handle 72+ volts and 100+ amps. But I know if i open up another schematic I chance loosing focus on finishing the controller PCBs lol.

I have a few ideas about using a DP-9 case with an added vacuum or injected molded housing for the top to fit a more 'sizable' bms. i want the added housing to be strong and still retain the ipx4 rating of the case.

Ohh! I also have roughly drawn up a schematic to integrate a heating control circuit into the BMS for those of us who might want to stop for lunch when its below 40F. I haven't had time to do the loss calculations, but i do know I'm tired of panicking when I have my batteries in my car for a few hours etc. If its December - April where I live its darn cold. I'm at about 8000ft elevation. Id rather have the ability to use a warming system if needed. I don't want to ruin cells. The Hailong DP cases actually have a decent gap to fit a few of these (tinyurl.com/m5efp2nf) and possibly a thin aluminum plate as a sink.

They are gentle for near skin contact and only get to max 149F. 18650's shouldn't get over 140 so with a little current limiting its 'safe?' :wink: j heat pad.png
 
OTP for cells should IMO be part of a BMS base functionality.

But thermostatic control of active heating I would implement standalone, maybe as part of a well insulated case.

to swap out in warm seasons save space weight and complexity
 
Man I really love that display firmware! That was running on the 850c, but you're saying you would rather see it run on something a bit more robust?
 
rolocretaw said:
Man I really love that display firmware! That was running on the 850c, but you're saying you would rather see it run on something a bit more robust?
It was very hard to get the firmware to that point. If I would have to update the firmware, I would prefer to start from scratch and using an high level language as Python.

I am only maintaining the 128x64 OLED display firmware.

I don't like big displays as 850C/860C as they are to much big for an ebike similar to a real bicycle, where we want something small, light and discrete.

Maybe you are more on powerful Ebikes near as a motorcycle, and then yes, a big display may make sense.

Anyway, here is a fork of my firmware for 860C, this fork may be more updated:

https://github.com/emmebrusa/TSDZ2-Smart-EBike-860C/commits/master
 
Does anyone here know the most affordable way to get CNC work done?

I've seen a few web based services but nothing remotely reasonable to machine a BBSHD housing. I can generate step files or .3mf or whatever 3d file type needed to check it out.
 
rolocretaw said:
Does anyone here know the most affordable way to get CNC work done?

I've seen a few web based services but nothing remotely reasonable to machine a BBSHD housing. I can generate step files or .3mf or whatever 3d file type needed to check it out.

There are more than a few dead controllers out here. Maybe run a want to buy add? If the weight is under 13 Oz. they can be shipped for less than $5.
 
Hey so i actually figured out that pcbway.com does cnc work. Go figure. Total quote with shipping to US is 138USD. :bolt: :thumb:

Or i can get a stock empty housing from china for $26. But i dont like the standoffs inside the volume. Its a waste of board space. Are those used for anything? I can see a few pics of potted controllers where it looks like they may hold the stock pcb, but is that correct? If so then they can get removed.
 
Im thinking about rebuilding my bbshd’s once the contoller is finished. Id like to varnish the windings to fight condesation, order custom gaskets with material designed for waterproofing, fully pot the controller pcb and enclosure, and comeup witha better gasket for the wires. And install a peek plastic gear to replace the nylon.

Has anyone even seen weight reduction done on the secondary reduction gear? Its steel so its strong, but there may be better materials out there now.

Ive read that even though potted electronics should be waterproof, wires entering the material can still encounter moisture creep during temp changes. Since im trying to tackle alpine weather conditions, a complete rebuild with all the little things ES members have done to their motors would be nice.
 
Looking for suggestions on in stock 100v ~50A mosfets? Kind of a long shot now-a-days but thought id ask.
 
rolocretaw said:
Looking for suggestions on in stock 100v ~50A mosfets? Kind of a long shot now-a-days but thought id ask.

How about the MDP10N027? 100V 120A
 
rolocretaw said:
Im thinking about rebuilding my bbshd’s once the contoller is finished.

What is the build date on your BBSHD's. Early versions have weak rotor shafts and need updating.
 
So i had to completely redesign the controller housing.. Its basically reamed out to be as big as possible while maintaining stock gasket surfaces. The Ecad work is slow at best. But mostly because ive changed the schematic about 27 times to work with in stock parts. Right now the mosfet setup is.... interesting . 6 Massive IRFP4668PBF . See what you guys think. And yeah I know 200v is way overkill. Its been hard to find ICs
 
tomjasz said:
rolocretaw said:
Im thinking about rebuilding my bbshd’s once the contoller is finished.

What is the build date on your BBSHD's. Early versions have weak rotor shafts and need updating.

Version B / 2 The later version. But very good to know, thanks a bunch!
 
Also, If anyone is willing to work on this Ecad project with me, send a PM. Im in EasyEDA at the moment but have fusion360, cicuitmaker, etc.
 
demo.png
A little more. BTW im planning to make a heatsink for the the mosfets still; a round aluminum piece similar to the stock bafang method. Then Im thinking thermal tape or similar to attach the aluminum heatsink to the enclosure. Any thoughts on that?
 
Back
Top