ATmega 2560 pins RX/TX not working

Hello everyone,

I am having a strange problem for the past month. My TX/RX pins stop working (permanently) after I use them on my project where they are used for tranceiving data with HC-05 module.

I managed to destroy all the RX/TX pins (1 - 3) on my Mega, I am not going try to connect HC05 with RX0/TX0 pins since these are last ones that still work.
So basically I cannot send/receive data on any data on these pins. After I wasn't receieving any data via bleutooth, I tried to to connect them to usb and make a loopback to test if pins are maybe alive somehow, but they do not show any sign of life.

This is the schematics of my circuit:

You can see that I have voltage divider connected to HC05 and arduino pin. Only thing that could possibly cause a problem is voltage regulator or DC motors. Voltage regulator drops 5V to 3.3V anyway, so these voltages cannot damage any arduino pins. And DC motors & motor driver are not connected to the same power supply anyways.

Has anyone encountered this problem, I wouldn't like to destroy other microcontrollers I have especially the ARM one, since it costs 50$. I would be grateful if some could give me any suggestion. I was maybe thinking of connecting zener diodes (5V threshold) to GND in parallel with the RX/TX pins, is that a good idea?

I noticed you forgot to post the circuit. Hope you find out what's causing the issue.

Hm, somehow URL wasn't saved when I clicked on Insert a picture button, so here is a direct link: https://postimg.org/image/ypywkobkl/ce8c35a7/

SimpleThings:
You can see that I have voltage divider connected to HC05 and arduino pin.

Only thing that could possibly cause a problem is voltage regulator or DC motors.

Voltage regulator drops 5V to 3.3V anyway, so these voltages cannot damage any arduino pins.

And DC motors & motor driver are not connected to the same power supply anyways.

Has anyone encountered this problem, I wouldn't like to destroy other microcontrollers

I have especially the ARM one, since it costs 50$.

And I see that it's connected (or drawn) wrong.

Yep, motors shouldn't share the same supply as the MCU.

Why a separate 3.3volt regulator, while the Mega has an onboard 3.3volt/150mA regulator.

A servo is a motor. And it's connected (or drawn) to the 5volt rail.

I never destroyed an Arduino pin, so I wouldn't know.
Your drawing doesn't seem dangerous to pins, so there must be something else going on.

ARM?
So you have a Due, not a Mega (as on the Fritzing).
An Arduino Due is a 3.3volt processor. 5volt on a pin could destroy the pin.
Leo..

Yep, motors shouldn't share the same supply as the MCU.

  1. Why a separate 3.3volt regulator, while the Mega has an onboard 3.3volt/150mA regulator.

I have a Adafruits motor shield V1, on my atmega2560 and their board is genius... when I attach it to the atmega, I cannot connect anything to that pin since they didn't make output connection for it. I needed 3V3 since temperature sensor and gyroscope run on 3V3

  1. A servo is a motor. And it's connected (or drawn) to the 5volt rail.

The other ones got destroyed before attaching the servo.

I never destroyed an Arduino pin, so I wouldn't know.
Your drawing doesn't seem dangerous to pins, so there must be something else going on.

  1. ARM?

I have other uCs like FRDM-KL25Z, LPC1768 they are 32-bit ARM microcontrollers that is what I was referring to since I would potentially use them in this project because I destroyed my RX/TX pins which means I cannot send/receieve any data to HC05/bluetooth module.
I might consider using my ATmega324p, but then I cannot use servo, since 324p has only 4 PWM pins (OCRn pins) which were used to control 4 DC motors via 2XL293D motor drives.
I think I might need some extra hardware to manage it, something like a shift register. Perhaps using one shift register, where it's input is one PWM pin connected, and it's output to 2x L293D's PWM inputs. I think that might do the trick. Here is the "Motor part of my project" https://postimg.org/image/yw59dwna3/10c25787/

4)So you have a Due, not a Mega (as on the Fritzing).
An Arduino Due is a 3.3volt processor. 5volt on a pin could destroy the pin.
Leo..
Hm I

I am using Atmega2560/Arduino Mega.

SimpleThings:
I might consider using my ATmega324p, but then I cannot use servo, since 324p has only 4 PWM pins

Why do you think a servo needs a PWM pin.
Leo..

Wawa:
Why do you think a servo needs a PWM pin.
Leo..

If you inspect code: Servo/src/avr/Servo.cpp at master · arduino-libraries/Servo · GitHub

#if defined (_useTimer4)
  if(timer == _timer4) {
    TCCR4A = 0;             // normal counting mode
    TCCR4B = _BV(CS41);     // set prescaler of 8
    TCNT4 = 0;              // clear the timer count
    TIFR4 = _BV(OCF4A);     // clear any pending interrupts;
    TIMSK4 =  _BV(OCIE4A) ; // enable the output compare interrupt
  }
#endif

Servo library uses Output Compare Timer Mode.