A Mobility Scooter Motor Controller issue(s)!!

Thread Starter

iONic

Joined Nov 16, 2007
1,662
Remember, you'll also be ordering a power MOSFET, and three diodes, plus spares. And the gate driver IC if you don't have one already. So shipping starts to be more reasonable.
Yeah, most of the parts I have pending are from Mouser, but there are a few that I can only find on Digikey. I have the MOSFET's and MOSFET Driver (TC1412N) already. I could use the part number for the diodes you intend to use. And the capacitors are an issue as well as Digikey or Mouser part numbers of the caps that will fit the PCB. I may have some of the caps on hand, but would need to order the remainder.
 

shortbus

Joined Sep 30, 2009
10,045
I guess I should really keep out of your discussion, but do have a question.:) Why are you using relays when a mosfet would be a better option? Relays have a limited operating life on the contacts and will fail after a while. Mosfets if driven properly and heat sinked properly will last much longer.

The biggest reason these controllers fail is that the 'bean counters' at the manufacturer controll the final product. In the end a few pennies here and a few pennies there kill the product. Doing it for yourself you don't have that constraint. Use what is really needed to do the job right and all will be good!

We now return you to your normally scheduled program.........
 

tom66

Joined May 9, 2009
2,595
I guess I should really keep out of your discussion, but do have a question.:) Why are you using relays when a mosfet would be a better option? Relays have a limited operating life on the contacts and will fail after a while. Mosfets if driven properly and heat sinked properly will last much longer.

The biggest reason these controllers fail is that the 'bean counters' at the manufacturer controll the final product. In the end a few pennies here and a few pennies there kill the product. Doing it for yourself you don't have that constraint. Use what is really needed to do the job right and all will be good!

We now return you to your normally scheduled program.........
The main reason for using relays is that they are easily used to reverse motors and they are far easier to drive. I don't think reversing and braking will happen that often, and a good relay will do 1,000,000 cycles+, so it should last a long time.
 

tom66

Joined May 9, 2009
2,595
Yeah, most of the parts I have pending are from Mouser, but there are a few that I can only find on Digikey. I have the MOSFET's and MOSFET Driver (TC1412N) already. I could use the part number for the diodes you intend to use. And the capacitors are an issue as well as Digikey or Mouser part numbers of the caps that will fit the PCB. I may have some of the caps on hand, but would need to order the remainder.
I'll try and design around the caps you use. I use general purpose 0.1µF (100nF) ceramics for decoupling and timing. An electrolytic is used in the slow start circuit as a timing element too. Depending on the electrical environment of the scooter, it *may* be a good idea to include the 1000µF 50V capacitors for the motor and the battery regen charger - still needs to be considered.

47µF cap: http://octopart.com/eca1hhg470-panasonic-3615463 (one required)

I'll probably also use 220µF caps for the voltage regulator (LM7812 probably):

http://octopart.com/eca-1hm221-panasonic-209056 (2 required)

Then the 1000µF cap: (This must be a low ESR one if it is to do any good.)

http://octopart.com/uhe1h102mhd-nichicon-202628 (3 required)

Diode: http://octopart.com/mbr40250tg-on+semiconductor-709939

