# AC Controller Discussion



## buzzforb (Aug 16, 2008)

I am attemptingnbto build an ac controller based on the circuit cellar design. I know that this article has been discussed somewhat in other threads,but not in any great detail. I think it might be helpful to discuss the particular strengths and weaknesses of the design in the hopes providing a reference point for those who might attempt this task in the future. We have a lot of really bright people in this forum and i think it 
would be very easy to come up with a extremely sufficient design. I readily admit to being in a position to benefit from any discussion, but
others would benefit also. i have found a very reasonably priced motor that seemsto fit the needs of an ac conversion and together with an open source controller would make ac conversions much more attainable. At the end of the day, i just want to drive an ev and at the same time get as many other people in ev's as possible. Perhaps this is a rosy notion and unattainable, but it seems to me the only limitation is doing it. Sorry for the rant


----------



## Evan (Feb 20, 2008)

Well the take they took on it was sound. If you are looking for why more work has not been built on their design I would have to guess it is because it is a hardware based project. Most open source stuff is just for one of a small number of platforms. You can't make that work for this kind of thing. There are rapid prototyping methods (like vendor development boards) that can make the hardware easier to fabricate but they also make it very expensive. The people who could contribute to the project would rather build our own thing, which is what I am doing. 

I don't like one part of their design. It lacks current monitoring on the motor phases. That would seem like a matter of safety too me. 

On a side note the reason I am doing it my own way is because they did not make the project around any open source tools. I have access Labview and Matlab but many people don't. They just cost too much. When I graduate from the university, which is soon, I will have to buy my own stuff if I want to continue with their work. I am trying to make something that is almost entirely built on open source. That way you could do cool things like make a livecd with all the project documentation including calculations and etc that could be run by anyone who is curious or just wants to tweek the controller once it is installed.


----------



## buzzforb (Aug 16, 2008)

The main hang up for me is the microchip pcb design. I shouldn't have too much trouble with building the inverter, but the control hardware is a daunting task. I was planning on using the microchip stuff with all their free downloads but was hoping to avoid learning both programming and pcb design at same time. Looks like i should start reading. it just seems like wecould all come together and comeup with a some sortof universal reference.


----------



## Evan (Feb 20, 2008)

Not to discourage you but this is not the kind of project to try to learn both PCB design and programming at the same time. If you are really trying to contribute to the project you might find it easier to learn the languages and tools independently. Like I said earlier they used two very expensive tools for data acquisition and math. As for a universal reference that is just not possible as it would have to encompass almost all of electronics and electrical engineering as well as software engineering. Now if you were having trouble understanding the documentation the best idea would be to email the authors. I don't remember but didn't they include the PCB artwork in that huge zip file? If you can't get the gerber file then again try to ask the authors. They did want their work to be useful after all. If all you want is too tweak the project to run on your specific motor that is something the people here could likely help with too. 

If you want a project that might be a simpler useful starting point that would advance things might I suggest making a CAN Bus user interface for this thing. Right now it is just the motor controller nothing more nothing less. A CAN Bus battery management system would be a good idea too.


----------



## buzzforb (Aug 16, 2008)

if i were to buy the Mc1 developement board, and learn c programming, wouldn't i be able build upon what they have already created and have an efficient control system, or is their design limited in its application in EV's. IT seems that was the idea behind the whole project. I am just unaware of how limited its setup is. also you said something about the design not having motor phase current sensing but i thought i remember reading that it had hall effect sensors. Thanks for the input.


----------



## Evan (Feb 20, 2008)

You would need more than an Mc1 Dev board. They provided software made in Labview to reconfigure the system for a given motor. But to build more on that system you need to have the full version of Labview and Matlab which is a lot of money. Unless I am mistaken the microprocessor they chose has a reasonable margin of extra processing power for additional code. How flexible is it? Well it depends on how you plan on making your changes and what they are. Unless you can find something you want to change I can not help you. That said the PIC is not my favorite chip to work with.

Hall effect only tells you the power of the magnetic field on the coil. I want current sensing to detect when something like an IGBT fails or a short forms. The typical hall effect sensors are typically used to detect the relative location of the rotor. 

They started with a full size motor. I don't like that method because it is kind of hard to manage. Plus I don't have the floor space to do that. I am using a 1/12 hp motor to model the system I am working on. I use an open source math program to check the models efficiency.


----------



## Madmac (Mar 14, 2008)

The Camosun College based design supported two types of Hall devices. A hall position sensor for shaft position and two hall effect current sensors for implementing the field based drive.

More information on the current sensors can be found at
http://www.gmw.com/magnetic_sensors/sentron/csa/documents/AN_121KIT_June_2007.pdf

From memory I cannot recall if they use the saturation based over current line from the IGBT drivers. Between this signal and the hall current sensors you can shut down under all failures except leakage to external surfaces.

Madmac


----------



## buzzforb (Aug 16, 2008)

i thought i was right about the hall effect sensors. its good to hear from you again madmac. evan, have you read the newer article from circuit celllar, here is the link

http://www.circuitcellar.com/archives/viewable/217-Ponech_McIntyre_Krahn_Hall_Kasmer/11.html

The reason i am using it is the fact that it gives a point of reference, ie motor control board design, daughter board design, and so on. it talks about adding extra can bus for further modification. if this is not a good place to start, can you point me in a differenet direction, perhapsto some open source stuff you have found. even if it takes awhile,i am going to do this thing. just hoping for help from salty dogs like you and madmac. i see mass. as your state id, are you in mit. i better start reading


----------



## Evan (Feb 20, 2008)

Madmac - I sit corrected. Sorry I should have read more carefully I though they disabled that in the final version. 

Buzzforb - I was not trying to deter you from doing this project. I was just saying that you might want to work up to it. Speaking from unpleasant personal experience learning multiple things at once to do a project is often over my learning curve. If it isn't over yours well, my hat is off to you. In a while expect to be hearing questions from me. I have more tools that are open source if you want to look at them but the design ideas I am going to hold onto until I get something working. No I am not in MIT.


----------



## buzzforb (Aug 16, 2008)

The thing which intimidates me the most is the pcb design. i believe, perlhaps incorrectly, that i can learn the programming given sometime. i ben looking at learning c with gcc compiler and and complimentary tutorial. there are quite a few books as wellas sites that seemto do a good job walking through the embedded programming process. i guess i am going to jumpin the deep end soon. i will just do the best i can. perhaps i canfind reference points to help with pcb layout. i would like to build board in such a way that i can have both charger module and bms module attached toinverter much like ac propulsion. geees that sounds way over my head. what the hell, might as well. rather burn up than fade away, with the former being likely with a little of the latter on top.


----------



## Evan (Feb 20, 2008)

PCB design is nothing special there is actually a very good pdf from TI about it but I have to find the link. The real challenge is the software. I wasn't aware that GCC supported this chip I would have though SDCC would have been more appropriate but I guess I am wrong. GCC is fairly intuitive. I suspect you will still need to know some assembly language to make this work. I have found that often to get decent speed out of microchips stuff asm is often a requirement. 

As for PCB design if you want to do that I suggest installing gEDA and PCB which work well under linux. There is a nice community of us who use them and the developers are very friendly. The thing about making PCB is that you *have* to check the footprints before you send it to the fab house. There is a so called "black magic" to PCB design in some cases but I don't think that really applies here. Just so you know that is generally about doing things like making RF circuits where the traces do things like wrap around the edge of the board to make inductors or using parallel ones to make capacitance. In microwave you have to be very careful about this as it can cause undesired effects. The same is true of high speed digital stuff where traces some times have to be the same length on a bus. I don't know if you ever looked at the AGP or PCI cards in your computer but they frequently have one or two traces that zigzag just to match time delay. In other cases to reduce cross talk lines are routed diagonally. The fact is that most of the stuff I just said does not apply here. The DsPIC is basically a little 16 bit system on chip so you don't have to worry about much. I just be sure to follow the data sheet notes if any one clock crystal distance. What you do have to worry very much about is EMI. EMI on this kind of thing can be brutal. Well EMI and heat. The really high end PCB software out there not only autoroutes but take into account all of these rules and manages to simulate thermal loads. That said it is still often wrong. Trust you self not the computer. I always triple check everything by hand with a highlighter on printouts.

