DIY Electric Car Forums banner

1 - 20 of 32 Posts

·
Registered
Joined
·
15 Posts
Discussion Starter #1
Hey guys,

After much lurking, I figured I'd step in and make a thread about my latest project. I'm currently developing a 3-phase motor controller for an EV I hope to convert some day. The work itself is being done as my capstone project in my final year of an EE degree. Here are the basic specs:

Hardware

  • NXP LPC1768 microcontroller - 32-bit, 100MHz, 3-phase motor PWM peripheral, etc.
  • VLA106-15242 isolated 24V gate driver power supplies
  • FUJI 6MBI100L-060 600V 100A IGBT 6-pack
  • LEM HAL-300 current sensors
  • 1/2 HP 4-pole 208-240/480V GE motor

The IGBT pack and motor selected are just for initial testing. Eventually they will be replaced by three 600V 300A dual modules and a hopefully a motor around the 20-30kW range.

The first revision of the PCB is complete and contains all the control and driver circuitry. It only supports basic functionality and will eventually be replaced with another board with more protection. Currently there is overcurrent protection both in software and hardware but no overtemp, overvoltage, etc. The board is a 2-layer design sized at 7.00" x 5.85". It could be shrunk down significantly but the fab house I'm using wouldn't charge less so I left it fairly large. I may choose to separate the driver and control boards in the future but for the first revision I kept it all together.

Firmware

I'm developing the firmware using NXP's LPCXpresso IDE, which is actually quite nice to use. I haven't had any previous experience with the LPC17xx series controllers however, so if anyone has experience with these I'd love to pick your brain on the topic.

The goal is to have field-oriented control with space vector modulation. I believe it is a reasonable goal to achieve in the time frame of the project (basically needs to be done before I graduate in May).

Current Status

The gerber files have been sent away for fab and I can expect the PCBs in a couple weeks time. I've attached an Altium 3D rendering of the mainboard so you guys can get an idea of how it'll look. While I'm waiting for the PCBs I'll be continuing development on the firmware. I'd like to have working V/Hz firmware ready for when the PCB arrives.

I'll be posting updates regularly to help document the project. I intended to put all this info on a website but this should be much easier to update in the mean time.

Cheers!

Chris
 

Attachments

·
Registered
Joined
·
4,064 Posts
I'll be following this project! I have two mbed LCP1768's.

Why is the throttle 2-pin? Why not use a 3-wire 0-5V (allows you to use hall effect or a pot)
 

·
Registered
Joined
·
15 Posts
Discussion Starter #3
I'll be following this project! I have two mbed LCP1768's.

Why is the throttle 2-pin? Why not use a 3-wire 0-5V (allows you to use hall effect or a pot)
To be honest I just designed it to use some 10k pots I had laying around. I figured there would be at least one revision before this actually goes into a car so I could figure out what would work best for a throttle/regen interface.
 

·
Registered
Joined
·
15 Posts
Discussion Starter #5
Nice one.
A lot of work lies ahead, dont let it get you down.
Thanks :)

By the way, I read through your DTC controller thread with much interest. I spent quite a bit of time deciding between DTC and FOC and still am quite curious about DTC. Haven't seen as many applications of it as FOC.
 

·
Registered
Joined
·
15 Posts
Discussion Starter #6
I should also mention that I plan to make the schematics, Gerber files and BOM public once this thing is a tested and complete design. I'm not sure how much I can release at the moment due to university policy.
 

·
Registered
Joined
·
780 Posts
Good work, Chris. Here's hoping the U policy allows your own design to be published... but you're right on not risking your final project chances.

Looking forward to the schematics and other materials when you have the time. I'd selfishly love to see them in native Altium format if you can.

JR
 

·
Registered
Joined
·
15 Posts
Discussion Starter #8
Time for a minor update!

With all of the parts collected (minus the PCB itself :p - should have that by Wednesday), it's time to start assembling the system. Once it's together and the PCB is tested I'm going to use some equipment from the school to start the development - namely a small induction motor with a belt drive attachment to a DC generator. A few pics included below.

To all of you in BC, Happy Family Day!
 

Attachments

·
Registered
Joined
·
1 Posts
Chris,

