Go Down

Topic: Using diodes to protect from reverse polarity (Read 2389 times) previous topic - next topic

MorganS

You did the calculation correctly. 214 amps is the correct answer.

But I suspect the measurement was wrong. Might that be kilo-ohms? Decimal point moved? Most multimeters won't read micro-ohms.
"The problem is in the code you didn't post."

Gary_Arduino

More data -

I have a Drok USB Tester and hooking that in line between my power supply (A USB battery supply) and the power amplifier I see that the supply is putting out 5.08v and the amplifier is drawing .51amps.

Putting that tester between the amplifier output and the electro-magnet, I see that the amplifier is putting out 10.5V  It is adjustable and apparently that was the setting I decided I needed when I first set it up a few months ago.
The magnet is drawing .21amps

I am now I am wondering if one of the Arduino's PWM pins (with a circuit to dial down the 3volt power supply) might be able to put out the small pulse I'd need to remove Remanence.
Software - Arduino 1.8.5 on a Mac 10.7.5
Hardware - Arduino Uno (ATMEGA328P processor)

"Have patience. Sometimes it's hard to believe someone could know less than you do ... but those that know more than you, are struggling with the same thought."

Paul__B

I am now I am wondering if one of the Arduino's PWM pins (with a circuit to dial down the 3volt power supply) might be able to put out the small pulse I'd need to remove Remanence.
And that is exactly what I was thinking.

If you use an Arduino pin to switch the boost converter on or off by its enable pin, connect it to one end of the magnet.  The other end of the magnet is grounded by a diode and connected through a resistor to a second Arduino pin.  You have a logic level FET, also controlled by the same (that is, second) pin which grounds the output of the boost converter.

You now have an H-bridge.  When the boost converter is enabled, it powers up the magnet, losing only the voltage drop of the diode.  When you shut off the boost converter, waiting for its output capacitor to discharge, you then switch on the second Arduino pin for a short time which applies 0.7 V to the diode and grounds the first end of the magnet.

PWM has absolutely nothing to do with this.

Gary_Arduino

#33
Jul 25, 2018, 11:14 pm Last Edit: Jul 25, 2018, 11:15 pm by Gary_Arduino
Paul__B ... Is this diagram what you were suggesting?

Software - Arduino 1.8.5 on a Mac 10.7.5
Hardware - Arduino Uno (ATMEGA328P processor)

"Have patience. Sometimes it's hard to believe someone could know less than you do ... but those that know more than you, are struggling with the same thought."

Paul__B

Paul__B ... Is this diagram what you were suggesting?

Errr, no!  That would not do anything.



Paul__B

#35
Jul 26, 2018, 12:35 am Last Edit: Jul 26, 2018, 12:37 am by Paul__B Reason: Always more to say.
You could indeed use a relay in this configuration to switch the "hot" end of the magnet between your 12 V and ground if it were not practical to find the enable pin on the boost converter, but I figure what I have suggested is substantially more compact and - avoids the relay (current draw).

OK, you just put the diode in the wrong place.  :smiley-eek:

Gary_Arduino

#36
Jul 26, 2018, 03:14 am Last Edit: Jul 26, 2018, 06:18 am by Gary_Arduino Reason: expounding on my thought.
Ok.
I'm going to need to study this a bit.

Wow - so now I have many questions. It's embarrassing really as this has gone well beyond asking for advice and has now moved into the area of tutoring. I apologize.

Starting with a clarification. My power booster is VERY simplistic. Unlike the booster in your diagram mine only has + and - Vin and Vout. No other connections.

1) As it is wired now, my 5 volt power supply and the power booster are entirely separated from the rest of the Arduino circuitry. They go directly to the magnet with just an in-line relay to interrupt the power flow. That relay IS controlled by the Arduino but I believe the "power" side of that relay is opto-isolated(?) from the Arduino.
Your circuit drawing seems to have everything sharing the same ground. Would that provide a possible path for some errant power surge from the magnet to get to my Arduino?

2)What is "Logic Level" in your circuit? Is that a transistor or maybe a relay?

3) It appears that the "release pin" is wired directly to the "ground" side of the magnet. What keeps the 12v power from traveling up that wire to the release "output pin" and frying the Arduino? I thought that is where a diode would need to go because it would only allow power to travel from the pin and not up into it (like a one way valve).
Software - Arduino 1.8.5 on a Mac 10.7.5
Hardware - Arduino Uno (ATMEGA328P processor)

"Have patience. Sometimes it's hard to believe someone could know less than you do ... but those that know more than you, are struggling with the same thought."

Paul__B

Starting with a clarification. My power booster is VERY simplistic. Unlike the booster in your diagram mine only has + and - Vin and Vout. No other connections.
Actually, I don't believe you.  I suspect it is one of those ones from eBay and with a bit of hacking, does have an enable line.  You need to show which one it is and we can work from there.

1) As it is wired now, my 5 volt power supply and the power booster are entirely separated from the rest of the Arduino circuitry. They go directly to the magnet with just an in-line relay to interrupt the power flow. That relay IS controlled by the Arduino but I believe the "power" side of that relay is opto-isolated(?) from the Arduino.
The photograph suggests the relay module has only four connections on the control side, which would be Vcc, ground and two control inputs.  If so, it can not be isolated, whether or not it happens to have opto-isolators on it.  Again, a Web link to where it is described would be most practical.

In any case, you can use the relay to switch the voltage to the magnet between ground and the 12 V (but you will need another diode!), in which case you do not need the FET.  My proposition is that you can do without the relay.

Your circuit drawing seems to have everything sharing the same ground. Would that provide a possible path for some errant power surge from the magnet to get to my Arduino?
It might if you did not make the connections in the correct order.  No part of the ground wiring path should be shared between the magnet and power supply to the Arduino.

