



smithinparis wrote:Hey Patrick,
I too am working on a brushless controller design. I fried my Crystalyte V1 36V 20A Start Immediate controller in some light flurries, and rather than fix it up, I decided to build a new, custom controller. I could fix the Crystalyte, I know I blew 2 FETs and one of the gate driving resistors, but rather than make an order from Digikey for those three parts, and risk blowing them again because of another fault further up the chain - I figured I'd build the controller that I actually want.
I've gotten all my parts from Digikey already, and I'm laying out the power section (I don't want to build the power section on a breadboard), and when that's done, I'll be building the actual control bit.
When the ball starts rolling, I'll get a thread going because I really want to get some opinions from the fine folks here as well.
Here is what I'm after:
1) Capable of 36 V to 72 V 35 A - for this I've choosen the IRF4310 FETs (6 for now)
2) Microprocessor controlled for easy upgrading and adding new features later on down the road - I'm basing it on a PIC 16F871. An absolutely massive PIC chip.
3) Regen capable
4) Ebrake connection (of course)
5) Current limiting
6) Thermistor heat monitoring that will throttle the controller down to limit the heating, rather than shutting down
7) Serial data out to plug into a Palm Pilot or PC, and a little serial LCD that will be located on the handle bars.
8 ) A 12V DC/DC converter and 5 V regulator combination to power the low power stuff
9) Sensored operation to start with, and will add an optional Sensorless option later
10) Completely @#$%@!@ing waterproof (sorry, I'm still a little bitter)
11) A connection to the front wheel speedometer pickup to implement a watchdog type function that will match the speed of the wheels (like antilock brakes) in the event of slippage on ice or a tumble off the bike (I've taken the spring out of my throttle, so it doesn't shut off on its own)
12) Voltage and current monitoring
13) Serial data in to allow for tweeking of some nitty gritty parameters (throttle calibration, PWM changes, current limiting changes ...)
I've already purchased all the bits and pieces to implement most of the stuff above. My goal was to keep the price under the cost of a new Crystalyte 36V 20A Start immediate controller (~$125), and I actually managed to keep it just under $100, which I'm pretty happy about.

Do some reading on the PIC18F2331-2431-4331-4431 micro, you might like these better because of the 6-8 pin power PWM output peripheral and faster ADC.
I'm using an Allegro hall sensor so far...
So far I am using a transistor/diode as first stage, with a 7805 for logic. I can't see myself using a switcher because of the cost, but might have to anyways at higher voltages.
This would be doubly important for me, because of my very particular assembly. I am still wondering were to source nice cheap aluminum cases?
Into some kind of flash or only out through serial coms?... I once thought that using cheap SD flashcards would be very neat for the sheer quantity of available logging memory! Read/wrtie libraries for this is pretty easy to find.



fechter wrote:A wide input range switching voltage regulator would be nice.
There should be temperature inputs for both the controller and the motor. Either one should start reducing the current limit when they approach the cutoff temperature.
Some kind of dynamic timing advance would be good for high rpm motors (useless on direct drive hub motors).
Optical isolation between the power stage and the control logic. When FETs blow, let's not take out any more parts than necessary. Optical isolation would make it easy to adapt different power stages.

Microbatman wrote:No hall sensors. Even if it means making a new matching hub motor. Lose the hall sensors. The RC crowd has been running BLDC motors for years without hall sensors. I still can't figure out why we need hall sensors for e bikes with todays modern software/firmware technology.
Hall sensors seem to be the weak link in the power drive chain and quite the pain to replace.
Programable low voltage cutoff
120 volt max 50amps
Downloadable data via USB to track current

Microbatman wrote:No hall sensors.

smithinparis wrote:I'm actually limited by my programmer - I does a huge number of 16Fxxx's, but only a few 18Fxxxx's.

