How to set up omnidirectional motor control with two buttons

Thread Starter

swamptrooper

Joined May 21, 2019
6
I'm hacking a big mouth billy bass of which the main motor controls the tail and head (motor spins one way, tail lifts, motor spins other way, head lifts). I want to create a circuit with two buttons where pressing one button will raise the head and one will raise the tail (in short, each button puts current through the motor in different directions). This is my present design (https://imgur.com/a/zfB8jLv) using IRF520 MOSFETs as my transistors but obviously it doesn't work because the sources of my MOSFETs connect to the gates of each other. Is there any smarter and relatively simple way to accomplish this task or does it simply require a full overhaul and more complex parts? I've been trying to solve it with diodes but to no avail. Thank you.

fZexhmL_Motor_swamptrooper.png
 
You need an H-bridge configuration with the initial control set to have both leads of the motor set to low. (i.e both right and left lower transistor on, both upper transistors off.) Place one switch to control the left side and the other for the right. When a switch is activated it switches the respective side of the H-bridge to connect that lead of the motor to the high voltage.

Example H-bridge:
upload_2019-5-21_21-7-35.png
 
You can find assembled L298 modules online for very low cost, unless your goal is to design something yourself. The L298 has two H bridges but you will only need one. Example schematics are also online, here is one example for driving a single motor:


Use your switches to apply voltage to pins 10 and 12.
 

djsfantasi

Joined Apr 11, 2010
5,955
I think that this doesn’t address his requirements. There are two motors in a Billy Bass. One controls the head and the second controls the tail.

As I read his post, I thought he wants one switch to control the head. The second switch controls the tail. Hence, two switches to control an H-bridge to control one motor is NOT what he needs.

In fact, the motors in the device only need control in one direction. A built-in spring returns the motor to its home position when power is removed. And the device is designed to stall the motor in the open position.

So the problem becomes very simple. No H-bridge. No L298 chips.
  • Isolate the motors from the control board
  • Connect one motor wire to ground
  • Connect the other motor through a switch to DC
  • If the motors run backwards, reverse the leads.
Easy peasy!
 
I quote the original post: "the main motor controls the tail and head (motor spins one way, tail lifts, motor spins other way, head lifts)."
One motor, opposite spin! Maybe he has it wrong and it actually has two motors but he specifies one.
 

djsfantasi

Joined Apr 11, 2010
5,955
I quote the original post: "the main motor controls the tail and head (motor spins one way, tail lifts, motor spins other way, head lifts)."
One motor, opposite spin! Maybe he has it wrong and it actually has two motors but he specifies one.
I read the original post and also have hacked Big Mouth Billy Bass. I know better. I found a relevant article.

In the “Mechanical” section, it states “The device is controlled by two 6V motors” (emphasis added).

I recognize he may have a different model. But two motors are typical.
 

dendad

Joined Feb 20, 2016
3,259
If it is just one motor, a couple of non locking pushbuttons with changeover contacts is all you need.
pushbutton.png
Adding diodes too is a good idea.
SwitchHBridge.jpg

This will run the motor while the button is pressed. I would recommend limit switches be added.
 

Dodgydave

Joined Jun 22, 2012
8,680
Here is the article circuit diagram for the Head/Tail motor using an H-bridge, and the Mouth uses a transistor, springs return the head, tail and mouth back to their home positions, with motor power removed.

Note the connections of the Pnps bases to the oppsite side of the motor, this enables only one input required per direction..

billybasscircuit.jpg
 
Last edited:

ScottWang

Joined Aug 23, 2012
6,860
I'm hacking a big mouth billy bass of which the main motor controls the tail and head (motor spins one way, tail lifts, motor spins other way, head lifts). I want to create a circuit with two buttons where pressing one button will raise the head and one will raise the tail (in short, each button puts current through the motor in different directions). This is my present design (https://imgur.com/a/zfB8jLv) using IRF520 MOSFETs as my transistors but obviously it doesn't work because the sources of my MOSFETs connect to the gates of each other. Is there any smarter and relatively simple way to accomplish this task or does it simply require a full overhaul and more complex parts? I've been trying to solve it with diodes but to no avail. Thank you.

View attachment 178058
Your Motor, the D,S OF N MOSFET are put on the wrong place.
Please take a look how a N MOSFET works.


You didn't mention the voltage draw current of motor, so the helpers can't give you the appropriate answer to match your requirement.
 

ScottWang

Joined Aug 23, 2012
6,860
You need an H-bridge configuration with the initial control set to have both leads of the motor set to low. (i.e both right and left lower transistor on, both upper transistors off.) Place one switch to control the left side and the other for the right. When a switch is activated it switches the respective side of the H-bridge to connect that lead of the motor to the high voltage.

Example H-bridge:
View attachment 177925
If you want to make the A side Q1, Q4 turn on then the Vgs should be add it to about 3V, so the Vg of Q1 should be as Vbat + 3V, the B side Q3 and Q2 have the same situation, the Vg of Q3 should be as Vbat + 3V.
 
Top