Home Brew Controller, what would it take ?

fitek said:
The software works, but I'm still working out the connections to the MOSFETs. I tried driving them directly. That didn't work. So I bought IR2101s, but I am still having a problem because the "logic" inputs on the IR2101 take 10v-20v as input. The ATMEGA88 runs at 5V. I'm not sure how to boost the 5v to get another 5 to 15v.

The IR2101 will take care of boosting the high side gates above pack voltage. There might be a different gate driver chip designed for a 5v input. There are some inverter chips that could be used to boost the 5v outputs, or you could use a pair of transistors. I suppose there's an optocoupler that would do it too. You really need to drive the gates with around 10-15v.
 
fitek said:
So I bought IR2101s, but I am still having a problem because the "logic" inputs on the IR2101 take 10v-20v as input. The ATMEGA88 runs at 5V.

The IR2101 is spec'd at:

Logic "low" in - under .8 volts
Logic "high" in - over 3.0 volts

The Atmel part should have no problem driving that. If you are using an open collector output you may need a 1K pullup to 5 volts.
 
billvon said:
fitek said:
So I bought IR2101s, but I am still having a problem because the "logic" inputs on the IR2101 take 10v-20v as input. The ATMEGA88 runs at 5V.

The IR2101 is spec'd at:

Logic "low" in - under .8 volts
Logic "high" in - over 3.0 volts

The Atmel part should have no problem driving that. If you are using an open collector output you may need a 1K pullup to 5 volts.

Hmm, I printed out the recommend operation ranges from the datasheet.

Vin (logic) is 0 to Vcc.

Vcc is 10 to 20V.

I'm attaching my schematic to this post. Go Powerpoint...

I ordered several other IRF parts to see if they change anything. IRS2001PBF-ND, and IR2011. The latter boasts "CMOS Schmitt-triggered inputs with pull down." Hmm, don't know what that is :)
 

Attachments

  • power circuit.jpg
    power circuit.jpg
    32 KB · Views: 748
Well men, this is a very interesting discussion. I'm not an engineer so much of it goes over my pea brain. But I am a RC hobbyist and have two ebikes so I can almost follow.

I just got one of Justin's (ebike.ca) newest controllers for my 5304 26". It has 72V 50A with IRFB4110 mosfets and plugs into my Cycle Analyist which can lower my max amps to 40.

QUESTION -- 1) Does this controller reduce the need that this thread is aimed at? "what would it take to build an indestructible Home-brew Controller? " Is this new one the robust controller we've been wanting?

2) One of these posts says BEMF is hard on controllers. Is this true? Will BEMF affect me running this controller with a 5304 and riding down long hills? Is there any way to route BEMF to regen? Do we need "phase inversion" for regen? (PS I don't need an explanation about the inefficiencies of regen as I know the 12% return stats but I use regen a hundred times a day in my Prius and my Tidalforce and appreciate the braking. The modest recharge has gotten me home more than once too)

3) What is the difference between "dynamic braking" and regen?

I haven't hooked the 5304 to 72v yet, but soon. It's running well on 36v at the moment.

Thanks a million for any info/answers -- exciting stuff -- cutting edge! We're designing the future -- someone's got to do it! How did the Wright Bros do it without the internet?!?
 
Nimbuzz said:
Thanks a million for any info/answers -- exciting stuff -- cutting edge! We're designing the future -- someone's got to do it! How did the Wright Bros do it without the internet?!?

Forget the internet-- what about with no duct tape?
 
fitek said:
Hmm, I printed out the recommend operation ranges from the datasheet.

Vin (logic) is 0 to Vcc.

Vcc is 10 to 20V.

Right. That just means that it won't damage the IC to apply those voltages, but you do not need them to make the part work.

From the datasheet:

"The logic input is compatible with standard CMOS or LSTTL output, down to 3.3V logic."

Also in the spec area:

Vih Logic "1" Input Voltage - minimum 3 volts (this means it will recognize anything over 3 volts as a 1)

Vil Logic “0â€￾ input voltage - maximum 0.8 volts (this means it will recognize anything under 0.8 volts as a 0)


The latter boasts "CMOS Schmitt-triggered inputs with pull down." Hmm, don't know what that is :)

A Schmitt trigger has hysteresis. So if you have a signal that's hovering in the illegal region (between .8 and 3.0 volts) it won't behave badly; it will "snap" to either a 1 or a 0, and stay there until the voltage changes significantly. It's a way of dealing with analog (or noisy) signals coming into a digital part.