I would just do two separate boards in one big box. Heck if it were me the box would actually be sub divided by a wire mesh soldered to the inside walls just to keep the noise down while allowing air flow. People think this kind of integration make the system better or at least cheaper the fact is it isn't a good idea for both thermal and EMI reasons in this case. I typically use optical isolators just to separate the uP power from the motor power and then put the two at different ends of the board with separate ground plains. The power supply for the digital stuff should have it's own separate place on the board too. Typically you would want one of the ground planes to go to the mounting holes only in this case to ground that but in this case you don't. I would make all of this BMS and inverter on one board and have a gap between them. You can have the fab house make them with a gap to split one off if you have the cash. I typically just make two traces and score the line in between over and over and over. For multilayer stuff you have to be careful not to cleave the layers apart though.

Bottom line - PCB design is an art from that to master takes years. You must learn to balance all these little rules and more I have not mentioned. This project however does not require all of these only a few you could learn in a week or two with some practice projects. Think the PCB equivalent of hello world.

Software
http://www.geda.seul.org/
gEDA & PCB

Some reading for you.
http://focus.ti.com/lit/ml/slua366/slua366.pdf
"PCB Layout Guidelines for Power Controllers"
http://focus.ti.com/lit/an/szza009/szza009.pdf
"PCB Design Guidelines For Reduced EMI"
http://www.brorson.com/gEDA/
Stuart's gEDA intro
http://www.delorie.com/pcb/docs/
DJ's PCB intro <-- this is a new thing and he would really like your feedback.


----------



## buzzforb (Aug 16, 2008)

Your help and advice is greatly appreciated. just to make things interesting i amm now looking at using the atmel stuff and learning c to program it because supposedly, c works really well with the atmel stuff, whatever that means. I will probabaly bug you for advice fro time to time if thats ok. Oce again, i greatly appreciate you taking your time to teach an over zealous guy trying to change the world. Cheers to being foolishly brilliant.....Hopefully.


----------



## buzzforb (Aug 16, 2008)

evan,
i wish i had a picture of a guys head blowing up because mine just did. Oh well, maybe its like muscle,you got to rip ti up before you can make it stronger.


----------



## buzzforb (Aug 16, 2008)

in reading te documents that you sent me, i realized that at the very beginning of the one concering emi, they say emi is not a problem below 50kHZ. I rremembered the circuit celler inverter design working at 30Khz, so is this an unecessary consideration.


----------



## Evan (Feb 20, 2008)

buzzforb - You are over apologetic, we are all trying to change the world in one way or another. EMI can take place at any frequency. With the kind of power involved it is possible to make all kind of interference. Shielding is good but if you can reduce switching noise you can improve efficiency. That said I still shield everything. A habit from my days playing with Tesla Coils as a kid. In higher frequencies you can cause all kinds of RF interference. Now I know your system is supposed to be down at 30KHz but the switches used like IGBT's or SCR's can make higher frequencies when they switch. One of the reasons commercial inverters are always kept close to the motor is because the line running to the motor can create problems. Reducing this noise by making smoother sinewave generation from pwm is how you improve efficiency. Power transmission lines like that have an echo when they are not matched for impedance and length. There are harmonics in everything. 

Don't feel bad if you don't understand this all right now. The EV-1 made so much noise that the radio in it did not work very well.

I think I am throwing a lot of problems at you. Don't think you should be computing all of this. Most engineers sadly don't. Granted noise is a source of lost efficiency but as it has been said by others "Don't let perfection be the enemy of good." Now when politicians say that I worry but no one builds anything of any real complexity that works perfectly on the first try in reasonable time. You can't use the method of least squares for everything but that doesn't mean your first version has to be perfect. Just make it in parts that you can isolate and test independently. Building a circuit is like learning anything, you learn at the edge of what you already know. Build at the edge of what you know works. 

I am not a very big fan of Atmel. In the past Atmel has fought having their development libraries public. Currently I am just trying to find the perfect PWM algorithm to match my IGBTs so I can tune the noise out. I have not build the uP board yet. I have done enough of that in the past. It is hard to know how much processing the uP will have to do until I get an idea of what it will have to do.

The creators of the project you are trying to build on have the right idea. A controller with a separate communications controller. I think I want to have a PLD do the PWM generation though.

The US DoD used to have a system called Elf. It used extrema low frequency, sub am band, to communicate with submarines. It was very effective, it took a lot of power, but it was very effective. At that kind of frequency the earth it self carries the signal all over the planet. Now that took mile long antennas and it again doesn't really apply here but you can see that just because it is supposed to be low frequency it can still travel. Incidentally they decommissioned this system a few years back in favor of a new thing that uses sound but the navy is going to have a day in the Supreme Court this year because it is defining marine life. ELF only zapped a few cows.


----------



## buzzforb (Aug 16, 2008)

in my reading i have found that atmel chips were designed with c language in mind in terms of programming. supposedly the chips respond very well to the programming language. it would seem also from what i have read that c is the language to learn first. you were talking about using a pld in your design for the algorithim calcualtions. could you elaborate on what this is in comparison to a dspic or atmel chip. will you be programming in vhdl. does this languagae lend itself better to chip/circuit control and mathmatical expressions and calculations. i am just trying to decide what road to take. you said you are going to try to work out the algorithims driving the igbt's first. how are you testing these calculations. are you using a developement board and small motor or running them through test equipment to check for harmonics? you have really opened my eyes up to the design process. no wonder it cost tesla motors 55 million.


----------



## abudabit (Sep 18, 2008)

With the controller I'm building i'm not even gonna attempt to implement any microcontrollers. The logic is just various comparators, and those 8x dip switch bars connected to resistors for the fine tuning and setting the temperature and current limiters. Way too intimidating for me.


----------



## Evan (Feb 20, 2008)

There is this new idea in designing for the third world about appropriate technology. I think it should also apply to the whole world to a point. As technical people we want to use the latest tech that has caught our fancy to solve a problem. I think stored database programming is an example. However, just because you can doesn't mean you should. 

We want to run off to Africa and build internet infrastructure. Now eventually that is what we should do. In the mean while though the local economics dictate that people frequently steel the wire off the telephone poles. The solution for creating a free press is FM radio. An FM radio station is hard to block, easy to build and maintain and all the parts are easy to get. It is easier to teach all of this to a native person who doesn't speak english. They can then teach each other. In the event of a natural disaster the radio station can coordinate with the outside world in a way that a centralized phone or internet setup can't. This is why HAM radio is still relevant. 911 and Katrina both cases the second thing to break is the phones. HAM radio never goes down. 

My aunt's dishwasher requires a 32 bit DSP with a very complex HMI used by a technician to tell us that the funny noise it is in perfect health. It still had them order new part randomly. It did this with a new technician each month for 6 or 7 months and ultimately got all the parts to build a second unit except the outside cosmetic panels. Eventually a new tech showed up and found a broken retaining clip had fallen into the rotor assembly. People who have high tech become dependent on it when they don't understand how it really works. Boy am I glad that was under warranty.

Just because you can doesn't mean you should. It is however a mistake I make all the time.

buzzforb - A dspic is a pic with some special math instructions. Like most of the larger CPUs for the desktop and other markets it is skirting the boarder between RISC and CISC. There is a lot more I could say here but it all depends on how much uP architecture you know. The short story is that they are designed to be economical. PIC was a take off on 8051 directed at the peripheral interface controller (PIC) area. Atmel does something similar only in slightly different flavors of CISC instructions. As for one being better with C that is a slight miss statement. It is mostly in the compiler. If you look at the RTN for most of this stuff the results are mostly the same. The idea behind both is as few instructions as you can do a given application in and no more. More instructions means more cost per unit and more power wasted if you don't use them. As for adding design time by making so many flavors well they figure the economy of scale for the small device market actually means that they have a bigger audience than the desktop chip makers. Think about it everything from your dishwasher to your TV set has at least 1 uP in it. Heck my computer has many MPUs to do things like decode keyboard input or handle ACPI. That is how they can only cost a few dollars a piece. 

A PLD is different. It is a "pool of gates" that can be reconnected in any configuration via reprogramming. Yes I would likely use VHDL. The advantage is that the system has a very fast response time. The down side is that it can get very messy. I have never done it but you can build a complete computer in one chip with VHDL and a large FPGA. There are some super computers that use this architecture across multiple FPGAs. I may end up scrapping this idea and going with a DSP. All this is subject to change based on the algorithm I end up with.

