It didn’t take long to get the first Decimus 4 board on the bench for a build. This first one will serve as a static testbed for code development and sensor testing. After verifying that the power supplies were good, the LEDs, display, buzzer and pushbuttons were added for a bit of a play. Since that went well, the rest of the components, except the wall sensors were added. I had run out of the MAX4427 gate drivers so I carried on without them. Don’t do that…

The motor driver MOSFETS are full-bridge devices and would normally have their gates drived directly from the MAX4427 gate driver. That means they would always be at one rail or another and either the top or bottom MOSFET will be on while the other one is off. With the gates floating, there is no guarantee about which MOSFET will be on and they can both be partially on. The result is potentially large currents flowing through the motor driver even without the motor connected. And tendrils of smoke gently wafting up from the devices.

Fortunately, the smoke seems to have just been hot flux and the power supply I was using went into current limit at 800mA. Without the current limit, the outcome could have been much worse. Nonetheless, the motor drivers may have sustained some damage so it would be best to replace them.

Without the gate drivers in place, the temporary solution is to short all the driver gates to ground so that I can continue developing code with this board while I wait for some new parts to arrive. That will ensure that one MOSFET in each half-bridge is firmly off.

So – until you are certain everything is correct, run from a current limited power supply and never, never leave the gates floating on a MOSFET half-bridge. But you already knew that. So did I but I rushed it anyway.

While testing, I have screwed the board to a piece of perspex as a precaution against shorts on my normally cluttered desk.

Decimus 4 getting built

 

This Post Has 17 Comments

  1. Bodie

    I have quite similar experience with MOSFETs, but we had there 6 cm high bright flame – because of running from Pb battery. The problem is the same, gates hadn’t defined state.
    Now we do tests only with current limited power supply 🙂

  2. dragonet80

    Just use pull-downs on gate mosfets.

  3. Augusto

    Just for curiosity, what value and voltage are the three tantalum ?

  4. Peter Harrison

    They are 100uF, 10Volts – although for no specific reason

  5. Augusto

    Are you splitting the digital and analog ground? If i remember in the forum i read that you use eagle, as me, how do you split the signal in eagle?

  6. Peter Harrison

    The two grounds are split. In Eagle, I have a part that consists of two surface mount pads. One pad is digital ground and one pad is analog ground. They are joined by a wire in the package but are otherwise separate. Eagle just treats this as two nets and they are automatically joined on the layout.

  7. Augusto

    Can you share the eagle part?

  8. Peter Harrison

    Sorry for the delay.

    I think I used the 2-pin jumper part from the Sparkfun library. It has a variant that will short out when reflow soldered. Since it is from their library, it would not be appropriate for me to post it here.

    Try: https://github.com/sparkfun/SparkFun-Eagle-Library

  9. Augusto

    Thank you… can you tell me what connector you use for the battery and the motors?

  10. Peter Harrison

    The motor connectors are JST PH series 2mm pitch and the battery connector is a JST XHP2 2.5mm type. I should have used the PH series for both but wanted the batteries to be useable on another base I have.

  11. mog123

    I’m having some power issues with my mouse. When I did the tests, everything worked. Let me describe my problem:
    – When I turn on the left motor on for 100% pwm, it works easily
    – The same thing works with the right motor
    – When I switch the connectors and turn the left motor, on the right driver, and vice versa (right motor on the left driver), still each one separately. Everything works.
    – When I turn both motors on, they try to budge, but they both turn off… I’ve added lots of caps (like 200uF before and after the 3v3 LDO) along with my 7,4v lipo battery. And the thing still happens. Do you know what might be the cause? Is it really the power? I’m trying to run both motors with 750/4096 pwm, and still this happens.

  12. Peter Harrison

    Do they work at lower PWM levels?

    Put a voltmeter on the battery terminals and see what happens to the battery voltage when you drive the motors.

    Make sure that it really is the battery that is providing the power to the motors and not one of the regulators.

    Do you have an oscilloscope? If you do, disconnect the motors and look at the signals on the drive and make sure they do what they are supposed to.

    You may have a wiring error in your board. Trace all the signals carefully. It may help if you can provide either a schematic or code. Or both.

  13. Green

    Hi Mog123,
    Based on the layout board on your site, seems you power your motor driver with 3.3V LDO regulator http://3.bp.blogspot.com/-CAdfAy7pJMw/UGn9EM4KRBI/AAAAAAAAAXI/ZDgNQe2MDsY/s1600/pcb.png
    If what I said was right, then probably you should consider to re-designed your mouse to power the VDD for your motor driver with battery voltage(7.4V)
    The max current output will be limited by the LDO regulator you use, and dropping voltage from 7.4V(8.4V max actually when fully charged) to 3.3V to feed a application with a power hunger application(such as the motor, which is the one drains the most power of your system) will be very efficient for the power usage for such as system.
    I also noticed you mixed your digital/analog/motor ground almost together on the top half of your PCB, also the power trace wasn’t consider be thick enough if you have more space available on your board.
    On the other hand, I really like your work to make the thoughtful motor mounting system. it looked so elegant and is always what I dreamed with!
    Power system design is very important and will always be ignored by people. May be “copy” someone’s design is a save way to start with(that’s what I did 🙂 )
    wish you best luck afterall.

  14. mog123

    It’s really an embarassment for me, cause I really thought I knew what I was doing. I didn’t make any simple mistakes as Peter mentioned. Every voltage is good etc. The only thing I didn’t do was make the design robust. I’ve added every ceramic cap needed of course, but I scarced on bigger caps, cause of their size. I thought one 100uF just after the LDO would be enough. Apparently it is not. I have made some improvements by adding more caps, but the problem is still there. I’ll be checking it out at work tomorrow on an oscilloscope and keep you guys updated.

    Green, thank you for acknowledging my blog. You can be sure that after I get my bachelors diploma I will upload some cool info, like how to implement a nonlinear motion controller, because it’s already in the works 🙂 Just those darn motors are playing games with me…

  15. Green

    Hi, Mog123,
    I don’t think this is about capacitor, since I saw someone only put a 10uf CAP on motor driver and performed pretty well at competition with faulhalber 1717 006 motor at APEC. May be having a schematic here for your mouse will be good for us to diagnose the problem your mouse has.
    What’s the discharge for your battery? the motor will shut off when accelerate too hard if the discharge rate for the battery is too low. I had this issue at beginning by choose some low discharge rate battery ended up had the mouse powered off when motors spin fast. Then I parallel 2 batteries as one to maintain sufficient current output. Usually 20-25C batteries are what I suggested. The max current = battery capacity * discharge rate. For instance, a 150mah battery at 20C discharge rate will have 150*20=3000mah=3A continuous current output capability.
    I don’t know what exactly motor you are using, you may need to go check the spec for motor’s current consumption to decide how much current is need at 7.4V power supply. I also noticed since you use A3950 motor driver, a thermo-pad is always suggested under the IC to help keep charge balance and heat spreading.

  16. mog123

    As I said, the problem was the caps, I had only ceramic caps near the driver, I put in an extra tantalum 100uf 10v and everything now works great 😉

  17. Green

    I am glad to hear that you have your problem solved 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.