Prop Plug and LQFP (Prop 1)

24

Comments

  • I agree about the relay contact loads. Turning on a/c motors and a/c solenoids can give a lot of spikes and resets to your prop.
  • Opto Isolated relays are a must. Seperate power supply to power the relays even better.
  • @Cluso99 Nothing is near any of the AC voltage. The 110 vac is on the opposite side of the board. The input voltage from the transformer (24 vac) is on the same side as the prop circuits but at the opposite end of the board and is at the closest 3/4 inches away from the coil connection of one of the relays.
  • > @Greg LaPolla said:
    > @Cluso99 Nothing is near any of the AC voltage. The 110 vac is on the opposite side of the board. The input voltage from the transformer (24 vac) is on the same side as the prop circuits but at the opposite end of the board and is at the closest 3/4 inches away from the coil connection of one of the relays.

    Excellent. There needs to be no copper tracks in this gap
  • frank freedmanfrank freedman Posts: 1,588
    edited 2020-02-17 - 04:24:21
    Actually, it looks from the layout that there are a number of low voltage points in the vicinity of the line voltages. Both at the connector at the board edge and also where the relay pins penetrate the PCB. The reason I mentioned this initially was due to the proximity of some traces to the line voltage through hole pads at the edge connector to low voltage/signal pads, relay through hole pads to signal traces at the outer edges of the board at K1 and K3. The spacing may be good for 110VAC, but switching inductive loads (or failures) can generate some significant back EMF with arc potential. Speaking of arcs, is the spacing between the relay mains traces and the surrounding copper enough? What would the effect of an arc to the copper cause to the system?

    For service, my preference would not be having line voltages and signal mixed on the same connector.

    Just lean a bit to the conservative side of safety (paranoid?)....


    Edited to add after thought regarding copper to relay trace question.
  • I have been testing this board for about 2 weeks and seeing something strange. Right now only using 2 relays the one on the left and the center. Temp probes are connected on the very right right. Left Relay is powering a 24 VAC gas valve Center Relay is powering a 110V AC Pump. All functionality works. However the relay that powers the gas valve will at a random cause a the propeller to reset when it kicks on. It is not a power issue because the other relay can be on and this one will cycle properly. I had a 20VA 24 Volt transformer and I upgraded it to a 40VA and still get the same issue.

    Is it possible that since I use the same transformer to power the propeller and the gas valve there is some feedback that randomly happens?

    I put my voltmeter on the transformer and there is 26 volts when the relays are off and when both are on it drops to 24 volts when the gas valve is on. All 3 Caps are 1000uf 1 at the 24 volt, one at the 5 volt and one at the 3.3 volt.

    Any insight on troubleshooting is appreciated.

  • Greg,
    My trouble shooting technique would be to isolate the Prop to a separate 5 volt supply to see if the problem was the power or something else.
    Jim
  • Greg's suggestion for troubleshooting is a good one to determine if it is noise from the AC relay coil. Powering an AC coil on or off can produce large pulses when it happens at the higher levels of the sine wave, and may cause the intermittent resets you are seeing.

    When powering a 24VAC relay I also make sure to have some small (~0.1uF) bypass capacitors on the logic power supply and use a zero crossing opto-triac coupler to drive the relay coil as well as having a snubber circuit on the relay coil.
  • @kwinn Thanks for the input. The schematic is posted earlier in this thread if you want to take a look. The Relays are pretty much isolated. Using transistors and reverse diodes. Caps are all over the place as well. Do you think its possible to get feedback through the transistor ?
  • @kwinn Thanks for the input. The schematic is posted earlier in this thread if you want to take a look. The Relays are pretty much isolated. Using transistors and reverse diodes. Caps are all over the place as well. Do you think its possible to get feedback through the transistor ?

    Ah, looking at that schematic makes things much clearer, and the circuitry driving the 3 relays looks fine. I'm assuming the relay on the left is K1, and it is connecting 24VAC to the gas valve when K1 is closed. That raises two possible causes.

    First, relays do have some contact bounce which could produce enough noise on the 24VDC to reset the Propeller. A 0.1uF across the contact may cure that.

    Second, it could be caused by switching the 24VAC to the gas valve on at the higher levels of the sine wave as mentioned in my previous post. A snubber circuit would take care of that, as would the opto-triac.

    I would suggest using a zero crossing opto-triac coupler instead of K1 to provide the 24VAC to the gas valve coil.
  • I think the surge of the valve turning on is pulling the supply to low allowing the regulators to drop out, and would suggest going to at least a 470uF for C1 and maybe do the same to C2 (random pick, cheap and common part, some math wiz could probably give a better value spinning the numbers). Having a very large cap would allow the voltage level into the prop supply regulator to hold up during this time, the problem may be more like a brownout when the valve turns on than a spike. Of course, I could be deep in right field (if there were any games these days that is). Maybe drop a .1uF or so across the cap for any spikes.
  • I think the surge of the valve turning on is pulling the supply to low allowing the regulators to drop out, and would suggest going to at least a 470uF for C1 and maybe do the same to C2 (random pick, cheap and common part, some math wiz could probably give a better value spinning the numbers). Having a very large cap would allow the voltage level into the prop supply regulator to hold up during this time, the problem may be more like a brownout when the valve turns on than a spike. Of course, I could be deep in right field (if there were any games these days that is). Maybe drop a .1uF or so across the cap for any spikes.

    Good catch. With a 10uF capacitor on the 24V input of U3 (5V reg) that's a distinct possibility that can be checked simply by putting a larger (470 to 1000uF) in parallel with the existing 10uF.
  • jmgjmg Posts: 14,289
    I have been testing this board for about 2 weeks and seeing something strange. Right now only using 2 relays the one on the left and the center. Temp probes are connected on the very right right. Left Relay is powering a 24 VAC gas valve Center Relay is powering a 110V AC Pump. All functionality works. However the relay that powers the gas valve will at a random cause a the propeller to reset when it kicks on. It is not a power issue because the other relay can be on and this one will cycle properly. I had a 20VA 24 Volt transformer and I upgraded it to a 40VA and still get the same issue.

    Is it possible that since I use the same transformer to power the propeller and the gas valve there is some feedback that randomly happens?
    Relays can be the source of many 'random' problems with MCUs - if you have proven stable power, the issue can be contact bounce / arcing, and the very fast edges that result make a mockery of ground zones. The bounces that result can disturb and reset MCUs.

    Remove the gas valve load and see if it ever occurs, then replace with a resistive load of equivalent rating.
    A MOV in parallel with the contact can reduce the arcing effect, and/or you can try carefully timing the on/off with mains cycles, or you can try a solid state relay.

  • The caps on the power have already been upgraded to 1000uf. Power is stable on the DC side of the rectifier. I am leaning toward the electro magnetic switch in the gas valve as the culprit. Bench testing this thing through probably 1,000 cycles never caused a problem. But the gas valve was not in the picture during that testing.

    I am going to try to create a snubber on the pins of the relay sticking out of the bottom of the PCB. Only problem is now I cant find the amperage draw of the gas valve.
  • Sorry, missed the note about already being at 1000uF. If you have access to a scope, it may show what is happening at valve turn-on. Once you determine the valve current requirements, it may be worth trying an inrush thermistor in series with the valve to limit the initial current into the valve coil. Alternatively, maybe go with a transformer with another winding to provide the prop and control relay voltage separate from the valve itself.
  • jmgjmg Posts: 14,289
    Only problem is now I cant find the amperage draw of the gas valve.
    You could measure it with a meter ?
    Trialing a Solid state relay could help confirm it really is the contacts that are causing the problems.

  • Hi Greg LaPolla

    About two years ago, chrisdlove faced a similar problem, using a Bs2P40 in a relay control circuit, powering a water pump and water heating element.

    https://forums.parallax.com/discussion/168674/parallax-bs2p40-sx48bd-tq-spontaneous-reboot

    I did remembered about it, because of the following video (if you are in a hurry, jump to ~2:52, just to see what a beautifull arcing, when relay' contacts closes).

    https://youtube.com/watch?v=8B8N7e-4hmI

    Hope it could help you, someway.

    Henrique
  • Cluso99Cluso99 Posts: 15,865
    edited 2020-03-17 - 09:56:56
    There’s a problem that many think putting bigger capacitors solves. Modern regulators do not require big c’s. In fact they are detrimental to the regulator circuit. So how do you fix this problem, if that is in fact the problem?

    It would have been better to have a completely separate power supply, meaning separate bridge and caps to the 5V and 3V3 electronic supplies.

    So, in order to get around this, put the 1000uF on the bridge output which will provide 24VDC. From this point, wire a 1N4001/1N4004 then a resistor or inductor to the junction of C1 and U3. I presume C1 is right across U3. This has the effect of isolating your logic power from the relay power. Not sure if everything in you circuit is shown. If you use a resistor anything from 10R up would help and don’t forget to check the power dissipation. An inductor (ferrite bead) tends to block any noise which is better than the resistor trick. IIRC 10uH sounds about right.
    C1 might be improved by being a tantalum and 22uF might be a better choice, and 10uF tantalum for C2 and C3. Here, you should have two caps for C2, one each right at the pins of the regulators. Quite often next to them a 100nF also helps.

    Next, data sheets are your friend. The LM1086 is not the best data sheet that I’ve seen, BUT in the Electrical Characteristics the voltage given for the 5.0V regulator is 20V MAX !!!
    This overrides the Absolute Ratings as you should NEVER design for this.

    Now remember that your 24VDC which you’ve already said can be 26VDC is a smoothed reading. If you look at the waveform you might find the peak is quite a bit higher.

    There is a 0.5A switching regulator (1A too IIRC) that comes in a TO220 regulator package. I cannot recall it’s PN off hand so I can’t check it’s input voltage atm. Peter mentioned it many post back - Recom. I note you said that you were using it, so did you replace U3? And did you check it’s max input voltage?

    BTW Don’t take this the wrong way. These are just things you learn from years of designs. The resistor/inductor trick is how we isolated analog power from digital power in modem chipsets in the 80’s and 90’s.
  • @Cluso99 Thanks for the info. The 5v regulator has also been replaced with a DC DC CONVERTER 5V 3W R-785.0-0.5.

    The 26 volts is AC voltage coming from the transformer before the bridge. I have uploaded an updated schematic as a lot has changed.

    Does the DC DC Converter change any of what you stated above?
  • Here are the potential problems that I think may be causing the Prop to reset.

    Relay K1 coil producing spike when powered up.
    Unlikely, inductance of coil will limit the speed of the current increase. The spikes occur when the current to the coil is turned off and the magnetic field collapses rapidly. That is why there is always a snubber circuit across the coil connections.

    5V Regulator shutting down due to overvoltage input or current draw.
    Possible. Depends on 5V current draw. Even at 90% efficiency having a voltage drop of 17-18V may produce enough heat for the regulator to shut down. I suggest using a scope to monitor the 5V supply while turning the relays on and off in all 7 possible combinations.

    Relay K1 contact bouncing/arcing.
    Very likely.

    Solenoid valve coil producing spike when powered up.
    Very likely if K1 contact bounces or arcs.

    Still think replacing the relay driving the solenoid coil with a zero crossing opto-triac or SSR. It will turn the solenoid on and off when the AC voltage is crossing the 0V level and avoid any inductive kickback problems.
  • @kwinn I like the idea of the opto but wont there still be a power influx back to the transformer when the opto is shut down ?
  • Greg,
    That is why I suggested trying a separate power supply temporarily isolating the prop’s power from the power to the relays. You can use most any 5V power source including cellphone portable power bank. It looks like you could pull U3 and insert 5V to the prop circuit at that point. I am not the electronics expert that @kwinn is, but as a former product manager in a firm that produced many control systems for their main product line, I often suggested trouble shooting ideas to engineers that lead to successful working controls.
    Jim
  • @kwinn I like the idea of the opto but wont there still be a power influx back to the transformer when the opto is shut down ?

    What RS Jim posted is a good idea that would definitely tell you if the problem is with the power circuitry or the logic/microcontroller section.

    As to your question, the answer is no, turning an ac voltage on or off with a zero crossing triac output isolator will not produce power spikes even if they are connected to inductors including mechanical relay coils. I have used them for many years to solve this kind of problem in more equipment than I care to think about.

    The circuit in the zero crossing triac output opto-isolator will only turn the triac on when the AC voltage it is controlling is crossing zero volts and the LED is emitting IR. The inherent behavior of a triac is that it will then continue to conduct until the current through it drops below a certain minimum. The result is that the triac starts to conduct at or very near zero volts, and when the LED turns off the triac continues to conduct until it is at or very near zero volts. Virtually spike free control of power through coils.
  • Cluso99Cluso99 Posts: 15,865
    edited 2020-03-18 - 08:18:32
    C2 and C3 must not be 1000uF. Regulators do not like these large capacitances! While this may not be your problem, it is nevertheless a problem.

    Next, C1, C2 & C3 are a loooong way from the regulators. Remove C2 & C3. Solder a 10uF tantalum across the input pins and another across the output pins right on U4's pins ie IN to GND and OUT to GND.
    Note the 5V Recom switcher has internal capacitors so this is not necessary IIRC. BTW I still don't like the very high input voltage to this switcher.

    Is your ac voltage measured with a meter? If so, that's RMS and you will get 1.414 * 26Vacrms which is about 35Vpk.

    IMHO you need to drop some considerable voltage between the bridge/C1 and the input to the Recom 5V switcher. For now, you could try a few 1N4001/1N4004 in series - they will drop around 0.6-0.7V each. If the Recom fails you'll likely see the blue smoke :(

    Once you've done this you can see if you are still getting the reset problem. Then we can look at other things.

    BTW we have driven relays for decades. You just need a clean power supply for the micro.
  • @Cluso99 is this a good replacement for a 1N4001: https://diodes.com/assets/Datasheets/ds16003.pdf

    Since there is not an easy way to get those diodes in, I am going to get another board made. Its only 2 bucks for 5 board but 17 bucks to ship.

    I have attached the new schematic for the power supply. I'll post the pcb layout once its fixed.
  • Cluso99Cluso99 Posts: 15,865
    edited 2020-03-20 - 21:24:31
    Since you’re doing a new pcb, i would take the time to do it properly.
    You need to follow the manufacturers specifications properly. So, you really need to lower the voltage into the recom 5V switcher as even supplying the maximum levels to the input gives poor regulation.

    When using regulators, no matter the manufacturer your using, i always put two capacitors right across the input pins with the closest being what the datasheet recommends (usually 10uF - 22uF closest and 100nF next closest). The same applies to the output.
    If you search the various datasheets, some manufacturers will show you pcb design examples. What i do comes from 50 years of design experience which you build up over time.

    All IC components require decoupling capacitors, right at their power and ground input pins. And the power and ground tracks or planes need to be large and direct. Decoupling capacitors are typically 100nF and sometimes also need to include 10nF. In large computer pcbs years ago we would also sprinkle 1-10uF tantalums around the board at strategic points. It was an art back then. The type of cap (capacitor) also matters as all are not equal. Use X5R or X7R, not others, and for little cost, 10% tolerance is better. You’re trying to keep the noise on the power and ground lines to a minimum as this upsets the ICs you use. This is likely your problem with the prop resetting.

    By correct design, I am able to overclock the prop to 104MHz - the actually run to around 112-114MHz or 115MHz on the DIP40 parts.

    Your 24V for your relays needs to be as far as possible a separate supply. Here, you need lots of capacitance to minimise the voltage drop when the relays operate, and for the spike when they release. And you need snubber diodes in reverse across the coils, right at the pins, to short the spikes generated by the coil when it is released.

    I dont know your complete design, not the constraints, so i can only guide from experience with what you have said.

    You are having reset problems. So, why not go and buy say 5 1N4004 thru hole parts, cut the track to the 5V regulator input, wire in ratsnest form these diodes from the 1000uF to the 5V regulator, put a 47uF (35V minimum) tantalum across the input to the 5V regulator. Remove the big caps C2 and C3 ( the ones across the 3V3 reg input and output) and solder a 10uF tantalum across its input and 10uF tantalum across its output - right on the pins.
    If this cures your reset problem, then redesign you pcb. If it doesn’t you have another problem as well.

    Better solution. Buy a 12V zener 1W through hole and wire this instead of your 1N4004s. The anode goes to the 24V side. This will drop 12V across it. My presumption here is the max current to the 5V reg is 80mA. When you cut the track, measure the current. Allow 50% safety so you want to see 40mA max. Else use two 5V 1W zeners in series. That will cover you safely for 100mA (160mA calculated). Dont forget you will need that 47uF tantalum across the 5V reg input after the zener(s) as you want the input to the 5V reg to be rock solid. A resistor could be used but then you need to know the range of current accurately for the line.
  • Here is the updated schematic and PCB. I removed the ground plane for clarity. All GND pins are connected when the ground plane is shown. I have taken all of @Cluso99 suggestions and added a few of my own. Added zeners on the coils of the relays as well to speed up contact opening.

    Added some taps on the power supply so I can add additional components if the power supply is not cleaned up.

  • If your transformer is still going to put our 26V then you will kill the switching regulator.
  • Just had a quick look as it’s midnight here.
    You need to read what I said. C1 is from h6 to ground. You need two 5v1 zeners because your dc is too high for proper reg. Where are the 100nF caps on the 3v3 reg? What is the actual dc? Is it too high for your relays. You need to check all component specifications properly.
    Why the zeners across the coil? They will only reduce the function of the reverse diodes.
    As they say you can lead a horse to water but you can’t make it drink!
  • @Cluso99 I put the 12v zener between the bridge and the 5v switcher . I was reading on sparkfun that adding the zener across the coils along with the standard diode will allow them to open quicker.

    I did put 2 10uf tantalums off the input and output of 3v reg and a 47uf on the 5 volt switcher.

    Is the zener not the better solution or is the 2 1N4001's a better solution ?

    @Brian Fairchild The 5v switcher is rated at 32 volts.
Sign In or Register to comment.