Solenoid Driver Circuit and its sorroundings..

Discussion in 'The Projects Forum' started by pizzaice, Jan 10, 2008.

  1. pizzaice

    Thread Starter New Member

    Jan 10, 2008
    8
    0
    Hi there,
    I am new here and actually studying mechanical engineering but I am very interested in robotics and at the moment I am doing a project that includes a high voltage solenoid driver circuit. My name is Chris.

    Unfortunately there are a couple of problems and I don't get any further with my ideas or research so maybe some of you guys are able to help me.

    The general setup looks like this:
    [​IMG]

    It includes a small petrol engine and two solenoids that actuate the valves in that engine.
    The actual problem seems to be the grounds or at least related to it.

    The solenoid driver circuit looks like this:
    [​IMG]

    And to understand the signal flow looks like this:
    [​IMG]

    And the solenoids are endclosed by the engine like this:
    [​IMG]

    A 5V signal at certain periods is generated by a PIC 18F452 and sent to the Solenoid Driver (the and gate in the solenoid driver) the AND gate then checks if the current limiting part of the driver circuit is giving out 5V as well and if so forwards the signal onto the mosfet driver which in turn activates the mosfet which then switches on the 120V and therefore activates the solenoid .

    The problems arise now if the solenoid actuating frequency gets faster and faster. With a test solenoid (which is not in the engine but an external test rig) they run up to the desired frequency of 30 Hz but as soon as the solenoids in the engine are connected they only run up to a frequency of 12 Hz and then cause the PIC controller to crash OR reset. Therefore I think the problem is related to grounding.

    I think that the solenoids somehow cant discharge quick enough and therefore feed back into the solenoid controller (PIC) but using an optocoupler in between didn't help either - which again leads to ground.

    During testing I have already broken lots of AND gates, mosfets etc. The entire driver circuit seems to be not very reliable.

    Do the solenoids discharge in a way that it crashes the PIC? Is the grounding layout not sufficient? Should I change the design of the driver circuit?


    At the moment I am just a bit lost and would really appreciate any kind of comments. If I left out any details that are needed please let me know.

    Thank you very much!

    Chris
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I see a resistor R5 in series with the flyback diode that in parallel with your solenoid. What is the value of that resistor?

    hgmjr
     
  3. pizzaice

    Thread Starter New Member

    Jan 10, 2008
    8
    0
    Hi hgmjr,
    its a 5.6K Ohm.

    Thanks for the quick question!

    chris
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I am not sure why you have elected to use a resistor in series with the diode. Ordinarily there in no resistance in series with a flyback protection diode. The series resistance basically negates the advantage of having the diode in the first place. If your diode is failing when there is no resistance in series then it is most likely not rated to withstand the brief high voltage pulse that is generated each time the solenoid is turned off.

    It is not unusual to also have a power zener diode in series with the standard diode in these kind of circuits. The zener can improve the speed with which the solenoid de-energizes.

    For now I would try getting rid of the 5.6K resistor in series with the flyback protection diode. That will help dissipate the flyback energy and cut down on the electrical noise it would produce.

    You may also need to look very carefully at the routing of the wiring around your over-current detector.

    hgmjr
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    There is something I don't understand. According to the datasheet, the TC4429 is inverting. If it is, the driver circuit won't work. The circuit will latch up with the solenoid always on. Are you using a TC4420 instead? Or maybe a NAND gate, instead of AND?
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Driving the gate of the FET directly could pose a problem. I would want a resistor of at least 50 ohms between the op amp output and the FET's gate.

    Is the diode across the FET really a zener?

    The FET driver has a supply rail that is zener regulated. Adding a filter cap to ground - 47 - 220 uF - would not hurt.

    Do you have access to an oscilloscope so you can visualize circuit operation?
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    This posting was deleted since my assessment of the TC4429 being non-inverting was incorrect.

    hgmjr
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    An odd number is inverting. Also, the datasheet explicitly says it is inverting.
     
  9. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Yes I know. I hit the odd key on my keyboard when I meant to hit the even key.

    The signal sees the FET (which inverts) then the inverting amp, then the inverter that is part of the 4429 and then the final inverting stage for 4 inversions. Am I missing something still?

    hgmjr
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I see two more things that would help add to the noise immunity of the current sensing circuit. In the positive leg between the wiper of the 100K pot and the + input of the comparator you could put a 10K resistor. Then yoy could add a 1 Meg from the comparator's output back to the + input to implement some hysteresis.

    Then you could add a resistor in series with the - input of say 10K and then add a 0.01 uFd. cap from the - input to ground. That would help filter the over current signal to prevent false triggering.

    hgmjr
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    See the annotated schematic below. Am I missing something?
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    No RonH, you have everything labeled correct.

    In fact, I bet what is happening is that in the test fixture the load does not ever trigger the overcurrent condition and therefore the circuit never locks up. Only when it is hooked to the engine does the overcurrent condition occur and that lock up condition ends up destroying the FET and that failure ripples back through the other devices.

    Does that make sense?

    hgmjr
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    It sounds likely. If the comparator inputs are swapped (or the AND is changed to NAND) to get negative feedback, I would bet money that the loop will oscillate. Whether that is a problem or not is another question.
     
  14. pizzaice

    Thread Starter New Member

    Jan 10, 2008
    8
    0
    Thanks for all the clues guys.

    First of all, I'm sorry for the confusion about the mosfet driver. I used the 4420 but still got the 4429 on the circuit drawing.

    I tried to remove the 5.6K resistor but the solenoid then takes far too long to discharge. The purpose of it is to accelerate the discharge time of the system. Could you explain me how this produces noise?
    I could try and put a power zener diode instead of the resistor but I will have to order one first.
    I added a 1M resistor to the comparator to implement some hysteresis.


    I do have access to a scope but don't know exactly what would be the best place to start analysis.

    The current limiter according to my measurements always stays high (off) also during engine operation conditions. I even tried to cut out the current limiter and the system still crashes. Would a zener in series with the diode across the solenoid help?

    Basically the problem is not that the driver is not working but that it is giving major feedback to the control box (PIC) at different points of high rpm (high frequency) which crashes the PIC and therefore the signal that it should give out. Therefore it is a problem of shielding ie. reducing the feedback noise through the input line that comes up in some cases (fast solenoid operation).

    Another important thing to consider is that the system works without problems with the test solenoid which is seperate from the engine in a small rig. The driver doesn't produce any feedback to the input and therefore the pic doesnt crash.
    BUT as soon as I use the solenoids in the engine which is grounded seperately to mains (as shown in the picture) the system starts crashing at half speed (1500rpm≈15Hz). Before I grounded the engine to mains it even crashed with lower speeds. Could it be that some voltage is dissipated through the engine by the solenoids? But why does it work with the non-grounded test-rig. The mechanical conditions in the test-rig are designed to simulate engine environment.

    Cheers guys,

    Chris
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    How long are the wires from the controller to the solenoids in the engine, and from the controller to the test solenoid? The current loop is a big antenna. I would try using a shielded twisted pair, and experiment with grounding the shield at either or both ends. Don't leave it floating.
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I believe that if you get your hands on a power Zener Diode with a value of between 57 volts and 60 volts and put it in series with the diode that you already have then orient the zener diode so that its cathode is toward the FET's drain and the anode is toward the 55V power supply bus you will be able to remove the 5.6K resistor and the solenoid will de-energized very rapidly.

    The criteria for choosing the zener diode voltage is that the sum of the zener diode voltage plus the forward voltage of the diode must be greater than the solenoid energizing voltage by a couple of volts. This diode plus zener arrangement clamps the flyback voltage at the voltage equal to the zener diode plus the standard diode's forward voltage. The flyback voltage rises rapidly to the clamp voltage but once there all of the flyback energy is reflect back into the solenoid which will assist the energy dump. If you can possible arrange to do so I would recommend that you locate this diode+zener didoe as physically close to the solenoid as possible. That will limit the size of the loop in which the flyback energy must circulate.

    By all means take to heart the recommendation by RonH to use twisted shielded wire to connect between the solenoid driver board and the solenoid since that will go a long way toward reducing the radiated noise.

    hgmjr
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Hgmjr, I don't see how the desired zener voltage has any relationship to the supply voltage, except for the consideration that (Vsupply + Vzener) must be less than the breakdown voltage of the MOSFET. If you were going to ground the anode of the zener, then the relationship would be important.
    The MOSFET has 400V breakdown. I wouldn't want to get close to that, but a couple hundred volts should work.
     
  18. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    RonH,

    Perhaps my explanation was not that clear. I have attached an application note that depicts the zener plus standard diode arrangment to illustrate what I was trying to describe so clumsily.

    I have used the flyback protection network composed of a series diode and zener as shown on page K3 in this Lucas-Ledex application note to improve the de-energize speed of a rotary solenoid. The improvement was pronounced when we used a high-speed video recorder to document the solenoid action in slow-motion.

    Our application did not include the cap but I can see how a cap could provide a softening of the risetime during that initial flyback interval before the voltage across the combination zener and standard diode reaches the clamp voltage.

    hgmjr
     
  19. pizzaice

    Thread Starter New Member

    Jan 10, 2008
    8
    0
    Thanks again,
    I improved the performance for now by twisting our current cables but will get shielded twisted pair cables as soon as possible next week and see if that helps. Also I ordered a 200V 3W zener and will try to implement that. 200V because our current max voltage we are running the solenoid at varies between 120V and 180V so that was the closest I could get. I hope thats not completely out of scope, but the voltage spikes seem to be a lot larger anyway.

    I will keep you posted and thanks again to Ron H for the twisting suggestion and hgmjr for the excellent explanation of the zener diode function. ;)
     
  20. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    That's great news. Sounds like RonH hit the nail on the head with the twisted cable suggestion.

    The zener diode selections seem like good first cuts at a value. I still think you will find that if you can relocate the zener and the standard diode right up next to the solenoid it is meant to protect, you will experience a worthwhile reduction in the noise generated by the switching solenoid to go along with the improvements that you gained from the twisted and shielded control cable.

    Do you think this suggested relocation of the flyback protection components will help, RonH?

    hgmjr
     
Loading...