Go Down

Topic: Program to control 8 channel relay with arduino  (Read 9114 times) previous topic - next topic

ktkamm

I apologize upfront for my ignorance. I am attempting to automate the blast gates in my shop by using an arduino. I would like to control the arduino with an IR control and have it in turn control an 8 channel relay. Relay will be connected to individual pneumatic solenoids.

I am just an older guy who likes to putter around and make things.

Thanks in advance for any help guidance.

larryd

Welcome:

Quote
I am just an older guy who likes to putter around and make things.
So are most of us  :(

What 8 channel relay board do you have?


i have an example if an IR control sketch here:
http://forum.arduino.cc/index.php?topic=317625.0

Adafruit also has an IR library.
https://learn.adafruit.com/using-an-infrared-library?view=all

Have you seen these?
http://www.leevalley.com/en/wood/page.aspx?cat=1,42401,72660&p=63013


.

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

ktkamm

Hi Larry,

I have a sainsmart relay. It looks like it is 0-5 volts input. I am planning on running the solenoids with a 24 volt circuit.

I have seen the above. I figure, wht buy something when I can spend more money building it. I am actually hoping to learn something along the way.

I will take a look at the above.

Thanks,

Kieran


larryd

Something like this? 


Keep these for reference:
Edit: if your relays are 5 volts then the external supply would 'not' be 12v it would be 5v


dlloyd

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

larryd

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

ktkamm

Larry,

That is it. The solenoids are 24 volts. What I would like to find initially, is the program that will allow the arduino to turn the relays off and on. The IR part would be my next venture.

I really appreciate your help and patience. It has been may years since I took physics.

Kieran

larryd

Are the solenoids 24DC or 24AC ?

Controlling the relay board is simple. Make 8 digital pins into 'outputs', then using digitalWrites to the pins, HIGH to go o 5v LOW to go to 0v.

There are examples in the IDE that shows how to turn on/off a LED, this would be the same for a relay.

See the simple Blink example:
https://www.arduino.cc/en/tutorial/blink

.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.


larryd

You will need to add snubbing diodes across the solonoid coils.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

ktkamm

Thanks. Looks like I have a bit to digest and a lot to read up on.

terryking228

Hi,
Here's example code to run that relay board you have:

http://arduino-info.wikispaces.com/ArduinoPower#4-8

That example is for the 4-relay version; you can see it's easy to modify for 8...

Suggest you read that page from the top for overall info..

And IR remote info and example code is HERE:
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

larryd

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

larryd

#12
Nov 04, 2016, 12:37 am Last Edit: Nov 04, 2016, 01:20 am by LarryD
Oh, it's because of dead brain cells.


.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Wawa

24volt DC solenoids.

Why a relay module.

How big are the solenoids (current).

There might be other/better solutions.
Leo.. (another old fart)


ktkamm

Wawa,

Open to any ideas/suggestions. I have about 4-5 blast gates that will be operated using 5 valve/2 way pneumatic solenoids. Solenoids are 24 volt DC.  Ideally I would like to be able to use an IR control to open and close each gate individually.

Thanks,

Kieran

Go Up