Shop OBEX P1 Docs P2 Docs Learn Events
Noise from 12v Actuator causing random reboot (even with fly-back diodes) — Parallax Forums

Noise from 12v Actuator causing random reboot (even with fly-back diodes)

JohnR2010JohnR2010 Posts: 431
edited 2015-06-13 23:52 in Propeller 1
I have Solid State Relays optically connected to my Propeller's pins. The SSRs are driving a 12v DC 3.5A actuator with built in limit switches and fly back diodes. I have used this circuit and actuator combo for years without any issues (no noise). Currently I'm working on a circuit to monitor the current the actuator draws that is not optically isolated from the propeller and now noise is getting in and rebooting the propeller randomly. I was surprised to see this as the actuator has fly back diodes. I wonder if in the small window before the diodes turn on a voltage spike is hitting my new circuit causing the reboot.

I'm planning on putting a 300ohm resistor and .1uF cap across the motor's leads as a snubber. I know the snubber should go across the switch or the load but in this case it will be going across both the switch and the load as the limit switches are built into the actuator. For a second level of filtering I also plan on putting a MOV across the motor's leads. http://www.mouser.com/Search/ProductDetail.aspx?R=B72207S0110K101virtualkey59250000virtualkey871-B72207S110K101

I was going to go with a 1 watt resistor (for the RC snubber) I think that is overkill as it has to be a very, very quick spike it needs to dissipate.

