Notifications
Clear all

Controlling a DC motor with foot switches and a microcontroller with a sensor

2 Posts
2 Users
0 Reactions
242 Views
(@leroy180)
Member
Joined: 2 months ago
Posts: 3
Topic starter  

I am hooking up a 12 v dc motor into a project A 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 switched out the foot pedal for a trim tab switch that I may use instead of the foot pedal. I tried attaching the foot pedal to the motor with the IBT-2, and I was unsuccessful. I was getting no output voltage when I pressed either pedal. I then switched out the IBT-2 for two IBT-4s. I had the same issue with the foot pedal, it just simply was doing nothing. I then opted for an older 'foot pedal' switch/button that I was planning on using. This is a trim tab switch, with 3 wires.

I wired each IBT-4 from the fuse box separately. The PWR+ came from the fuse box separately, and the PWR- grounded separately at the fuse box as well. I then wired one motor wire into the outer motor module on one IBT and then wired the other motor wire into the other outer motor module on the other IBT. The trim tab has 3 wires, purple which is hot, green which is down, and blue which is up. I wired the purple (hot) wire directly into the fuse box. The green wire is connected to the IN1 on one IBT and the blue wire is also connected to the IN1 on the other IBT. I then wired the GND on each IBT together and grounded them on the fuse box. This works, when I press the trim tab up button it turns the motor one way and when I press the trim tab down button it turns it the opposite way. I now need to figure out if I wire up the trim tab to the IBT-2 to simplify things, but I still need to figure out how to have a 'mode selector' to switch between automatic and manual modes. I am not opposed to having the foot pedal/trim tab switch only works in the manual mode, but then in automatic mode the foot pedal/trim tab switch and sensor with microcontroller works if that makes things easier.

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. 

IMG 7711
IMG 7710
IMG 7707
IMG 7666
IMG 7667
IMG 51D7D38B 959B 46A5 905C DEF86B51DD98
IMG 6B10AE1E 6421 4746 A1D2 DD362B0E1C6B
IMG 7759
IMG 8ECD4BEB C55C 4A11 88EA 238168D4AF9C
IMG 7705

   
Quote
(@aliarifat)
Member
Joined: 10 months ago
Posts: 61
 

You can try the following arrangement.

12V battery > Fuse box > ON/OFF switch > Rocker switch (Mode Selector) > Rest of the circuit.
A 12V-5V buck converter will power the Metro M4.
IBT-4 H-bridges need 12V and GND connections from the fuse box.

The 7-pin rocker switch will route control signals to either the manual system (Trim Tab) or the microcontroller.
When in manual mode, the trim tab switch directly controls the IBT-4 modules.
When in automatic mode, the Metro M4 controls the IBT-4 modules.

In case you want to design and print a PCB, you can see here for an idea about pricing.

https://www.allpcb.com/blog/pcb-ordering/pcb-cost-per-unit.html


   
ReplyQuote