2)What is "Logic Level" in your circuit? Is that a transistor or maybe a relay?
A FET specified as a "logic level" device whose lowest effective "on" resistance is achieved at 3 V.

3) It appears that the "release pin" is wired directly to the "ground" side of the magnet. What keeps the 12v power from travelling up that wire to the release "output pin" and frying the Arduino? I thought that is where a diode would need to go because it would only allow power to travel from the pin and not up into it (like a one way valve).
And indeed, there is a diode there that does exactly that.  It holds the voltage when the magnet is energised, to one forward diode drop voltage, and also limits the voltage which is used to reverse-power the magnet to no more than about 1 V, if that.  The current from the Arduino is defined by the resistor, which will probably be close to 1k if your coil resistance is in fact, 56 Ohms as you measured.

Gary_Arduino

So this, to me, seems like an elegant solution to this. I just have to figure out how to make it.
I'm about to go on travel and hopefully I will get some time to study it.

BTW - Here is a link to information about the power booster I am using
 https://www.addicore.com/MT3608-Boost-Converter-p/ad300.htm
I ordered it before I knew even as much as I do now ... which isn't much. It seems to work well but if you needed a very precise voltage it probably wouldn't do the trick.


I couldn't find a schematic for the relays I am using. It is the 2PH63091A 2 Relay Module although I am only using one of the relays for the magnet. The other relay is being used to apply completely separate power to something else.
The modules themselves are the JQC-3FF-S-Z
A picture of which is here https://i.stack.imgur.com/TWLit.jpg
but the controller board is different for the 2 Relay Module I am using.
Software - Arduino 1.8.5 on a Mac 10.7.5
Hardware - Arduino Uno (ATMEGA328P processor)

"Have patience. Sometimes it's hard to believe someone could know less than you do ... but those that know more than you, are struggling with the same thought."

Paul__B

So this, to me, seems like an elegant solution to this. I just have to figure out how to make it.
I believe it is a terribly elegant solution.  Well, perhaps not - second thoughts as below:

BTW - Here is a link to information about the power booster I am using
 https://www.addicore.com/MT3608-Boost-Converter-p/ad300.htm
I ordered it before I knew even as much as I do now ... which isn't much. It seems to work well but if you needed a very precise voltage it probably wouldn't do the trick.
But you do not require a precise voltage - that is quite a different circuit.  OK, here is your module (from another well-known seller):

If you look at the datasheet, you will note that the enable pin is pin 4 which on the module you have is connected to pin 5, Vin and a simple hack to this module is to cut that connection with a craft knife so that with due care, you could solder the bared end of a fine flexible insulated wire to pin 4 (lower right pin on that image).  This is the pin you would connect to your Arduino (by as short a path as possible) to switch the boost converter on and off.  Unfortunately, I have just realised that this will not drop the output voltage to less than 4.7 V on a boost converter so we will have to forget that and use the relay!  :smiley-roll:

One last thought - the supplier from which you bought that module at least has used capacitors of reasonable size.  Hopefully they are the 22 µF specified in the datasheet.  I notice many suppliers picture very small capacitors which I suspect are dodgy.

Anyway, I just ordered five of those boost converters to play with.   :smiley-lol:

I couldn't find a schematic for the relays I am using. It is the 2PH63091A 2 Relay Module although I am only using one of the relays for the magnet. The other relay is being used to apply completely separate power to something else.
The modules themselves are the JQC-3FF-S-Z
A picture of which is here.
but the controller board is different for the 2 Relay Module I am using.

Right.  I think from your rather congested photograph that you are using one of these modules.

These are actuated by a LOW level output though you could re-work the connections for a single relay to operate on a HIGH output.  This is the schematic diagram:

To use them correctly, you remove the jumper, connect GND and JD-VCC with a pair of wires (in one bundle) direct to the 5 V power supply, connect Vcc and your inputs but not GND to your Arduino which is powered by a separate, bundled, pair of wires from the power supply.  A 470 µF capacitor across the relay power wires at the relay board would be a good idea.

Happy holiday!  :smiley-lol:  :smiley-lol:

Gary_Arduino

An update for anyone still following this thread.

Just because I could, I ran a test.
- I energized the magnet, picked up a metal plate and then removed the magnet from the power source.
- I ran Arduino Pin 4 through a diode to what had been the negative side of the magnet.
- I ran what had been the positive side of the magnet to Arduino Ground.

A quick bit of code that assigned Pin 4 as an output, initially set to LOW, then changed to HIGH for a delay of 100
and then back to LOW.
When run, the magnet drops its metal plate immediately. I experimented with several delay settings until I found the shortest period that would reliably cause the magnet to loose it's Remanence.

So, as was predicted - 5volt Arduino output run through a diode and reduced to .7volts WILL remove the Remanance in this scenerio.


Software - Arduino 1.8.5 on a Mac 10.7.5
Hardware - Arduino Uno (ATMEGA328P processor)

"Have patience. Sometimes it's hard to believe someone could know less than you do ... but those that know more than you, are struggling with the same thought."

Paul__B

It is not clear from your explanation there whether the diode was in series or in parallel to the magnet.  If it was in series, you would have been applying 5 V minus 0.7 V, thus 4.3 V to the magnet.  Only if the diode was in parallel to the magnet would you have been applying just 0.7 V.

In any case you would need a (220 Ohm) resistor to limit the current as putting a 56 Ohm load across the Arduino output overloads it.

ReverseEMF

Sadly, I learn better by doing (and frequently failing) then from JUST reading something in a book.
Nothing sad about it.  Most college courses in this arena are composed of both a Lecture and a Lab -- because there is nothing like hands on experience when learning something new.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Go Up