2
\$\begingroup\$

enter image description hereenter image description hereI need a help for debugging the error in my 7 segment display based digital clock design. It consist of six 2 inch displays and sixty 1 inch displays. The power supply I am using is 12 V/2 A external SMPS adapter. A 9 V regulator and a 5 V regulator are used in this design. A 7805 is used for providing supply for PIC, RTC and 1 inch display driver circuitry. A 7809 is used for driving 2 inch displays driver circuitry and buzzer. For 1 inch displays BD140 (PNP) is used and for 2 inch displays (ULN2003 + BD140) is used. ULN2003 is used for level shifting pic signals from 5 V to 9 V. Also around 2 meter of 12 V LED strip is driving directly from adapter output.

The clock works fine during testing procedures before sale. After sales, we got many calls from customers with the same complaint. That is, display is fully off, LED strip and adapter is working fine. Then I try to reprogram the IC but failed. There is no specific interval for the damage, sometimes within 1 month, sometimes within one year like that. But whenever this happens, 95% of the complaints will be same.

Actually I don't know where to start. Software problem? Hardware problem? Power supply problem? 2 inch display driving section? We have lots of models with 1 inch displays and almost the same design, and they work satisfactorily). Circuit Diagram

\$\endgroup\$
  • 1
    \$\begingroup\$ How many damaged units do you have on your desk, and what do you replace to fix them? \$\endgroup\$ – Jeroen3 Jun 18 '18 at 12:17
  • 2
    \$\begingroup\$ You can't fix a problem if you don't know what the problem is. You must determine the actual fault in the failed units before you can begin to work on a solution. \$\endgroup\$ – Elliot Alderson Jun 18 '18 at 12:18
  • 1
    \$\begingroup\$ I second the comments. If the IC fails to be programmed there are a number of things that maybe went wrong, you need to narrow down the list. Maybe it is related to a humid/hot environment? \$\endgroup\$ – Vladimir Cravero Jun 18 '18 at 12:20
  • 1
    \$\begingroup\$ How much current are you sinking into your PIC via R15, R16 and so on? The resulution is not enough to read the values. \$\endgroup\$ – winny Jun 18 '18 at 14:04
  • 1
    \$\begingroup\$ @Nikhil - You said that there are "sixty 1 inch displays". Do you really mean that? The schematic appears to show sixteen 1 inch displays. If the mention of sixty displays is wrong, please edit the question to fix. Then I'll remove this comment to avoid clutter. Otherwise, if the number sixty is correct, please explain why the schematic does not show sixty displays. \$\endgroup\$ – SamGibson Jun 19 '18 at 13:46
4
\$\begingroup\$

I assume from your description that the MCU is being damaged, and replacing the MCU solves the problem.

It looks to me like a layout issue, which is not captured in your schematic.

Without further information, I would suggest adding series resistors on the CLOCK and DATA lines, perhaps around 1K (depending on how high your clock frequency happens to be). The 74HC164s may be pulling those lines below ground when the high segment currents switch.

Rather than blindly doing that, you can put an oscilloscope on those lines and see if indeed there are transients that exceed the power supply limits in either direction. Such transients can cause latchup of the MCU and destruction from power supply current can ensue.


Edit-

Yes, your layout is pretty horrific, in particular the power connections are thin, long and meandering so they have a lot of inductance. A 2-layer or 4-layer board would be much better, but of course that costs money.

\$\endgroup\$
  • \$\begingroup\$ Around 400ma is taking by entire displays from the adapter. And I read from somewhere that a track of 1mm is enough for carrying this much current. \$\endgroup\$ – Nikhil Jun 20 '18 at 10:05
  • \$\begingroup\$ Can you suggest some links regarding good pcb designing practices. \$\endgroup\$ – Nikhil Jun 20 '18 at 10:06
  • \$\begingroup\$ @Nikhil I don't have much in the way of links to pass along. Most of the wisdom is in the form of rules of thumb (that often conflict). In this case you have fast high-current edges so you should minimize the loop areas where the currents flow. This is similar to the requirements for minimizing radiated EMI and for minimizing EM susceptibility. \$\endgroup\$ – Spehro Pefhany Jun 20 '18 at 12:35
  • \$\begingroup\$ Single sided boards can be tricky, but placement of a few extra jumpers can greatly improve things. As far as references, I've found Noise Reduction Techniques in Electronic Systems (Ott) and Cable Shielding for Electromagnetic Compatibility useful, but I suspect you wouldn't see the applicability immediately. If you watch Robert Feranec's videos, especially the lower tech 2-layer layout of an Arduino board, he has a good feel for the issues. He has a Udemy course that is like US$10 so almost free. \$\endgroup\$ – Spehro Pefhany Jun 20 '18 at 12:39
2
\$\begingroup\$

Do your customers reprogram the PIC? Once in my office we had an issue where almost every machine started failing to program. The problem turned out to be that the programming header was not keyed, and on this particular machine you had to reach around and plug in the header where you can't really see it. If you you plugged the header in just so (off by one in one direction I think). Then the programming voltage would fry the PIC. We had to replace the pic on almost every board, I put keyed programming headers on everything after that.

I also see that you don't have any sort of static protection on this board. Try cutting the guard off of a barbecue lighter and zapping your design (from outside the case if you ship with one), and see if that causes the problem. Or use an expensive ESD test wand if you have one (which I never have).

\$\endgroup\$
  • \$\begingroup\$ It's not about programmer. Because I am using same programmer to program all other models and it works. Only the returned damaged mcu fails. \$\endgroup\$ – Nikhil Jun 20 '18 at 9:54
  • \$\begingroup\$ Ok, so you're saying that customers don't reprogram the board themselves. I think you need to try to reproduce the problem, get your boards wet, drop them, zap them, etc. Exactly how you stress them will depend on how your customers are using them, especially the failed ones. \$\endgroup\$ – Drew Jun 20 '18 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.