Hi. So I have a project for a company, and basically the wiring set up has a push button switch(on and off buttons) that powers a contactor relay using 120 VAC. Once the on button is pushed, the contacts close and it powers a 120 VAC to 5 VDC power supply which powers an arduino that controls a solenoid. Currently the power supply has a 3 second delay when power is supplied to it. I am also using a 120 VAC to 24VDC power supply off of the contactor relay to power a motor.
I need the arduino and solenoid to start at the same exact time the motor starts to spin. Is there a way that I can keep the arduino powered at all times and only run once it sees that there is 24 VDC coming from that power supply?
This is for industrial/manufacturing use.
Thank you.
For an Arduino or any microprocessor, there is a large amount of time between when the 24 volts is applied to the motor and when the motor actually begins to turn. Think about it. Which do you really need?
Paul
This is homework, right...??
@Paul_KD7HB I need the arduino to begin, at least before the motor, preferably at the same time, but I can always add in a small delay in the arduino code to match when the motor starts. From when the on button is pushed, its about 3 seconds for the motor to start turning(it goes through a controller also, so I can throttle speed) and about 4 seconds until the arduino runs and the solenoids will start clicking.
@bluejets No this is a real life application, a machine I am building for a company as part of my senior Project for college.
From a cold start, it takes Arduino some time to boot up and initialize everything before it's ready to control anything, depending on the size of the program that could be several seconds. Post a wiring diagram and your program.
keep the Arduino powered all the time.
you can see the presence of the switch signal
and you can see the presence of the motor starter.
most contactors have aux contacts so you can power the other parts with lower power, lower voltage... etc. and not need any other devices.
Seems the whole system needs a re-design.
Why don't you run the motor contactor on the other side of the controller and your Arduino at main power-up.
Pushing a button and have a motor start at some other time without adequate warning in place sounds a dangerous practice.
Maybe if other detail ( drawing) was shown others may get a better idea of what is going on and what you expect to happen.
Have the 24VDC power an opto-isolator to signal the Arduino it is ON. You don't HAVE to isolate grounds to use one.
This is my current set up, I haven't wired in the "Close" button but that button is basically just going to switch polarity of the motor so it can turn backwards. The wiring diagram is of the contactor relay and how I wired in the switch before that.
The transformer on top is the 120VAC to 24VAC. This powers the solenoid. The block box on bottom left is the 120VAC to 24VDC. This powers the motor controller which is to the right of the arduino(It came with the motor to adjust speed etc)
I just need to know if it possible that the arduino could sense that the motor is powered with the 24VDC or is that too high of a voltage and I would need to reduce it or something.
My other idea was just using a time delay and wiring that in there.
@JCA79B The program is simple. Its just power pin 13, (for one relay to one side of the solenoid) then a short delay, then power pin 7 ( other relay to other side of solenoid), then short delay. It loops like that clicking each side of the solenoid continuously.
Thanks
if you use a full bridge rectifier and a resistor voltage divider, you can get 5V from the raw 24V.
a cap to smooth the signal and a Zener to give you 4.5-5 volts
then you can take that into a digital input pin.
the AC optoisolator is another choice. An AC opto will give you a signal with an AC voltage on the input.
Or totally dumb it out, and place a 24VDC relay in parallel with the motor. Motor on=relay closed. Coil to 24VDC, contacts to Arduino.
Thanks
@adwsystems I try and incorporate that into my test setup and see how it goes.
llacroix413:
Thanks
@adwsystems I try and incorporate that into my test setup and see how it goes.
Remember, parallel not series. Both the motor and relay need 24VDC to activate or run.
Sorry, but that diagram makes absolutely no sense to me. (40 + years in industrial electric / electronics).
If you get a Programmer, you can use Sketch:Upload Using Programmer and your sketch will start almost immediately, vs several seconds (up to 8?) while the bootloader code runs before your sketch starts.
llacroix413:
I just need to know if it possible that the arduino could sense that the motor is powered with the 24VDC or is that too high of a voltage and I would need to reduce it or something.
You put an opto-isolator with resistor for 24V to a led on the 24V side and the other side cats as a switch, in this case between an INPUT pin and GND on the Arduino.
Look them up if the word is not familiar, opto-isolator. Might cost a whole 50 cents for one, less if you shop and buy a dozen.
@JCA79B The diagram shows the configuration of the contactor relay. There are 8 'ports' that can have wires to it. #7 and #2 are the coil. #1,3,4 are one contact, depending on either normally open or normally closed. the other contact is #8, 6, 5. The part on the left of that diagram is how I would wire in the start/stop switch. The "open" is start and would power the coil sending 120 VAC to #7 when pressed. since the "stop" button is normally closed it has power going to terminal 1. When the 'start' is pushed it would close the contacts and then #1 would be connected to #3. I have a jumper from #3 to #7. this keeps power going to the coil to keep it energized until the stop button is pushed and breaks the voltage going to the coil.
Right now I have the contactor relay controlling the 120 VAC line coming in. I figured I would put the contactor after this, before the Arduino and 24 VDC voltage. So everything would be powered, but once I press "open" or start it would continue the voltage to the arduino and motor controller and start everything simultaneously. I will test this out. I am ordering another relay with more contacts in order to do this.