Smart EBike: Dashboard + Motor controller + Battery BMS

Electric Motors and Controllers
Post Reply
casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Smart EBike: Dashboard + Motor controller + Battery BMS

Post by casainho » Apr 02 2012 4:32pm

Smart EBike: Dashboard/color display with touchscreen + Motor controller + Battery pack BMS. Wireless communications between each three systems.

A Smart system for electric bicycles and scooters with Smart capabilities and hackable/configurable options for advanced users. It will also communicate with Smartphones using Bluetooth.

Do you want to join the efforts to test and/or develop an OpenSource Smart EBike Controller?
Please join the efforts if you value such EBike Smart Controller. Please read more on project page.

Current status
Videos and fotos registered on 24.02.2013:







Image

Image

Project page: http://www.smartebike.likesyou.org
On the project page you can find the project documentation, including videos, pictures and the source files for schematic/PCB, firmware and software.
Last edited by casainho on Feb 26 2013 7:18am, edited 41 times in total.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 03 2012 11:11am

I am now in contact with Olivier Evalet, the men behing "Bicycle Manager" project:

Image

Links to the project:
- http://olivier.gelux.ch
- https://github.com/evaletolab/bicyclelab-manager

Who wants to join us?
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
bigmoose   100 MW

100 MW
Posts: 2653
Joined: Aug 06 2009 3:05pm
Location: North coast USA
Contact:

Re: OpenSource Smart Controller -- let's make it

Post by bigmoose » Apr 03 2012 11:17am

"Open Source" is very vague. Please clarify if this work, and all derived works will fall under

Post licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License

http://creativecommons.org/licenses/by-nc-nd/3.0/
"Live simply. Love generously. Care deeply. Speak kindly. Leave the rest to God..." all the best, Dave

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 03 2012 11:30am

bigmoose wrote:"Open Source" is very vague. Please clarify if this work, and all derived works will fall under

Post licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License

http://creativecommons.org/licenses/by-nc-nd/3.0/
It is to early to talk about licenses, there is nothing done yet by me. I would use GPL or something like that. Example of Bicycle Manager Project: https://github.com/evaletolab/bicyclela ... master/GPL

Arduino board and Makerbot as a kind of projects reference, which are OpenSource, commercial and professional.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Lebowski   1 GW

1 GW
Posts: 3199
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: OpenSource Smart Controller -- let's make it

Post by Lebowski » Apr 03 2012 11:36am

OK, let's say I have knowledge of a controller that blows everything away, good, solid, simple, fast
etc etc, the thing we're all dreaming about. Why would I make it open source ? I'm a capitalist :mrgreen:
and open source doesn't sound like any money....

User avatar
shock   1 kW

1 kW
Posts: 454
Joined: Oct 18 2011 8:52pm
Location: Motor City
Contact:

Re: OpenSource Smart Controller -- let's make it

Post by shock » Apr 03 2012 12:28pm

Open source is for the greater good. You can still make money, but your platform remains well documented, and remains open to changes, so the next guy who adds to the functionality can charge for his improved product, but must share the changes and keep them open. Really it's a win-win.
High Voltage

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 03 2012 6:28pm

Lebowski wrote:OK, let's say I have knowledge of a controller that blows everything away, good, solid, simple, fast
etc etc, the thing we're all dreaming about. Why would I make it open source ? I'm a capitalist :mrgreen:
and open source doesn't sound like any money....
The cost on a project like this is on development and after on production.

For development and testing, we are a community and we can work together in an "OpenSource way". The cost is low since the tools are really cheap or free and OpenSource: Arduino electronics are cheap and firmware is free, PCBs are cheap, software CADs are free and OpenSource for schematic and board, free and Opensource Android software IDE, etc.
We also have many free tools to work and communicate together like this forum and github for hosting the sources.

For production, again, the cost is cheap due to the use of OpenSource and cheap electronics like Arduino and China electronics. Most ICs today are really cheap and also the PCBs. I would say a board for a controller must not be over $50 in components for 10 units.
For production, we can get funding with Crowdfunding like others projects that got +$500K in KickStarter. There must be a project manager for this, can be someone to work in a professional way. Or a company can work on the production and selling of the controller.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 03 2012 6:36pm

