I'll start this off by simply saying I am not an Electrical Engineer. I am, however, an embedded programmer who has had some experience with circuit design and setup (give me 1's and 0's and I can make them dance...but Analog is black magic...).
Some background that might help understand what's going on here. I work in my spare time to help a local theater out as one of their Technical Directors. Long ago, they built a rig that's used in several productions and special events. The rig is specifically an aluminum chassis on rails, above the stage, that is remotely operated. The rig allows tech members to lower down props on stage while the show is running. A prop is simply attached to a tether and lowered down to the stage by a small DC motor. The motor runs in only one direction - down. The rig then jaunts off stage and is prepped for the next use. By it's, rather interesting, design, the motor is taken off and placed back on several times (it's changed out for different items, not enough space on the rig for everything).
Now, I originally designed the control circuits a long time ago and they have worked beautifully since then. However, I finally have the time and money to help them out by upgrading it. In that process, I'm trying to solve all the electrical puzzles I haven't found the right answer to.
The original design is DEAD simple...n-channel MOSFET attached to a uC (view the lower image, but remove A/B/C/D). This has worked constantly. However, every time a motor is plugged in, while the device is still powered, the unit will completely reboot. I initially thought this may be due to an inrush of current from attaching the DC motor coil, but I'm not knowledgeable enough to know if it's that, or the lack of a fly-back diode. Or, worse, something is happening to the uC. After several trips through google and this site, I've seen several suggestions made, but I can't discern which is accurate or the best solution for this. Even worse then that, I don't know how to properly size any of these components (I'm sorry, help!).
For additional information, the motor being attached is always 3v-3.3v and 1A to operate. The motor's can be changed on the fly, so I can't give an exact value here on the properties of each motor (the rig must be blind to this), but those 2 requirements are always met. The motors are also controlled by PWM via the uC.
Here's the proposals I've seen:
So let's go down the list.
'A' was suggested to prevent latch-up of the uC when the field collapses on the motor. I...guess that make's sense, not sure if that'll help or hurt me.
'B' is a standard fly-back diode for when the field collapses to prevent back-fed EMF. Is this the correct place to put it? How does one size the diode if this is correct?
'C' is a dual-zener fly-back that was also suggested. This requires more parts, so I'm not sure if there's anything beneficial here.
'D' is a varistor installation to prevent the inrush. Would that prevent my uC from rebooting when the motor is plugged in? How does one size it?
Are any of these designs correct? Do I need to add in a TVS for ESD? And more importantly, if any of these are good choices, how does one choose the part? I know to look for certain items in a data sheet, but the multitude of additional information bits just does my head over. What's important and what's not?
Finally (it's a tome, I know...) we have the last bit that I'm adding in this year.
This was a request by the director. He want's to be able to 'drop' certain items rather than use the tether. To do this, he currently has a poor stagehand connecting a rather large magnet to a car battery. The magnet is spec'ed at 12V at 0.66 Amps (EM175L-12-222 from apwelectromagnets.com) for a holding force of 110# (complete overkill, but safety related). The above circuit, I believe, will do what's needed. The uC will send a 1 down the line (MAG1/MAG2, Armed is a safety, will also be 1) and the magnet is energized. When I want to 'drop', I write a 0 on MAG1/MAG2, sending the H-bridge in the opposite direction, forcing the magnet to push the prop away (it has a tendency to 'stick' at the moment if the magnet is left on for too long, magnetizing the prop plate). Would this design work? Do I need to add the same or different protections from above since the EM field on this is going to be much larger when the H-bridge switches?
I sincerely appreciate any help I can get on this. I wish I could disclose more about the theater, the show, and other information. I am however under a contract that prevents me from doing such without the directors approval (working on it!) Any assistance is greatly appreciated, and I will attempt to get you added to the show pamphlet if the director approves.
Again, thank you for reading the story of the MOSFET, or the more popular title, Harry Potter and the prisoner of Diodes.
Edit per Tony's Questions:
Power is from an A/C line converted to 12V via an on-board power supply (100W, DPS-100AP-11 A by Delta Electronics), which is then converted down to 5V and 3.3V via linear regulators capable of 5A each (AZ1084CD-3.3TRG1 via Diodes Incorporated for the 3.3v supply, LM1084ISX via TI for the 5v supply). External cabling is not shielded, and consists mainly of standard 2-terminal speaker wire (on the cheap unfortunately). Cable lengths vary from a few inches upwards of 10' depending on the rig setup at that time.