Electronic spike filter

Advert

Electronic spike filter

Home Forums Electronics in the Workshop Electronic spike filter

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #737287
    duncan webster 1
    Participant
      @duncanwebster1

      A few years ago I made an arduino based gizmo for a fellow club member to control the generator field current on his petrol electric loco. After a few teething problems it worked fine until a couple of weeks ago when it died. Turns out that the 7805 which drops the 12v down to 5v, the arduino and the LED display have all been fried. That’s nearly all the active components, I haven’t even looked at the Mosfet yet. I think I made a fundamental error in sending just one supply to the board to power both the field coils and the electronics. Before you ask I do have a flyback diode across the field coils. I’m in process of rebuilding, and am going to have 2 independent feeds from the 12v lead acid battery (both 12v and gnd). I want to put some filtering on the low power. I have a series diode to protect against reverse connection, what I think I need is a series inductor and capacitor twixt 12v and gnd. I’ve got some 470uF 16v and some 470uF 25 volt caps (can buy bigger if need be), but can’t find any ferrite toroids. Plenty on ebay, but what size do I need? Do I wind both 12v and gnd through it? Or one toroid on each? How many turns? The more the merrier seems intuitive. The only thing being supplied is the Arduino and a 4 digit LED display, so only a few tens of mA I would guess

      Advert
      #737317
      John Haine
      Participant
        @johnhaine32865

        If there is significant current I would avoid winding the choke on a toroid as it may easily saturate which you don’t want.  Difficuot to say what inductance is needed but I’d guess at least a millihenry.  470uF probably OK but also add an 0.1uF ceramic cap across it because the self-inductance of the electrolytic may prevent it filtering out very fast spikes.  You could also add a say 15v zener across the cap to absorb any spikes significantly above 12V.  To source the inductor I suggest go to RS or Farnell and buy a designed or the job power inductor.  They are not very expensive

        #737346
        Robert Atkinson 2
        Participant
          @robertatkinson2

          You need to be careful about adding series inductor(s) at the input to the regulator. It can affect stability. To insure stability you need to place a large capacitor between the regulator input and 0V physically close to the regulator. This should be at least 100uF, Personally I’d use 470uF. Your 25V ones should be fine. Personally with 12V input available I’d use a series resistor with same capacitor to ground rather than an inductor. IT’d agree with John that you need a 0.1uF in parallel with the 470uF. You also need a 0.1uF across the 7805 output as well.
          Assuming 50mA current draw, 12V supply and 8V at input to the 7805 would give a maximum resistance of 80 Ohms. I’d use 47 Ohms. Power rating needs to be I squared x R so 0.125W but resistors run hot so I’d use at least a 0.5W one, larger if I had one to hand.
          I also agree with John on the need for a zenner diode after the resistor (or inductor). I’d use an 18V one rather than 15 as a nominal 12V vehicle supply can get close to 15V in normal operation. The 7805 can withstand at least 35V so still low enough to protect it.

          Robert.

          #737377
          SillyOldDuffer
          Moderator
            @sillyoldduffer

            Most likely cause was voltage spikes from the generator repeatedly stressing the 7805 until it failed allowing spikes into the Arduino.

            Various ways of dealing with spikes, for instance:

            • With an inductor, capacitor, resistor network that flattens the spike.   Correct operation of the network depends on knowing the spike frequency.   A capacitor resistor network is more amenable to guesswork because they’re broadband, but that also makes them less effective.  An inductor capacitor network filters best, but only if the components values are in the right ball-park.  Otherwise, bigger the better!  Looking at the output of the generator with an oscilloscope should reveal exactly what the problem is.
            • With a Zener diode.  These have the useful property of passing current when a certain voltage is exceeded, so they can be be arranged to clip spikes off a power rail.   Downside is a rather large Zener may be needed:  if a spike exceeds the rating of the Zener, the Zener will fail, and bad things happen.   This may be what happened inside the 7805!
            • With a Metal Oxide Varistor,     Not a diode, but like a Zener,  these pass very large currents when a threshold voltage is exceeded.  They are the first line of spike defence in many consumer devices, and may be the only one!   Well worth trying.

            Another approach is to dump the 7805.  Excellent device, but it is a linear regulator, meaning there is very little to stop a high voltage on the input blasting through to the output.   There’s some hope that the regulator will burn out before any damage is done downstream, but Gremlins are cruel masters.    A buck converter could be a better choice:  their design is considerably more fail-safe, in that the input and output aren’t easily jumped when the device fails.

            I’d try a MOV and a buck converter first, basically because they’re cheap and easy!

            Dave

            #737383
            John Haine
            Participant
              @johnhaine32865

              To pick up Dave’s suggestion, I would never now use a “78..” regulator if I can avoid it.  On eBay you can buy PCBs with an LM2596 buck converter with all supporting components for a fiver for 3.  Input up to 35V, output 1.5 – 30V adjustable.

              #737391
              Robert Atkinson 2
              Participant
                @robertatkinson2

                I have to disagree with advice to use a switch-mode (buck) converter for such a low power application. The circuit consumes less than 50mA This is certainly well below the minimum load for stable operation of a LM2596 (3A regulator). This is particuarly true for the wide range adjustable modules sold on ebay. Thay cannot be optimised for 5V 50mA output. They also have a bit of a reputation for poor reliability. As the trade price of a LM2596-5 is $2.83 (£2.25) in 1000 off quantities you have to wonder what you are getting from china for £1.80 as that has to include PCB, inductor, diode, multiturn potentiometer and capacitors… Talking of capacitors all the modules I looked at on ebay show a 220uF input capacitor while the datasheet says to use 470 or 680uF.
                Switch-mode regulators can also cause signficant interference.

                I stand by my suggestion of 47 Ohm series resistance, 470uF (25V) and 0.1uF capacitors close to the 7805 and a 18V zener to ground for this application. I didn’t mention a rating for a zener but allowing for a long 32V surge (jump starting with 24V pack) you would need a 5W zener. This is overkill. A 1.3W zenner is enough to give protection against a susaint 24V input with 47R in series. A 0.5W would be enough for spikes.

                The part numer “7805” is generic for a 5V 1A (ish) linear regulator typified by a UA7805 or LM7805. some are better than others. By specifiying a specific part number perfomance can be assured. A L7805T or LM340T-5 (dash not minus) will give better resistance to spikes etc.

                The above advice come from over 40 years of using these devices (including the LM simple-switchers) for many applications. These include aerospace use where thy have to withstand severe input supply over-voltage and spike conditions. For example the DO-160G section 16 requirements for a 12/14V system include maximum normal input of 15.1V and Surge of 23.5V. Section 17 requires withstanding 50 spikes of 600V with a rise time of 2us and fall of 8us with in a minute. Then the same for negative. My circuit with a 1.3W zener and L7805 will pass this test, I’ve done it.

                MOV (metal Oxide Varistors) are not very useful at low DC voltages and have a finite life in terms of transients suppressed.
                Silicon transient suppressors are a better choice The are called TVS diodes.

                If you  want even more protection replace the 47R with a 4R7 and a 33R resistor in series with a 27V 1500W unipolar TVS e.g. TP1.5KE27 between the junction of the two resistors and 0V. Keep the rest of the circuit as described.

                Robert.

                #737406
                Martin Kyte
                Participant
                  @martinkyte99762

                  If your energy budget for 5V is less than 0.5A you could consider moving to a 7805SR which is a drop in switching replacement for the 7805.
                  Don’t ignore your ground returns when thinking about your twin feed for power.

                  regards Martin

                  #737411
                  Robert Atkinson 2
                  Participant
                    @robertatkinson2

                    The genuine Murata 7805SR will work and is rated for 0% load. Certainly a better choice than the LM2596 if you want a switch mode regulator. It will still need input over voltage protection though. The higher cost of switching regulators is only really justified for higher input voltages or when high efficency is required i.e battery operation.

                    Robert.

                    #737422
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer

                      We’re all being very naughty by recommending spike protection measures when we have no idea what the spike characteristics are!

                      And what is the source of the spikes?  Could they be due to the way the Arduino controls the field coils, perhaps creating voltage peaks with too fast digital switching?   Be fun if Duncan’s answer was software rather than hardware.

                      I believe Duncan owns an oscilloscope.  Be good to see what goes on when the generator is revved and the Arduino applies regulation.

                      Dave

                       

                       

                      #737423
                      duncan webster 1
                      Participant
                        @duncanwebster1

                        It might be interesting, but it’s not going to happen. The Arduino controls the field current on the main generator, but that can only be loaded by having the loco pulling a load. My scope is mains powered, and we don’t have mains at the track. We do have a petrol driven genny, but I’d need a very long bit of wire. And anyway, I’m doing it as a favour, so it has to be fairly quick and dirty. It could possibly be done with a big bank of resistors, but they don’t generate back emf, so an important factor missing from the equation.

                        I don’t have any 0.5W resistors, so I’m going to put 2 off 200 ohm in parallel, these are from those packs of assorted and are I assume 0.25W. First off I’ll replace the display to get it working and check the current consumption running if off a bench power supply, then add resistors and make sure they don’t get hot. I’ll probably have to buy a zenner, anathema to a Yorkshireman.

                        I think the whole concept is wrong. He has the field control connected to the throttle lever, I’m sure it would be better with independent control, as if you wind up the field before the engine has revved up the engine is overloaded. I think he has allowed for this in software, but doing it my way could just use one of those motor controllers off ebay to control the field, and I doubt they have any delicate processors to worry about.

                        Thanks to all contributors, I’ll report progress

                        #737437
                        Robert Atkinson 2
                        Participant
                          @robertatkinson2

                          Duncan,

                          If you drop me a PM with your address I’ll send you some resistors and zenners.

                          SOD,
                          While we may not knoe the source ot type of the presumed spikes, my solution is based on established standards for this sort of thing. While it might be a random 7805 failure, adding protection can’t do any harm.

                          Robert.

                          #737452
                          duncan webster 1
                          Participant
                            @duncanwebster1

                            Robert, that’s very generous, pm sent

                            Typo warning, 200 in my last post should have been 100.

                            #737453
                            SillyOldDuffer
                            Moderator
                              @sillyoldduffer
                              On Robert Atkinson 2 Said:


                              SOD,
                              While we may not knoe the source ot type of the presumed spikes, my solution is based on established standards for this sort of thing. While it might be a random 7805 failure, adding protection can’t do any harm.

                              Robert.

                              Yeah, that’s reasonable!  We know that the original Arduino/7805 circuit lasted a long time, suggesting spikes near to 7805 max ratings, rather than completely over the top!   So like as not, any reasonable counter-measure will be effective.

                              Just as a matter of interest, does anyone know how clean the output of a typical petrol generator is?   My guess is they are pretty filthy unless the load is absolutely linear.

                              Dave

                              #737480
                              duncan webster 1
                              Participant
                                @duncanwebster1

                                The little generator sends its output to a small lead acid battery. I naively assumed this would mop up spikes, but I was wrong it seems.

                                #739706
                                duncan webster 1
                                Participant
                                  @duncanwebster1

                                  <p style=”text-align: left;”>Thanks to the help and generosity of forum members it’s fixed, just needs putting back in its box, but the owner can do that. Here’s a picture. Board layout is crowded because I had to squeeze extra bits in</p>
                                  IMG_20240705_224515

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                Advert

                                Latest Replies

                                Viewing 25 topics - 1 through 25 (of 25 total)
                                Viewing 25 topics - 1 through 25 (of 25 total)

                                View full reply list.

                                Advert

                                Newsletter Sign-up