The pulldown part means that if you leave it unconnected it gets pulled to a 0. (A good thing with this part!)
 
billvon said:
fitek said:
So I bought IR2101s, but I am still having a problem because the "logic" inputs on the IR2101 take 10v-20v as input. The ATMEGA88 runs at 5V.


The Atmel part should have no problem driving that. If you are using an open collector output you may need a 1K pullup to 5 volts.

I have no pull up resistor on the AVR. It goes straight to the IR2101. What's a open collector? I suppose I should look on wikipedia..
 
Nimbuzz said:
QUESTION -- 1) Does this controller reduce the need that this thread is aimed at? "what would it take to build an indestructible Home-brew Controller? " Is this new one the robust controller we've been wanting?

2) One of these posts says BEMF is hard on controllers. Is this true? Will BEMF affect me running this controller with a 5304 and riding down long hills? Is there any way to route BEMF to regen? Do we need "phase inversion" for regen? (PS I don't need an explanation about the inefficiencies of regen as I know the 12% return stats but I use regen a hundred times a day in my Prius and my Tidalforce and appreciate the braking. The modest recharge has gotten me home more than once too)

3) What is the difference between "dynamic braking" and regen?

1) sort of. So far, other than the guy that hooked one up to the batteries backward, I don't think anyone has blown a 4110 controller. The design still leaves a lot to be desired though.

2) I don't think so. The BEMF won't do anything until you're going faster than the no-load speed of the motor. Even then, it won't put any more stress on the components than acceleraton does.

3) Regen puts the energy back into the batteries. Dynamic braking dumps the energy into a big resistor or dissipates it in the motor windings (wastes it).

billvon said:
I have no pull up resistor on the AVR. It goes straight to the IR2101. What's a open collector? I suppose I should look on wikipedia..

An open collector output means it can only pull a voltage down. It's like a switch to ground. It cannot supply a voltage. With an open collector, you need a pull-up resistor to generate a logic high.
 
fetcher wrote:

" The design still leaves a lot to be desired though. ...."

What would you add ?

It has the tie in for the cycle analyst, adjustable current, cruse control, throttle, brake inhibit, reverse...

Other than lots of Battery monitoring which the cycle analyst provides, what would you add ?

More voltage, more current ?

If the ebikes controller is as good as it looks, I may put my project on hold....
 
The 4110's have enough voltage and current for me :twisted:

A true torque servo mode would be nice. I'd use that all the time.

No reason you can't add regen, all the power transistors are there already. Regen could be disabled for those that don't want to use it. I'd go for a regen that is current limited, adjustable, and only comes on when it gets a signal from the brake lever.

Why not sensorless? Perhaps that's pushing things, but it seems possible in theory to make a sensorless controller that starts from a dead stop nicely. It would sure make hooking up motors a lot easier.

Real time fault detection and safety circuits; have a shunt for each phase and watch all of them at high speed to kill the output in the event of a fault. I call this "fault tolerant" design. If hall signals get out of sequence or timing, it should detect this and disable the defective phase. I want a red light to come on instead of a smoke signal from a FET.

Built in diagnostics; heck, even if they added 3 little leds that indicated the hall signals (this would not cost much to add), it would save tons of time down the road if you had a problem. With a microprocessor, it could keep track of all the hall signals, voltages and currents to actually tell you which part or connection screwed up in the event of a fault.

OK, a perfect controller is beyond my abilities and might cost more than I would want to pay, so perhaps only some of the features would be implemented.
 
Fetcher & Others -- 1) Can regen be added to my controller or must it be a custom build and yes the type of regen you describe = adjustable charge rate and brake lever activated.

2) Justin had this new controller (72V 50A with IRFB4110 mosfets and plugs into a Cycle Analyst)configured by Crystalyte to his specs. I am going to alert him to this thread in case he isn't aware of it because there may be some wisdom here that he might like for future models. So put in any other ideas you geniuses might have.

Thanks,
 
fechter said:
A true torque servo mode would be nice. I'd use that all the time.

I second that motion! Really, nearly all the hardware for a "torque mode" throttle is already in the controller. I'd love it if this was offered as an option. (well... the current shunt is in the wrong location, but constant input power is a good approximation of the constant motor current an exact "torque mode" would require)

