ATTiny2313 microcontroller is heating up

Ok, that would make sense...

First of all.

You need to pull the reset pin of the 2313 HIGH, or nothing will work.

How are you providing 5v to your schematic, what is your source ?

What core are you using ? If you are using the ATtiny core then your pinout looks like this


I am still using the older version, but to use a 2313 you will need to modify the boards.txt, pretty sure that should be resolved in v2

Now i am confused.. What builtin LED are you talking about here ? This should throw a compile error, since that macro is not defined.

That said, and again depending on the core used, i doubt if there is a need for that, but checking on the code that is used for the normal digital-Read() & Write() would confirm either way if they have excess code as part of the function like the AVR cores do for checking if there is PWM running on the pin specified. Regardless, this is probably not the issue anyway, though the library may mess the pinout up even more. I would use the normal digitalWrite() & Read() function or use direct pin control through the registers.

The topic name mentions overheating, Is this really happening ?

I am not sure about this.

However this is the complete connection diagram of my project

If I press SW1 (as per the diagram in the post number 25) then the relay should ON. Now the code is working however whenever I connect the microcontroller GND pin with pin#4 then immediately the microcontroller is heating up.

@jim-p Do you have any idea on this issue??

Hi, @chandu-mca06

Please review your circuit diagram in post #25, and fix the gnd error to the relay module.
Then repost the correct schematic in a new post.

Can you please post some pictures of your project?
So we can see your component layout.

Do you have a DMM? (Digital MultiMeter)

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

Yes I have DMM, what do you mean by the GnD error to the relay module? GND is common for both 12v and 5v power modules.

Hi,
Do you have a gnd connection between gnd on the relay and gnd on the 2313?
Not shown in post #25.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

Please see the below image..

:grinning: :coffee: :+1: :australia:

Tom...

I followed the following connection diagram

This is my actual board connections.

I am ! Mind you, that small break-out board may be doing that for you.

The GND on the 12v side of the DC-DC converter may not be the GND on the 5v side of it.

I am still waiting for the core version, the upload method now also becomes interesting and i am completely unsure of what pin numbers you are referring to for pin 4 & 12 (as even for GND and Vcc for that matter but let's assume you picked the correct pins)

Those two you have posted are not similar.

What is your relay module?
Please post specs/data on this module.

I am not familiar with the 2312 but have you set the 2313 code for internal clock?

Hello, I already mentioned that GND is common for 12v side as well as dc-dc converter.

I connected the correct pins to VCC and GND of 2313. Sorry I am using physical pins of 8 and 15.

This was not clear from your schematic.

So that is GPIO 6 & GPIO 12 (not 2 & 12 as is in the sketch) You have still not told us which core you are using (i am going from the pint of view of it being the ATtiny core)

This is the board manager I am using

I marked the PINS which I am using for this project as below

image

BTW I am not facing any issues while uploading sketch. I uploaded successfully but if I connect Pins GPIO 6 and GND pins the relay is ON but at the same time the micro controller is heating up. This is the actual issue.

Well the only thing that could cause this is that somehow the power to the Relay is not connected properly or the GPIO pin to the Relay is incorrectly connected.

The Relay module looks like it is not of a more common type. There appears to be an Opto-coupler (a PC817 most likely) driving the Relay, which it is definitely capable of doing, and that should only require the ATtiny to provide not a lot of power to do this. The easiest way to confirm that a wrong connection there is the cause is by disconnecting the Relay unit altogether and the heating-up should stop.

I just confirmed the scenario which you have raised..

I completely removed the relay module from microcontroller and I switched on the power supply. I was waiting for some time and there is no sign of heating.

Now, I connected both GPIO 6 with GND of microcontroller together (GND is coming from 12V supply because it is common) and waiting for 5 seconds and I noticed that MC is heating up very quickly which means something wrong from MC side but not with Relay module.