Basic Microcontroller based project

Discussion in 'Embedded Systems and Microcontrollers' started by abhimanyu143, Mar 30, 2015.

  1. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    Hello experts
    I am trying to make small Microcontroller based project.I am making with three module
    part 1-Power supply
    part2-microcontroller (rest , cap and oscillator )
    part3- programmer circuit

    I have purchased some components
    Micro controller P89v51RD2BN
    Capacitor 1000 uF
    diode 1N4007
    regulator Ic 7805
    battery 9v DC

    I am trying to make circuit step by step. so that's why I am making power supply for microcontroller
    upload_2015-3-31_7-18-0.png


    I measured some value with multimeter
    battery voltage without load = 9.39
    regulator Input voltage 7.01
    regulator output voltage= 6.79
    microntroller voltage =6.35

    please look at my reading and tell If look like correct.I am just waiting for confirmation If Its correct than I will post my next programmer circuit .
    thank you very much
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    You have your 7805 regulator plugged in backwards.
     
  3. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    ok that's my mistake
    I have taken another readings
    battery voltage without load = 9.39
    regulator Input voltage 8.16
    regulator output voltage= 5.03
    microntroller voltage =5.00

    please tell me If circuit is correct then I will post my next part
     
  4. AfdhalAtiffTan

    Active Member

    Nov 20, 2010
    117
    11
    That sounds right.
     
  5. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    ok here is my next part
    upload_2015-3-31_22-7-18.png
     
  6. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    1. You need a pullup resistor on the button.
    2. EA (p31) should be connected to +5V
    3. A 100nF cap to be connected to 5V to GND on the output of 7805.
    4. Another 100nF cap to be connected to pin 40 of 89V51 and GND.
    5. The resset cap (10uF) and resistor (10K) should be connected to pin 9.

    89v51rd2 vead.PNG

    Allen
     
    abhimanyu143 likes this.
  7. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    you normally only need one capacitor if the parts are so close and you dont race the circuit with some weird waveforms.

    You can use almost any small capacitor (at low frequencies).
    100nF as such does very little you need another value if you drive waveforms at high frequency or draw large currents.

    But dont plug it with myriads of unneeded capacitors. Pull them out, see what happens, it may take an hour or two but then you see the whole thing becoming unstable.

    A battery actually is kindof a capacitor, even if doesnt directly have a capacity in Farads. you dont neccessarily need a large other capacitor for a battery.
     
    absf likes this.
  8. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    One more thing... Lighting the LED using logic high might not work well with 8051 as it has weak pullup on the port pin. It is better to connect the LED and resistor pair to Vcc and light it using logic zero.

    Allen
     
    atferrari likes this.
  9. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    hello
    I think I have to buy some component
    here is my another effort. tell me which component I am missing. I will buy very soon and If you see any wrong connection please informme
    1.power supply circuit
    2.microcontroller
    3.programmer circuit
    upload_2015-4-1_9-22-19.png
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    abhimanyu143: the standard way to present a circuit is thru a schematic diagram. Don't get me wrong, posting a picture of your build is also very helpful in letting others see possible errors (like that 40 pin package isn't quite inserted all the way into the breadboard) but the best way to document your work is with a schematic diagram.

    Those of us in the game for a while actually thing in terms of the schematic first: when we see the parts we actually see the symbols in some weird way.

    There are several free programs that will let you draw schematic diagrams. My favorite is Kicad but there are many others, right down to a pencil and a piece of paper. I strongly suggest you draw this out and learn how to do good schematics if you intend to pursure electronics either as a hobby or professionally.

    Sorry I can't be of much help on your project as I don't use that brand of controller but you are getting some good advice from the others here.

    Good luck with your project!
     
    absf likes this.
  11. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    hello ErineM
    I will follow your advice. I will post schematic diagram with hardware Picture
     
    ErnieM likes this.
  12. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    I drawn schematic diagram. I don't have enough component to make complete diagram. Mr. Allen suggested me some components in post #6
    its all or am I missing some components ?

    upload_2015-4-1_12-37-28.png
     
  13. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Next time do first what Allen did: show a circuit and eventually one or two pictures.

    You are suposed to always follow a schematic to build something.

    By the way, is this your own creation or are you trying to reproduce a circuit you found somewhere?
     
    absf likes this.
  14. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    On your breadboard, your button was connected to pin 10 (P3.0) but on your schematic, it was connected to pin 9 (reset). So which one is correct?

    In your circuit also, you forget to connect the 2x 33p caps to Gnd. And the you need a logic high to reset the 8051.

    As for the MAX232. I usually use 1uF instead of 100nF. See what the datasheet says...

    Allen
     
    atferrari likes this.
  15. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    ok I am making new schematic. This is my design. tell me how many mistakes are in this design ?
    upload_2015-4-2_6-9-53.png
     
  16. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    C9 and C10 are connected incorrectly. Check the datasheeet.
     
  17. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Neither U2 nor U3 show any pins for power. I assume your schematic program hides these pins but they need be wired. Each chip should also get a o.1uF cap between the power pins as close to the device as possible; there are for power bypass and they keep the devices from interfearing with each other via the power supply wires.
     
  18. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    I am attaching datasheet here , I don't understand whats wrong with C9 and C10
     
  19. Papabravo

    Expert

    Feb 24, 2006
    10,145
    1,791
    Both C9 and C10 should be connected to GND. Pins 2 & 6 will have ±8.5 volts. See Figure 6. in datasheet. These "RS-232" levels are generated from the +5V power supply using a charge pump and an inverter.

    As has already been noted Vcc(+5V) goes on pin 16, which must be bypassed to GND with a capacitor, and GND(Vss) goes on pin 15.
     
  20. abhimanyu143

    Thread Starter Member

    Aug 25, 2014
    211
    1
    I think it should be correct. now tell me If schematic look like correct. I will start to make project on breadboard
    upload_2015-4-2_11-34-16.png
     
Loading...