Shop OBEX P1 Docs P2 Docs Learn Events
BS2P40 Failures — Parallax Forums

BS2P40 Failures

harry irizarryharry irizarry Posts: 6
edited 2008-04-28 17:34 in BASIC Stamp
Background:
I integrated the BS2P40 into a product and I have been getting random board failures. The boards function is limited to controlling a DAC and a few I/O pins. It gets is power from a DC/DC converter (RECOM R-785.0-0.5) that is powered from a 28V switching power supply. I pretty much implement the same circuit that is the BS2P40 module. So far, I have been unable to narrow down the cause of the problem(s).

Theories:

I noticed the 5V output of the DC/DC converter spikes after shut down. By shutdown I mean cutting 120VAC to the 28V switching power supply. This spiking happens shortly after and decays in the order of milliseconds. Sometimes it is a single spike, and other times it occurs twice. I would say that the overall peak of each spike is 2-3Volts. My thoughts on this are that this could corrupt the BASIC STAMP firmware. I understand that there is a brownout circuit in the SX-chip but I have read concern over its efficacy.

On my circuit board I used 1206 package capacitors and could not find a 5pF cap in this size for the oscillator circuit. I used a 4.7pF instead. I wouldn't expect this to be an issue but I figured I should mention it.

I should also mention that the boards all worked initially. They tend to fail after a series of calibration steps that involve switching power to the board on & off and communication via RS-232.

