BBSHD FOC controller -Stock Housing- Open Source

Electric Motors and Controllers
rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 17 2022 11:37pm

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/Detai ... h/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:

casainho   100 GW

100 GW
Posts: 5779
Joined: Feb 14 2011 2:43pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by casainho » Jan 18 2022 3:26am

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.
- TSDZ2 and OpenSource EV display: 128x64 OLED display, easy to build as DIY, Bluetooth and ANT, OTA wireless updates, easy to repair and customize for other EVs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: OpenSource EV display, Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays.

john61ct   100 GW

100 GW
Posts: 8443
Joined: Dec 18 2018 2:06pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by john61ct » Jan 18 2022 9:48am


casainho wrote: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


rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 18 2022 1:51pm

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.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 18 2022 6:56pm

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
Area3.png (302.69 KiB) Viewed 1074 times

casainho   100 GW

100 GW
Posts: 5779
Joined: Feb 14 2011 2:43pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by casainho » Jan 19 2022 6:12am

rolocretaw wrote:
Jan 18 2022 6:56pm
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_Contr ... lectronics

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/

Image

Very simple schematic for DIY:
Image
- TSDZ2 and OpenSource EV display: 128x64 OLED display, easy to build as DIY, Bluetooth and ANT, OTA wireless updates, easy to repair and customize for other EVs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: OpenSource EV display, Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 19 2022 10:11am

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:

casainho   100 GW

100 GW
Posts: 5779
Joined: Feb 14 2011 2:43pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by casainho » Jan 19 2022 10:41am

rolocretaw wrote:
Jan 19 2022 10:11am
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:

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.
- TSDZ2 and OpenSource EV display: 128x64 OLED display, easy to build as DIY, Bluetooth and ANT, OTA wireless updates, easy to repair and customize for other EVs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: OpenSource EV display, Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 19 2022 3:21pm

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
heat pad.png (134.61 KiB) Viewed 1018 times

john61ct   100 GW

100 GW
Posts: 8443
Joined: Dec 18 2018 2:06pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by john61ct » Jan 19 2022 3:59pm

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

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 19 2022 5:54pm

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?

casainho   100 GW

100 GW
Posts: 5779
Joined: Feb 14 2011 2:43pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by casainho » Jan 19 2022 6:03pm

rolocretaw wrote:
Jan 19 2022 5:54pm
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-Smar ... its/master
- TSDZ2 and OpenSource EV display: 128x64 OLED display, easy to build as DIY, Bluetooth and ANT, OTA wireless updates, easy to repair and customize for other EVs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: OpenSource EV display, Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Jan 20 2022 4:09pm

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.

User avatar
tomjasz   10 GW

10 GW
Posts: 4663
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by tomjasz » Feb 07 2022 8:07am

rolocretaw wrote:
Jan 20 2022 4:09pm
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.
Thanks Justin_le we're here thanks to you. All the best to the mods for their tireless work keeping it on an even keel.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 11 2022 9:28pm

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.
Last edited by rolocretaw on Feb 11 2022 9:47pm, edited 1 time in total.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 11 2022 9:39pm

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.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 20 2022 5:30pm

Looking for suggestions on in stock 100v ~50A mosfets? Kind of a long shot now-a-days but thought id ask.

Woly   10 mW

10 mW
Posts: 32
Joined: Nov 16 2020 10:32pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by Woly » Feb 20 2022 5:57pm

rolocretaw wrote:
Feb 20 2022 5:30pm
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

User avatar
tomjasz   10 GW

10 GW
Posts: 4663
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by tomjasz » Feb 21 2022 12:19pm

rolocretaw wrote:
Feb 11 2022 9:39pm
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.
Thanks Justin_le we're here thanks to you. All the best to the mods for their tireless work keeping it on an even keel.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 1:52pm

demo.png
demo.png (31.36 KiB) Viewed 426 times
Im making some progress
demo.png
demo.png (78.18 KiB) Viewed 426 times
demo.png
demo.png (70.62 KiB) Viewed 426 times

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 1:57pm

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

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 1:58pm

tomjasz wrote:
Feb 21 2022 12:19pm
rolocretaw wrote:
Feb 11 2022 9:39pm
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!

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 2:00pm

Woly wrote:
Feb 20 2022 5:57pm
rolocretaw wrote:
Feb 20 2022 5:30pm
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
Those look pretty darn sweet too. And the current.. :)

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 3:34pm

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.

rolocretaw   10 mW

10 mW
Posts: 21
Joined: Jan 17 2022 7:30pm

Re: BBSHD FOC controller -Stock Housing- Open Source

Post by rolocretaw » Feb 28 2022 4:09pm

demo.png
demo.png (35.95 KiB) Viewed 409 times
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?

Post Reply