My design process right now is trying to find the way to squeeze the most efficiency out of my small motor. I do this with a DAQ box and my PC. I have a few books on control systems and such and I am trying to see how well I can make this work in practice. Ultimately I want a series of equations that scale to any motor size and take into account the hysteresis from IGBT or FET internal capacitance. That way I can scale that design and know what the true operating frequency of the controller has to be. Then I do the prototype on the small motor with some liberal rounding of numbers and check to add flexibility. The IGBT's should be the only thing, other than the motor, that needs replacing in the final version. Then I check the prototypes efficiency against the math I have. Iteration of the last few steps until I get a good result and then make a full size version. Ultimately I will likely get board and skip ahead and just make something at scale that works reasonably well at tweak it later. If this were a commercial product at the end the company would go threw and do things like try to cut component count to reduce cost. If I use an FPGA that is when it would become something like an custom chip with as few gates as possible. At each step things like durability, reliability and interference would be tested. I only worry about that at the end really.

Tesla cost 55Million I suspect because they had a design teem trying to do the best of very thing. When you have to make a new car from scratch that is what you get. I still question the wisdom of putting the battery pack in back given it's high weight. They did a lot more than just the drive system.

abudabit - At one time I had considered doing the whole thing an analog and just having a uP to do the interface. Whatever you can do that works. I know most people scoff at the idea but I have seen some very powerful analog computers. Yes thats right analog. Analog is no less intimidating, in the end it can get just as complex if not more so than digital.


----------



## buzzforb (Aug 16, 2008)

Evan,
i was looking over an app note from microchip(908) about induction motor control. it includes along with its explanation, a vector control code. what would be the shoertcoming of this code?if it is properly applying variables fromfeedback and other sources, why would it not function properly and efficiently. i am also looking at a couple of powercontrol books. Do you have any recommendations. also, do you know of any good pcb design books? i think i will start small with either dspic or atmel. i found someinfo on free math software and was wandering if this would be helpful with the visualization and execution of thecomputations involved.


----------



## Evan (Feb 20, 2008)

There are other methods that can make smoother sinewaves from PWM. Don't get me wrong that PDF is useful but it is *not* to be taken as all there is to it. The thing is that what you want is to make something that can operate open loop, which means no feedback. This is not because open loop is better it is because closed loop would mean finding a motor with sensors, likely hall effect, mounted on the motor. I have been told this is harder. In any event there are ways to squeeze more power out of things. Telling you what I am thinking would be giving away what I am working on, which I am not quite sure of at the moment. There are things that are publicly known to work. For example the faster a PWM system switches the smoother it's curves get. Think about it a DC motor is just an synchronous AC motor with brushes on the commutator to make AC. Rounding the corners on that squarewave reduced power loss. However, the faster you switch the more power you waste switching. That pdf was made to show off that there chip could do it, not that it was the definitive method for doing it. They do a lot of that stuff I guess banking on the idea that some time cruched EE will have a project due soon and pick up one of their chips to solve some small problem like that. 

There are a number of bad powercontrol books. I have in school been forced to contend with a few. Sadly I have non I would recommend. What I meant to say was motor/energy conversion theory books. I can't recommend any of them ether. It is funny the worse a topics books are written the more of them I accumulate. In electronics I have a handful, The Art of Electronics and some others on feedback theory and specialized topics. In power engineering and electromechanical things I have not found a book I actually liked or could even claim to mostly understand. It might just be me being idiotic and not the books. 

As for PCB design I learned threw doing. Most people, myself included, use the rules of thumb about that area. I may use some real math to get some higher efficiency out of the power end but that is a ways a way. I threw those things out there not to scare you but to show you where the complexities are if you happen to hit one. Only a few of those things are really likely to happen on this project. At this early stage it is hard for me to gauge which ones. Some are already astronomically unlikely others are very likely.

I love math. That said I am likely not taking my own advise in many places about letting perfection be the enemy of good. Matlab, Octave, Scilab, SageMath and the like are good and you should learn at least one or two of them. That said you need to know what you want computed before you can do it. Yes they can model control systems for you but if you don't know what that model should be or how to code it the tool is useless. There is something called engineering intuition that just can't be bottled. No tool will just give you the answer, the ones that claim too only give answers based on the way their creators work. I want to do something new. Look, when you are learning there is some large amount of trial and error you just have to go threw. I am happy to answer any questions you have but I think if you want to actually get some where you should just try to make something. After you have done that then sit back and learn an analysis tool or two.


----------



## buzzforb (Aug 16, 2008)

i have a company that makes induction servo motors that are rated similarly to the motors being sold at metric mind at half the price. i canot say that they the same quallity, but i would say they were not because i have not tried either one. An added benfit of this motor is that it comes with an encoder. This will allow for mesurement of teh rotor and by adding hall effect sensors to the igbt lines lke in the circuit cellar design, i should be able to get the closed loop info that i need to be accurate with my control. Is open oop the same as sensorless control based siply on feedback and formulas. Microchip also has app notes on this too.


----------



## Evan (Feb 20, 2008)

Being sensorless means you have to be open loop. Closed loop means that the output of the system has some kind of measurement that is used to alter the input to the motor. As for one being better than the other, I don't know. Can you provide a link to the data sheet(s) for the servos you are talking about? Most that I have seen the encoder is not easily usable for matching rotor and stator fields. The encoders are used in a closed loop but the loop is for speed or position.


----------



## buzzforb (Aug 16, 2008)

Evan,
PM me with your email and I will send you the info i have on the motors I am looking at. As for the encoder question, if you refer to Microchip application note 908, page 2, first column, there is an explanation of how in a closed loop system an ecndoer is used to measure rotor mechanical velocity and combined with information from Hall sensors to complete info feedback for control algorithim.


----------



## abudabit (Sep 18, 2008)

Sensored >>>>>>>> un-sensored. I don't know which is better, but personally I would never use an un-sensored brushless on a vehicle.

Un-sensored are super innefficient at slow speeds, more so than regular motors. And since at slow speeds is when you need torque the most, and since motors are already inneficient at low speeds, that equals massive current draw. That means less life on all your parts. And I would imagine soft start would have trouble on un-sensored.


----------



## buzzforb (Aug 16, 2008)

abudabit,
sensorless field oriented control of brushless motors is capable of running a motor at equal efficiency to sensored setup, it is just much more math intensive. microchip has an aap note showing measurements of the two types side by side and just how close sensorless comes to matching sensored. new control techniques are moving in the direction of sensorless because of equipment cost reduction.


----------



## abudabit (Sep 18, 2008)

How do they detect BEMF at 0 RPM? Or 10 RPM? Curious about these new techniques, last I heard they had to send high currents blindly through the windings in a pattern.


----------



## buzzforb (Aug 16, 2008)

It is not true sensorless control, it still uses hall sensors to detect bemf


----------



## 1clue (Jul 21, 2008)

What is BEMF?


----------



## Evan (Feb 20, 2008)

BEMF = Back ElectroMagnetic Force. 

Back EMF can be detected using a number of methods. Shunts on each windings power, current sensing transformers, and yes hall effect sensors. 

buzzforb - You really only need the hall effect sensors for this kind of thing. The encoder(s) are really not needed unless you need to know the speed or acceleration of the motor. I guess it might be useful if you want to see if the motors slip is growing excessively but that would be just as well done via current monitoring. Typically this is done for PID (Proportional Integral Derivative). I don't think there is really all that much advantage to it here unless you want to have a really accurate MPH gauge on your dashboard. 

abudabit - Not that I don't believe you but can you elaborate on that point or add some kind of further documentation to explain the physics of that. I can imagine there is some efficiency loss but I would like to see it quantified in some way.

No one is talking about blindly throwing a sine wave at the motor. There are ways to keep the system in smooth constant motion both mechanically and electronically.


----------



## abudabit (Sep 18, 2008)

Here is how it was explained to me:

With no hall sensors in the motor and the motor not turning there is no way for the controller to know the position of the rotor (as far as I know). The way controllers know the position of sensorless brushless motors is by detecting back emf in the various windings. When not turning there is no back emf. When slowly turning there is very little back emf. To detect the position during slow or no turning the controller cycles pulses through the windings in a circular pattern. This is very inefficient because it is basically blindly (but in a useful pattern) running electricity through the windings.

Once the back emf becomes large enough to detect then the sensored and sensorless can become equally efficient. But in stop and go traffic, or during a stall, or starting from a stop, or crawling extremely slowly, etc. it is massively less efficient. And those are the times you need efficiency the most because those are the highest torque applications in an ev.

I could be incorrect as I have never worked with an unsensored brushless.


----------



## buzzforb (Aug 16, 2008)