ZapPat wrote:- Small (something like castle creations offerings)
- ABS-type reaction (to avoid possible lock-ups, specially when using large motors like X5's - Note that this may just be equivalent to seting a max regen current...)
- High-voltage cutoff user warning, and/or automatic redirection of regen current to optional load resistor, or it might be possible to implement an engine break using the FETs.
- Selectable throttle control modes: Classic (PWM duty cycle) control mode, Current control mode
- Cycle analyst connection (maybe eventually integrate an LCD with CA functions right into the controller?)
- Upgradable firmware (maybe by end user, but likely available only by sending the unit back to builder)
- Reduced torque ripple (less of a cogging "square" feel, specially when accelerating hard at low speeds and while doing strong regen)
- Sensorless operation eventually

billvon wrote:smithinparis wrote:I'm actually limited by my programmer - I does a huge number of 16Fxxx's, but only a few 18Fxxxx's.
The ICD2 supports pretty much everything Microchip makes and is pretty cheap (<$160.)


Miles wrote:Hi Patrick,
Pulse charge regeneration?
Sine wave rather than block commutation?
Toorbough ULL-Zeveigh wrote:I'll see Miles's's's sinusoidal commutation & raise him space-vector modulation.
remember, you did axe 4 ideal.

ZapPat wrote:Miles wrote:Hi Patrick,
Pulse charge regeneration?
Any documents or links about this? From a quick google search, seems like this is mostly just using pulses to charge the batteries, with maybe some small negative pulses thrown in too. I've heard of something similar before, but I haven't seen anything to prove what benefits doing this would bring. On top of this, a controller doing regen pulses the battery anyways, it's the nature of steping regulators.


Miles wrote:ZapPat wrote:Miles wrote:Hi Patrick,
Pulse charge regeneration?
Any documents or links about this? From a quick google search, seems like this is mostly just using pulses to charge the batteries, with maybe some small negative pulses thrown in too. I've heard of something similar before, but I haven't seen anything to prove what benefits doing this would bring. On top of this, a controller doing regen pulses the battery anyways, it's the nature of steping regulators.
Anything useful here: http://techno-fandom.org/~hobbit/cars/boost-hack/ ?

billvon wrote:If you make it small, put a flange on it so you can bolt it to the frame and dissipate more heat! Heat is the big problem with small.
Maybe do this like the Tidalforce did it. When you hit the brake, it ramps up regen slowly, over about a second. That lets you modulate regen by pumping the brakes, like a manual PWM. (Note that regen will never lock up a wheel, since if the wheel slows down the braking force is reduced as well.)
- High-voltage cutoff user warning, and/or automatic redirection of regen current to optional load resistor, or it might be possible to implement an engine break using the FETs.
By turning both halves of the bridge on? Yikes! Maybe a very simple power zener (i.e. zener+PNP) to do an emergency limit. You'd be limited by heat dissipated though.
Just include whatever ICP connector your chosen uP uses, and you'll cover that base for most experimenters. (And make it easier to reprogram at the factory.)
- Reduced torque ripple (less of a cogging "square" feel, specially when accelerating hard at low speeds and while doing strong regen)
You can do this via flux vector control, but that's a LOT of math for a little uP to handle. You'd probably be looking at something in the dsPIC30F series.
- Sensorless operation eventually
Do both!

Toorbough ULL-Zeveigh wrote:I'll see Miles's's's sinusoidal commutation & raise him space-vector modulation.


fechter wrote:Toorbough ULL-Zeveigh wrote:I'll see Miles's's's sinusoidal commutation & raise him space-vector modulation.
And don't forget synchronous rectification. Most of the 'cheap' controllers do not have this.

ZapPat wrote:
The only hick with synchronous rectification is that in itself it doesn't permit freewheeling, so the controller either needs to disable outputs when freewheeling is desired and/or have it actively track current cycle-by-cycle to give a net zero current flow even if actively switching all the time. For now my phase current sensing method still needs perfecting, since my present allegro hall sensor on the battery bus is inadequate for this type of fast loop response.

wrobinson0413 wrote:One is to have a good intuitive GUI that allows you to easily configure your controller to be what you want and do what you want through a generic serial port. The second suggestion would be to have datalogging capability which can be accessed through your GUI. Having a view into what is happening in your controller makes for less frustration during debugging. Have many times have you heard "I think I blew my hall sensor, how can I check it?". That is something that can easily be checked through software by showing those states in a GUI. When I look at the Chinese controllers, I find that is one thing that is lacking on them. The only GUI that I have seen for the ebikes was for the infineon controller that Knuckles was selling, and that was very primitive. I haven't looked at what the Kelly controller GUI looks like. Just imagine the diagnostic capabilities that you could have if you structured your code correctly and had visibility into all the system parameters like throttle, current, voltage, temperature, brake, halls signals, etc.
I posed a similar question about what people would like to see in a controller back when I joined this forum, and the tweakability factor was high on people's list, along with reverse voltage protection and short circuit protection. It is too bad that the cost associated with the last two items is high.
One other thing is the waterproofing. I think that will pose more of challenge for your design if you also try to keep it so that the controller is tweakable. I know that you can get soft potting that will make your controller more or less waterproof, yet still allow you to peel it off to tweak.

Users browsing this forum: bbbelanger and 18 guests