joshsstuff
New Member
Hello,
I have already completed a project that uses relays and a 120v circuit to open/close a set of TV monitors for my church. It's a very simple reversing circuit via the relays means a switch is turned "ON" to open the monitors and "OFF" closes them.
(the 120v system was necessary because of the distance between the switch and the equipment)
The problem, however of the abrupt start and stop of the monitors needs to be fixed.
My Arduino project will use a PWM sequence that I will fine tune to provide a more gradual opening and closing.
(I would also like to add an infrared transmitter mounted to the TV sensors so that I can have them turn on/off as they open/close)
Here is an illustration of how the system currently works:
I have sourced the following items for this build:
1) 2x Arduino Uno's
2) H- Bridge motor driver https://www.amazon.com/gp/product/B01GHKO5O8/ref=oh_aui_detailpage_o06_s02?ie=UTF8&psc=1
3) Infrared Diode LED IR Emission and Receiver https://www.amazon.com/gp/product/B00EFOQEUM/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1
4) Limit switches at each end of the Actuators desired stroke.
Features to include:
1) Interrupt code, if the switch needs to be reversed when the actuator is in motion, there is a brief pause before heading back. (this is really bad for the actuators, but I must leave some safety option)
2) IR transmission to turn ON/OFF TVs
3) Recovery protocol if power is cut to the system
(if a fuse blows mid-path or while the TVs are open, there must be a way for the program to recover)
There challenge in #1 & #3 is that the only input is signals sent to the Arduino based on 2 positions of the switch.
I plan on using the dry contacts of the relays to send 2 signals to the Arduino:
"Open" and "Close".
Unfortunately these actuators do not include position feedback, so I will use limit switches at each end of the desired stroke to feedback to the Arduino.
I plan on using the opening of the limit switches as a signal to start the timing of my PWM function to properly time the stroke speed.
Here is the order of the Arduino program:
Open TVs
1) Relay signal "open"
2) IR signal "TV_ON"
3) Actuator Powered "Forward"
4) "full_Closed" Limit switch opens
5) PWM function
6) "full_Open" Limit reached
7) Actuator Power Stops
Close TVs
1) Relay signal "close"
2) IR signal "TV_OFF"
3) Actuator Powered "Reverse"
4) "full_Open" Limit switch opens
5) PWM function
6) "full_Closed" Limit reached
7) Actuator Power Stops
*Interrupt function = Pause before reversing circuit
*Safety recovery after power blackout
I'm used to programing on PicAxe microcontrollers.
I have ideas about how I would use the interrupts and multitasking to accomplish this type of program, on my old platform, but I'm still learning how to do this on Arduinos, so perhaps you could recommend better procedures than how I propose to accomplish these objectives.
Here is the motor controller I purchased for the job
There is no real documentation with this controller, it appears that a +5v to the "PWM" pin and a ground to the "DIR" pin will allow it to operate at full speed in a particular direction.
(The controllers are coming in the mail tonight and I will test them)
I am grateful for any insight you can offer that will point me in the right direction!
Thank you!
In advance.
I have already completed a project that uses relays and a 120v circuit to open/close a set of TV monitors for my church. It's a very simple reversing circuit via the relays means a switch is turned "ON" to open the monitors and "OFF" closes them.
(the 120v system was necessary because of the distance between the switch and the equipment)
The problem, however of the abrupt start and stop of the monitors needs to be fixed.
My Arduino project will use a PWM sequence that I will fine tune to provide a more gradual opening and closing.
(I would also like to add an infrared transmitter mounted to the TV sensors so that I can have them turn on/off as they open/close)
Here is an illustration of how the system currently works:
I have sourced the following items for this build:
1) 2x Arduino Uno's
2) H- Bridge motor driver https://www.amazon.com/gp/product/B01GHKO5O8/ref=oh_aui_detailpage_o06_s02?ie=UTF8&psc=1
3) Infrared Diode LED IR Emission and Receiver https://www.amazon.com/gp/product/B00EFOQEUM/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1
4) Limit switches at each end of the Actuators desired stroke.
Features to include:
1) Interrupt code, if the switch needs to be reversed when the actuator is in motion, there is a brief pause before heading back. (this is really bad for the actuators, but I must leave some safety option)
2) IR transmission to turn ON/OFF TVs
3) Recovery protocol if power is cut to the system
(if a fuse blows mid-path or while the TVs are open, there must be a way for the program to recover)
There challenge in #1 & #3 is that the only input is signals sent to the Arduino based on 2 positions of the switch.
I plan on using the dry contacts of the relays to send 2 signals to the Arduino:
"Open" and "Close".
Unfortunately these actuators do not include position feedback, so I will use limit switches at each end of the desired stroke to feedback to the Arduino.
I plan on using the opening of the limit switches as a signal to start the timing of my PWM function to properly time the stroke speed.
Here is the order of the Arduino program:
Open TVs
1) Relay signal "open"
2) IR signal "TV_ON"
3) Actuator Powered "Forward"
4) "full_Closed" Limit switch opens
5) PWM function
6) "full_Open" Limit reached
7) Actuator Power Stops
Close TVs
1) Relay signal "close"
2) IR signal "TV_OFF"
3) Actuator Powered "Reverse"
4) "full_Open" Limit switch opens
5) PWM function
6) "full_Closed" Limit reached
7) Actuator Power Stops
*Interrupt function = Pause before reversing circuit
*Safety recovery after power blackout
I'm used to programing on PicAxe microcontrollers.
I have ideas about how I would use the interrupts and multitasking to accomplish this type of program, on my old platform, but I'm still learning how to do this on Arduinos, so perhaps you could recommend better procedures than how I propose to accomplish these objectives.
Here is the motor controller I purchased for the job
There is no real documentation with this controller, it appears that a +5v to the "PWM" pin and a ground to the "DIR" pin will allow it to operate at full speed in a particular direction.
(The controllers are coming in the mail tonight and I will test them)
I am grateful for any insight you can offer that will point me in the right direction!
Thank you!
In advance.