Wednesday, January 7, 2015

Return of MechEtroller, revisions 1 and 2!

Way back in the warmer days of September, I posted the creation and almost immediate destruction  of my first brushed motor controller, MechEtroller. While the result was unsurprising given my limited experience in power electronics and PCB design, I'm won't let this project die with only one failure. I'm a huge advocate of learning by doing, and each MOSFET detonation is another valuable piece of education in how not to electronics! So the adventures of a MechE student attempting to build a robust, compact motor controller continues.

 Not long after the voltage regulator smoke cleared, I embarked on the revisions to solve the grounding issues that plagued the first version.

If only it happened this quickly in real life
No new features were added in this iteration, only an attempt to resolve the problems I identified last time and some rerouting. I also took the more intelligent approach of soldering this board in bite sized pieces, moving in the order of voltage regulation, logic control, and MOSFET control. Almost immediately, I identified a new problem. I had apparently foolishly assumed that just because both regulators were from the same company and had the same footprint, that the pin breakout would match. This meant that the 12 volt regulator was out of commission, so I bypassed it by jumping the pins with a small strand of copper. This was less catastrophic that it sounds, because the 5 volt regulator could handle up to 12 volts, and that was the exact voltage needed for the gate drivers. So, with the board now connected to a carefully dialed in variable power supply, I continued onto the ATmega 328 microcontroller and peripherals. The power LED was still giving the all clear, indicating that there were not immediate shorts, so I went ahead and burned the Arduino bootloader onto the chip through an ICSP pogo pin programmer...


...and it started right up, blinking the status LED just like it should. Neat! I took the opportunity to test the FTDI header breakout and confirmed that the test program uploaded successfully. With the simple stuff finally working, I moved onto the FETs and gate drivers. I send a 5 volt signal to the gate pin on the driver and measured the output. The multimeter read 0 volts. Back to the datasheet. Further investigation revealed that the XREF pin of the FAN3111 driver had been mistakenly tied to ground rather than logic voltage. Whoops. Another lesson to read the documentation carefully and not submit PCB designs at 2 in the morning. I spent a little more time chasing down another strange problem involving voltage leaking across a MOSFET, but after examination and input from some friends, concluded it was a result of not cleaning the flux from soldering. 

Excited by how much closer revision 1 had gotten me, I decided to get a little more ambitious. I was dissatisfied by the FETs I was using, now firmly convinced that their tiny size was just too limiting of thermal dissipation. The pitch spacing on the pins was also a concern, just inviting a tiny metal shaving or solder blob to lodge between and ruin a lot of work. I also wanted to include a current sensor, so it could begin making intelligent power control decisions. I settled on the IRLS3036 for the FETS, due to their relatively cheap cost, acceptable Vgs vs Rds relation, and hefty D2Pak footprint. This footprint also gives me the ability to easily upgrade to better components when the detonation danger level has dropped. I chose the ACS712 hall effect current sensor because it was the cheapest component that could measure up to 30 amps (a somewhat arbitrary design requirement that I decided on when starting the project).


The increased footprint of the FETs is pretty obvious right away. You can also make out the current sensor pads to the left of the battery voltage plated hole. Populating the board was uneventful with the exception of a tiny solder bridge from one of the gate drivers shorting to a ground via. Once fixed, power regulation and the microcontroller operated normally.

Now uglier and covered in sawdust
Before soldering the FETs, I ran through each of the gate drivers, checking to see that they outputted the 12 volts being supplied to the gate pin when driven logic high. Everything checked out, so I added in the MOSFETs. Immediately there was a problem. Everything powered on fine for about a second before the microcontroller began switching the outputs. Then, a brief current spike would occur and everything would reset and repeat the process. I tried to track the source of the shorting in numerous ways, before finally deciding to just allow the board to draw more current and seeing what got hot the fastest. The board sustained about three seconds on an electric drill battery before smoking in multiple areas, but it was enough time to see the issue. Somehow, certain MOSFETs were conducting even when their gate pins were low. The only way I could imaging that happening would be voltage spikes over 60 volts (impossible), or that the current was flowing source to drain. I checked the eagle schematic and confirmed my suspicions. In my eagerness to copy and paste the new FETs into the schematic, I had accidentally flipped the position of two of them. Another facepalm moment, but another opportunity to add more functionality in the next revision...






No comments:

Post a Comment