Thanks for posting an update - having parts in hand is a good sign! I am happy to see an update on this and will be following the progress. Actually I registered for this forum specifically to see this thread, as I intend to build a (big) brush-less controller on the basis of an LPC1768 (currently have an mbed). I have done some or the schematic but have not yet started the layout. The software side is the part which worries me, so I hope to be able to learn some of this from your project.

To prepare, I have been doing a lot of reading. AN10899 is particularly good. I have determined that the Motor Control PWM signals are the way to go (specifically for dead-band settings to avoid shoot-thru on the IGBT gate pairs). One thing I found yesterday that was troubling is an errata sheet put out by NXP specifc to the LPC1768 chip stating that some of the MCPWN do not function. I have yet to check the pin-to-pin comparability, but I am really hoping that I can just swap to the faster LPC1769 chip (provided that it does not have the same issue). I may be jumping the gun, but I wanted to give you a heads up on this potential issue.

Good Luck !

- Brian
 

·
Registered
Joined
·
15 Posts
Discussion Starter #10
Chris,

Thanks for posting an update - having parts in hand is a good sign! I am happy to see an update on this and will be following the progress. Actually I registered for this forum specifically to see this thread, as I intend to build a (big) brush-less controller on the basis of an LPC1768 (currently have an mbed). I have done some or the schematic but have not yet started the layout. The software side is the part which worries me, so I hope to be able to learn some of this from your project.

To prepare, I have been doing a lot of reading. AN10899 is particularly good. I have determined that the Motor Control PWM signals are the way to go (specifically for dead-band settings to avoid shoot-thru on the IGBT gate pairs). One thing I found yesterday that was troubling is an errata sheet put out by NXP specifc to the LPC1768 chip stating that some of the MCPWN do not function. I have yet to check the pin-to-pin comparability, but I am really hoping that I can just swap to the faster LPC1769 chip (provided that it does not have the same issue). I may be jumping the gun, but I wanted to give you a heads up on this potential issue.

Good Luck !

- Brian
Thanks Brian!

Is this the errata sheet?

I think it may only refer to the original revision (released in 2009 I think) of the die, hopefully the later revisions have it fixed. Regardless, I actually have an LPC1769 on hand that I intend to try out - I will let you know if the MCPWM input pins work. I believe the 68 and 69 are pin-to-pin compatible, it seems to follow the general trend of their device family naming.
 

·
Registered
Joined
·
15 Posts
Discussion Starter #11
Time for a reading week update!

The PCB is now assembled and ready for basic testing. I need to figure out what kind of filters are needed at the current sensors and a couple other basic component choices, but I should be able to start testing the micro-controller and PWM signalling shortly. So far I've powered it up and tested the four rails (+5V, +3.3V, +15V, -15V).

For those wondering what the little blue module sticking up is, it's the Bluetooth comms module. These things are dirt cheap now, you can grab them for ~$8 on dealxtreme. The micro-controller is programmed over it, and during regular operation it'll be used for live diagnostics streamed to a laptop.

Link to Bluetooth module here.
 

Attachments

·
Registered
Joined
·
15 Posts
Discussion Starter #13
Thanks Paul.

FWIW the modules I'm using should work fine with any micro-controller. The 3.3V IO will likely work out of the box with 5.0V PICs, or you could add a basic unidirectional level converter (resistor divider) for the 5.0->3.3V if you're worried about the levels.

Chris
 

·
Registered
Joined
·
3,141 Posts
I'm happy to say that I ordered and received a Bluetooth module:
http://www.ebay.com/itm/181072994083

It works directly on 5VDC and TTL RX/TX lines from the PIC18F4420 in my datalogger project. I got a $12 Bluetooth dongle for my laptop and it found the module and allowed me to use COM14 to receive the data stream at the default 9600,N,8,1 settings. Very easy to use and dirt cheap. I paid $12 for the dongle but I saw some on eBay for less than a dollar including shipping! How do they do that?
http://www.ebay.com/itm/USB-2-0-Min...Adapter-For-PDA-Mobile-Phone-PC-/280865366084

I was amazed that the signal was not blocked by a 7" x 9" 12 gauge steel plate. I may incorporate this into an industrial test set I am designing. Thanks for the idea! :)
 

·
Registered
Joined
·
15 Posts
Discussion Starter #15
Quick update:

