Maker Pro
Maker Pro

Electromagnet with strength controlled by photoresistor

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
The diodes need a peak-inverse-voltage (PIV) somewhat greater than the power supply voltage

Looking at the document you uploaded, is this the Maximum Repetitive Peak Reverse Voltage, which is listed at 50 V in the 1N4001 column? I take it this requirement refers to what will be the normal mode of operation in my case, since the diode is wired against the normal flow (i.e., it's blocking current through itself when the coil is on, and that's why we're looking at the "reverse" voltage spec). In this case, because 50 V is more than either 16 or 24 V (I realized that the voltage I use will depend on which magnets I go with), we're good.

When the MOSFET turns off, whatever the current is in the coil at that moment will be transferred to the diode, so the peak current capacity of the diode needs to be at least as large as the coil current

Here we're talking about the Peak Forward Surge Current, correct? Because current will be flowing backwards through the circuit (but forwards through the diode) right after the coil is turned off. The rating here is 30 A. Since the circuit will have 16 V // 32 Ω (or 24 V // 87.7 Ω for the store-bought magnet option) we'll only be pushing 0.5 A (at most) in the 'forward' direction through the diode. Correct?

even the lower PIV-rated 1N4001 diodes

The only difference between the 1N4001 and the 1N4007 seems to be the Maximum Repetitive Peak Reverse Voltage. What would be the symptom if the 1N4001 isn't up to the task? Would it simply melt?

Instead look for a power MOSFET specified for TTL (5 V) gate switching levels, such as this one.

Just ordered it. Thanks!

pretty ingenuous person

Thanks for the vote of confidence!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Looking at the document you uploaded, is this the Maximum Repetitive Peak Reverse Voltage, which is listed at 50 V in the 1N4001 column? ...

Yes.

... I take it this requirement refers to what will be the normal mode of operation in my case, since the diode is wired against the normal flow (i.e., it's blocking current through itself when the coil is on, and that's why we're looking at the "reverse" voltage spec). In this case, because 50 V is more than either 16 or 24 V (I realized that the voltage I use will depend on which magnets I go with), we're good. ...
Yes, you're good to use the 1N4001 to block the power supply voltage.

... Here we're talking about the Peak Forward Surge Current, correct? ...
Yes.

... Because current will be flowing backwards through the circuit (but forwards through the diode) right after the coil is turned off. The rating here is 30 A. Since the circuit will have 16 V // 32 Ω (or 24 V // 87.7 Ω for the store-bought magnet option) we'll only be pushing 0.5 A (at most) in the 'forward' direction through the diode. Correct? ...
Yes.

... The only difference between the 1N4001 and the 1N4007 seems to be the Maximum Repetitive Peak Reverse Voltage. What would be the symptom if the 1N4001 isn't up to the task? Would it simply melt? ,,,


I believe all diodes in this series are manufactured from the same chips which are diced from a wafer, packaged, and tested for sorting into "bins" by their maximum peak reverse voltage. In actuality, probably all of them will pass the 1N4007 test of 1000 V PRV, but they will be "branded" according to market demand. However, only those marked as 1N4007 will actually be guaranteed to work at 1000 V although one marked as, say, 1N4001 may very well also work at 1000 V. Unless there is a huge price difference, or there is a small price difference but you are buying in million-lot quantities, buy the 1N4007 type.


Diodes usually fail when their PN junctions melt from excessive current, which can also occur if their PRV rating is exceeded. Sometimes you will find glass-encapsulated diodes (like the 1N400x series) that have turned black inside when the PN junction vaporizes. Those diodes can have failed either open or shorted. In really overloaded instances the glass case explodes and the diode separates into two pieces, each end still soldered to the circuit board. Clearly the diode has failed "open" in this extreme case.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
For the MOSFET you have selected, the gate-to-source threshold voltage is too high for use with a 5 V gate drive. The gate-to-source threshold voltage is the voltage required to just barely turn the MOSFET on. Your device is specified with 10 V gate-to-source drive to obtain full-on conduction.

@hevans1944, can I ask you a bit more about the MOSFETS? When we talk about the gate-to-source threshold voltage, we're talking about the difference between potential across these two terminals, right? Since in this case we're using this chip to regulate a certain voltage with a smaller voltage, we need to hook the Source to ground, that way the difference will always be equal to whatever the Gate is receiving, correct? And since we're working with PWM, the signal itself is not analog, so there's no reason we need to worry about the range of voltage being applied to Gate; the only certainty we require is that it will switch on when hit with the 3.3 or 5 V supplied by an Arduino pin during rapid on-off-on PWM, correct? The part I bought is the FQP30N06L. The spec in question is the Gate Threshold Voltage, which is spec'd as "min" at 1.0 and "max" at 2.5 V, according to this document. (I ordered from Mouser because it was a bit cheaper than sparkfun and I like them).

If we were controlling a larger voltage with a smaller analog (fluctuating) voltage, we would have needed to find something that had upper and lower threshold limits that matched the limits in our controlling voltage, correct? Out of curiosity, what kind of application would have voltage going to the source? What else are these guys used for?
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
I believe all diodes in this series are manufactured from the same chips which are diced from a wafer, packaged, and tested for sorting into "bins" by their maximum peak reverse voltage. In actuality, probably all of them will pass the 1N4007 test of 1000 V PRV, but they will be "branded" according to market demand. However, only those marked as 1N4007 will actually be guaranteed to work at 1000 V although one marked as, say, 1N4001 may very well also work at 1000 V.

Fascinating how this works. They really just label the 'same' parts differently?
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
@hevans1944, can I ask you a bit more about the MOSFETS? When we talk about the gate-to-source threshold voltage, we're talking about the difference between potential across these two terminals, right? Since in this case we're using this chip to regulate a certain voltage with a smaller voltage, we need to hook the Source to ground, that way the difference will always be equal to whatever the Gate is receiving, correct? And since we're working with PWM, the signal itself is not analog, so there's no reason we need to worry about the range of voltage being applied to Gate; the only certainty we require is that it will switch on when hit with the 3.3 or 5 V supplied by an Arduino pin during rapid on-off-on PWM, correct? The part I bought is the FQP30N06L. The spec in question is the Gate Threshold Voltage, which is spec'd as "min" at 1.0 and "max" at 2.5 V, according to this document. (I ordered from Mouser because it was a bit cheaper than sparkfun and I like them).

If we were controlling a larger voltage with a smaller analog (fluctuating) voltage, we would have needed to find something that had upper and lower threshold limits that matched the limits in our controlling voltage, correct? Out of curiosity, what kind of application would have voltage going to the source? What else are these guys used for?
Look at Figure 2. Transfer Characteristics for the document you reference (Fairchild FQP30N06L N-Channel QFET datasheet):

upload_2016-2-23_11-8-4.png
Note the drain current scale is logarithmic. At 25° C, for Vds=25 V, the drain current varies from about one ampere, near the Vgs threshold of about 2.3 V, to about 10 amperes for Vgs equal to about 2.6 V, increasing to 90+ amperes for Vgs equal to 10 V. This is highly non-linear behavior typical of a power MOSFET switch. You want to operate this device as a switch, driving the gate-to-source voltage to zero to turn it off, and to at least 5 V (preferably 10 V) to turn it fully on. This will minimize the power dissipation in the device but will not totally eliminate it because there are switching losses.

As conduction changes between full-on and full-off or from full-off to full-on, the drain current and the drain-to-source voltage (which is dependent on the load impedance and power supply voltage) both pass through a region of so-called "linear" conduction where drain current and drain-to-source voltage are sufficient to cause significant power dissipation in the MOSFET. This particular device is rated for 79 W dissipation. It is also rated for 60 V drain-to-source voltage and 32 A continuous DC current. Clearly both of these conditions cannot occur at the same time because that would result in 1920 W dissipation! It is necessary to traverse the region between full-on and full-off very quickly (nanoseconds) to minimize the power dissipation that occurs in this region, but the ability to add or remove charge from the gate-to-source capacitance (including the Miller capacitance) determines how fast this can occur. You need to drive the gate with a low impedance source to minimize the switching time.

If we were controlling a larger voltage with a smaller analog (fluctuating) voltage, we would have needed to find something that had upper and lower threshold limits that matched the limits in our controlling voltage, correct? Out of curiosity, what kind of application would have voltage going to the source? What else are these guys used for?
No. You adjust bias-point and feedback and load impedance to fit the device. Also, the "upper" and "lower" threshold "limits" represent a range of values that any particular part will fall between. For Vgs threshold, these values are measured at a particular Vds and Ids and devices that fall outside the specified Vgs range result in either part rejection or re-binning to some other spec. Be careful relying on "min", "typ", and "max" specifications unless the manufacturer defines (somewhere in their literature) what these terms mean. It is not unusual to see only a "typ" specification without a high or low limit. Who the hell knows what that means? What recourse do you have if the part you receive isn't "typical"?

These power MOSFETs are intended to be used only as switches, driven fully on with milli-ohm Rds at high current, or driven fully off with essentially no current flowing from drain to source. It is a whole different ball game to design a power MOSFET circuit for stable linear operation as a power amplifier or power oscillator. Here is a link to get you started if you want to explore that fascinating application area.

(I ordered from Mouser because it was a bit cheaper than sparkfun and I like them).
Cost is certainly a factor in any engineering design, but to choose a vendor based on whether you "like" them or not is not good engineering practice. I choose a vendor based on many criteria such as cost, delivery, availability of parts, reliability of parts (freedom from counterfeits), and vendor reputation. I "like" Mouser... and many others such as Digi-Key, Jameco, Allied Electronics, Newark (Element 14), McMaster-Carr, Microchip, Texas Instruments... the list goes on and on, and all have "good" reputations, but cost, delivery, availability, and reliability are my usual determining factors in which vendor I choose.

I don't much "like" Asian vendors because it is difficult to know exactly what you are getting from them. I have to rely on experience with a particular vendor, or their eBay rating, before deciding whether to order from China... and then its a crap shoot. I have had some pretty good experience with Chinese carbide drills for PCB work (so far), but China makes a lot of counterfeit electronics parts that may or may not be equivalent to a world-class vendor's stock of a brand-name manufacturer's parts. Caveat emptor (buyer beware) until you have thoroughly vetted a vendor.
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Fascinating how this works. They really just label the 'same' parts differently?
Semiconductor manufacturing at a profit is very much dependent on "yield" from any particular wafer. There are many process parameters that, if slightly incorrect, can affect yield to particular test specifications. The location of a part on the wafer (center versus edge) can also be a factor affecting yield. So it makes sense to test each part, before or after packaging, and bin those parts that meet spec differently than those that "almost" meet spec or are otherwise unacceptable. Unfortunately, there are a lot of "scrap" parts that make it out of the fab (illegally) and into a grey market where they are sold as "the real deal" by unscrupulous vendors. I would never knowingly purchase such parts, but some OEMs pressed to make a delivery date might do that. So the next time you purchase a mixed bag of parts from eBay, you might want to test each one to see if it actually performs to your expectations.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47

Gds is analogous to Vgs, correct?

This is highly non-linear behavior typical of a power MOSFET switch. You want to operate this device as a switch, driving the gate-to-source voltage to zero to turn it off, and to at least 5 V (preferably 10 V) to turn it fully on.

So I'll have to make sure the pins I use from the Arduino give 5 V for the PWM. Is it going to be OK that I can't give it 10 V?

You need to drive the gate with a low impedance source

Does the Arduino qualify as such?

the "upper" and "lower" threshold "limits" represent a range of values that any particular part will fall between

So this is a single value for a given device, and the range is related to manufacturing tolerances.

What recourse do you have if the part you receive isn't "typical"?

Probably zilch!

These power MOSFETs are intended to be used only as switches

So they're basically like small relays, which can be switched on an off extremely fast... so fast that changes in the pattern of switching (on/off time ratio) will affect devices on the Vds circuit as if they are seeing a varying current, correct?

power MOSFET circuit for stable linear operation as a power amplifier

I believe car stereos were advertising MOSFET as a big deal in the 90s...

usual determining factors in which vendor I choose

Nice. For me it's just that I've ordered from them before and they seem professional.

carbide drills for PCB work

This sounds awesome. What kind of stuff do you do?

world-class vendor

The only way to go.

mixed bag of parts from eBay

Interesting, considering that's sort of what I just did. I did avoid ordering from Asia, though. Shipping takes too long and language barriers make customer service impossible.

+++

Hey, again: THANKS!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Gds is analogous to Vgs, correct? ...
It was late when I wrote that. I went back and changed all references to Gds to Vgs.

... So I'll have to make sure the pins I use from the Arduino give 5 V for the PWM. Is it going to be OK that I can't give it 10 V? ...
Yes, it will probably work okay. Rd(on) will be a wee bit larger because the gate drive is smaller.

... Does the Arduino qualify as such? ...
I think it does, but I have no first-hand experience with actual measurements of Arduino output drive capability. You could look at some of the links on this Google results page, or look at this link.

... So this is a single value for a given device, and the range is related to manufacturing tolerances. ...
Yes, and it varies with temperature as the graph shows.

... So they're basically like small relays, which can be switched on an off extremely fast... so fast that changes in the pattern of switching (on/off time ratio) will affect devices on the Vds circuit as if they are seeing a varying current, correct? ...
Hmmm. Small relays, huh? Pretty good analogy, except no moving parts other than electrons. Small MOSFETs are often used as analog multiplexers in integrated circuits, so the relay analogy is actually pretty good.

... I believe car stereos were advertising MOSFET as a big deal in the 90s. ...
I wouldn't know about that. There is a mode of audio power amplifier operation where the audio signal is used to control the duty cycle of a higher frequency pulse-width modulated square wave, something on the order of 50 kHz or higher. This allows very high power output with little heating of the MOSFETs and only requires a low-pass filter to remove the high frequency pulses in the output. There was also some excitement about using small-signal FETs as low-noise amplifiers, IIRC.

... Nice. For me it's just that I've ordered from them before and they seem professional. ...
Prior favorable experience is definitely a positive factor in choice of vendor. I have used Mouser before, too, and they are quite reliable and professional.

... This sounds awesome. What kind of stuff do you do? ...
Not as much interesting stuff as I did before "retiring" in January 2015. Now I putter around at home with Arduino and Microchip PICs but am currently hampered by not having a decent electronics lab. My fault. I had a nice setup in the basement in the 1970s and then neglected it for almost forty years because I had better "toys" to play with at work, most recently a "little" 1.7 MV tandem particle accelerator. If my former employer ever finds a customer for what that puppy can do, maybe they will call me back to operate and maintain it again. I seriously doubt that will happen, so I am moving on to other things, like getting back to being involved with embedded microprocessors for machine control.

... Interesting, considering that's sort of what I just did. I did avoid ordering from Asia, though. Shipping takes too long and language barriers make customer service impossible. ...
That's quite a nice bag of boodle! Good price too. That should keep you busy for awhile!
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Got the Arduino set up on a MOSFET tonight. Not the ones you suggested, but one the lab had laying around. I'm just trying it out but things seem to be working.

This is what I've got:

160223-a-schematic.png

I'm measuring resistance with the meter, getting anywhere from infinity to 0.3. Seems to be working!

I do want to verify that this seems right. I'm worried about what we talked about with the Vgs curve, and about the resistance and power consumption of the component in the intermediate ranges.

I'm hoping that what I'm seeing for resistance isn't the "real" resistance, but the average resistance over very short periods which are actually going from "near infinity" to "near zero" with very very little time spent in between (where the component might overheat). Does that sound plausible?
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Got the Arduino set up on a MOSFET tonight. Not the ones you suggested, but one the lab had laying around. I'm just trying it out but things seem to be working.

This is what I've got:

160223-a-schematic.png

I'm measuring resistance with the meter, getting anywhere from infinity to 0.3. Seems to be working!

I do want to verify that this seems right. I'm worried about what we talked about with the Vgs curve, and about the resistance and power consumption of the component in the intermediate ranges.

I'm hoping that what I'm seeing for resistance isn't the "real" resistance, but the average resistance over very short periods which are actually going from "near infinity" to "near zero" with very very little time spent in between (where the component might overheat). Does that sound plausible?
Wow! Did you make sure you scraped all the dust off that MOSFET before hooking it up? Datasheet says this is 1999 technology. The Rd(on) is pretty high... 0.1 ohms. That's still too low to accurately measure with a two-lead resistance measurement, unless you "nulled out" the meter lead resistance before making the measurement. But I wouldn't worry about it: 0.3 ohms is in the right ball park, and you didn't say what the duty cycle was. Stick a coil and a voltage source in place of the ohmmeter (don't forget to put a diode across the coil to catch the back EMF when you turn the coil current off) and see how the ferrofluid reacts as you crank the voltage up and/or change the pulse width. It does look like the Arduino is providing enough gate drive to turn the MOSFET on pretty good. This particular device also has a much lower Vgs threshold, so I think you are good to go if you want to use this part. See ancient datasheet I have attached to this post.
 

Attachments

  • DSA2IH0048379.pdf
    205.9 KB · Views: 86

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Stick a coil and a voltage source in place of the ohmmeter

Can't do it tonight. I was just working on getting the photoresistor to give input. I'll take this back up tomorrow and let you know!
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
This is what I've got:

160223-a-schematic.png

@hevans1944, I've got a question. In the setup I had last night, the gate and source were sharing a common ground. Is the MOSFET still going to work if they don't? Because I want to have the power between Drain and Source, which is from the PSU, on a different circuit than the power being applied to the Gate, which is from the Arduino. Here's the schematic for reference:
160221-c-schematic.png

Do they need to have a common ground?
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47

Dang, that's a problem. Or is it? Reading around, I find that it sounds pretty simple, but I can't figure out which would be the best way to approach it:
160224-a-schematic.png

Diagram showing a connection between the ground wire of the Arduino's power supply and the 24 V power supply driving the electromagnets circuit. Would it be necessary to place a resistor in the connection from the Arduino power jack and the common ground (to isolate them?)

Or would this be just as good? Certainly it would simpler, because I could take care of all of this on the perf board and Arduino pins rather than having to mess with the power supplies directly.
160224-b-schematic.png

Schematic showing a connection between a ground pin on the Arduino and the ground of the 24 V power supply. Would I need a resistor here to isolate the two power circuits?

Regarding this 'isolation business,' the Arduino forum and this article about power supplies both seem to suggest this isn't necessary. The thing I'm worried about is the effect of the current in the Vds circuit heading into the Arduino. Would this not happen? Why not?
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
At 25° C, for Vds=25 V, the drain current varies
upload_2016-2-23_11-8-4-png.25216

Taking a step back, I was re-reading this post. I'm really trying to get my head around the different specs of the MOSFET chips... When we say "the drain current" here, what we're talking about is the drain current limit, correct? The reason the limit goes up as Vgs rises is because the resistance in the Vds circuit goes down, allowing the MOSFET to avoid heating as more current is run through it. At a Vgs of around 5 V, the graph shows Id (drain current) as being around 60 A. I don't know, am I still not getting it?
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Success! I put the circuit together tonight in the second configuration above, but without the resistor, like this:
160224-e-schematic.png

Actually, I only had one magnet and one photoresistor going. But, no resistors necessary in the ground circuit!

It works beautifully. The electromagnet is strong and variably-actuated. The MOSFET stays cool! I made a video, available here.

And I took a pic of the materials and cutting samples I had made at the fab lab today. I'm deciding on what color plexi to use. I'm thinking clear with gold etching. Haven't decided what to etch yet...

160224-c-photo.png

The speed nuts (the black metal thingamabob at the right end of the thread post) are pretty cool looking fasteners.

Completely thrilled! Thanks you guys!
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
The proof of concept video was pretty cool! Congratulations! OTOH, the ferromagnetic "speed nuts" should probably be avoided. I would recommend using all aluminum hardware, or nylon all-thread with nylon nuts. From what I've read on Amazon, the ferrofluid will be "attracted" to any ferrous material that happens to become magnetized, and since you will have some relatively strong magnetic fields near those fasteners and the support rods, they will become magnetized.

Good job figuring out the Arduino and 24 V coil supply grounds do not interact. Just avoid placing the Arduino ground in the return path from the MOSFET source terminals to the 24 V supply. The Arduino ground should attach near the MOSFET source terminals and can be 24 AWG insulated wire. The common or return lead for the 24 V supply should be a somewhat larger gauge and also attach near the MOSFET source terminals. Think of the water pipe analogy: you don't want the coil currents to appear on the same wire as the gate drive current from the Arduino
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
The Arduino ground should attach near the MOSFET source terminals

Is this nearness literally about length? Does the distance from the junction where the wire leading the Arduino's ground terminal need to be smaller than the distance from this same terminal to the power supply's ground?

The common or return lead for the 24 V supply should be a somewhat larger gauge

...or is it about resistance, with the larger wire giving the coil currents a clearer path, and so directing them, back to the PSU's circuit?

+++

About grounding, is it sufficient to connect the grounding circuits to the negative wires on the power supplies, or should I be running a connection from these to a separate grounding circuit?
 
Top