Three phase BLDC motor driver IC
Olivier told me about TMC603 BLDC motor driver controller (link to Farnell online shop, 7,18€ unity price). Does anyone knows about other driver more DIY friendly??
Image
"The TMC603 is a three phase BLDC motor driver IC for highly compact and energy efficient drive solutions. Control algorithms previously only found in much more complex servo drives can now be realized with a minimum of external components. The TMC603 directly drives 6 external N-channel MOSFETs for motor currents up to 30A and up to 50V. It integrates current measurement without the need for high current sense resistors, and the sensorless commutation circuitry hallFX™. Its integrated support for sine commutation as well as for back EMF sensing and commutation saves cost and allows for maximum drive efficiency. Depending on the desired commutation scheme and the bus interface requirements, the TMC603 forms a complete motor driver system in combination with an external 8 bit processor or with a more powerful 32 bit processor. Protection and diagnostic features as well as a step down switching regulator further reduce system cost and increase reliability."
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Kingfish   10 GW

10 GW
Posts: 4064
Joined: Feb 03 2010 11:23am
Location: Redmond, WA-USA, Earth, Sol, Orion–Cygnus Arm, Milky Way. Age: > yesterday < tomorrow
Contact:

Re: OpenSource Smart Controller -- let's make it

Post by Kingfish » Apr 04 2012 12:23pm

We've been down this road before.

Project: Building the Best Controller

Why start all over when we can just pick up from where we left off?
~KF
* My 2WD Garden Wall
* Kinaye MotorSports
* Primary ride: 2WD Disc 9C 2806-equiv / Dual Lyen 12FET / 20S7P LiPo.
* Epics: Going to California: 2011 8)
* 50-mph, 101, 10k-Club. 12,527 miles-to-date, 7037 as 2WD.

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed.
The hands acquire shakes, the shakes become a warning.
It is by caffeine alone I set my mind in motion.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 04 2012 5:11pm

Kingfish wrote:We've been down this road before.

Project: Building the Best Controller

Why start all over when we can just pick up from where we left off?
~KF
Thank you Kingfish.

I will take much time to read all the messages :-) -- could you please tell me why the project stopped? What did failed?

The project seems TO MUCH complex...
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
cal3thousand   1.21 GW

1.21 GW
Posts: 3552
Joined: Mar 26 2012 4:47pm
Location: California

Re: OpenSource Smart Controller -- let's make it

Post by cal3thousand » Apr 04 2012 5:41pm

Interesting.
Get a Cycle Analyst and a Multimeter, you're still a noob if you don't have at least one of each.

Planning on posting questions or buying anything on this site? Put up your country (at minimum) on your profile. This is a worldwide forum and we haven't reached clairvoyance.

User avatar
Kingfish   10 GW

10 GW
Posts: 4064
Joined: Feb 03 2010 11:23am
Location: Redmond, WA-USA, Earth, Sol, Orion–Cygnus Arm, Milky Way. Age: > yesterday < tomorrow
Contact:

Re: OpenSource Smart Controller -- let's make it

Post by Kingfish » Apr 04 2012 7:30pm

Well… we all have ideas to contribute and wish to be heard, plus we have our own goals. One could say there were too many cooks in the kitchen, or that the objectives are too broad, or that finding the talent to get us to the end-game is challenging, or that there are parallel & more mature endeavors with a tighter focus closer at hand… Any of these could be true, or none at all; it depends upon your point of view.

The tough nuts to resolve are how to manage more than one drive; do we have one mcu with lots of slaves for x-number of driven motors? The part that I did like was how we separate the p/s from the mcu from the drivers section: Make it modular so that any pioneering individual with modest ambition can cobble together a good solution far more quickly. But then this is all vaporware; we never finished because we – as a forum of kindred individuals – are also confederates, and it is really difficult to rally around common points for an initial prototype.

In other words, Chinese controllers are cheap, and this is suitably more complex, completely custom, and vastly difficult for one, or even many to pull off. In the hiatus there have been some great developments by other contributing members. I think in terms of hardware, we’re mostly in agreement; the challenge is around the mcu and programming tools.

I am happy to jump back in with what I know and keep notes up to date. For that matter, I need to anyway at some point because I suspect I will need a sino solution for the motors I am crafting.

Anyway – I’m glad this effort piques your interest!

Cheers! KF :wink:
* My 2WD Garden Wall
* Kinaye MotorSports
* Primary ride: 2WD Disc 9C 2806-equiv / Dual Lyen 12FET / 20S7P LiPo.
* Epics: Going to California: 2011 8)
* 50-mph, 101, 10k-Club. 12,527 miles-to-date, 7037 as 2WD.

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed.
The hands acquire shakes, the shakes become a warning.
It is by caffeine alone I set my mind in motion.

Njay   10 kW

10 kW
Posts: 836
Joined: Sep 09 2010 10:43am
Location: Portugal