I guess that for me it is as simple as using the sensor just because it is there and available. Its accuracy is ulikely to be beaten by an algorithim unless the encoder is crappy. Thankfully i have freedom either way. Evan, i can't post the infor on the motor on this site because of its size. if you want it i will need your email.


----------



## buzzforb (Aug 16, 2008)

What's up 1clue. its been a while since i have seen your name. how is the info gathering going. I am officially becoming an egineer/progrrammer/whatever the hell else i need.


----------



## 1clue (Jul 21, 2008)

Don't really have anything to add to this discussion. I'm reading it because I'm interested, but since I'm a software guy I really need to keep my mouth shut here except for asking questions. I did add BEMF to the wiki though....

For some reason, I can't bring myself to think about a DC conversion. I also think that when it comes time to put a car together, I'll probably be short of cash. Which means that I'll have to whittle one out of a stick the way you guys are talking.


----------



## buzzforb (Aug 16, 2008)

I just became a software guy the other day. Working out great so far. Got the download, then run part. I am trying to grasp a better understaning of the math end of the control algorithim. If it based on a series of formulas that are the same no matter what, and most of the information that is used in them is gathered by the controller from various inputs(sensors,encoders,potientiometers), how could the ones from Microchip be incomplete or limited? i can see how the variables?parameters within the software that we can alter could change things some,but how great of an effect would this have? I guess what i am asking is, what efficiency difference do we stand to gain for loads of testing and is the difference worthwhile in the scheme of things.


----------



## Evan (Feb 20, 2008)

abudabit - How would that work for a squirrel cage motor though? Think about it the rotor is rotationally symmetric. The AC motors we are talking about are not synchronous machines, they have slip. Even if the frequency of the power starts to drift away from the rotor frequency the slip grows and the power input grows until the system is brought back into the proper slip. One could argue that this is a bad thing but regardless of the motor control method if you demand too much speed or acceleration from the motor you are going to lose power getting it. 

Granted there are wound AC motors but even there the same basic idea is the same. The machine automatically gets itself into the correct slip. That slip is a tiny number and a very tiny distance. I doubt that it could really be that much power.

We are talking about an AC asynchronous machine not an AC synchronous machine. When you talk about a brushless machine you are typically talking about a motor with AC fed rotor coil(s) with permanent magnets in the stator. That is a synchronous machine. Basically that is a DC motor only to replace the brushes on the commutator we typically use optical isolators. There are such motors meant to operate with out any kind of sensors but those are wasteful and I suspect what you think we are talking about. But I may be wrong.


----------



## Evan (Feb 20, 2008)

buzzforb - I have a bit of an almost compulsive need to do my own thing when it comes to my projects. So for a large part I want to do my own thing. I have some new ideas I want to test out. That is why I am doing all that extra work. Look don't worry about the way I do things there are plenty of people who don't work the same way I do and still get working machines out of it. I explained my methodology on this project only because you seemed curious about what a I was doing. I don't advise this for everyone. I am just trying to apply my working methodology to my DIY project. I normally don't work this way at home it takes a long time. I think I can do better, I am fairly sure of it. That said I am not an expert I am not going to run my mouth off until I have something that works. I will say that one third of the system is dependent on what is basically a high power 3 channel class-d audio amplifier. Then second part is the system that makes the 3 ac sinewaves. The third part is the HMI where the user actually interacts with the machine, gauges, pedals, etc. The optional 4th part is the BMS. There are other ways to do all of this only no one will know if they are better if they are not tried. I have been using my tools to make small models, both physically and mathematically of all of these to try to find the optimal solution. I may be "letting perfection be the enemy of good." If I am then at least in the end I know I am doing the right thing. Here is one thing I never understood. Why is it that no one uses switched delta-y motors. They make motors that at the right speed switch from being delta to y. How come that is not done in EVs?

If you can't upload the datasheet why not just post a link to it? Ether way I just PMed you with my email.


----------



## abudabit (Sep 18, 2008)

I'm talking about a 3 phase PMAC, also known in misnomers as a brushless DC. Typically they use hall effect sensors. Not talking about synchronous AC.


----------



## Evan (Feb 20, 2008)

For those who are reading and don't know PMAC - Permanent Magnet AC.

Abudabit - Yea that is what I though. No those are a form of synchronous AC. The fact that the "AC" is really just a square wave is just a matter of cheep design. You can feed them with true AC for higher efficiency. I checked the textbook I have here on Energy Conversion.


----------



## abudabit (Sep 18, 2008)

Yes, looks like we are talking about 2 different motor types. I have 0 experience with a squirel cage. My appologies for the confusion. I think I'll only call them PMAC's from now on. Looking back he did say induction, so ignore everything I wrote about blind starting.


----------



## Evan (Feb 20, 2008)

abudabit - Yea that tends to happen online, don't worry about it. Induction motors are actually a lot nicer to deal with than PMAC. Unless I am mistaken PMAC do have advantages over induction machines in terms of regen but they are not as efficient and I suspect they weigh more. I do know however that they were used in the UQM Electrek Car in the late 1970's with good results.

Squirrel cage and even wound induction machines are relatively the same when it comes to blind starting.


----------



## buzzforb (Aug 16, 2008)

Evan,
Your desire to do this thing to the best of your ability is exactly what i would hope you would do. I am not asking these questions to be subversive, just to gain insight into your reasoning, which seems very solid. I have learned a great deal from our conversations and am better off in this project as a result. The question about efficiency goes beyond this one element of the design. If by switching from a dc system to an ac system i am able to gain 10-15% overall efficiecy, then in my mind it is worth it. And if by dedicating myself to bulding the ideal controller, I gain similar ground, then it is well worth it also. But if i could build a very good, but not ideal controller and focus more of my time on efficiecny gains in say a bms system or a switching delta/Wye motor(great question btw) is that time better spent. I hope i don't irritate you but rather cause you to look at aperspective that perhaps you had not before and see if it changes the overall picture. It may not. So far your are very solid in your approach in my dime a dozen opinion.


----------



## Evan (Feb 20, 2008)

buzzforb - The thing is to find out how good the system could be you have to spend a lot of time working out what the theoretical limitations are of it and then apply some real world limitations as fudge factors to see how that changes things. Then compare that to the systems already in existence. If it is worth it try to realize that idea if not do what the normal implementation is. I could give you another rant about how that should work but this is the general idea.

In industry while this is what they like to say they do the reality is that it is mostly rules of thumb. After they have made a decent prototype they then look at the least efficient parts of it and try to improve them. Academics decry this but I guess it works too. The founder of Airovironment was a big proponent of using models of various kinds but he came from an academic background as I understand it.

I don't mind you questioning me. I did not see it as subversive I just was getting a little flustered because I didn't understand what you were trying to ask. Sorry.

As for the BMS verses controller that is an open question. The controller manufactures make very high efficiency claims. I don't know if in real world driving conditions (stop and go in the city) they really hold true. Starting conditions of most motors are far less than the ideal. However, if they are really that good over all then the last unoptimized territory in the EV world is BMS. I have some very theoretical ideas about how this could be done better. Not to put down what every one else is doing but I don't like Lee Harts method because that many relays is just crazy. You loose power because the relays add resistance and even at a few tenths of an ohm it adds up. As for the ACP method of having a big battery made of 20 or 30 laptop batteries with networked BMS chips that is a lot of added electronics. I really don't like reductive charging because I imagine a fair amount of power is wasted in the motor which was not really meant for that kind of use. Now they might have made a motor that is wound to work that way but then how good a motor could it be. On the BMS I am not even trying to out do them I just want to make a cleaner design. Something that is more integrated and has temperature control. I don't want to go lithium though. I may go NiCd if I can find them. I know cadmium is toxic but so is lead, heck lithium itself is not very safe ether. No matter what batteries we use recycling is a basic requirement. I don't think improving BMS will improve range significantly but it may improve battery life. 

I am just curious. You are not an electronics person and you are not a software person. So what is your background? Car enthusiast, mechanical engineer?


----------



## buzzforb (Aug 16, 2008)

Im a nobody who knows very little. Considered going back to school to be E.E. since engineeringis in my blood, but Wife and kids and life in general may not allow for that. I will have to educate myself through various onversations and book purchases in the meantime. From what i have read the mesh connection to the motor would allow for lower current starting of the motor, but does not seem to be intended for high inertia load startup. Perhaps the control algorithimcould be manipulated to overcome this but might reduce any positive effects of doing so. From what i read, this is stategy intended for extending life of motor and euipment more so than efficiency. Perhaps that is what you had in mind.