Any suggestions as its been too long since I designed a filter circuit and thought I would run it by the forum for input?
«1

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2015-06-03 10:59
    the reset-input-pin of the propeller-chip has a very high impedance which makes him an antenna for emv.

    I had a rebooting-problem with a solid-state relay. I added a small capacitor I don't remember exactly how the capacitor is connected
    and the circuit is 500km off my place.

    best regards

    Stefan
  • davejamesdavejames Posts: 4,045
    edited 2015-06-03 15:29
    John - have you a scope with which to view said noise on the reset pin?
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-04 03:51
    davejames wrote: »
    John - have you a scope with which to view said noise on the reset pin?
    No I have not scoped the reset pin. Noise from the motor is the issue I need to suppress the noise and keep it out of the whole circuit. I think your right it is probably affecting the reset pin and causing the prop to reset. But instead of focusing on the reset pin I would like to focus on the noise suppression for my motor.

    Thanks.
  • ercoerco Posts: 20,254
    edited 2015-06-04 04:28
    Try three 0.1 uF caps on the motor in a delta arrangement. One directly across both motor connections and one from each connection to the metal motor case, soldered directly on, very short leads.
  • evanhevanh Posts: 15,192
    edited 2015-06-04 04:29
    I'd start with the reset pin, it's an easy first step. If the problem is radiated noise then an earthed, shielded cable will do wonders. I'm not so sure that is the case here though. As you've noted, you have been generally successful in previous variants of this.

    I'm thinking you may have unexpected current paths forming. Such currents often cause digital latch-up and can be destructive. It's hard to be precise without seeing a board layout and wiring/schematic drawings.
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-04 04:45
    erco wrote: »
    Try three 0.1 uF caps on the motor in a delta arrangement. One directly across both motor connections and one from each connection to the metal motor case, soldered directly on, very short leads.

    Here is what I'm going to try
    1) Snubber across the motor leads .1uF and 100ohm resistor
    2) @erco's delta cap arrangement
    3) shielded drive cable with ferrite

    If this doesn't help I will post the schematic and PCB as well as hook up my scope and take a look at the noise on the reset pin.

    It may be well into next week as my electronics lab now has a bunch of teak wood from my son's boat drying and waiting for the next coat.

    Thanks everyone!!
  • ercoerco Posts: 20,254
    edited 2015-06-04 05:00
    Is this a door lock actuator by chance?
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-04 08:03
    erco wrote: »
    Is this a door lock actuator by chance?

    Nope it is a 11.5" linear actuator.
  • DomanikDomanik Posts: 233
    edited 2015-06-04 10:13
    Your prop and SSR INPUT should share the same ground back to the source (battery or wall-wart). However, the SSR output circuit, relay/actuator coil, diode and capacitor should have an independent ground that goes back to the source. This allows the high return currents in the relay ground circuit to move around all it wants without jamming up the prop logic ground. Otherwise, if the two ground circuits are shared, high currents or fast edges combined with the logic ground can lift the ground reference above prop logic levels.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-06-04 20:49
    JohnR2010 wrote: »
    If this doesn't help I will post the schematic and PCB as well as hook up my scope and take a look at the noise on the reset pin.

    By all means post this including photos (more than one) if you really want to solve it. Sometimes the schematic and pcb can look fine but the photos reveal wiring problems etc.
  • Mark_TMark_T Posts: 1,981
    edited 2015-06-05 03:34
    No, capacitor directly across the contacts, no resistor, so long as the capacitor value isn't too big this
    is much better at suppressing RFI from commutator arcing at source. Use a detuned AM transistor radio to
    see how well this performs.

    Remember there are two kinds of interference, capacitive and induction. The first thing to avoid
    is running motor/actuator wiring alongside other wiring, that's where the electomagnetic
    induction will happen. Avoid large loops in your circuit, use twisted pair for all power and motor wire
    pairs too.
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-05 04:49
    Domanik wrote: »
    Your prop and SSR INPUT should share the same ground back to the source (battery or wall-wart). However, the SSR output circuit, relay/actuator coil, diode and capacitor should have an independent ground that goes back to the source. This allows the high return currents in the relay ground circuit to move around all it wants without jamming up the prop logic ground. Otherwise, if the two ground circuits are shared, high currents or fast edges combined with the logic ground can lift the ground reference above prop logic levels.

    I think I'm okay here. I have the SSRs and the ground that is connected to the motors all on the left side of the PCB with huge traces running directly to the power source. All the logic circuits including the switching power supply are behind a diode on the right side. As I noted above this circuit board has worked great for years driving actuators I just recently added a new current sensing circuit that seems to be sensitive to the noise that was otherwise being blocked by optically isolated SSRs.

    Thanks
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-05 04:52
    By all means post this including photos (more than one) if you really want to solve it. Sometimes the schematic and pcb can look fine but the photos reveal wiring problems etc.

    Will do Peter I want to try a few things hook the scope up and get my ducks lined up. Stay tuned. Thanks
  • kwinnkwinn Posts: 8,697
    edited 2015-06-05 05:16
    JohnR2010 wrote: »
    I think I'm okay here. I have the SSRs and the ground that is connected to the motors all on the left side of the PCB with huge traces running directly to the power source. All the logic circuits including the switching power supply are behind a diode on the right side. As I noted above this circuit board has worked great for years driving actuators I just recently added a new current sensing circuit that seems to be sensitive to the noise that was otherwise being blocked by optically isolated SSRs.

    Thanks

    Have you tried disconnecting/removing the current sensing circuit to verify that is the source of the problem?
  • Bill HenningBill Henning Posts: 6,445
    edited 2015-06-06 09:55
    I'd use an ACS712 to measure the current, it is isolated.

    You can get cheap +-5A capable versions from RobotShop on a nice little module for about $4
    JohnR2010 wrote: »
    I have Solid State Relays optically connected to my Propeller's pins. The SSRs are driving a 12v DC 3.5A actuator with built in limit switches and fly back diodes. I have used this circuit and actuator combo for years without any issues (no noise). Currently I'm working on a circuit to monitor the current the actuator draws that is not optically isolated from the propeller and now noise is getting in and rebooting the propeller randomly. I was surprised to see this as the actuator has fly back diodes. I wonder if in the small window before the diodes turn on a voltage spike is hitting my new circuit causing the reboot.

    I'm planning on putting a 300ohm resistor and .1uF cap across the motor's leads as a snubber. I know the snubber should go across the switch or the load but in this case it will be going across both the switch and the load as the limit switches are built into the actuator. For a second level of filtering I also plan on putting a MOV across the motor's leads. http://www.mouser.com/Search/ProductDetail.aspx?R=B72207S0110K101virtualkey59250000virtualkey871-B72207S110K101

    I was going to go with a 1 watt resistor (for the RC snubber) I think that is overkill as it has to be a very, very quick spike it needs to dissipate.

    Any suggestions as its been too long since I designed a filter circuit and thought I would run it by the forum for input?
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2015-06-06 18:02
    Hard to say without a schematic.... we do this all day long with 240V 120V 24V and 12V and it's never a problem. Not using a Propeller though which shouldn't make much difference.

    If you are using OPTO-isolators (This includes the front end of a SSR) read the datasheet carefully for the reverse breakdown voltage of the internal LED. A reverse biased diode across the AK(<--Anode Cathode) input might also be necessary.
  • edited 2015-06-07 13:56
    I'm using Littelfuse 5KP33CA Transient Voltage Suppressors to suppress the spikes from some 24 volt solenoid coils I'm driving. They're bi-directional. The 5KP15CA might be just the thing you're looking for.

    Connect one TVS between each actuator power connection and ground. This will suppress the voltage spikes to a maximum of 15 volts. The solenoid you're using to drive the actuator should be rated for a voltage that is at least twice the TVS voltage. I use Crydom CMX100D10 solid state relays in my application.

    The research I've done indicates that a back to back zener diode configuration is most effective when driving solenoids because it forces the field to collapse quicker. Not sure about motors.

    Sandy
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-08 13:44
    I'm using Littelfuse 5KP33CA Transient Voltage Suppressors to suppress the spikes from some 24 volt solenoid coils I'm driving. They're bi-directional. The 5KP15CA might be just the thing you're looking for.

    Connect one TVS between each actuator power connection and ground. This will suppress the voltage spikes to a maximum of 15 volts. The solenoid you're using to drive the actuator should be rated for a voltage that is at least twice the TVS voltage. I use Crydom CMX100D10 solid state relays in my application.

    The research I've done indicates that a back to back zener diode configuration is most effective when driving solenoids because it forces the field to collapse quicker. Not sure about motors.

    Sandy

    Thanks Sandy! This sounds like a better option than the MOV I was going to use. I will take a look at it!
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-08 14:16
    Update: I have made huge improvements in reliability. I tried a ton of stuff but the two things I did that made the biggest difference is use a shielded cable to carry the power to the actuator and a code change. I have four SSRs powering the DC actuator. They are teamed so when team A is active the actuator extends and when team B is active the motor runs in the opposite direction and contracts the arm. Well I came up with the idea (in the shower, again) of instead of just floating the SSR's to stop the actuator I could activate the two SSRs that would ground both sides of the motor leads. In doing this I removed all the start and stop spikes I was seeing on the scope (they were small spikes but non the less they are gone).

    Now for the bad news: Not sure how bad this really is as it doesn't seem to cause any problems. With my scope on my 3.3V DC supply and I see about 40mV @ 500Hz ripple when the actuator is running. I just cant seem to get that noise out of the circuit with this board. So my question is should I be concerned with 40mv of noise? Heck the florescent lights in my shop are showing up around 25mV at 60Hz. The circuit is in a metal case and If I put the lid on I bet it will be less.

    So I'm now doing reliability tests and so far it has out performed previous test by a long shot! Not sure I should worry much about the 40mV ripple on top of my 3.3v DC???
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-06-08 20:22
    JohnR2010 wrote: »
    Update: I have made huge improvements in reliability. I tried a ton of stuff but the two things I did that made the biggest difference is use a shielded cable to carry the power to the actuator and a code change. I have four SSRs powering the DC actuator. They are teamed so when team A is active the actuator extends and when team B is active the motor runs in the opposite direction and contracts the arm. Well I came up with the idea (in the shower, again) of instead of just floating the SSR's to stop the actuator I could activate the two SSRs that would ground both sides of the motor leads. In doing this I removed all the start and stop spikes I was seeing on the scope (they were small spikes but non the less they are gone).

    Now for the bad news: Not sure how bad this really is as it doesn't seem to cause any problems. With my scope on my 3.3V DC supply and I see about 40mV @ 500Hz ripple when the actuator is running. I just cant seem to get that noise out of the circuit with this board. So my question is should I be concerned with 40mv of noise? Heck the florescent lights in my shop are showing up around 25mV at 60Hz. The circuit is in a metal case and If I put the lid on I bet it will be less.

    So I'm now doing reliability tests and so far it has out performed previous test by a long shot! Not sure I should worry much about the 40mV ripple on top of my 3.3v DC???

    I have been reserving my opinion until I get to see some documentation on this setup...... :)

    However it sounds like your 12V rail might not have been adequately filtered in the form of high-frequency bypass caps, even inductors and transient protection diodes etc. In normal operation the flyback diodes will be shunting that spike back through the rails and if that looks like a fairly high impedance to the spike then it could be propagating through the rest of your system. By shorting the winding out rather than floating you are shunting the current through the ground and back through a "flyback" diode as only one SCR would effectively be conducting, the other blocking. If this works then fine but don't neglect simple transient protection for your 12V supply and maybe we might even get to see some photos and diagrams? ;)

    As for the ripple it doesn't sound like a problem at all, you only need to worry about those levels if you had some analog system running from it and even then it is easy to filter that part of it. Sometimes it's the way you have hooked up the scope that can mislead you as you may be creating a ground loop or something. I don't know what kind of regulators you are using but I normally like to switch down to 5V and have one or more linear regs for 3.3V for clean supplies.
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-09 04:37
    I have been reserving my opinion until I get to see some documentation on this setup...... :)

    However it sounds like your 12V rail might not have been adequately filtered in the form of high-frequency bypass caps, even inductors and transient protection diodes etc. In normal operation the flyback diodes will be shunting that spike back through the rails and if that looks like a fairly high impedance to the spike then it could be propagating through the rest of your system. By shorting the winding out rather than floating you are shunting the current through the ground and back through a "flyback" diode as only one SCR would effectively be conducting, the other blocking. If this works then fine but don't neglect simple transient protection for your 12V supply and maybe we might even get to see some photos and diagrams? ;)

    As for the ripple it doesn't sound like a problem at all, you only need to worry about those levels if you had some analog system running from it and even then it is easy to filter that part of it. Sometimes it's the way you have hooked up the scope that can mislead you as you may be creating a ground loop or something. I don't know what kind of regulators you are using but I normally like to switch down to 5V and have one or more linear regs for 3.3V for clean supplies.
    Peter your correct my 12V rail isn't adequately filtered with fly-back diodes. The original use of this circuit board ran the actuator to its limits in both directions and in doing so the fly-back diode / limit switch combination in the actuator provided the protection. This is not going to fly now as I need to stop the actuator in mid cycle when detecting an object. If I recall correctly the reason I didn't put them in my old circuit is I couldn't see an easy way to place a fly-back diode across the motor leads when I'm using 4 SSRs that are switched on and off in pairs to reverse the motor. I will revisit this but my above grounding trick and MOV may be the best way to go.

    The power supply for the board uses a switcher to drop it down from 12v to 5v and then a liner to take it to 3.3v. I did that because I needed 5v and 3.3v. In the new design I use a switcher to go from 12v all the way down to 3.3 as I don't need 5v for anything now.

    As for a look at the PCB I'm going to post my new design and give you chance to look it over.
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-09 11:06
    Here is my new design based on improvements to a board I made back in 2011.

    PCB layout:
    The motor drive circuit is the lower left of the PCB. You can see the 4 SSRs and a two pin header to connect the two motor wires. In addition to the SSRs I also have a current monitoring circuit based on INA219 chip. I use two pins to communicate with the INA219 directly connected to the propeller. This is where the spikes were getting in before and causing the reboot. I fixed that with code by grounding both sides of the motor leads right after I turn off the SSR that is supplying 12v.

    Notice in place of fly-back diodes across the motor leads I use two TVS to suppress any surge over 12v.

    attachment.php?attachmentid=114449

    attachment.php?attachmentid=114450

    Schematic of Motor Drive circuit in lower left of above picture.
    attachment.php?attachmentid=114448
    668 x 294 - 74K
    668 x 294 - 32K
  • tonyp12tonyp12 Posts: 1,950
    edited 2015-06-09 12:50
    Big huge ground planes is not always good, use traces or stayout tracks to isolate mcu ground, make it meet at single point by the power source.
    Power to the MCU through a 200 Ohm resistor and a 1F cap, just to give it backup-power for short amount of time if a power surge make voltage drop more than a 1Volt.

    Also try different power sources, as some have over-current protection or a minimum power requirement.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-06-09 16:27
    JohnR2010 wrote: »
    Here is my new design based on improvements to a board I made back in 2011.

    PCB layout:
    The motor drive circuit is the lower left of the PCB. You can see the 4 SSRs and a two pin header to connect the two motor wires. In addition to the SSRs I also have a current monitoring circuit based on INA219 chip. I use two pins to communicate with the INA219 directly connected to the propeller. This is where the spikes were getting in before and causing the reboot. I fixed that with code by grounding both sides of the motor leads right after I turn off the SSR that is supplying 12v.

    Notice in place of fly-back diodes across the motor leads I use two TVS to suppress any surge over 12v.

    In a H-bridge the diodes aren't connected across the motor but they are arranged across each switching element as in this example.

    image7.png

    Sometimes the MOSFETs use their own internal substrate diodes if they are rated for that. As mentioned earlier this would also require at least a good high frequency cap on the 12V supply for the flyback spike but shorting the motor should work too.

    I can't tell from the diagrams what the ground planes are like (as mentioned you need to keep the power and logic separated) but looking at the long long control lines it's easy to see how they could become nice little antennas. Even if you did run this as is you could have logic ground plane around it and even between the lines. The other simple thing is just put those series resistors not at the SSRs but back at the Prop where you could also add some protection if needed. However I don't think you should ever have those lines actually floating, just low or high outputs (in case I read you wrong).
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2015-06-09 16:47
    Notice the diodes D1,D2,D3, and D4 on Peter Jakacki's post form a bridge rectifier. You can also do something like this directly on the motor with the motor terminals connected to the "AC" inputs of a Bridge rectifier and the "+" terminal to the supply and the "-" terminal to ground. This will offload the substrate diode in the Transistor MOSFETs. Ideally though would be to use Schottky diodes for the Bridge rectifier.

    I wonder how much galvanic isolation, if any. your current sensor is capable of withholding.... THAT could be a potential ground loop problem. Either way, I would at least move it so that it is on the supply side of the MOSFETs rather than a direct line with your motor. If you are needing to sense current direction, you should already know which direction your motor is going, since the micro is controlling it, making it a moot point to place it in direct line with the motor.
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-10 04:32
    I wonder how much galvanic isolation, if any. your current sensor is capable of withholding.... THAT could be a potential ground loop problem. Either way, I would at least move it so that it is on the supply side of the MOSFETs rather than a direct line with your motor. If you are needing to sense current direction, you should already know which direction your motor is going, since the micro is controlling it, making it a moot point to place it in direct line with the motor.

    Beau, I like the idea of moving the current sensor's shunt resistor to the supply side of the SSRs. If nothing else it gets it a little further away from the motor's noise and won't hurt a thing. I don't care about the current direction, in fact in my code if it is a negative value I invert it so it is positive heck this will reduce a line or two of code.
    In a H-bridge the diodes aren't connected across the motor but they are arranged across each switching element as in this example.

    image7.png

    Sometimes the MOSFETs use their own internal substrate diodes if they are rated for that. As mentioned earlier this would also require at least a good high frequency cap on the 12V supply for the flyback spike but shorting the motor should work too.

    I can't tell from the diagrams what the ground planes are like (as mentioned you need to keep the power and logic separated) but looking at the long long control lines it's easy to see how they could become nice little antennas. Even if you did run this as is you could have logic ground plane around it and even between the lines. The other simple thing is just put those series resistors not at the SSRs but back at the Prop where you could also add some protection if needed. However I don't think you should ever have those lines actually floating, just low or high outputs (in case I read you wrong).

    Peter, I will put the diodes across the SSRs as you suggest in your H-Bridge configuration (thanks for the pic). I had them configured that way but I took them out and went the TVS route as I was concerned they would allow voltage spikes into the 12 volt power supply. I thought the idea of a fly-back across the motor is it will short the windings keeping the spike out of the circuit. Wont the diodes in the H-Bridge configuration let the spike onto the 12 Volt Buss. Maybe that is the idea, let it on the bus so it can be absorbed by the power supply?? I don't have a problem adding them just want to understand how they help. Any thoughts on the TVS wont they help with the spike? I have never worked with them.

    Its easy to move the resistors closer to the prop I should also be able to extend the ground plane between them. Great Idea! Oh, and no I don't float the control wires to the SSRs I did say float in a earlier post but I was trying to say the SSRs are floated (off) and the control line to them is low.
    tonyp12 wrote: »
    Big huge ground planes is not always good, use traces or stayout tracks to isolate mcu ground, make it meet at single point by the power source.
    Power to the MCU through a 200 Ohm resistor and a 1F cap, just to give it backup-power for short amount of time if a power surge make voltage drop more than a 1Volt.

    Tony, I broke up my ground plane last night so the 4 SSRs and motor feed are now isolated off and it meets back at the power source as you suggest. That makes a lot of sense thanks!! The originally version of this PCB I made back in 2011 had a 5v ultra cap on the 5v buss that feed the 3v liner reg. It would run the prop including the xBee for over 2 minutes after the power was disconnected. Since they are little pricy I ended up taking them out of a few boards and everything seemed to work just fine. I will price out a 1F cap and get either that cap or an ultra cap back in the 3.3v line. I was able to get away with just putting the ultra cap in without a 200 Ohm current limiter, I had a 1A switcher and it seemed to charge it just fine. I have that same switcher now feeding 3.3v directly do you still think I need the 200 Ohm resistor? Or is that too much stress on the power circuit at start-up?
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-10 16:12
    Here is the new schematic with fly-back protection across each SSR and now measuring current as it feeds into the SSRs apposed to directly connected to motor leads:
    Motor leads including the shielded cable's drain wire connect to J301

    attachment.php?attachmentid=114458

    View of my new isolated ground plane for the motor control components.
    attachment.php?attachmentid=114456

    With the ground plane turned on:
    attachment.php?attachmentid=114457

    This is all work in progress much fine tuning to do and I still want to add a 1F cap in the power rail as Tony suggested.
    992 x 431 - 140K
    992 x 431 - 161K
    1024 x 814 - 122K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-06-11 08:33
    Supercaps are normally only low voltage and relatively high ESR, not really suitable for the PSU IMO. To avoid the droop you run a series resistor and diode from 12V into a 4700uF for instance and regulate down from there. The current drain is less because of the switch-mode power conversion, and even though the voltage will start to droop almost immediately it is still being regulated. Don't neglect the power-saving that you can effect in simply slowing down the Prop or executing WAITCNT during those start-up surges too. Soft starting could also be another option.

    You can even parallel smaller caps which makes it easier to distribute them around on the pcb plus they tend to be lower profile than one big cap and they also have a lower ESR when paralleled.
  • evanhevanh Posts: 15,192
    edited 2015-06-12 02:52
    I've moved the isolation line to normal location for SSRs like that. The negative common for the SSR inputs should be derived from the control ground rather than the power ground.
    992 x 431 - 177K
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-06-12 04:56
    evanh wrote: »
    I've moved the isolation line to normal location for SSRs like that. The negative common for the SSR inputs should be derived from the control ground rather than the power ground.
    If I understand what your suggesting correctly I should have that covered. You can see it better by looking at the schematic, the SSRs control ground is tied to my logic ground (a different ground plane than the SSRs power side ground). Its hard to see with these low res pictures. Thanks
Sign In or Register to comment.