4 Arduino Nano, 3 keypads and a relay. I can't figure out where I'm failing

Good day.

I am working on a lock project for my escape room business. The lock has 4 stages. Gold, Silver, Copper, and Key.

The Gold, Silver, and Copper, are all working perfectly. Enter the correct code on the keypad, Leds light up, and they digitalWrite HIGH out on a pin to trigger the main or Key controller.

The Key controller has a simple button to activate the final lock and it gets the HIGH outputs from the other 3 Nanos. At this point the Key Nano is supposed to signal a relay to trip so that some solenoids can release a door latch.

The Problem: The Key Nano is sending a pulsing/twitchy signal out to the Relay making it chatter, and eventually burn out. I have tried a dozen different power supplies, rewiring the connections, everything I can think of. I can provide a Schematic off Tinkercad, if that would help.

Thank you to all who can help.

Without the schematic and the code we cannot help you.
Why do you think you need 4 nanos?

1 Like

Sorry, I went ahead and made a quick Schema for it.

5V to Vin is a definite No-No. Vin must receive 6.5-7V minimum.

The relay chatter is likely from the 'floating' switch pin.
(being pushed hundreds of times per second by environmental noise)

  1. Connect the switch between pin and ground and activate internal pullup with
    pinMode (switchPin, INPUT_PULLUP);
    Change your code to the inverted switch function.
    Not pressed is HIGH, pressed is LOW.

  2. Power the Nanos with 5volt on the 5V pin.

  3. I would add three 10k resistors in series with the three blue lines, close to the master pins 4,6,8. That would ensure survival of the Nano in case the power wire to that Nano would fail.

  4. Make sure you have a snubber circuit on those relay contacts, otherwise the Arduino's could do random things on relay activation/deactivation and/or burn out the contacts over time.
    Leo..

1 Like

I will do all those alterations. I don't know how to do a snubber circuit though.

I Don't just power the Nanos with 5v. I have tried several power supplies, from 5v up to 12v in the hopes of cleaning up the interference with cleaner power supply. I failed in my attempt. I have a 9v 5A supply I will use dedicated to this from here forward.

I would power the master Nano with a 5volt cellphone brick with USB socket (plug the USB lead in there). Then loop all the 5volt/GND wires to the other Nanos.

If the lock is low voltage DC, then the snubber could be a simple diode across the lock coil.
Leo..

This was the answer. I was sending voltage through all the outer controllers to the main controller and it was losing it's mind. I did what WAWA here suggested with using the PULLUP on all the controllers so they were sending Ground instead of Voltage, and BOOM, fixed. Just like that. Thank you WAWA, You solved a puzzle that had stumped me for months. Now I feel a little silly.

No need. We all have been there.
Thank you for letting us know that the solution worked.

1 Like