(I'll look out for a lower Vbrkd diode as this one will dissipate a lot more heat than say a 40V diode... just due to how Schottky diodes are made. To consider: MBR30L45.)

Use octopart to find the best place to buy these at.

And don't forget the 7812 itself... http://octopart.com/lm7812ct-fairchild+semiconductor-8039642

I don't know enough about the inductance of your lead wires, but getting a TVS device to absorb the surges which might be present from the rapid switching of the motor may be a good idea... http://octopart.com/1.5ke33a-stmicroelectronics-345963 (33V clamp.)

Heatsink? The MOSFET *may* not need it, but the diodes almost certainly will. Do you have one you can get easily e.g. from a junked power supply? I have a junk power supply here with two very nice heatsinks you can have if you want.
 
Last edited:

tom66

Joined May 9, 2009
2,595
Did you mention what the PWM frequency would be using the LM324?
I need it to be about 30kHz.
That should be possible with a 324.

If not there are a wealth of pin compatible op amps which can work at higher frequencies. I know one which is good up to 80 MHz. You could call it overkill but if it works...
 

Thread Starter

iONic

Joined Nov 16, 2007
1,662
I was eying the TL494 IC, But I think that the LM339 offers a higher freq. I am doubting that the 324 will get anywhere near 30kHz.
 

tom66

Joined May 9, 2009
2,595
I was eying the TL494 IC, But I think that the LM339 offers a higher freq. I am doubting that the 324 will get anywhere near 30kHz.
LM339 is a comparator - not good for what we want. We need an op-amp.

LM324 has a GBWP of up to 1 MHz and so will probably be good enough for a 30 kHz oscillator. As the comparator output drives a gate driver, slew rate isn't very important, the gate driver ensures it is always a logic 0 or 1.

Install chip sockets in the board so you can change them, on the off chance it doesn't work.

TL084 has 3x the GBWP. Could be considered.

Also consider LT1365 at 70 MHz GBWP - but it's $8.08 each a piece. http://www.linear.com/product/LT1365 If you ask Linear nicely, they'll send you two or three free samples. You'll only need one for the PWM part; I'll make sure one op-amp is used for all the high speed stuff.

TL494 is just a power supply control IC. Not sure how useful it is for your application because the odd input (bidirectional acceleration) already requires a few op-amps to convert it, so you *may as well* use them to generate the PWM too.
 

tom66

Joined May 9, 2009
2,595
Take a look at the SG3525A IC.
That's a closed loop PWM controller - designed to regulate the output voltage of a switch mode power supply.

It will be very difficult, nigh impossible, to operate it open loop, which is what we want for most basic motor drives.
 

SgtWookie

Joined Jul 17, 2007
22,230
LM339 is a comparator - not good for what we want. We need an op-amp.

LM324 has a GBWP of up to 1 MHz and so will probably be good enough for a 30 kHz oscillator. As the comparator output drives a gate driver, slew rate isn't very important, the gate driver ensures it is always a logic 0 or 1.
See the attached simulation of an LM324 operating at 29.5kHz with a very light output load. R1/C1 provide the timing. R2/R3/R4 provide the hysteresis for 1/3 and 2/3 Vcc toggling. The green trace is the output triangle wave. You need a square wave there.

TL084 has 3x the GBWP. Could be considered.
The TL07x and TL08x have a higher gbw, but cannot "see" within 3v of the negative rail.

Also consider LT1365 at 70 MHz GBWP - but it's $8.08 each a piece. http://www.linear.com/product/LT1365 If you ask Linear nicely, they'll send you two or three free samples. You'll only need one for the PWM part; I'll make sure one op-amp is used for all the high speed stuff.
Don't plan on using "freebies" for an otherwise expensive part - they'll only get more expensive as time goes by - and sooner or later, everything breaks.

Take a look at this opamp: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00003289.pdf
Digikey stocks them for $2.65/ea:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=497-8926-1-ND

TL494 is just a power supply control IC. Not sure how useful it is for your application because the odd input (bidirectional acceleration) already requires a few op-amps to convert it, so you *may as well* use them to generate the PWM too.
It's a pwm controller IC with a lot of built-in functions.
 

Attachments

Last edited:

tom66

Joined May 9, 2009
2,595
See the attached simulation of an LM324 operating at 29.5kHz with a very light output load. R1/C1 provide the timing. R2/R3/R4 provide the hysteresis for 1/3 and 2/3 Vcc toggling. The green trace is the output triangle wave. You need a square wave there.
Nice - looks more than capable.

I might have to tweak the circuit to generate a signal from 1/3Vcc to 2/3Vcc as at the moment it goes from 0V to 2/3Vcc, then again, having a dead band may be a good idea...
 

SgtWookie

Joined Jul 17, 2007
22,230
Nice - looks more than capable.
Tom, I think you may have missed my point.

In the simulation, the output, the green trace, needs to be a square wave to be an input to iONic's driver - but the LM324 is much too slow to generate a square wave output at that frequency. Take a look at the propagation delay

When I substituted another opamp that WAS fast enough (gbw>50MHz) the output changed to a square wave at 100kHz, with no other component changes.

I don't recall which opamp I used, so I just threw in a random OnSemi model, the MC34084 (it's obsolete). It oscillates at 80kHz with no other changes; see the attached. That's the kind of output you want to see.

This also means that the GBW of the opamp will affect what timing components that you will need to use.
 

Attachments

tom66

Joined May 9, 2009
2,595
Tom, I think you may have missed my point.

In the simulation, the output, the green trace, needs to be a square wave to be an input to iONic's driver - but the LM324 is much too slow to generate a square wave output at that frequency. Take a look at the propagation delay

When I substituted another opamp that WAS fast enough (gbw>50MHz) the output changed to a square wave at 100kHz, with no other component changes.

I don't recall which opamp I used, so I just threw in a random OnSemi model, the MC34084 (it's obsolete). It oscillates at 80kHz with no other changes; see the attached. That's the kind of output you want to see.

This also means that the GBW of the opamp will affect what timing components that you will need to use.
Hmm. I thought it was a good triangle wave driver! Seems to be struggling quite a bit...

Anyway, this project has been called off by ionic but it should still be interesting to see how it could be done.
 

THE_RB

Joined Feb 11, 2008
5,438
The higher the frequency, the lower the losses will be in the motor; but his driver module is limited to around 30kHz input.
Yeah I got that, but vehicle motors are very high inductance and switching losses are the main loss of efficiency. Most commercial vehicle PWM driver's I've seen have been much lower in frequency, 1200 Hz to maybe 8000 Hz.

30kHz just seems abnormally high to me.
 

SgtWookie

Joined Jul 17, 2007
22,230
Top