Re: OpenSource Smart Controller -- let's make it

Post by Njay » Apr 04 2012 8:02pm

I don't know what you do for a living Kingfish, but I take the opportunity to say that you seem very good at project management in, at least, most of its aspects :). I've never seen someone on a forum with such skills so well delineated.

And so that I won't be so off-topic, It seems to be that what's really driving you casainho is the smartphone control possibility. In that case, why not design the "wireless Cycle Analyst" with no screen and with throttle control. Seems enough to do everything you listed.

User avatar
Kingfish   10 GW

10 GW
Posts: 4064
Joined: Feb 03 2010 11:23am
Location: Redmond, WA-USA, Earth, Sol, Orion–Cygnus Arm, Milky Way. Age: > yesterday < tomorrow
Contact:

Re: OpenSource Smart Controller -- let's make it

Post by Kingfish » Apr 04 2012 8:23pm

Njay wrote:I don't know what you do for a living Kingfish, but I take the opportunity to say that you seem very good at project management in, at least, most of its aspects :). I've never seen someone on a forum with such skills so well delineated.
Thank you for the compliment: I thought it was a bit obvious that I am an engineering consultant :)


Prosit! KF
* My 2WD Garden Wall
* Kinaye MotorSports
* Primary ride: 2WD Disc 9C 2806-equiv / Dual Lyen 12FET / 20S7P LiPo.
* Epics: Going to California: 2011 8)
* 50-mph, 101, 10k-Club. 12,527 miles-to-date, 7037 as 2WD.

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed.
The hands acquire shakes, the shakes become a warning.
It is by caffeine alone I set my mind in motion.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 05 2012 3:53am

Kingfish wrote: (...) or that the objectives are too broad, or that finding the talent to get us to the end-game is challenging, (...)
That project seems to be about a SUPER controller! I think is a bad strategy to start building such a BIG and DIFFICULT device.

I must say I don't have much free time and in past I were in projects to big that never concluded, so, now I try to do only "quick and dirty" projects, taken advantage of other OpenSource projects. My last project is an example of that, the Smart bathroom scale was quick to build and cheap. I used OpenSource software for Android, OpenSource firmware for the ARM and cheap and available electronic boards. The scale works perfectly!!

I also must say I would be frustrated if I work in a project and it don't conclude. I am happy to build system that are useful for me and other people, not the other way.
I have a problem of over weight, that's why I build the Smart Scale. The bicycle is also important for me because I am motivated to use it (I use all days a no electric bicycle to go to work, shop, etc) and it helps me to get fit, healthy. All these years using a bicycle gave me a lot of value, and I will continue to use bicycle, so, I can invest that I will continue to win.
This is my motivation.

Also, I am building my 3rd electric bicycle and I am having difficult to find a cheap controller with low current. I am using BMSBattery components and the controller I used last years was KU63 24V 12A and now the next one in line is KU93 22Ah. I need a controller were I can configure the current/power, for safety while I ride and to optimize the battery size/weight/cost since I need to do 66km with a battery charge.
Kingfish wrote:I think in terms of hardware, we’re mostly in agreement; the challenge is around the mcu and programming tools.
I can help with:
- Arduino/AVR firmware. ARM7/9, ARM Cortex firmware. I prefer ARM Cortex because the OpenSource tools I use are more productive (GCC + GDB debugger + JTAG + Eclipse IDE). I am using this cheap board, 32bits ARM7 @ 50MHz $10.
I have a JTAG debugger for ARM7/9 and ARM Cortex.

- I can prototype a circuit, by soldering it on a PCB but I don't have experience in design of a PCB and buy it. But in past I used KiCAD for design of schematics and PCB.

- I have cheap Chinese 2 channels 50MHz oscilloscope. Solder iron an bench power supply of 30V 10A.

- I have a spare 24V 250W front hub motor (Cute-85), 24V 25Ah Lion battery and KU63 controller, throttle and brakes. I would use this system to test the Smart Controller.

- I buy components from Farnel online.

- I can do a little programming in Java, mainly on Android. I can adapt others applications and I know very well how to communicate with Bluetooth and Android and show data on the screen, also take input from the touchscreen/buttons.

- I use Github for collaborative working on projects. And I am a Linux and Android user.

- In past I worked on this OpenSource projects:
-- Pedal Power Meter -- a king of Cycle Analyst??
-- Bicycle LED POV
-- Smart bathroom scale
-- Rockbox / Lyre project, Open Source portable audio player
-- R2C2 RepRap 3D Printers and CNC controller -- from my company.