----------



## buzzforb (Aug 16, 2008)

THere is a bms design on endless sphere by a couple of electric bike guys that looks good. May give you some ideas or may confirm some of your thoughts. Victor at metric mind believess you should try to find batts that are close to the ah you want to avoid paralleling cells,as this seems to give rise to the biggest cahllenge in bm, cell balance over a period of time. I know that most power tool batts go bad simply because a couple of cells go bad and the whole pack tests dead. think about all the good batteries getting thrown away


----------



## Evan (Feb 20, 2008)

I doubt you are a nobody. As for your plan to reduce startup current that would cause the car to hesitate when you first accelerate from a dead stop but I might be misinterpreting your meaning on "mesh". The funny thing is that this is one of the most studied part of electronics. You can find a great deal of information on it at any decent library. You have to be careful in tinkering with the PWM timing because the inductive kick from the motor can cause shoot threw that breaks down the motors insulation. What are you really trying to ask? The thing is I don't know what else I can say here that won't end up leading you to my idea. Not that I am against sharing but I think it is better if more people look at the situation from a fresh perspective. If I continue to just give you mine you will just end up thinking the same way to the same conclusions. You need to develop your own way of looking at the problem.

Power tool packs are junk for any application larger than the one they are intended for. Plus most power tool people don't know how to replace a few bad cells. It takes a special kind of spot welding machine. I don't parallel cells. You could parallel a pair of batteries but that too has issues. You basically have to use large single stacks of cells. As for what the bike people are doing I doubt that it will scale. They have a different but parallel problem.


----------



## buzzforb (Aug 16, 2008)

forget the mesh comment,it was an erroneous memory from the section in my motor book about motor wiring and startup. What i was saying about the battey packs has to do with the other 8 cells left in the pack that are still good. Don't forget that Tesla used a butload of these small cells to make their packs. Hint: cheap way to put together a test pack is to ask local power tool repair shop for lithium ion packs that customers have brought in and had tested and turned out bad. In most cases they are bad simply because the first couple of cells in the pack are bad. Very cheap and excellent testing grounf for bms. In the modeling and testing of your algorithim are you using a small scale modelor are you using simulation software?


----------



## saab96 (Mar 19, 2008)

Evan said:


> I may go NiCd if I can find them. I know cadmium is toxic but so is lead


Could someone actually quantify the risk factor of flooded nicads vs. flooded lead acid? I mean, there is a reason flooded nicads are no longer generally available. I'm strongly considering tracking them down myself due to their long lifespans, but the thought of poisoning myself doesn't appeal to me.


----------



## buzzforb (Aug 16, 2008)

Evan,
My thought on mesh connections was not erroneous after all. I found a link to an article about a compnay who is trying this wiring schme in an attempt to make lighter and more efficient motors. Yake a look and see waht you think.

http://findarticles.com/p/articles/mi_m0EIN/is_2003_Dec_4/ai_110912576?tag=rel.res4


----------



## buzzforb (Aug 16, 2008)

ON a different note, here is an interesting article that some looking at how to improve motor efficiency and power.

http://www.thenews.com.pk/print1.asp?id=135239


----------



## Evan (Feb 20, 2008)

saab96 - I don't think there was a serious outgassing problem from the cadmium. Over charging only releases hydrogen or oxygen. My guess is that with the rise of NiMH a fall in the use of NiCd happened. They were both very similar in terms of the applications they were usable in only NiMH was better. I know Saft for example still makes NiCd for some applications. I think they even have some distributors in the US. Strangely while they make NiMH I can't find a distributor for that product line in the US. Now don't get me wrong I am a very environmentally concerned person but I think this might also have to do with the environmentalist movement trying to reduce our use of cadmium. While it is turning up in our ground water that is mostly from industrial enterprises dumping or miss handling it. Just about every battery I have ever seen requires something fairly toxic to operate. They all need 100% recycling to be green so why try to get rid of a good solution? I guess the "memory effect" was a problem but was it really that bad? I used to use NiCd rechargeable in my small devices and it worked very well with most of them lasting for about 10 years.

buzzforb - They say mesh but they don't really define what the mesh is. There is some talk about a method for altering the PWM and peek voltage to generate lower end torque at lower starting current. This is not however a new idea. The thing is that to get the motor insulation over rated to deal with the voltage spikes.

As for using silver plated wire in the motor that does not sound like a good idea. Copper is the better choice. This would not be even considered only we are running out of copper. People talk about peak oil but we have already passed peak copper years back. We have mined just about all the copper there is to get out of the planet. The thing is that electric motors are very recyclable. They dissolve the insulation off the wire and then melt them down. Plane and simple. Silver is not as good because if the insulation fails the conductivity drops like a rock and the wire heats up and melts. Now the likely hood of that happening is a matter of some debate but I wouldn't take the risk. I know it sounds unlikely but current motor technology is very very efficient. 
Weight could be better but we are not likely to get custom motors wound. I want to make something that can be easily optimized for a given motor configuration. For most people making some controller from a kit of parts is hard enough. Getting one wound is a while second adventure.


----------



## buzzforb (Aug 16, 2008)

Evan, 
Are you using a working model or are you using sim software. How technical is using a daq.


----------



## Evan (Feb 20, 2008)

I have a sub 1 HP motor that is 3 phase. I have a model of it I made in math to match the motor. The model was built in octave. The physical working model is built on my work bench with a pair of transformers and the motor with some small IGBT's and assorted hardware. The PWM is synthesized in my computer and fed threw a dongle on my USB port. I have a flywheel on the motor to simulate the momentum of a cars body on the motor. This lets me get the motor running and then check the regenerative function. There is an ADC to get the data back from the power in/out of the setup. Please note all of this is still a work in progress. DAQ is Data AQuisition. The most popular way to do this is via a proprietary program called LabView by National Interments. It is very easy to learn but very expensive as I have already said. As for the opensource tools out there the smaller end is Comedi the higher end is EPICS. I am currently trying to get this stuff running. I know my hardware works but the software is not liking my dongle. My limitation as a software person are becoming more evident. I don't want to wast time fussing with the thing so I may just use my universities lab. They have LabView.

http://www.comedi.org/index.html
http://www.aps.anl.gov/epics/index.php


----------



## buzzforb (Aug 16, 2008)

In modeling the controller solution on a smaller scale, do get into any scaling. I have read some things in the past that would indicate that smaller motors have a tendency to perform differently than their larger counterparts. ONe specific thing that comes to mind is efficiency. Second question. How does the torque curve of a motor controlled using field oriented control look in comparison to the standard NEMA curves posted for different class motors. Also, since this type of motor control uses more of the available voltage does that mean that bat pack size can be reduced?


----------



## Evan (Feb 20, 2008)

Yes the curves for my small motor are not the same as they would be for a larger one. That is just a given. I am not really concerned with that at the moment. I plan on getting a second larger motor and testing what I get from this setup on that. I know what the ideal efficiency for my small motor is so the hard part is making the controller match those numbers. PowerOut/PowerIn plain and simple. You are right this is not a perfect model but it is as close as I can make in my living room and without building a full size model. I guess I could have gotten a NEMA class B motor or what have you but this is really all I kneed. The small motors have lower efficiency but there isn't anything that can be done. No model is a perfect scale down of everything.

As for changing PWM and Voltage dynamically changing the size of the pack. The thing is that it doesn't really work out that way. I think using super capacitors will likely have more of an effect on the high starting current from Y motors. I suspect that the exchange is not favorable enough to make system use less power. If anything the exchange would lead to an increase in total power use. Think about it you can build the pack to supply extra voltage or extra current but not both. I would rather just have a single large current pack. That way if you drive without using as much torque you get more range. The pack voltage should be designed to fit the motors normal operating range plus a little to account for the internal resistance the battery has. Now that over rating is just to over come the fact that the pack appears from the outside to loose voltage and current as it discharges. The reality is that it looses only current. The internal resistance grows with that. The voltage is in fact constant. So you really can't use that extra voltage for anything unless you want to wear the pack out faster.


----------



## etischer (Jun 16, 2008)

I know I may be a little off topic, but here is my homebrew AC controller. See video at the top of my page.

I'm using an off the shelf VFD as a firing circuit for a larger IGBT pack. Im currently running in V/Hz mode, but plan on making the sensorless vector mode work soon.

http://etischer.com/awdev/


----------



