Nano 33 and 8 channel relay module unwanted startup activation

If the Nano 33 IoT GPIO outputs go from 0v to 3V3, the 595 would be powered by the 3V3 power pin; the Relay module Vcc needs to be powered from 5V from the Nano 33 IoT.


I do not understand this. :thinking:

I found this link and soldered the VUSB

Okay, that will give you access to USB 5v on pin #12.

  • This 5v pin would be wired to the Vcc pin on the 8 channel relay module.

  • The controller 3V3 goes to pin 16 of the 595.

  • The external 5v coil voltage power supply is wired as in the post #17 schematic.

Add a decoupling capacitor from 595 pin 16, 5V, to pin 8, GND, 100nF ceramic.

I'm really sorry to do this to you since I lack the skill, knowledge and time (girlfriend yelling I should come to bed) but here is another imperfect representation, tried with tinkercad this time. I could not find a way to represent the 8 chanel relay, so the connections are represented by dipswitches. The red ones the IOpins plus a VCC connected to arduino's 5V and on the blue dipswitch the GND and JD-VCC connected to the external power.

I think it's close to the last schematic you pasted, minus some components. I'll read up on them tomorrow.

And thank you again for your help and patience!

That would be wrong.

The DIP switch would be replaced by 8 LEDs.


The schematic in post #24 will be the latest and greatest. :wink:

if you don't have any I/O left (remember analogue pins are also digital pins), then you can delay relay activation with a resistor and capacitor.
Use a 1Megohm resistor between OE pin and ground, and a capacitor between OE pin and VCC of the 74HC595. 100n will give a delay of 0.1sec, 1uF delays about 1 sec.
Leo..

Schematic includes this in post #24.

:+1:
Missed that.
10uF/100k is about 1sec.
The addition of a Schottky bleed diode would be safer with a 10uF cap.
Leo..

are you talking about the same part? I see I have a 1N4007 M10, but google tells me it's a ZENER. So I'll look if I can find a 1N4148 today.

I change my mind from using a 1N4148 to using a Schottky diode (any low power version will do).

See post #24

The idea is that the Schottky diode discharges the cap on power-down.
A common diode (1N400x, 1N4148) has a too high forward voltage, which could result in the internal clamping of the 74HC595 taking some/most of the discharge current.
The 1N5819 Schottky is common.

Slightly different symbol. Plenty of mistakes on the net.
Leo..

I have all the parts except the 1N5819, it was sold out :frowning:
They did have a 1N4148 though so I'll connect that and replace it with the Schottky later, assuming that's not an issue with the other parts.

I'll use the schematic from #24 (thanks Larry) and replace the 100K resistor with the 1M resistor and add the Schottky later (thanks Leo).

One thing that caught my attention is you have the external power for the relay module connected to the GND next to the input pins instead of the GND next to the JD-VCC pin (or next to the VCC pin next to that to be precise). Does that matter or is either a good point?

Either GND is okay.

Please give us a link to your relay module.


Going to 1Meg might not be low enough, testing will prove if it works.

If you go to 1Meg, lower the capacitor to 1uF.

This is the relay module:

Since I don't have a 1uF on hand I'll use the 100K resistor. I can swap it later, depending on the result.

Haven’t seen that version of a relay module where GND is near JD-Vcc.

However, 99.9% confident this GND will be the same as the GND on the input header strip.

To be 100% sure the resistance between the two GNDs will be zero (0) ohms.

  • If you intend on getting into this as a hobby, buy kit selections of resistors, capacitors, diode types, silicone insulated wires (different gauges, 26, 24, 20AWG), MOSFETs, BJTs.
  • Individual I.Cs will vary.

Alright, finally finished building it as per #24 schematic, with 1N4148 and 100K resistor between OE/pin13 to ground. Diode polarity tripple checked.

There is about 0.5 ohm resistance between both GND pins, but that's the same as the resistance of my multimeter contacts, so everything OK there. I had indeed been looking at assortiment kits, but this is probably the only hardware I'll have to build for my project, but who knows. I'm certainly enjoying it :slight_smile:

The good news is there is no longer an unwanted activation on startup. If I disconnect and reconnect the USB cable the leds will simultaniously light up very briefly with the slightest of sound, but no click to indicate the relays have moved.

The interesting news is that when I push the reset button on the Nano 33 IoT the leds and relays will perform an unwanted on/off sequence. Eacht relay will rapidly go on/off 1 or 2 times starting at the last one moving towards the first one.

Will the schottky diode paired with 1 MOhm solve this?

Pushing the reset switch is not the same as powering off then on.

The latter discharges the described power on reset capacitor which then generates the OE disable that is needed when power is applied to the circuit.


You need to discharge this capacitor when the reset is pressed some how if you want the same effect.

A simple DPDT or SPDT switch can be used to accomplish this.

I suppose that is doable with holding down a simple push button for a sec or 2, and then hitting the Nano's reset button, but what happens if the arduino decides to reset on it's own, or the wifi disconnects?

Whenever I upload a sketch from the iot cloud it also resets and trips all relays. Unless I can automate the discharge before or with a reset I haven't solved the problem, merely displaced it.

I might be missing something though?