ELECTRONICS UTILIZED
Arduino UNO
Arduino UNO is a low-cost, flexible, and easy-to-use programmable open-source micro-controller board that can be integrated into a variety of electronic projects. This board can be interfaced with other Arduino boards, Arduino shields, Raspberry Pi boards and can control relays, LEDs, servos, and motors as an output.
Dual channel relay module
The relay module Is an electrically operated switch that can be turned on and off deciding to let current flow through or not.
12V Solenoid
For this project, the source of choice was a 12 volt push and pull solenoid.
Breadboard
The breadboard allows for quick and easy creation of temporary electronic circuits or to carry out experiments with circuit design.
RECREATE OUR CIRCUITRY
We wired the Arduino uno with the relay module to create oscillating motion. This is possible through the following wiring. Pins 3 & 4 are connected to the inputs 1 & 2 on the relay. Do not connect pins to left inputs because that is where the powering to the source will take place. The power pin (5V) is connected to the VCC on the relay to provide power to the relay. Now to power the main source (solenoid) by using the relay we will be focusing on the left side of the relay. We connected the ground to the negative input source on the breadboard. The JD-VCC is then connected to the positive input source of the breadboard. This now powers the breadboard with on and off switch for the solenoid to create puncturing motion on and off.
Now to finalize the circuit, we will only be using the common and normally open socket on the relay to keep relay circuit open so the circuit could be broken by using the Arduino to signal the close circuit or in other words “on and off”, if we use the normally closed socket, the relay by default will always be closed which impedes the motion of the source to be oscillating continuously. Now to finish, connect 1 wire to the solenoid's negative input on the breadboard, and the other to the relay on the normally open socket, this will trigger the solenoid to activate in oscillating motion repeatedly without any circuit disruptions.
The Arduino software (IDE) is an open-source software which is used to program the Arduino boards and is currently undergoing various development in electronics. This is the code we used on Arduino IDE software, pins 3 and 4 are defined due to the Arduino commanding the relay and solenoid, the only main focus of this code will be the last part, where we used a recurring if and else statement to get the solenoid to act on and off, we mainly wanted the solenoid to act in recurring state and if it were to suddenly stop, the code then reactivates it to turn on.
Finished Arduino