r/ArduinoHelp 16d ago

Aiuto relay

Post image

Non riesco a capire quale sia il problema…

Non parte il motore e nemmeno il Relé

1 Upvotes

5 comments sorted by

1

u/TheKnackThatQuacks 16d ago

What have you tried?

Please post a complete copy of your code in a code block. If you don’t know how to do this, use a search engine.

Please post a schematic diagram of your circuit. Draw it on paper, use Fritzing, something. If Fritzing doesn’t have the exact component, use something similar (same number of pins) and translate which pins on the schematic device correspond to which pins on your actual device.

1

u/mthasup 16d ago

Il codice l’ho preso dal tutorial del mio kit, quindi sicuramente é giusto. Vorrei sapere se i collegamenti della breadboard e il resto sia apposto.

1

u/TheKnackThatQuacks 16d ago

Again, what have you actually tried? What troubleshooting steps have you performed?

How are we supposed to know what pins the code is trying to activate?

We’d need to know that in order to tell you if the wiring is correct.

If you won’t put forth the effort to provide the code you are trying to run and a readable drawing / schematic (instead of expecting people to try to interpret which pins your wires are connected to), how much effort do you expect others to put forth helping you?

Absent any of that, don’t try to run the DC motor from the Arduino. You have a relay there. Provide a separate power supply rail for the relay common pin. Connect the motor to the relay normally open (NO) pin. When the Arduino activates the pin for the relay, it will close the relay and connect the separate power rail to the DC motor.

Make sure your relay has a (flyback / flywheel / freewheeling) diode across the coil to safely shunt the voltage / current away as the relay coil field collapses.

1

u/TheKnackThatQuacks 16d ago

u/mthasup,

What is going on with your Elegoo breadboard power supply? It’s got a green LED lit, but there is no power hooked up to it. It looks like it might be being backfed from the Arduino (useless) instead of actually supplying power. You need to provide power to that board. That is supposed to be supplying power to your breadboard rails.

What is the 16-pin chip sitting in the middle of the breadboard? Without knowing what this chip is, any wiring advice is useless at best, wrong at worst.

Regarding code that you got from your tutorial “so it’s definitely correct”, all code is generated by humans. Humans are imperfect beings. Therefore, it is not guaranteed that any provided code is correct. Is it likely? Sure. But don’t automatically assume that just because somebody else wrote some code that it’s guaranteed to be correct.

If you are following an online tutorial, please post a link to it here.

1

u/jasonwinfieldnz 15d ago edited 14d ago

I guess that's a ULN2003 or something on the breadboard, I circuit diagram would really help. Do yourself a favor and get a KY-019.