LEROY180
Newbie level 4


I am hooking up a 12 v dc motor into a project AI have been working on. The motor is attached to a linear actuator (trapezoidal screw) that will raise and lower a shaft. I have a deep cycle 12 v battery I am using to power this. Power is ran to a fuse box. The motor is a 12-24 vdc 24 amp motor. I have a 7 pin rocker switch I would like to use for an automatic and manual mode selector if possible. I would also like a on/off switch (2 pin) wired in front of this rocker switch. The manual mode will control the motor, up and down with the foot pedal. Then when you switch the rocker switch to the automatic mode, it will have the motor move up and down based off inputs from the ultrasonic distance sensor if there is any obstacles, and will raise the shaft accordingly.
I am unsure how to fully wire this up. I have 12v-5v buck converters that I can use to power the microcontroller if needed. The microcontroller is a Metro M4. I also have an IBT-2 and two IBT-4s I can use to wire things together as well. I have access to other microcontrollers if needed too. I have other SPDT relays I can use as well.
I do not know how to wire this up so that it works. I attached multiple images with my equipment as well as some wiring diagrams for different things. Any information or guidance is greatly appreciated. If there are other images or information I should provide please let me know. Thank you.