Solenoid discharge current

Discussion in 'The Projects Forum' started by Ripper612, Oct 13, 2010.

  1. Ripper612

    Thread Starter New Member

    Aug 3, 2010
    5
    0
    Hi

    My goal is to measure the current through a solenoid. The solenoid is driven by a MOSFET switch that is controlled by a PWM signal.

    My current sensor is just a 1 ohm resistor, where i amplify the voltage drop over the resistor. The current sensor resistor is on the high side of the solenoid(between the 14V DC source and solenoid).

    The voltage drop over the resistor is PWM. I then use a low pass filter to get a continuous signal.

    My question is now: What effect will the solenoid discharge current have if i include it in my current sensor? Should the fact that the discharging current is included or not have an effect on my low pass filter?

    Thanks in advance
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    Discharge Current will develop are higher negative going Voltage unless the solenoid has a clamping diode across it
    and effect depends on how ur filter is designed
     
  3. Ripper612

    Thread Starter New Member

    Aug 3, 2010
    5
    0
    Hey. I think this is an important point your making. Could you please explain a bit more? Im not al there yet
     
  4. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    What point r u talking about
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Have a look at the attached schematic and simulation.

    Note the connections for L1, Rsense and D1.

    The comparator I selected has a common mode range that exceeds Vcc, which is a bit unusual. You couldn't use a standard comparator like an LM339, LM393/2903, etc - as they can't "see" within about 1.5v of Vcc.

    I didn't bother with filtering the Rsense signal, as that would delay the response. It's not straight PWM either; it's current-controlled feedback, which is immediate. R4 serves to provide some hysteresis; without it the comparator would be switching at maximum speed, and the MOSFET would wind up spending too much time in a partially conducting state.

    Q1 and Q2 serve to boost the current output of the comparator to switch the MOSFET on and off quickly. R1 prevents the MOSFET gate from "ringing" after it's switched from one state to the other.

    R2 and R3 set the current. C1 provides a form of "soft start", but in this case it's really not necessary.

    Not shown is an 0.1uF cap across the comparators' supply pins, which is required. There should also be a 0.1uF cap across the collectors of the two transistors.
     
    Ripper612 likes this.
  6. Ripper612

    Thread Starter New Member

    Aug 3, 2010
    5
    0
    The point you said about "develop are higher negative"

    Where and when does does it develop
     
  7. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    The magnetic field tht is built up in the solenoid will collapse when the current reverses, this is instantaneous. So this will induce a much larger voltage at the solenoid terminals in reverse. If not clamped or shorted, this voltage could destroy any switching element tht is used to activate the solenoid.
     
    Ripper612 likes this.
  8. windoze killa

    AAC Fanatic!

    Feb 23, 2006
    605
    24
    I know that a 1Ω resistor doesn't sound very big but it can have a bit of an effect if the current is high. I have always found using a much lower sense resistor to give a wider and more stable result. Think about changing this to 0.1Ω.
     
    Ripper612 likes this.
  9. DonQ

    Active Member

    May 6, 2009
    320
    11
    Realize that the current does not spike when the coil releases. The coil attempts to maintain the current that was flowing at the time that the circuit was broken. If at that point the circuit is completely open, then the voltage spikes attempting to force the original current through an infinite resistance (a good way to make a voltage spark, or trash electronic circuitry). If a clamping diode is used, it starts conducting at 0.6-0.7 volts, and the current flows at that voltage plus some I*R contribution from the coil and connecting wires. If you include a resistor in the loop with the diode, that I*R adds on.

    Example:

    A one amp coil, with a 2 ohm resistance, and an additional 1 ohm resistor and a sufficient diode. When you turn it off, the 1 amp flows through any resistance generating I*R volts, and the diode at a relatively fixed 0.7V for 2*1 + 1*1 + 0.7 = 3.7 volt 'spike'. I call it a spike because it dissipates fairly quickly.

    You may see a tiny, tiny, tiny spike above this voltage caused by the inductance of the wires connecting the components (creating a higher effective resistance at the very leading edge of this event). This is why you want to place the diode close to the coil. For long wires, this can be significant.
     
    Ripper612 likes this.
Loading...