Hi,
I am new to Arduino Uno and I am trying to program a 12V Linear Actuator 100mm (MO-LN-12V-100) to extend and retract to represent the Brake Shoe of a train. I also have a 2 channel relay and an external power source for the actuator.
As a safety feature, I have two slide switches (SW-SL-SSD2D10), both switches must be switched on for the program to proceed.
I also need to demonstrate a 3-12V Air Pump with Pipe & Bubble Stone (MO-OXY-CC) pump supplying compressed air in, then displaying "3.8 Bar In" on the LCD display (16x2).
Once ready, the micro servo 1 (EF92A) will turn 180 deg, followed by the micro servo 2 (SG90) turning 90 deg, and the extension of the linear actuator follows immediately.
I also require an ultrasonic sensor (HC-SR04) to detect the fully extended linear actuator to demonstrate the passing criteria.
If it is able to detect, then both the green LED and a "test passed" is being displayed on the LCD.
My question is:
Does anyone know how to connect the wiring onto the breadboard etc and the codes? I have searched and looked up online, YouTube, ChatGPT, and I am still unable to get it right.
Oh, good to know. On any project of any size, pick ONE device and learn how to program for it and control it. Then do the same for the next device.
When you are confident that you know how each device works, you can design the final program that will combine what you have learned and produce what you require.
Start by taking each hardware element you have and getting to know how it works and how any library that may be useful can be exploited by…
… slavishly duplicating any example or demonstration code that you can scare up and reading through it and running it for yourself (without messing with it).
You did not say how you are going to supply power to those things which will need any significant current. This should be sorted before you start trying to run servos or motors.
Running significant power through the Arduino, that is to say using it as the supply of power, is not acceptable.
Running significant power through a breadbox is also going to cause more trouble than it is worth.
Learn about each hardware element separately.
You can work on the logic of the program in a simulator, either using simulated servos and so forth, or by using LEDs as proxies.
This one works well
I'll look again to see, but you may want to refine and elaborate on exactly how the elements are to come together to perform their intended functionality.