fechter said:
Why not sensorless? Perhaps that's pushing things, but it seems possible in theory to make a sensorless controller that starts from a dead stop nicely. It would sure make hooking up motors a lot easier.

Sadly, no sensorless controller will work at zero speed. A sensorless controller uses the back emf voltage of each phase to calculate the position of the rotor. To generate any back emf the rotor needs to be spinning. So dead stop = no rotor position info = poor starting. With improved components a sensorless controller can reduce the speed that it "cuts in", but it'll never be zero.

@Nimbuzz: To the extent of my understanding adding regen requires driving the drive transistors in a different way. So adding regen to an existing controller would be rather hard. (see a clear description of PWM theory, and specifically how to do regenerative brakes. More generally this technique is called synchronous rectification. What the former material describes also generalizes to a 3-phase system like a brushless motor controller)

Marty
 
From my ancient perspective (My EE training was 25 years ago) adding some fault indicators would be easy... a mater of a LED (or several) and a latching circuit at a minimum. Not too bad... some of the IR drivers already have it with a programmable reset timer...

The current detection per phase might be tough, and expensive... in my research once I got below .01-ohms the selection got very limited and expensive for what I was getting. Yes there are .001 resistor shunts, but they are expensive ($5 each) and take up lots of real-estate (probably more valuable)

In my attempt to build a "Robust Homebrew Controller" I broke the deign into 3-sections, and worked outside in..

Inputs was easy...
Hall Effect, Throttle, Brake, reverse, 60/120 and cruse.... (might want a feed through to a second controller for 2-wheel drive quads/trike config)