I will read the Open-BLDC project, looks like it is the only working project (even if not tailored for electric bicycles).
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: OpenSource Smart Controller -- let's make it

Post by casainho » Apr 06 2012 7:40am

I were looking at Open-BLDC schematic and some Application Notes from Atmel and NXP. Seems that we need from the ucontroller:
- 6 PWM channels (2 for each phase) to drive mosfets --> drive each phase
- 4 ADC inputs
-- 3 for measure a voltage related to current of each phase
-- 1 for throttle signal input
- 4 Digital inputs
-- 3 for read each zero cross of each phase, for sensorless function
-- 1 for brake grip signal
- Serial RX/TX - for Bluetooth communications/debug

Seems that Arduino is enough for this. Would be great if we could produce a Arduino shield to make this project which I call "EBike Smart Controller".

Olivier prefers to use AVR/Arduino. Arduino seems to be a natural selection. I will go with Arduino and I am sure I can prototype by hand a shield for it.

Firmware may be a bit complex... I would love to get help and testing from others.
For Android smartphone I can make some simple application, to show the velocity, current and voltage of the motor. I want to be able to setup the controller maximum current on the Android application.

Hardware for this project is nothing complex (thanks also to Open-BLDC project), but as I see, I will need to setup a testing bench with the Cute-85 24V 250W motor, variable power supply 30V 10A and oscilloscope. Something like on this video:


For now I will build the testing bench and record with oscilloscope the actual wave signals of the motor using the original KU63 controller.
I will also buy 2 Arduinos and 2 Bluetooth serial modules from Dealextreme.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 06 2012 1:24pm

I found a link on Open-BLDC site to another OpenSource project: BLDC HV Controller (also OpenSource, sure). Looks like Open-BLDC project uses the same hardware (mosfets, current measure, etc) as this project. But BLDC HV Controller uses ATmega8 ucontroller, which is almost the same as the one on Arduino :-)

BLDC HV Controller -- is very well documented!! Now this project is my reference and not the Open-BLDC.

I took some images with my cheap oscilloscope, of my Cute-85 24V 250W motor, controlled by KU63 and using 24V lab power supply. The motor didn't had any load:
Image

Image

Image

Image

Image

Throttle at maximum/motor at full speed:
Image

Please see all the 32 images here.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 07 2012 12:00pm

My workbench:
Image

While looking at LM339 (quad comparator) signals on my KU63 controller:
Image

KU63 have one LM339 (quad comparator) and on 3 comparators there is a signal that I believe to be related to BEMF.
It also have 6 mosfets, 2 for each phase. Since each phase have one must have 2 switch/mosfet, one to connect the phase to GND and the other VCC, each mosfet holds the 12A.
Image

HEY!! I just found a site with a schematic and much more info about KU63 controller!! :-)

And here I video showing 1 phase and later 2 phases, on oscilloscope:


Images of the 3 BEMF signals of LM339:
Image

Image

Image
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
avandalen   10 W

10 W
Posts: 90
Joined: Oct 02 2010 10:40am
Location: Maastricht, The Netherlands
Contact:

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by avandalen » Apr 07 2012 4:51pm

Hi Jorge,

The KU63 costs only about $15 and is not bad, it is small and light and gets hardly warm under load. Building a motor controller is pretty much work, it must have a lot of meaningful extra opportunities, otherwise it makes less sense.

-The following extras would be very welcome:
-Sine wave output (created by PWM) to increase motor efficiency, without adding significant weight and costs.
-Maybe a simple kind of sinus would be better, to overcome the extra motor losses due to the higher frequency that is required to create a sinus.
-Pedelec Legalisation Device built in.
-Anti-spark circuit built in.
-Speed switch input.
-SMPS for the internal supply voltages (12V and 5V).
-Output for speed, current, voltage, etc. has already been mentioned.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 07 2012 5:04pm

avandalen wrote:Hi Jorge,

The KU63 costs only about $15 and is not bad, it is small and light and gets hardly warm under load. Building a motor controller is pretty much work, it must have a lot of meaningful extra opportunities, otherwise it makes less sense.
You are correct. From now on, I see 2 options: or hack the cheap KU63 or build my own.
avandalen wrote: -The following extras would be very welcome:
-Sine wave output (created by PWM) to increase motor efficiency, without adding significant weight and costs.
-Maybe a simple kind of sinus would be better, to overcome the extra motor losses due to the higher frequency that is required to create a sinus.
What are the required hardware for that? is the same switchs/mosfets but high speed ucontroller?
avandalen wrote: -Pedelec Legalisation Device built in.
Easy to implement, I think. Just firmware.
avandalen wrote: -Anti-spark circuit built in.
I saw in your site, thank you for sharing.
avandalen wrote: -Speed switch input.
-SMPS for the internal supply voltages (12V and 5V).
-Output for speed, current, voltage, etc. has already been mentioned.
Relative easy things.

