Calling two pins

I am trying to set 2 pins high at the same time for two relays. It would be great to call one pin and turn on both relays. I want to stop and start with a clock timer. The project will require a second set of relays to come on at different time When the first goes off the second will come on. Motor control of High and Low switch. I would like this to be done as another relay turns on a valve by comparing two temp probe Can someone point me in the right direction for my project. Thanks again for the help in advance

These tine boards are awesome little creatures

Sprinkfitter

Does it really matter if the two relays switch on simultaneously, or 5 microseconds apart?

If you are using relays then they are so slow that just writing two successive digitalWrite calls will be fine. You would be hard put to it to measure the difference between the two relay closures.

If you can’t bare that answer in the mistaken belief that it makes a difference then use direct port addressing, see this Arduino - PortManipulation

FirstI have wrote to digitalwrite commands for both relays. The do turn on together. I was wonder if this could be done just with one pin? I am hoping with the RTC it will let me to turn 2 relays on at a certain time and turn two more on at a certain time.

Second At the same time the pump is running on high or low speed. I need to turn another relay on to run a valve by temp sensors.

Third I also have a fan that needs to be turn on for cooling heatsink when the pump is running.

For your first. Take two wires, cut them up, put them together in a Y shape there you go!

I was wonder if this could be done just with one pin?

Yes, you can connect both relays to the same pin, as long as the current draw remains within the allowable limits.

If you are actually triggering a transistor which triggers the relays, this will be the case. If not, the amount of current drawn will need to be determined for your specific relays.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you list the parts you have please?
Can you post a link to data/specs of the relay please?
What model Arduino are you using?

Thanks.. Tom.. :slight_smile:

(deleted)

The Project Parts

UNO
1-5V 2 Channel SSR Solid State Relay Board Power Switch High Level Trigger
1-220 volt motor with high and low speed
1-5volt 4 channel relay
1-5v fan
1-12v 3/4 valve
3-30amp current sensors ACS712
2- PBC402-24V DEFINITE PURPOSE CONTACTOR 40A 2P 24V
2-Temp Sensor Thermal Probe DS18B20
1-20x4 LCD
Wifi ???

51+6DDQQkhL.jpg

PaulS:
Yes, you can connect both relays to the same pin, as long as the current draw remains within the allowable limits.

If you are actually triggering a transistor which triggers the relays, this will be the case. If not, the amount of current drawn will need to be determined for your specific relays.

Can you do that by code?

The Project Parts

A list of parts are useless unless you show how they are wired together please post a schematic.

Can you do that by code?

You can trigger things by code but only if they are wired up correctly so until we have a schematic of how you have wired things up no one can tell.

Grumpy_Mike:
A list of parts are useless unless you show how they are wired together please post a schematic.
You can trigger things by code but only if they are wired up correctly so until we have a schematic of how you have wired things up no one can tell.

This is the beginning of the project. Right now i am looking on how i will put this project together. The phase it is now is how relays will act on the 220 motor. When i progress more i will post a schematic. Driving 2 pins together is very important. Thanks for all the help

Project Update
:slight_smile: :slight_smile: :slight_smile: :slight_smile: This is a great forum!! Really helpful and very knowledgeable. Controlling 220volt two speed motors was going to be one of the big task to make safe.
avr_fred has help very much. It appears in my case calling two pins together will not be safe controlling this motor. It looks like the safest way is with a DEFINITE PURPOSE CONTACTOR 40A 2P 24V instead of the Solid State Relay. This solves the issue with the 2 pins together. Now I can call each relay by one Arduino pin. Thank you all for the help and knowledge.

Sprinkfitter