7

Pin 13 fires relay when powering on... How to disable? I'm using pro mini 5v 16MHz and a DC 12V 2 Channel Relay Module Optocoupler. The relay Jd-VCC is powered by a 12V and it's VCC is 5V (the same as Arduino VCC). The relay is active low and I soldered pins 12 and 13 of the pro mini to IN1 and IN2 of the relay.

When I power the board up it cycles Pin 13(and the on-board LED) ON and then OFF before resuming to the code I uploaded. I believe that this can be fixed by disabling this blinking function in the startup process.

I understand that I can use other pins. Why not learn how to remove this from startup, if I prefer to use this pin for circuit layout purposes?

Any help would be much appreciated. Most of my searches ended up with people using the pin as an input... My issue is when using D13 as an active low pin it has some funky behavior at startup but then works as programmed.

Thanks!!!

P-nut
  • 71
  • 1
  • 2

2 Answers2

11

There are three things you can do:

  1. Remove the bootloader entirely and program the board with a hardware programmer (USB-ASP, Another Arduino, etc).
  2. Edit the bootloader source, recompile, and reinstall it to the board using a hardware programmer (as in option 1).
  3. Just don't use pin 13 for the relay.

Of the three options the third one is by far the simplest.

James Waldby - jwpat7
  • 8,920
  • 3
  • 21
  • 33
Majenko
  • 105,851
  • 5
  • 82
  • 139
0

A little bit late, but due to the fact that pin 13 has a on-board led it is basically pulled up.

Workarounds:

  1. Remove led physically.
  2. Remove the 330ohm resistor connected to led
  3. OR both.
Rohit Gupta
  • 618
  • 2
  • 5
  • 18