Relay module problem

Hi all,

I am making a arudino-based system that controls a solenoid at a specific period of time.
I am using 2x arduino unos: one controls the solenoid and another records when the solenoid is open as well as other optional events designed.

My problem arises from a relay module.

As for the connection in the (one-channel) relay module, I connected S (Signal), VCC, and GND with an arduino uno. Because an arduino uno controls a solenoid, I connected COM in the relay module with (-) of the solenoid and NO (normally open) with (+) of the solenoid so that the solenoid is open whenever the arduino transfers the output signal (HIGH) to the relay module.

However, as shown in the video: https://drive.google.com/open?id=0B21yoZg7xUs8RG5mQ2FneXhWRHM, the noisy sound like "Tic-Toc" still appears whenever the arduino uno gives the relay module an output signal (by a digital write function with "HIGH") (see 5s and 25s and 45s in the video).

Without connecting the solenoid with the relay module, this sound still appears. Therefore, I guess that there is some voltage spike when the arduino uno communicates with the relay module.

However, I do not know how to fix this problem.
Could you guys please give me any advice?
Thanks!

A schematic would be a nice addition. what powers all this?

Paul

Why do you think you need two Arduinos for a simple task like this.

A relay is a mechanical switch. Ofcourse you will hear that switch "click".

If you don't want that, then replace the relay module for a transistor based solenoid driver.

Cross-post here http://forum.arduino.cc/index.php?topic=430629.0
Leo..

You sure the relay module is active HIGH?

Hi, I am very new in this world. I am making an egg incubator where there is a temperature and humidity sensor/controller besides a timed motor controller.

I have decided to use two Arduino board. One for temperature and Humidity sensor/controller, other for the motor turning and that's how I can solve the issue of temperature and humidity sensors/controls and motor turning separately.

Can anyone help me to write the code for motor controller please? I am connecting a 5 V relay to the output pin (13) of the Arduino module. I want the relay to go high (activate) for 10 seconds (enough time to turn the eggs with the help of a small AC motor used in the window air conditioner connected on the otherend of the relay) every after 4 hours and repeat it until the module is switched off or reset button is pressed.

Arduino uno is not supporting "delay" code above 65000 ms (65 seconds) right?

So what is the possible solution/code? Need your help please.

shariful3672@gmail.com

@ Col-Sharif
Not very nice to hijack someone else's thread.
You should have started your own.

Col-Sharif:
I have decided to use two Arduino board. One for temperature and Humidity sensor/controller, other for the motor turning and that's how I can solve the issue of temperature and humidity sensors/controls and motor turning separately.

Can anyone help me to write the code for motor controller please?

I am connecting a 5 V relay to the output pin (13) of the Arduino module.

Arduino uno is not supporting "delay" code above 65000 ms (65 seconds) right?
So what is the possible solution/code? Need your help please.

  1. Such a simple task can be done with one Arduino.

  2. We can help you improve/debug your code.
    Post whatever you already have. Don't forget the code tags.

  3. Do you have a link to the relay? Don't connect a "bare" 5volt relay directly to an Arduino pin.
    Use a relay module, with transistor base resistor and kickback diode.

  4. Don't use delay() for that long.
    It stops the Arduino dead in it's tracks during the runtime of the delay.
    Look at "BlinkWithoutDelay" that comes with the IDE.
    That sketch shows you how to manage time without using delay().

Also look at this.
http://forum.arduino.cc/index.php?topic=223286.0
Leo..

@Wawa

I am not trying to "Hijack" some one else's thread, I was asking for help. It entirely deonds on someone how he or she views a water filler glass. Is it half filled or half empty.

Anyway, thanks to Leo and others who are giving tips.

Why I was about to use two Arduino board? Its because I am a novice and still learning the codes.

Secondly, while experimenting I learned that, for a long delay code, Arduino suspends all other functions as it is counting the delay time.

For a delay of one hour (60601000 millis), the temperature and humidity sensors goes off duty .. not a good thing for an incubator.

Anyway, I am trying to figure that out too. If I can't, I will fall back to you guys.

Meanwhile, I will be using either a relay module to allow current to drive a small AC motor or a high torque DC servo coupled by 256 ohm resistor and a kickback diode instead of a relay.

Thanks for your comments.

Col-Sharif:
Anyway, I am trying to figure that out too. If I can't, I will fall back to you guys.

Meanwhile, I will be using either a relay module to allow current to drive a small AC motor or a high torque DC servo coupled by 256 ohm resistor and a kickback diode instead of a relay.

  1. So did you study the BlinkWithoutDelay sketch from the examples in the IDE.
    I have tried to explain the principle here in post#9 as well.
    Run loop every x hours - Project Guidance - Arduino Forum

  2. You have lost me here. A 256ohm heating element?
    Post a diagram showing how you think it should be wired and powered.
    Leo..