School's been quite busy lately with other projects and assignments, and as a result I haven't had as much time to focus on this project as I would have liked. In addition to other schoolwork, I've run into a problem with the controller. I haven't been able to get the LPC1769's bootloader to respond - meaning I can't even program the damn thing. After some probing it looks like the chip is completely dead and will have to be removed. It may have been damaged during assembly or perhaps had shorted underneath the pins; regardless of what caused it the next step is to remove it and check for visible shorts. Being that it was 3:00 AM and I didn't have a hot air gun, I decided to try something different. Surprisingly, it worked in just a couple minutes and didn't seem to leave any damage to the board other than some candle residue which wiped off easily. Hopefully a replacement LPC will have this board up and running tomorrow!
 

Attachments

·
Registered
Joined
·
571 Posts
Ovening the PCB's is not worth the hassle unless you have the real process at your disposal.

Just hand solder, it's one of the quickest steps in the project and pretty straightforward. If not, then you have too many components!

If you are going to mass produce, then develop and test the reflow process first.
 

·
Registered
Joined
·
15 Posts
Discussion Starter #17
Ovening the PCB's is not worth the hassle unless you have the real process at your disposal.

Just hand solder, it's one of the quickest steps in the project and pretty straightforward. If not, then you have too many components!

If you are going to mass produce, then develop and test the reflow process first.
Yes, I hand-populated the boards for this run. I have a toaster oven for reflow but I had a lot of through hole parts anyways so I figured I'd go for the hand soldering method. In this case, I used the candle to desolder, since the oven would haved caused all of the parts to come loose instead of just the one. It worked surprisingly well!
 

·
Registered
Joined
·
3,141 Posts
That's a clever idea with the candle, but it may still cause some damage to the board. What I usually do for removal of SMD chips with exposed legs is to cut them with an Exacto knife and then use a soldering iron and vacuum sucker to remove the debris. Of course that won't work for a BGA or a chip with a soldered ground/heatsink pad under it.

Also make sure you clean the board thoroughly, using something like alcohol to remove the solder flux and then follow with detergent and water to remove conductive ionic contaminants, and finally a thorough wash with clean water )perhaps even distilled or deionized). Then a thorough baking or drying with a heat gun.

It looks like you have a lot of room on your board, and you may do well to use an adapter board and a socket for easier removal and testing. Good luck on your project.
 

·
Registered
Joined
·
15 Posts
Discussion Starter #20
I'm a bit jealous to be honest. Gate drivers and controller all on one board, thats nice.

So these black things are DC/DC converters and the 8SOIC parts are the gate drivers?

What other I/Os do you have?

I hope you can fire it up soon, there is none greater :)
Correct, the black potted SIP packages are the +15/-8.4V DC/DCs and the SOICs are the 12A low-side drivers. I/Os are kept to a minimum for this revision, other than the phase current and encoder inputs there are just a few pushbuttons, contactor control, two pots (throttle and regen) and a serial link.

That's a clever idea with the candle, but it may still cause some damage to the board. What I usually do for removal of SMD chips with exposed legs is to cut them with an Exacto knife and then use a soldering iron and vacuum sucker to remove the debris. Of course that won't work for a BGA or a chip with a soldered ground/heatsink pad under it.

Also make sure you clean the board thoroughly, using something like alcohol to remove the solder flux and then follow with detergent and water to remove conductive ionic contaminants, and finally a thorough wash with clean water )perhaps even distilled or deionized). Then a thorough baking or drying with a heat gun.

It looks like you have a lot of room on your board, and you may do well to use an adapter board and a socket for easier removal and testing. Good luck on your project.
I have tried that technique in the past (scalpel then iron + solder sucker) but have had pretty bad luck with damaging pads. I'm probably not as experienced at it as yourself though, so maybe I'm being too aggressive during the removal. In any case, I'm going to pick up a hot air reflow gun soon so hopefully I won't have to resort to candles or knives anymore :D

Yes I made sure to wipe the board with alcohol and I usually use the low-solvents "no-clean" flux anyways. Will take another pass with distilled water as per your advice, thanks.

Regarding the socketing of the microcontroller, in retrospect I kind of wish I would have modularized the whole thing - one board for the power supplies, one for the micro and inputs/outputs, and one for each driver (mounted on the IGBTs). Unfortunately this was considered a bit too prohibitively expensive for this project at the time of conception.
 
1 - 20 of 32 Posts
Top