Controller power supply

Discussion in 'Embedded Systems and Microcontrollers' started by mayank rob, Jan 5, 2015.

  1. mayank rob

    Thread Starter New Member

    Sep 18, 2012
    I am trying to implement a simple home intrusion detection project.
    I have done all my work on general purpose PCB,7805 as voltage regulator,used AT89s52 controller, AC-PG-USBASP USBASP AVR Programmer,reed switch as sensor.
    Everything works fine as long as i use the programmer to power the board.
    But as soon as i connect 6V 500mA power adapter to the board, it starts behaving randomly. It works sometimes and sometimes misses the key detection (which is on interrupt 0 pin). I need to press it twice or thrice. sometimes it just starts buzzing on its own. while sometime all LED's go hay vary on change of state(reed switch).

    What i was able to conclude that its probably my adapter is providing excess supply to the board then needed hence everything is behaving randomly.

    Please help me out here, because in my opinion 7805 should smooth out everything for board,right?

    PS:- I have attached the schematic in image form.
  2. bertus


    Apr 5, 2008

    A 7805 voltage regulator needs at least 8 Volts at its input.
    With a lower input voltage , the output voltage will also be lower, wich might lead to erratic behaviour.
    You will also need decoupling capacitors at the input and output of the 7805.


    In the schematic there is given 12 Volts for input voltage.

    mayank rob likes this.
  3. praondevou

    AAC Fanatic!

    Jul 9, 2011
    The 7805 has at least 2V voltage drop from input to output. You can modify the power adapter, use a different power adapter or use a LDO regulator or switching regulator instead of the general purpose 7805.
    mayank rob likes this.
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    There are various kinds of adapters. Does this "6V 500mA power adapter" have an AC or a DC output?

    Even if it says "DC," there is oft times no smoothing capacitor in the output so you get a pulsing DC. So you may need to add one.
  5. mayank rob

    Thread Starter New Member

    Sep 18, 2012
    Thanks Bertus, i completely missed the 7805 capacitors, so thanks for pointing that. Il take of trail implementing all the suggestions given.
    And the adapter is linear transformer adapter, initially even i thought that the randomness might be due to non linearity of the adapter, but then 7805 should linear that out. Can you suggest any particular regulator? (i have zener voltage regulator in my mind, any suggestions on that.)
    Anyway, I will report back the trial report.