avandalen, thank you for sharing KU63 schematic!! Could you please compare the BEMF with the Open-BLDC BEMF circuit? Which circuit have most advantages?

Don't you want to help to build this Smart Controller?
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
avandalen   10 W

10 W
Posts: 90
Joined: Oct 02 2010 10:40am
Location: Maastricht, The Netherlands
Contact:

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by avandalen » Apr 08 2012 11:53am

avandalen wrote: What are the required hardware for that? is the same switchs/mosfets but high speed ucontroller?
Yes that is true.
avandalen wrote: Could you please compare the BEMF with the Open-BLDC BEMF circuit? Which circuit have most advantages?
I dont see serious differents.
BEMF has a SMPS for the 12V, that is fine.
Open-BLDC BEMF has no 36V input?

It is easy to take the back emf detection from the KU63.

avandalen wrote: Don't you want to help to build this Smart Controller?
I have no time now, the solar bike must be finished first.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 08 2012 4:30pm

avandalen wrote:
avandalen wrote: What are the required hardware for that? is the same switchs/mosfets but high speed ucontroller?
Yes that is true.
I am using on a project the LPC175x ARM Cortex-M3 @ 100MHz. It should work, I believe. But for now, I wish I could do the same as KU63 and AVR/Arduino should be enough.
avandalen wrote:
avandalen wrote: Could you please compare the BEMF with the Open-BLDC BEMF circuit? Which circuit have most advantages?
I dont see serious differents.
BEMF has a SMPS for the 12V, that is fine.
Open-BLDC BEMF has no 36V input?
Open-BLDC BEMF circuit (hardware V0.3) seems simple but I can't understand how it works. I need to read more about "star voltage" and maybe build the circuit and test it.
avandalen wrote:
avandalen wrote: Don't you want to help to build this Smart Controller?
I have no time now, the solar bike must be finished first.
Ok, good luck with your solar bike project.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 22 2012 5:26pm

I bought 2 new KU63 controllers, so, I will have soon 3 KU63 controllers. I plan to exchange the microcontroller of the KU63 controller and use a small board with LPC2103 ARM 32bits @ 50MHz.

I can't yet understand how to put KU63 BEMF circuit working and so the first thing I would like to do is running the motor without feedback from BEMF, as on this video from Open-BLDC:
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Alan B   100 GW

100 GW
Posts: 7492
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by Alan B » Apr 22 2012 5:58pm

I reviewed the Atmel AVR processors some time back, and the one most suitable for this type of application is the ATmega32M1. It has a Power Stage Controller in the chip that has the proper PWM setup and other hardware to support BLDC control, as well as some special hardware to facilitate rapid fault detection and shutdown. This CPU is very similar to the Arduino processor so it should be straightforward to make an Arduino loader for it.

If fancier controls are desired review the ARM processors and look for those that have BLDC motor hardware. However this raises the complexity (and the capability) a lot. Some of the PIC processors have good motor controls too, but the free tools are not as good.

Probably the best approach would be to make an Arduino MEGA shield that had the motor controller CPU, leave the Arduino MEGA to do the housekeeping and user interface (run a graphics display to handle CA type functions), and dedicate a shield with whatever processor to do the actual motor controls. Make it so two of them can be stacked on for dual drives (use I2C or similar for the communications).

casainho   100 MW

100 MW
Posts: 2799
Joined: Feb 14 2011 2:43pm

Re: EBike Smart Controller (OpenSource) -- let's make it

Post by casainho » Apr 22 2012 6:11pm

Alan B wrote:I reviewed the Atmel AVR processors some time back, and the one most suitable for this type of application is the ATmega32M1. It has a Power Stage Controller in the chip that has the proper PWM setup and other hardware to support BLDC control, as well as some special hardware to facilitate rapid fault detection and shutdown. This CPU is very similar to the Arduino processor so it should be straightforward to make an Arduino loader for it.
What I don't like on AVR is the lack of OpenSource debugger. I prefer ARM because I use the JTAG and GNU Debugger. Open-BLDC uses ARM STM32. Looking at the inputs and outputs of KU63 schematic, seems to me that any simple microcontrooler with (or even without) PWM and ADC will work.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Post Reply