## buzzforb (Aug 16, 2008)

etischer,
I have been following what you are doing with your controller since joining the forum. I hope you get the problems worked out. I havr a suggestion for you if your interested in a range increase. I have been looking at pairing a Hatz quiet diesel engine with another motor as a supplement to my battery pack. It would allow me to get lithium of some sort without the bank blowing up, and still get good range. The motor i am looking at is encased in a sound deadening shell to help with noise, which seems to be a limiting factor with most generator setups. I know it is not pure EV, but it would get me on the road allowing for fine tuning while also waiting for LIFEPO4 to come down in price or something like the ultra battery to go into production. By the way, i think i would set the generator to electrically start when my ac motor went above a certain amp range to act as a supplement. Hopefully i could work it out to where it is on minimally on short trips. Might be rather involved programming wise. I have also though about doing what some other folks have done and get an AWD vehicle and use the motor to run a supplemental generator and hook electric up to other drive train to be used as primary drive. Good luck


----------



## RhoanW (Oct 30, 2008)

Etischer I'm quite new to this and am only just thinking of converting a car to an EV. I noticed you are using a three-phase motor which is what we have more readily available here in Jamaica. The question is why do you need to make modifications to your controller?


----------



## etischer (Jun 16, 2008)

RhoanW said:


> Etischer I'm quite new to this and am only just thinking of converting a car to an EV. I noticed you are using a three-phase motor which is what we have more readily available here in Jamaica. The question is why do you need to make modifications to your controller?


The controller I have only puts out about 3 amps, and the motor can pull 300 amps. This is why I am trying to modify my controller.


----------



## RhoanW (Oct 30, 2008)

Oh I understand now. I see some controllers on metricmind that could probably work but I imagine the price will be prohibitive.


----------



## Wirecutter (Jul 26, 2007)

Evan and buzzforb -
Thanks for exchanging your thoughts here where the rest of us can see them. Evan, you somehow remind me of another Evan I know from another forum, but he's in BC, Canada.

Like 1clue, I fear that I'll be "whittling it from a stick" when it comes to building (and financing!) my eventual EV conversion. I'm working on the Camosun/Circuit Cellar design, but I'm all the way back at the thermal management parts. I didn't like their cold plate design, so I'm making my own. 

etischer, I think I've seen a number of those Seimens/Ford motors on Ebay - someone came up with a bunch of "motor only" of that type. I'm interested in seeing if anyone actually gets one going. I thought about using one of those, but I was a little intimidated by the spiral spline on the output shaft. I think the controller for that motor was made by Ballard Power Systems, but they won't talk to anyone about it, much less sell controllers. Also, someone here mentioned that your conductors need to be not wires, and not even bars, but *plates*. They posted a link to a manufacturer. I called them and they basically told me how they make the bus plates. Plates and such go to what you've already learned the hard way about keeping inductance very low. Anyway, I plan on using copper plate for my DC bus.

I have also studied up a bit on the Tesla/ACP battery design. They parallel cells at the single cell level, then series a bunch of those together. I thought this would be advantageous because the potential imbalance between cells should be less. If you stacked up 4 or 8 cells, then parallel the stacks, there is a potential for more imbalance. Now, they parallel 69 of the 18650 cells for their basic "brick", and I don't know if or how they can manage individual cells within a brick.

It's seemed to me that a system made up of many, many smaller cells might be the way to go because large lithium cells are hard to get and perhaps less reliable. Also, the failure of one or two 18650s is probably a lot less dramatic than the failure of a 100+aH cell. (Tesla literature mentions this.) Problem is, as you point out, that you have to come up with a monster of a BMS. 

So many issues, so little time...

-Mark


----------



## Evan (Feb 20, 2008)

Wirecutter - Thanks. Sorry I am not in or from Canada however much the last 8 years (10 really) made me frequently wish I was. 

The point is that you are working on something. There are a few people on here who despite the bad economy some how still have enough money to play with this technology. I have the money only for my electronics parts not a real conversion at the moment. I want to make a working drive system first. That part of the EV seems to be static so when I do have the chance to do the full car it will still be current. The battery chemistry and I hope BMS will evolve more before then. I actually have more of an idea about the BMS than I do the inverter. 

I don't know about using motors without data. I do it for my little robot projects all the time but for something like a car I would want to have more information. You can't design a controller around a motor that is basically undocumented. 

I have seen plates used but I have also seen sum very large systems MW type stuff (power company) that used bars. The reality is that improper use of ether is problematic. I like bars over plates because they are physically smaller and that makes covering them, to reduce EMI, easier. Someone should quantify the improvement in efficiency for them in this scale application. Until they do I am sticking with bus bars.

I have tried to avoid studying ACP if only to avoid thinking to much like them. Don't get me wrong they clearly know what they are doing but I want to make my own ideas. This is partially a matter of personal pride but also to avoid legal issues if my work gets any where. The circuit cellar design has one issue which is that it is copy righted but no one said what license it is under. For opensource software it is GPL or BSD license(s) but I didn't find ether inside this project. 

Does anyone know what the conditions are around that projects license?

As for larger battery management I think the whole idea of that many smaller batteries being used to be false. Connecting that many tiny cells increases the resistance of the whole battery and increases the weight of the interconnects relative to the actual battery weight. They are only doing this to get the better price on the cells threw the greater economy of scale and higher competition. 18650s are produced by more vendors and are standardized unlike the larger format lithiums. This also means that changing vendors doesn't mean redesigning silly things like the container they all go in. This is funny considering that Tesla still chose to make the large battery one giant brick. If it were me that large brick would have been spread out under the passenger compartment. I don't like the idea of putting that much weight behind the safety cage, it just feels wrong.

I have a better way to do the BMS but I need a lot of time to work it out. Right now it is almost entirely on paper. The parts that are not on paper have yet to match the math to my satisfaction.


----------



## judebert (Apr 16, 2008)

The Circuit Cellar project is under a proprietary license. The source code can only be used to create controllers based on the processors from the same company that provided their PIC.


----------



## Evan (Feb 20, 2008)

judebert - Thanks I suspected as much but didn't have the patience to go digging for it. Their stuff looked very similar to the microchip tech application note.


----------



## Wirecutter (Jul 26, 2007)

Evan said:


> Wirecutter - Thanks. Sorry I am not in or from Canada however much the last 8 years (10 really) made me frequently wish I was.


I hear ya. As screwy as things get here, though, I'm hard pressed to think of any place I'd rather be. I guess you can say I'm going to ride it out...





Evan said:


> I have tried to avoid studying ACP if only to avoid thinking to much like them. Don't get me wrong they clearly know what they are doing but I want to make my own ideas. This is partially a matter of personal pride but also to avoid legal issues if my work gets any where. The circuit cellar design has one issue which is that it is copy righted but no one said what license it is under. For opensource software it is GPL or BSD license(s) but I didn't find ether inside this project.
> 
> Does anyone know what the conditions are around that projects license?


 I like the way you think. Generally, I think that

1. The first time something done, it's science.
2. The second time it's engineering.
3. All subsequent times it's research.

...or something like that. Aside from the complex battery pack, I don't really know that much about how ACP does things. I'm starting with the Camosun/Circuit Cellar design, but I don't expect it to be more than a "jumping off" point. Most of it seems to be lifted from Microchip and PowerEx app notes and reference designs, anyway, and I think it's going to need some work to bring it up to full power. I'm not terribly worried about copyright issues - I'll be deviating from the original, I don't expect to profit from it, and I'll share my work with anyone who wants to listen.

It's also fair to say that at this early a stage, I'm not really locked into anything. I have to admit that the power source, be it anything from Optima Yellow Tops to a bazillion laptop batteries, is going to be a challenge. If and when the day ever comes that I get an inverter up to anything near full power, I'm going to have to use a big battery array of some sort, because I don't have enough power coming into my house to run it off of the AC mains. But that's a ways off yet. I got a laugh and a sober reminder watching etischer's video.



Evan said:


> I have a better way to do the BMS but I need a lot of time to work it out. Right now it is almost entirely on paper. The parts that are not on paper have yet to match the math to my satisfaction.


 Ah, now there's a rub. Up until recently, I had a coworker that was one of the best engineers I've had the pleasure to work with. He could do the paper exercise and then get the hardware to perform within a percent or so of the math. That's tough to do with any regularity, and he did it. I ah, don't hold myself to that high of a standard. 

-Mark


----------



## Evan (Feb 20, 2008)