Output was Harder, but well defined...
IR4110's at a MINIMUM....
50+Amps Minimum
72 Volts Minimum
Adjustable Current detection on a pulse by pulse basis
Schottky bypass's
HEAVY HEAVY traces to limit board resistance
Design for the Current (50A's) which calls for 6-8ga connectors and wires.
Protection, Protection, Protection....

The Middle is where the decisions get hard...

Many people make good dedicated, pre-done controller chips., but they don't offer modification options.

The PIC (or micro CPU) is more flexible, but the software "scares" some away. The Cost of the PIC is ABOUT the same as the dedicated controller, but the cost of the programming board and learning curve is HIGH.

If we look at what people want (Poll Anyone ?) and then build up a matrix, maybe we CAN design a better controller that doesn't cost THAT much more, but is really a better controller.

My personal FIRST desire is for an indestructible controller that will shutdown rather than self destruct...


Bob

PS... Don't forget about connectors & Cables... "Locking" connectors invite damage (and shorts) when they get pulled... Anderson, IDC, and other such connectors will pull apart with causing damage... No wimpy power wires either IN or Out. If we are worried about .004 Ohms in the Mosfets, shouldn't we be wanting 8ga-6ga wires as at least an OPTION?
 
lawsonuw said:
I second that motion! Really, nearly all the hardware for a "torque mode" throttle is already in the controller. I'd love it if this was offered as an option. (well... the current shunt is in the wrong location, but constant input power is a good approximation of the constant motor current an exact "torque mode" would require)



Sadly, no sensorless controller will work at zero speed. A sensorless controller uses the back emf voltage of each phase to calculate the position of the rotor. To generate any back emf the rotor needs to be spinning. So dead stop = no rotor position info = poor starting. With improved components a sensorless controller can reduce the speed that it "cuts in", but it'll never be zero.

@Nimbuzz: To the extent of my understanding adding regen requires driving the drive transistors in a different way. So adding regen to an existing controller would be rather hard.

Marty

Using the battery current rather than the motor current is close enough. That's how I have it set up on my scooter right now. Power servo rather than true torque servo. It's very nice at low speeds.

I think sensorless is possible with the right asynchronous startup routine. It might be inefficient during startup, but that condition will normally be a very small fraction of total operating time.

Adding regen to the existing controller would take a different commutator chip. Some off-the-shelf 3phase controller chips have a brake function that could be used. To get regen, you turn on all 3 low side FETs at the same time, shorting out the motor. This "short" is PWM'd to get the desired braking current. When the short is opened, the body diodes in the FETs (or schottkey diodes across the FETs) will conduct the resultant voltage spike back to the batteries. The duty cycle of the PWM has to be controlled by the current. Maximum regen current should probably be somewhat less than the maximum driving current, and adjsutable.

The "shunt resistors" in the existing controllers are just chunks of special wire, not real resistors. In a typical Crystalyte, there are 4 in parallel. If you had two per phase, you might not need the ones on the battery. I don't think it would increase the cost much. A fast current measuring circuit to watch the shunts might be more expensive, but shouldn't be prohibitive.

They do tend to get cheap on the wire and connectors. I'd be OK with no connectors on the high power wires and DIY. Some kind of screw down connection similar to line power circuit breakers might be nice.
 
anywho, over on the http://www.parallax.com Propeller chip support forum, there was a discussion about how to make a sensorless BLDC controller. The link to This guys master's thesis came up. ( the "T.pdf" link is the actual thesis) He modifies the PWM pattern of the motor to always leave one phase of the motor floating and then uses the floating leg to detect when to advance the commutation cycle.

@Rsisson: if you're interested in microcontrollers Parallax's SX chip line (similar to a PIC) and Propeller (8-core fire-breather) are potent chips. Most importantly though, Parallax has built up superb documentation and support forums around these products. They're worth a look if you decide to add a microcontroller.
 
Those "special Wires" are precision resistors... or can be.

Here is what I found when I went looking...

http://dkc3.digikey.com/PDF/T073/P1683.pdf

.001 ohm, 1% 40A Shunts about $6 each in limited quantity

I have played with the Parallax chips before...very powerful...

the issue becomes programming and interfacing... oh yes, and support.
 
A bit more on the Masters Thesis link I posted. ( Direct .pdf link) On the bottom of page 66 of the .pdf (pg 58 of the doccument) The author states that a 50:1 or better speed range should be possible with his proposed sensorless BLDC control scheme. (he mentions ~5:1 as typical for conventional systems)

A sensorless BLDC controller with a 50:1 speed range makes sensorless control much more practical for an e-bike. lets see what this would mean for a bike with a 35mph top motor speed.

the speed the controller would cut in is 35*(1/50) = 0.7mph, just kicking off from a stop should get a bike up to this speed. (burnouts would be hard though :lol: )

And now back to your regularly scheduled topic,
Marty
 
In looking at the Parallax and PIC sites and searching on them, I found LOTS of H-Bridge controllers, brushed controllers, and mentions of 3-phase controllers, but no complete plans for HIGH POWER 3-phase BLDC controllers.

There were some Atec things, like mentioned above, but they weren't complete, nor did they have MANUAL controls. Everything assumed NETWORK control, ie RS-232, Enet, or something else found in cars these days... nothing with a analog throttle input...

My search was far from complete, but I was surprised by what I didn't find...


Bob
 
rsisson said:
In looking at the Parallax and PIC sites and searching on them, I found LOTS of H-Bridge controllers, brushed controllers, and mentions of 3-phase controllers, but no complete plans for HIGH POWER 3-phase BLDC controllers.

Go to the Microchip site and search for Application Note 957 (AN957) - "Sensored BLDC Motor Control Using dsPIC30F2010." Has all the code and block diagrams of the required hardware. One of these coupled to a "brain dead" Crystalyte controller would work pretty well.
 
I specifically linked the OSMC info a back a few posts as a source for a tested design of a high power motor driver. I understand that it's an H-bridge for driving DC motors. Still, chop it in half and repeat that half three times and you have the output stage of a 3-phase motor driver. A motor driver that regularly survives Battlebot competitions and currents averaging around 160A. (~50v max with the default components though)

Anywho I'd expect the info on sensor based control of BLDC motors to be a bit scarce on the net. I'm pretty sure that was new in ~1970s-1980s before the 'net started to consume everything. If you can schlep into your local university library I bet you'll have more luck looking there.

my log(100) bits,
Marty
 
The Microchip article was interesting...everything seemed to be there, until I started looking hard..

Now I was looking at it from a EE point of view, not a CSE...

The application program is there, but it has some BIG holes in it...

There is NOTHING in the code that deals with the current detection hardware... and I am not sure hoe entrenched the "look for Key press" is in the timing. I also was looking for other inputs, like brake (enable) or low voltage cutout.

I was impressed with the thoroughness of the hardware solution on the driver side, but without becoming a coder again, I didn't see a "complete" solution.

I would love to see the plans/schematic/layout for the 70v/50A controller Justin had made as it already has the inputs for the cycle analyst and other stuff there... along with reverse and some other niceties... AND it is fully supported....
 
Back
Top