Any questions, comments or recommendations would be greatly appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-25 12:56
    The SX chip is rated for a supply voltage absolute maximum of 7.0V. Anything higher than this is capable of destroying the chip and your spike appears to be higher than this. I would investigate the spike further. It should not be happening. Worse comes to worst, you may need some brute force filtering on the output of the 5V supply, either additional capacitance or an LC filter. You may need to use a Zener diode across the 5V supply, probably a 6V Zener, to clamp the spikes to a value that won't destroy your equipment.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-04-25 13:13
    This just cries out for a filter capacitor across Vdd and Vss. 0.1 uF or greater (probably less than 10 uF). And if that doesn't work, you could use a 6 volt Zener diode across Vdd and Vss to 'clamp' the Vdd voltage to 6 volts. This would ONLY take effect during shutdown, and should protect the BS2.
  • harry irizarryharry irizarry Posts: 6
    edited 2008-04-25 13:32
    The output of the voltage regulator is nominally 5V. As mentioned above, upon shutdown of its input voltage (28V), which is gradual (500ms), I notice a few voltage spikes on the output side of the voltage regulator. The spikes don't appear to be more than a few volts. I tend to think that the voltage peak is not causing the problem but its short duration is. I've attached some files collected from my scope.
    1024 x 768 - 61K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-25 14:05
    Thanks for the images. So the spikes are after the power supply voltage has decayed and the height of the spikes is still within the normal range for supply voltage. The brownout detector should still hold the reset line low even with the short spikes. Some additional filtering on the 5V supply should slow down and blunt the spikes anyway. In any event, these spikes don't explain random board failures.

    Without much more detailed information, it would be difficult to provide much more than general advice. Generally, processor failures (if that's what's happening) are from voltage stresses, usually unexpected transient voltages. Since the board failed with just power cycling and RS232 communications, that's the place to look first. What kind of RS232 signal conditioning are you using? What happens if you cycle the power supply, but actually run the board off some other 5V source? Could switching transients from the 120VAC supply or the 28V supply couple through to the 5V supply?

    The Basic Stamp firmware is difficult to corrupt. It would require multiple coordinated steps. The EEPROM used for storage of the Basic program tokens is also difficult to corrupt. It's much more likely for part of the chip itself to be destroyed from a voltage transient.

    Does your board have a programming connector? Does the BS2p40 fail to be recognized by the Stamp Editor after a failure?

    Post Edited (Mike Green) : 4/25/2008 2:18:37 PM GMT
  • harry irizarryharry irizarry Posts: 6
    edited 2008-04-25 18:13
    The board does have a programming connector and after failure the Stamp Editor fails to recognize it. I attached a copy of the schematic for the entire board. I use the surface mount micro and industrial 20MHz oscillator.
    3240 x 2040 - 169K
    3240 x 2040 - 277K
    3240 x 2040 - 207K
    3240 x 2040 - 308K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-25 18:47
    You didn't say what regulator you're using. I did a web search for the part number I see on your diagram and the datasheet says that the device is rated for up to an 18V input. This may not be the part you're using, but I doubt that most similar converters are rated for 28V. Texas Instruments makes a line of similar DC to 5V DC converters that are only rated for 25V. It may be that you're getting transients well over 7V through the converter that are destroying the BS2p40s and perhaps other devices running off the 5V supply.

    I suggest that you use a DC to DC converter rated well over 28V (35V would be reasonable) and you probably should have a 6V Zener diode across the 5V supply lines as allenlane5 and I suggested, perhaps with a fuse in the 28V line in case the regulator fails.
  • harry irizarryharry irizarry Posts: 6
    edited 2008-04-25 19:08
    The DC/DC converter has an input range of 6.5 to 34V: http://www.recom-international.com/pdf/Innoline-2008/R-78xx-0.5.pdf
    Its part number is R-785.0-0.5.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-25 19:32
    The manufacturer's datasheet indicates that a 3.3uF input filter capacitor is required for input voltages greater than 26V and I don't see that on your schematic.

    I keep coming back to the power supply because it doesn't take much of a transient coupled through to the 5V supply to destroy logic ICs and power supply on/off transitions seems to be the situation where damage occurs.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-04-25 21:47
    All the schematics seem good. Meaning, there's no relays involved to send current transients back into the BS2 to destroy it.

    Which leave's Mike's suggestion as the most likely issue. I'd still be tempted to put a 0.1 uF capacitor physically close to the BS2 across Vss and Vdd -- to provide some local transient supression for the module. Once upon a time, EVERY IC would be given it's own 0.1 uF cap physically close to it across Vcc and Gnd to supply current for short transients during switching.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-04-25 22:39
    I think it is still good practice to add a .1uf cap at each chip. The caps don't cost much. I've been doing that on my boards and haven't had any issues. A while back I had to rebuild a home brew robot which suffered from reliability issues. It didn't have a cap at each chip and (at least in my opinion) didn't seem to have enough to do the job. Adding a .1uf cap at each chip helped.

    Hopefully you'll get the issue with your circuit resolved soon.

    Robert
  • harry irizarryharry irizarry Posts: 6
    edited 2008-04-28 15:48
    What are the chances that its the oscillator that is causing the problem? I attached an image of the PCB. Does it look like the crystal is close enough to the micro? The pertinent components are X1, R28 and C13. Does this circuit have reliability issues? I am using the SM 20MHz Crystal from Ceralock (250-12055). I've noticed a bit of a variation of resonance amplitude from board to board. Would it be better to use a Crystal Oscillator with a 5V TTL output and just feed it directly into XI?
    552 x 445 - 63K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-28 16:18
    The chances are very small that the oscillator is causing the problem. The crystal appears close enough to the micro. Look at the various OEM boards for the SX micros. Their crystal / resonator position is not that different from what you've shown. The only commonly used parts here that exhibit a high sensitivity to crystal position and layout are the RTCs with 32KHz crystals like the DS1302 and DS1307, probably because of the very low power involved.

    An unstable oscillator also would not explain the behavior you're describing where the units fail after several power cycles.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-04-28 16:56
    Have you looked at the xtal output at XO on the 'scope? It should be a good sine wave at 20mhz. I see the position for R28 on the PCB, but i almost looks like it shares the pad with the xtal. The value of C13 is not very critical and it can usually be left out. The resonator has built in capacitors. Empirically, C13 is adjusted while looking at the oscillator output XO and adjusted for the strongest sine wave without flat-topping.

    The oscillator would not have anything to do with this failure you are seeing, I think, although if the Stamp is damaged the oscillator might or might not stop.

    I join in the opinion that it has to do something with the power supply. It only takes a spike up to 28 volts for a few nanoseconds to do the damage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-04-28 17:15
    I believe the BS2p40 OEM chip is setup to use a resonator by default. If you want to change to an external TTL clock source you would probably have to contact Parallax to ask about getting a custom version with the clock settings set differently. If you read the datasheet on the SX48 chip (what the BS2p40 OEM chip is based on) you'll see they clock settings are different depending upon the frequency and type of clock source. Instead of going that route you may just want to try another brand of resonator to see if things improve.

    Since you said all of these boards were initially working ok I doubt the resonator is the problem. I agree with Mike and think you might want to take another look at the power supply.

    Does this only happen with the boards are installed and connected to all your external devices or have you seen failures like this just powering the boards themselves?

    This may be a good time to step back and look at not only your board but also how everything is connected. Are there any ground loops? Are there any other ways to feed power back into the board that aren't anticipated?

    I only noticed one cap on the line you use to reset the BASIC stamp during programming. I usually see another inline with the ATN line in many other examples people have made and I usually add one.

    Robert
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-28 17:23
    I am using the Recom R7805-0.5 on my javelin boards without any problem.
    But I use 100uF electrolyt capacitor on its output as suggested by the linked datasheet.
    You seem just to use 4.7uF
    I used this datasheet which shows some different values.

    http://www2.produktinfo.conrad.com/datenblaetter/150000-174999/154483-da-01-en-DC_DC-WANDLER_INNOLINE_R-785_0-0_5_SIP3.pdf

    regards peter
  • harry irizarryharry irizarry Posts: 6
    edited 2008-04-28 17:30
    I seem to be hearing that I should probably consider a fast 5.5V Zener on the 5V side and I should not worry about replacing the resonator with a TTL output clock. As shown in the schematic, all ICs have a .1uF cap with the only exception being the micro which has 2 x 4.7uF and 2 x .1uF. Should I add a 47+uF cap at the dc/dc converter output? Maybe a 10uH inductor to attenuate any spikes? My other option, which was my initial plan, is to put a power supervisory circuit in series with the 5 volt supply. I designed it thinking that the post turn off 2V spikes were the problem but I also need to attenuate IC killer voltage spikes (+7V), adding a quick Zener might not hurt my cause.

    Thank you all for your helpful input!
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-28 17:34
    You also need a capacitor on the regulator input side. Peter's datasheet suggests a 47uF value.
Sign In or Register to comment.