Connect with us

Help with Atmega328 project

Discussion in 'Microcontrollers, Programming and IoT' started by fastpcuser, Jul 10, 2012.

Scroll to continue with content
  1. fastpcuser

    fastpcuser

    31
    0
    Apr 8, 2012
    I'm trying to build a circuit that uses two switches to turn on and off pump. I had it all set up on breadboard and it works fine, but when I created PCB it is not working properly. The pump does not turn on only when I unplug the power and plug it back in. I'm using 12V 1200mA power supply with LM7812C regulator for the pump and LM7805 for the Atmega328P microcontroller. This Microcontroller has the Optibot loader from Arduino. I tried to test with with the simple led blink test, and all my LED would blink the way they should. but I can't seem to get the motor/pump turn on.

    I have attached PCB drawing ( need to clean it up little) and schematics.

    PS: I'm new to electronics. Be nice.
     

    Attached Files:

  2. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    Clarify this, it works sometimes? But, then fails to work, and a reboot fixes it? That suggest a problem with your code...

    Also you need a resistor on the base of the transistor, so you don't kill it, and you also have a problem with the voltage levels... You are using a 12v supply and trying to regulate it to 12v with an LM7812C... Either bypass the LM7812C and use the already existing 12 volts, or up your supply voltage in excess of 14.6v as the LM7812C needs at least 14.6v to operate properly...
     
  3. fastpcuser

    fastpcuser

    31
    0
    Apr 8, 2012
    Actually the PS is 12 but the output is 14.6v . The motor turns on for few seconds after the microcontroller resets other than that it doesn't do anything.
     
  4. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    It's either a 12 volt power supply or a 14.6 volt one, at what load did you measure the 14.6 volts? I suspect that is the the no load voltage on the '12 volt' power supply, and I'll bet as the load increases the voltage drops quite rapidly... When it drops bellow 14.6 volts the LM7812C no longer performs properly, and that means it is not properly supplying the motor a that point... You need in excess of 14.6 volts to properly run the LM7812C, try an 18-24 volt supply and see how that works, or as I said skip the LM7812C and run the motor directly from your existing power supply...
     
  5. fastpcuser

    fastpcuser

    31
    0
    Apr 8, 2012
    just got home from work so .... the PS without any load is 15.78V Dc (measured with multimeter.). I think I have found one error ..... my button/switch is missing pulldown resistor. Also is there any other (better) transistor that I can use than TIP120 ? I'm going try adding that resistor to see if it will do anything.
     
  6. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    So now it's went from a 12v supply to a 14.6v supply to a 15.78v supply? Ever changing values isn't productive to solving a problem...

    And you go through a rectifying diode that skims off about 0.7 more volts leaving you at about 15v max... If that power supply drops even half a volt under load you are bellow what the LM7812C wants and could still very well be the source of your problem...

    Your choice of transistor is not the problem...

    Without the code and intended function of the circuit trying to troubleshoot beyond what I have suggested already is really just a shot in the dark...

    You seem to continue to be very hesitant to heed my advice on the power supply, taking an argumentative stand when you are attempting to eliminate possible issues isn't beneficial to narrowing down the cause of the problem...

    I also have to asked why on earth are you using a micro if the intended purpose is just to use switches to turn on/off a pump? Seems like excessive overkill...
     
    Last edited: Jul 11, 2012
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,411
    2,779
    Jan 21, 2010
    It might be useful to measure the output of the 5V regulator and also to see how you're driving that transistor.

    We will need at least a partial circuit diagram.

    Is the pump on or off when you're taking your measurements?

    Have you tested the circuit using a different load (for example just a LED)?
     
  8. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    You TIP120 is probably losing you 2V. Maybe you would be better off to use the 14V input rather than regulating it down to 12V. A MOSFET would have been a better choice.

    Bob
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-