When what I am doing is not working, burning up on the bench, that is science. The subsequent autopsy of the toasted hardware is also science. The rework is science. 
The rereading of datasheets and realizing I swapped to pins, priceless research. 
The last version where all the math is neatly done to try to perfect things is engineering.
Something like what you described. I guess the labels are unimportant only the methodical way you go threw the steps they belong to.

I am staying away from lithium. Laptop batteries are just too darn flaky. The one in my compaq (std 6 cell shipped with the uni V3019us) is a piece of junk. As for being let down by the Circuit Cellar design well... That was their starting point. The problem is when you start with the Microchip Tech Appnote you are kind of married too it. Everthing else is built around that. I suspect it is always possible for them to step in and declare what ever you replace the SVM code with to be derivative of their Appnote. As for using the PowerEx Appnote well, I just don't care. Those appnotes are a good way to learn large signal amplification which I have not learned in school thus far. The Circuit Cellar design used a cold plait which I don't care for. Everyone else from ACP to Solectria (Azure) gets by with forced air. Driving a water or glycol pump is going to eat more power than driving a simple fan. Pumps are more prone to failure than fans too. Now I my model is small IGBT based which is just free air cooled. But the first full scale version has to be *FET based if only to reduce costs since it will likely burn up. The second one might be IGBT. 

It is a shame it would seem even the CAN Bus stuff from the circuit cellar work is from a microchip appnote. 

Not to bad mouth etischer but that work might have been based on the TI data sheet on SVM too you know. Like I said we all have to start some where. Perhaps I am just being neolithic by trying to write my own SVM code from scratch. As for using a full size thing for testing that is part of why I am building a model.

I do hold myself to that kind of standard for my work. At home usually not if only for cost reasons. I do however still want to be close to the math as I can get. I sill use it to optimize the final design.

I would right more but I have to go...


----------



## Bugzuki (Jan 15, 2008)

So, what processor would you use to make the control - anyone? The Microchip controller is nice but the have everything locked down so it is hard to make it open source. The C compiler costs like 700 dollars. 

Does Atmel make a good controller that could do high end motor control and have enough power to do other stuff like keep track of other sensors on the car?

I have taken a couple embedded systems programming classes and can do pretty good, I just have a hard time getting started.


----------



## Evan (Feb 20, 2008)

Bugzuki - Microchips stuff is more open than ATMEL. Microchip is more flexible than Atmel about letting outside projects distribute their libraries. 

As for the compiler costing $700 I do use PICs on occasion with SDCC. SDCC is open source but it uses a microchips proprietary lib.


----------



## buzzforb (Aug 16, 2008)

Is the free student edition compiler incapable of doing the job. I have it downloaded but have yet to take a look at it or even read up on it.


----------



## epyon (Mar 20, 2008)

"I want to sound stupid " . I want to know if I can use any ac motor and batteries with this controller ? Down the street a guy is just giving them A-C motors away ....literaly !! I have some one who'll help with the batteries and charger . Well I be able to up the hertz from 60 to 120 ? If i send you the wiring on the motor and pictures will you be able to let me know the best way of hooking it up ? I know you have looked at some controllers and thought that it could be simple . Or at least understandable for us that went to college for football an women or some of us that didn't go at all .


----------



## Evan (Feb 20, 2008)

buzzforb - I don't know about compiling the circuit cellar design using the student compiler. I have no experience with ether of them. My advice is to try it. Worst case is you learn something. In the old days when I used the microchip assembler it was cryptic at times about it's errors but it never gave a false positive. I imagine the compiler to be the same.

Epyon - Well the circuit cellar design is very flexible when it comes to using an induction motor. The majority of what that group did was develop a user interface threw labview to tune the controller too the motor. The output stage (IGBT's) would need to be changed and some variables too. Just about any 4 pole induction motor I guess. The wiring used in their demonstration version is not sufficient to power a car. The bus bars were realistic but not wires out of them. It will take some time for the group on EVCS to get a good packaged version of the design. I doubt that their ideas about putting IGBTs on a PCB will work though.


----------



## Bugzuki (Jan 15, 2008)

The Microchip C compiler student addition is full function, but time limited. If your projects acceeds the time limit then you would have to figure out how to get it to install again. I have done it but don't remember what I had to do.


----------



## Wirecutter (Jul 26, 2007)

Evan said:


> I doubt that their ideas about putting IGBTs on a PCB will work though.


*Those* IGBTs on a circuit board? I won't go so far as to insist it won't work, but based on my modest research, _I'd_ never attempt that. Maybe people a lot smarter than me could get it to work - who knows?

-Mark


----------



## Evan (Feb 20, 2008)

It could be made to work but it would be a very hard thing to due and not very sound.

Bugzuki - Thanks for the info one the compiler.


----------



## Mesuge (Mar 6, 2008)

Wirecutter said:


> I have also studied up a bit on the Tesla/ACP battery design. They parallel cells at the single cell level, then series a bunch of those together. I thought this would be advantageous because the potential imbalance between cells should be less. If you stacked up 4 or 8 cells, then parallel the stacks, there is a potential for more imbalance. Now, they parallel 69 of the 18650 cells for their basic "brick", and I don't know if or how they can manage individual cells within a brick.
> 
> It's seemed to me that a system made up of many, many smaller cells might be the way to go because large lithium cells are hard to get and perhaps less reliable. Also, the failure of one or two 18650s is probably a lot less dramatic than the failure of a 100+aH cell. (Tesla literature mentions this.) Problem is, as you point out, that you have to come up with a monster of a BMS.
> 
> ...


Hi Mark,
is there any more info available about the ACP/Tesla batt. system apart from the known/available material (patents approved&filled, corp. websites, youtube videos)? I second your analysis, their parallel/series approach is relatively simple, they don't micro-manage the single cells (there seems to be only indiv. fuses attached). Some BMS logic comes on the higher level though, "bricks", "plates" etc. 

Now the other problem for diyers is that even if you manage to design 5k 18650s batt. pack, the manuf. won't let you touch their latest stuff like >3Ah cells which are OEM only (Tesla, high end notebooks, etc.) and even the ~2Ah will sell you on not that good terms pricewise, hence big cells like TS LFP comes to play again..


----------



## frodus (Apr 12, 2008)

I got a quote on K2 (Peakbattery) batteries.... 3.2Ah, 3.2V 26650 size batteries (A123 sized) for quantities over 1000 (~10.24kwh) for around 7bucks a cell... but it could be negotiated. 180lbs. cylindrical cells. (10kwh of thundersky would be around 250lbs)

If you went with a 22 parallel and 45 series in a pack (144V 70.4Ah), the peak each cell could supply is 28A for 30S and 12A continuous.... 616A for 30s and 240A continuous for a 22 parallel configuration.... not too shabby.


----------



## JRP3 (Mar 7, 2008)

Mesuge said:


> Now the other problem for diyers is that even if you manage to design 5k 18650s batt. pack, the manuf. won't let you touch their latest stuff like >3Ah cells which are OEM only (Tesla, high end notebooks, etc.) and even the ~2Ah will sell you on not that good terms pricewise, hence big cells like TS LFP comes to play again..


I'm pretty sure the Tesla pack uses the 2.4 ah cells as that was the "sweet spot" in price. They may move up in the future of course.


----------



## Mesuge (Mar 6, 2008)

Yes, rumor (confirmed) has it that Tesla 1.5 drivetrain/batt. pack is based on >2.4Ah cells..


----------



## Evan (Feb 20, 2008)

Why are you guys all so interested in copying tesla. I think the DIY community should focus on our strengths trying a lot of cheep things to find out what works best. Sure math can narrow down the ideal number of solutions but people still need to try them.


----------



## Mesuge (Mar 6, 2008)

It's not about copying nor about Tesla (this is ACP's invention and perhaps even they saw the basic concept first somewhere before, RC models in mid/late 1980s?). At this stage of science/industry and availability of mass produced components (OEM only) there is only limited number of solutions to get the right combination of batt. components to get ~200kW/long range EV: price/Wh, power, reliability, longevity, piggybacking on the electronics industry investment in comodity cells and their rapid progress, ..

If you figure out something completely different great!


