# XD2PA22 Joystick to control forward and reverse motor

#### Pockets1

Joined Oct 5, 2023
7
Hey

I have zero experience in circuits but my son has his leaving cert project and needs some help.. So thanks in advance for anyone who can help.

We bought an XD2PA22 (https://www.amazon.com/XD2PA22-Position-Joystick-Momentary-Switches/dp/B083VT8GCD) 2 direction joystick switch and would like to use this to control forward and reverse on a small motor

i have managed to get it to power a motor in both directions but i need to have the voltage reverse when forward and back positions selected.

researching i think i need a reversing relay, but the diagram boggle me.. the switch only has two outputs and i have no clue what i should be looking for.

any advise and very basic drawings would be great if anyone can help

#### ThePanMan

Joined Mar 13, 2020
792
First, welcome to AAC.
We bought an XD2PA22 (https://www.amazon.com/XD2PA22-Position-Joystick-Momentary-Switches/dp/B083VT8GCD) 2 direction joystick switch and would like to use this to control forward and reverse on a small motor
the diagram boggle me.
Let's start with some facts: I'm assuming this is a DC motor. If so - and you want the motor to spin one direction when you push the stick forward but you are getting it to spin in the opposite direction - simply reverse the two wires on the motor.
Another fact is that if you want to discuss the wiring diagram but find it boggling to the mind then perhaps we should be speaking with your son. After all, it IS his project.
Still another fact: actually a question; "What diagram?"

#### ThePanMan

Joined Mar 13, 2020
792
Looking at the base of the switch it does not look like it supports switching a motor forward and reverse. Nor is there a diagram. Also missing are needed facts: How many amps the switch can handle and how many amps the motor can draw at a full stalled condition. Full stall is not letting the motor spin at all while it is powered. That's when it will draw the heaviest amount of current. Then there's start-up current; how much the motor draws the moment you apply power to the motor. Even worse, if you go from full "forward" to full "reverse" without allowing the motor to come to a complete stop the amperage will be even higher. AND motors don't like being run that way.

#### Pockets1

Joined Oct 5, 2023
7
Hey Thanks for replying..

the motor currently spins in same direction when i push forward or back.. i want it to change direction when the joystick changes direction - forward clockwise, back - counter clockwise

My son is just as bad as me, he is more mechanically minded than electrical but its a control for a motor driven lift

#### Attachments

• 24 KB Views: 5

#### Pockets1

Joined Oct 5, 2023
7

#### ThePanMan

Joined Mar 13, 2020
792
Looks to me like the joy stick will work. You just need the TA6586 H Bridge motor controller. Those push buttons do the same exact thing as your joy stick would do.

#### Pockets1

Joined Oct 5, 2023
7
thanks for your help. i will look into them.. Thanks again

#### Jerry-Hat-Trick

Joined Aug 31, 2022
551
I think you need two batteries. Not sure if this device has three pins (with one common to each switch) of four (with two switches isolated from each other) but either way, connect each switch in series with the motor and one of the batteries such that the batteries are the opposite polarity when connected. Since both switches can't be closed at the same time you won't be shorting them together

#### MisterBill2

Joined Jan 23, 2018
18,451
IFF you can provide us with some image of the switch that shows the connections, and iff there are 4 connections then it might be possible to develop a circuit that could provide motor reversal.
Then it could be a question of the TS being able to follow a circuit schematic and connect it.
Onemore thing, the description calls it a 2 position switch. Or is it center off? and two ON positions?

Joined Jul 18, 2013
28,675
The IC , TA6586 mentioned in #5 & #6 provides bidirectional control, selectable on either of two inputs.
Quite a few hook-up details on the WEB.

#### ThePanMan

Joined Mar 13, 2020
792
I think you need two batteries. Not sure if this device has three pins (with one common to each switch) of four (with two switches isolated from each other) but either way, connect each switch in series with the motor and one of the batteries such that the batteries are the opposite polarity when connected. Since both switches can't be closed at the same time you won't be shorting them together
That switch pictured is two SPST switches. That's to say half of the switch is a make or break switch and the other half is the same thing but only switches when the joy stick is thrown in the opposite direction.

#### MisterBill2

Joined Jan 23, 2018
18,451
I count that as three positions, and yet the listing describes it as a two position control stick. Good to know it worked out for you.

#### Jerry-Hat-Trick

Joined Aug 31, 2022
551
That switch pictured is two SPST switches. That's to say half of the switch is a make or break switch and the other half is the same thing but only switches when the joy stick is thrown in the opposite direction.
That's fine, one terminal from each switch connected together going to one side of the motor, the other switch terminals connected via different batteries (the opposite way around) to the other side of the motor. Whilst I favour the TA6586 H Bridge approach, two batteries is perhaps the simplest solution requiring no electronics.

#### ThePanMan

Joined Mar 13, 2020
792
True, but then you have a split power source (or two batteries). If you have only a single source of power then you will need some sort of H-Bridge for Forward and Reverse. I just think that switch is all together wrong for the job. But I can't glean enough information about the switch. Honestly it simply looks like two switches, one closes when you push the stick forward and the other closes when you pull the stick back. On top of that - the switches are switches. They're not linear potentiometers. Or audio taper. It's hard on full forward or hard on full reverse. To use that joystick you're going to need some supporting electrical or electronic additions.

#### MisterBill2

Joined Jan 23, 2018
18,451
If those sitches are single pole, double throw, that is, if they also have a normally closed contact, then it will be simple to have reering operation. So the big question is do the two switches each have three terminals?? If yes, all set to revers with using only one power source.

#### ThePanMan

Joined Mar 13, 2020
792
So the big question is do the two switches each have three terminals?
The only two terminals I see (per switch side) are on either end. The screws in the middle look like assembly hardware. I DOUBT there is a SPDT or DPDT switch configuration. Of course, the TS has not given us clear pictures or clear verbal verification as to what exists. We're not flying blind but we ARE flying in fog.

All day yesterday and all day today so far we've not heard from the TS (post #7) with any further information. Until then - we're just playing a guessing game as to what we're being asked to work with and what's expected of us - aside from a motor being run forward and reverse. Obviously controlling a motor that way is not a difficult thing to accomplish. But without proper information we can not give a proper answer.

#### MisterBill2

Joined Jan 23, 2018
18,451
OK, as I looked at the picture in the link off post #1, I see that the switches look like solid industrial devices. only normaly open contacts.

#### Pockets1

Joined Oct 5, 2023
7

The two battery idea worked in my test circuit - Center of off so Mr Pan, your dual battery situation (reversed poles) is teh route i am going with

Thanks guys for all your suggestions and help..

#### Pockets1

Joined Oct 5, 2023
7

#### Sensacell

Joined Jun 19, 2012
3,442
Note that if BOTH switches are closed, the batteries are shorted together.
(boom)