Connect with us

First ever help

Discussion in 'General Electronics Discussion' started by Vini77, Jul 27, 2017.

Scroll to continue with content
  1. Vini77

    Vini77

    3
    0
    Jul 27, 2017
    Hi guys, this is my first post here. I expect to be just the beginning. I don't have a backgroung in electronics but completely apaixonado right now. Also, this is my first 'project' and I am here to learn. Sorry in advance by the completely dumb questions. Lets go.
    First, I am looking to reproduce this project here: https://circuitdigest.com/microcontroller-projects/arduino-automatic-plant-watering-system
    https://circuitdigest.com/sites/def...c-plant-irrigation-system-circuit-Diagram.png
    Its a system to automate irrigation.
    I have assembled the prototype exactly as the image attached. Before to send the code and plug in the power supply, I have some important questions:

    1) As I am very new with circuits and wiring, I would like some help to check if my prototype match the schematics in the original project.
    2) In the original schema, the owner did not use a relay module, and in my case, I decided to wire the Signal wire directly into D11. It's ok?
    3) In the original schema, the owner used diy soil moisture sensor with just VCC and Ground. In my case, using a ready made sensor there is the Signal output which I have any idea where to wire.
    4) Are there something that I am missing? Specially regarding the power supply? I do not want to burn everything again!

    I think it is just it for a while!

    Thank you very much!
     

    Attached Files:

  2. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    Welcome to the forum!

    1. Take the schematic and check each wire, crossing it off when it is found to be connected correctly.

    2. No, the port pin probably cannot drive the relay directly. You need the transistor to supply enough current to the relay coil.

    3. Changing the sensor will require changing the code, unless, by some miracle, your sensor puts out exactly the same signal as the DIY sensor in the original.

    4. Almost certainly. If not, you would not be human. In my latest project, I built a PCB with a custom footprint I added. It was wrong, and the part could not be soldered. Damn!

    Bob
     
  3. Vini77

    Vini77

    3
    0
    Jul 27, 2017
    Hey Bob! Thank you very much!
    Which transistor do you mean? As I understood, the transistor in the original schematic is conducting to the ground. Can you explain me better?
    Thanks.
     
  4. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    Q1. It switches the current for the relay coil. The port pin cannot switch that much current by itself, so you use a transistor as a switch.

    Bob
     
  5. Irv

    Irv

    112
    30
    Jun 7, 2017
    If you are using one of the relays which come with Arduino kits (little blue ones with 3 pins, +, -, and S for signal as shown in the picture) then they draw less than 14 ma. on the signal pin (measured), so don't require a transistor. The driver circuit is built onto the board, you can see the chips and usually also an led status indicator.

    Normal relays, on the other hand, have only two pins for the coil, there's no need for a polarity marking, and those will generally require more current, thus the need for a driver of some sort.

    Edit to add: If you're using an "old school" relay, don't forget to add relay spike suppression. The "kickback" voltage when the coil's magnetic field collapses can be bad news for an Arduino I/O port.
     
    Last edited: Aug 3, 2017
  6. Vini77

    Vini77

    3
    0
    Jul 27, 2017
    Hey Irv, thanks by the reply. It is exactly the case!
    I am using a random relay module for arduino. My doubt is, in the original schematic, the relay was wired in a transistor, which base was wired into a resistor wired to arduino d11. In my prototype I decided to wire the relay module's S (signal) pin directly to d11. Do you think it is ok?
     
  7. Irv

    Irv

    112
    30
    Jun 7, 2017
    I'm running one right now, a Nano with the relay connected to pin 11, switching once per second.
    Tick,tock. No problem. If you have any doubt about the relay you have, simply connect the + to 5 volts, the - to ground, and connect the S pin to 5 v. thru a milliamp meter. Relay should engage, LED on the relay board should light, and current drawn should read about 13 or 14 ma.
    It's always good to check these things, just to be sure.

    The reason the original design used a transistor is because he is using an "old school" 12 volt relay,
    which (a) needs 12 volts to engage, not 5 v., and (b) probably requires more current than a port can supply, and (c) can "kickback" a voltage spike when it releases, that can fry output ports.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-