My guesstimate is that some sort of hybrid type of batt. pack might be the suitable route for diy exploits 
(from frankenstein's garden): e.g. capacitor + Pb, capacitor + LiFePO4, ..
where you can again capitalize on the continuous progress made by big industries,
even if EVs get a boost in next decade, the best traction batt. will be always OEM only..


----------



## Wirecutter (Jul 26, 2007)

Well, after looking again at recent pricing, I'm beginning to swing more toward Evan's point of view. Seems to me that certain 18650 cells have been creeping up in price (again). Last I checked, and with the published pricing I could find, a Tesla type battery arrangement would run well over $50,000. If Tesla had to pay that much, I can't see how they could ever become profitable. Of course, they probably get a better price than I can.

I did the math on the Tesla battery system at one point and convinced myself which capacity 18650 they were using. It was either the 2.2Ah or the 2.4Ah. I have spreadsheet files somewhere - for a while there, I used them like post-it notes to calculate a bunch of different series-parallel configurations of 18650s, C, SC, and other sizes. I also compared some NiMh cells, but they didn't have nearly the energy density and they were still heavy.

I did web research on the Tesla battery. A lot of good info is in a "white paper" I found on the Tesla web site. I found a description of the battery specs, the construction of the various modules of the battery, etc. Apparently, the arrangement of the cells within the battery pack is no big secret. (11 "sheets" in series per pack, 9 bricks in series per sheet, 69 18650s in parallel per brick.) The "secret" stuff is the details of the battery management system. 

Come to think of it, AC Propulsion's AC150 has been used a lot with the "zillion 18650" battery system. The Tzero, the Wrightspeed X1, and the Tesla all use the AC150 system and feature similar battery systems. (I don't know about the Ebox) I wonder how much the AC150 "knows" about all those little batteries connected to it. Could this be an area of proprietary information that makes the AC150 system so hard to get?

Anyway, I really have to buckle down on my controller. I'll keep thinking about batteries and management, but I really need to get a shaft turning first.

-Mark


----------



## JRP3 (Mar 7, 2008)

One thing to keep in mind, Tesla based their setup on the ACP system but supposedly modified and improved upon it so they aren't exactly the samething.


----------



## coulombKid (Jan 10, 2009)

buzzforb said:


> The thing which intimidates me the most is the pcb design. i believe, perlhaps incorrectly, that i can learn the programming given sometime. i ben looking at learning c with gcc compiler and and complimentary tutorial. there are quite a few books as wellas sites that seemto do a good job walking through the embedded programming process. i guess i am going to jumpin the deep end soon. i will just do the best i can. perhaps i canfind reference points to help with pcb layout. i would like to build board in such a way that i can have both charger module and bms module attached toinverter much like ac propulsion. geees that sounds way over my head. what the hell, might as well. rather burn up than fade away, with the former being likely with a little of the latter on top.


I designed my first PCB using ExpressSCH and ExpressPCB. I'm good at designing circuits and breadboard optimizing them so ExpressSCH was a breeze. I've used AutoCad over the years so learning ExpressPCB was fun. I think the charge $60 for simple 2-layer boards (3).


----------



## Evan (Feb 20, 2008)

Look if you are really married to the idea of using windows  the gEDA developers have port of PCB for windows in the works. I personally don't care for using windows but too each his/her own.


----------



## coulombKid (Jan 10, 2009)

Evan said:


> Look if you are really married to the idea of using windows  the gEDA developers have port of PCB for windows in the works. I personally don't care for using windows but too each his/her own.



I'm slowly trying to lean more about Linux. I've converted my home desk top to a dual boot machine but I still have to fall back on Windows a lot of the time.


----------



## Evan (Feb 20, 2008)

coulombKid - I started with linux but it was not as well documented back then. I started with SuSE (before Novell and M$ got involved) and then moved to gentoo. I was introduced to it by a few friends with heavier software backgrounds than mine. They started in the earlier days. It took me a two years to dump windows. As it is employers/school still have apps I have to use in windows. Wine is good but not always as predictable as I would like. 

I like PCBExpress as a company but not the tool they distribute. It is my pet consperiacy theory that they are trying to create vendor lock-in. Get the smaller run users to build more of their stuff in the tool to the point where changing tools becomes a pain. Granted more popular tools like Cadence are not very user friendly but atleast they offer some nicer footprint libraries. The thing is they are expensive and propriety. I use gEDA's PCB because it is free and Cadence is proprietary. I don't like having to maintain my own libraries but I use a lot of odd parts. Besides I don't trust other peoples footprints anyway.

What distro are you using?


----------



## epyon (Mar 20, 2008)

Small question from the little yellow bus . Will any this be able to be used on one of those big AC motors people just give away because they can't controll them ? And can I be a ginne pig to any of you ?


----------



## Evan (Feb 20, 2008)

epyon - Hmmm... 

Well my thing is still a ways away. 

The Circuit Cellar thing should work with anything in a sane range depending on the size of the IGBT's in the output stage of it.

Etischer is close IMHO. I don't know how well regen will work with his hacked VFD machine. The thing which is remarkable to me is that he has very little info on the motor he is using which I believe was an old Rav4ev leftover. If you read his thread he lists the rough spec for it. 

Basically I think we need to know more about the motor(s) you have access to before we could really answere this.


----------



## JRP3 (Mar 7, 2008)

Evan said:


> Etischer is close IMHO. I don't know how well regen will work with his hacked VFD machine. The thing which is remarkable to me is that he has very little info on the motor he is using which I believe was an old Rav4ev leftover. If you read his thread he lists the rough spec for it.


Ford Ranger EV actually.


----------



## Evan (Feb 20, 2008)

JRP3 - Oh my mistake.


----------



## epyon (Mar 20, 2008)

A 12" inch Diameter AC motor , could that be controlled with one of them ? And if so , P.M me . I suck with electronics but I can build a car from nothing . Let me know what I need to get you and I will try .


----------



## etischer (Jun 16, 2008)

The VFD I'm hacking has an auto tune feature where it will measure the mutual inductance, rotor resistance... So I'm hoping once I get my current transducers implemented this feature will still work. Still working on getting my battery pack together, then I can atleast test v/hz mode on the vfd. 



Evan said:


> epyon - Hmmm...
> 
> Well my thing is still a ways away.
> 
> ...


----------



## Evan (Feb 20, 2008)

etischer - Thank you for the update and nice work on your project. I have to wonder how the controlers firmware will do the math once it gets values for a motor much larger than the one it was designed around. I am just curious about how you are looking at it, I don't want to be a nay sayer. I remember your remarking that at the low starting speeds the motor seemed to hesitate, is that the result of the sensing not working yet? I repared a few smaller VFD's and they had a large resistor wattage and acompanying transistor to dissipate the power we otherwise would want for regen. Did you have to scale that up too or does your controller work differently?

epyon - No offense I know the whole inch dimensions thing is common in the EV enthusiast area but it really is meaningless across vendors and motor types. It is really only useful for mechanical mounting related issues. If you could find the output power, input power, frequency, rate RPM, number of phases that information would be more usefull.

I am the opposite of you, I know my electronics but not my mechanics.


----------



## etischer (Jun 16, 2008)

The VFD uses current transducers to measure motor current. I am replacing the 5 amp sensor with 500 amp sensors. 

The hesitation in the motor was likely due to the weak extension cords. The lights in the house were flickering like crazy, so I think my generated sine wave was saggy. I hope things improve once I get a battery pack conected. The inverter was running in volts/hz mode so there is no feedback required. It would be the same as plugging the motor across a 230 volt line. I'm a bit dubious about getting sensorless vector mode working too. The drive will still think its putting out 5 amps and 230 volts. 

The dynamic brake resistor is not needed for regen in my case. The resistor starts dissipating energy once the dc bus voltage gets too high. Since I have a huge battery pack instead of a small internal capacitor, my dc bus voltage should never get too high. If it does, the drive will just trip on over voltage and shut off. 




Evan said:


> etischer - Thank you for the update and nice work on your project. I have to wonder how the controlers firmware will do the math once it gets values for a motor much larger than the one it was designed around. I am just curious about how you are looking at it, I don't want to be a nay sayer. I remember your remarking that at the low starting speeds the motor seemed to hesitate, is that the result of the sensing not working yet? I repared a few smaller VFD's and they had a large resistor wattage and acompanying transistor to dissipate the power we otherwise would want for regen. Did you have to scale that up too or does your controller work differently?
> 
> epyon - No offense I know the whole inch dimensions thing is common in the EV enthusiast area but it really is meaningless across vendors and motor types. It is really only useful for mechanical mounting related issues. If you could find the output power, input power, frequency, rate RPM, number of phases that information would be more usefull.
> 
> I am the opposite of you, I know my electronics but not my mechanics.


----------

