+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Full Member level 5
    Points: 2,739, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    276
    Helped
    0 / 0
    Points
    2,739
    Level
    12

    microcontroller interface with led and relay

    I lost the atmega (PORTD.0 is burnt and always low), . led on PD0 is connected to 500 ohm and PORTD.0 is gone. but the othe port PD1 isn't affected its led is connected to 220 ohm. what is wrong with this connection

  2. #2
    Super Moderator
    Points: 77,368, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,663
    Helped
    4222 / 4222
    Points
    77,368
    Level
    67

    Re: microcontroller interface with led and relay

    It would be better to connect the LEDs and series resistors across the relay coil but assuming you also have the grounds connected to the MCU, it should still work without causing damage.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisment

        
       

  3. #3
    Super Moderator
    Points: 70,762, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,471
    Helped
    3292 / 3292
    Points
    70,762
    Level
    64

    Re: microcontroller interface with led and relay

    Hi,

    With this circuit you can't kill the port.
    --> Show us your real circuit.

    We can't verify
    * your power supply circuit including capacitors,
    * your reset circuit...

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  4. #4
    Super Moderator
    Points: 28,642, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,527
    Helped
    1081 / 1081
    Points
    28,642
    Level
    41
    Blog Entries
    6

    Re: microcontroller interface with led and relay

    I lost the atmega (PORTD.0 is burnt and always low)
    How did you came accross this conclusion? Have been PD0 working so far and suddenly did not show activity anymore? Where is the code used on this experiment, are you sure you have configured I/Os correctly?
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  5. #5
    Full Member level 5
    Points: 2,739, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    276
    Helped
    0 / 0
    Points
    2,739
    Level
    12

    Re: microcontroller interface with led and relay

    Yes it was working for a month then stopped suddenly. I thought that the resistor value is low and the port pin couldn't handle it so i increased the resisor and changed the atmega then i lost it again. This is the third time to post it why this pin? Why not the other pins. Nothing is connected to it but led and transistor

    - - - Updated - - -

    Quote Originally Posted by KlausST View Post
    Hi,

    With this circuit you can't kill the port.
    --> Show us your real circuit.

    We can't verify
    * your power supply circuit including capacitors,
    * your reset circuit...

    Klaus
    You want the pcb layout?



    •   AltAdvertisment

        
       

  6. #6
    Super Moderator
    Points: 70,762, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,471
    Helped
    3292 / 3292
    Points
    70,762
    Level
    64

    Re: microcontroller interface with led and relay

    Hi,

    You want the pcb layout?
    It depends whether you want it to be checked by us or not..
    And the sane is true with all the informations you give.

    Until now we can only check the schematic and the given part values.
    And we decided, that the schematic will not caused the described problem.... thus

    There is a chance that:
    * the error doesn't exist at all --> show/tell how you verified it
    * the PCB layout is problematic --> show us your PCB layout, if you want it to be checked
    * wrong wiring --> photo
    * wrong capacitor types --> exact type and manufacturer, datasheet
    * unstable power supply --> scope pictures
    * soldering errors --> detailed photo
    * the used part values don't match the schematic values --> photo
    * wrong port setup --> code
    and so on ... temperature (ambient, soldering), ESD, EMC, ...

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  7. #7
    Full Member level 5
    Points: 2,739, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    276
    Helped
    0 / 0
    Points
    2,739
    Level
    12

    Re: microcontroller interface with led and relay

    this is my circuit except that the serien is connected directly through resistor to the MU



  8. #8
    Super Moderator
    Points: 70,762, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,471
    Helped
    3292 / 3292
    Points
    70,762
    Level
    64

    Re: microcontroller interface with led and relay

    Hi,

    you try to fool us?

    Now the "killed" PORTD.0 has a totally different circuit..
    And additionally you tell us that the circuit for the "killed" port is even different than in the new schematic.


    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  9. #9
    Full Member level 5
    Points: 2,739, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    276
    Helped
    0 / 0
    Points
    2,739
    Level
    12

    Re: microcontroller interface with led and relay

    Sorry i forget to tell you its counterpart on my circuit. Pin 14 is the burnt pin.
    I thought that it won't make difference

    - - - Updated - - -

    I didn't expect that you would ask me for my real circuit so i give portd as atypical example



    •   AltAdvertisment

        
       

  10. #10
    Super Moderator
    Points: 70,762, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,471
    Helped
    3292 / 3292
    Points
    70,762
    Level
    64

    Re: microcontroller interface with led and relay

    Hi,

    So is OK when we give equally confusing, unreliable and "typical" answers?

    Now it is Pin14.... this is PB0.
    * On one schematic totally unconnected, ...
    * at the other schematic named as "motor" but no other circuitry, no other information...it has nothing to do with LEDs and relays...

    Iīll spend my time with other things..

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  11. #11
    Full Member level 5
    Points: 2,739, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    276
    Helped
    0 / 0
    Points
    2,739
    Level
    12

    Re: microcontroller interface with led and relay

    I attached the relay board. I found the problem it was the transistor 2n2222 that is connected to PD4. what are the possible causes for losing this transistor?
    Last edited by mshh; 8th March 2019 at 15:16.



--[[ ]]--