Erratic output behavior when moving from dev board to PCB

Discussion in 'The Projects Forum' started by mikewashere05, Dec 23, 2009.

  1. mikewashere05

    Thread Starter New Member

    Oct 26, 2009
    15
    0
    Hello all,

    As the title states, I've just moved a project from a development board to a custom made PCB. Unfortunately I can't provide an exact schematic, as I'm not permitted to, however I'll do my best to explain.

    It uses an ATTiny261. 4 inputs (each a switch), 3 outputs (2 assigned to a bi-color LED and one to a relay driver circuit).

    The relay driver circuit includes a 1kΩ resistor from the μC output pin to the transistor base, a 4.7kΩ (what I had on hand) acting as a pull-down from the transistor base to ground and the relay has an activation current of about 100mA and resistance of 85Ω. I calculated the 1kΩ value using a worst-case scenario of a 45 hfe transistor and 150Ω relay.

    I use a common 5v low dropout regulator with capacitors on both the input and output rails.

    I hope that provides enough background information about the circuit. Now, the software and problem.

    The software is simple enough. If one of the switches is pressed, turn on the red LED and turn off the green. If another switch is pressed, turn off the red LED and turn on the green. This works correctly on the development board.

    On the PCB, however, its very erratic; both when I have the switches controlling the LEDs and when I have it controlling the relay. It seems any movement whatsoever on the PCB will cause a change in the output... sometimes even lighting both the red and green LED. I can literally breath on the circuit and change the color of the LED. I've checked with the multimeter again and again: there are no shorts.

    I'm away from work for the holiday and don't have access to spare parts so that I can build another board up from scratch, so I need to debug this one. I'm completely lost as to where I should begin troubleshooting, does anyone have an idea?
     
  2. mikewashere05

    Thread Starter New Member

    Oct 26, 2009
    15
    0
    Pull up resistor! *facepalm*
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Are you serious? You're asking for help, but you insist on tying one hand behind our backs. Companies with that kind of attitude and approach to problem solving will probably go belly up sooner rather than later. You all may think you've got some great proprietary tecnology, but from where I sit it looks like a steaming pile of floating inputs and questionable design.

    Don't believe me? Look on this forum for the numerous examples of people with deep dark secrets asking for help and make an educated guess about how many of them succeeded? The answer is so close to zero as to be indistinguishable from it.

    As a successful entrepreneur myself I can tell you the secret of success. Open everything and continuous improvement. You've got to move so fast the competition can't keep up even if they have all of your schematics, documents and source code because you're three products ahead of them and they're always playing catchup.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    This was a bad idea.

    Always use Ib=Ic/10 when using a transistor as a saturated switch. That way you'll know it'll work.

    Then use Rb * 10 for the base pull-down (NPN) or pull-up (PNP).
     
  5. mikewashere05

    Thread Starter New Member

    Oct 26, 2009
    15
    0
    I did something along those lines, just didn't have the calculations off the top of my head.
     
  6. mikewashere05

    Thread Starter New Member

    Oct 26, 2009
    15
    0
    I provided everything short of an exact schematic. That post must have taken quite some time to type with your hands tied and such...

    Regardless, I figured out the problem. It was a stupid late night oversight and I'm on my way. I appreciate your "steaming pile of floating inputs and questionable design" assertion, however. I think next time something more constructive would be "I think you have floating inputs and should check out pull-up/down resistors."
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    You're entitled to your opinion of course, and if you succeed in spite of your penchant for secrecy and obfuscation I will be surprised. But hey, I've been surprised before.
     
Loading...