Author Topic: Need Wiring Help For 12 Volt Motor  (Read 29025 times)

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Need Wiring Help For 12 Volt Motor
« on: December 10, 2014, 02:09:52 PM »
I'm attempting to add a 12 Volt motor to drive the X axis on my milling machine. The problem is that the motors direction is changed by reversing the power wires. Clockwise direction is power to red wire, ground to black wire. Counter clockwise is power to black wire, ground to red wire.

Here are the parts I intend to use.

One 12 Volt power supply.
Two SPST joysticks. One is momentary for fast table return (not controlled by the PWM). The other will be controlled by the PWM for slow feeding.
One 12 Volt Pulse Width Modulator (PWM) for controlling the speed.
Two DPDT relays ( I have more if needed).

I think I have it figured out without the PWM, but when I factor that in it gets confusing. I tried finding some DPDT joysticks but had no luck.
Here is a pic of the parts.





Online awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: Need Wiring Help For 12 Volt Motor
« Reply #1 on: December 10, 2014, 02:13:52 PM »
You need to implement a 'double pole double throw centre off' function to have FWD-STOP-REV
Andrew Mawson
East Sussex

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Re: Need Wiring Help For 12 Volt Motor
« Reply #2 on: December 10, 2014, 02:17:15 PM »
That is what I was hoping to accomplish with DPDT relays.

Offline bertie_bassett

  • Full Member
  • ***
  • Posts: 179
  • Country: 00
Re: Need Wiring Help For 12 Volt Motor
« Reply #3 on: December 10, 2014, 05:42:48 PM »
think iv come up with a wiring diagram that might work for you. ( someone please check as im rather sleep deprived)

have had to assume a few things though, namely :

  • the pwm modual requires a + and -ve and outputs a seperate pwm +ve
  • the pwm modual dosn't mind having 24v applied to its output
  • the joysticks have a neutral point in the middle where none of the contacts are closed 


if no's 1 or 2 are wrong we should be able to make minor changes and still be good, if no 3 is wrong we will have to come up with something else.

whoops, that will go bang  :zap:


should work as follows:

S joystick moved left, power is applied to PWM modual and R1, pwm signal applied to motor, motor moves left
S joystick moves right, power is applied to PWM modual and R2, pwm signal applied to motor, motor moves right

F joystick moves left, 24v is applied to motor, motor moves fast left
F joystick moves right, 24v is applied to motor, motor moves fast right

iv added interlocks to stop both R1 + R2 ( left and right) being energised at the same time

also if the motor is moving under pwm control and the fast joystick is moved in any direction, it will override the slow speed and move at full speed.

hopefully thats all correct and what you were after, if not it should be a basis to work from.

« Last Edit: December 11, 2014, 05:10:54 PM by bertie_bassett »
a competent engineer uses the tools and knowledge available, to get a challenging job done.

 An incompetent "engineer" tells his boss that the existing equipment "can't do the job" and to get another machine

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Re: Need Wiring Help For 12 Volt Motor
« Reply #4 on: December 10, 2014, 11:18:35 PM »


 

  • the pwm modual requires a + and -ve and outputs a seperate pwm +ve
  • the pwm modual dosn't mind having 24v applied to its output
  • the joysticks have a neutral point in the middle where none of the contacts are closed 


if no's 1 or 2 are wrong we should be able to make minor changes and still be good, if no 3 is wrong we will have to come up with something else.



I'm totally unsure as to what you are talking about regarding the wiring of the PWM. Picture of the wiring below.
And, yes, the joysticks have a neutral position with no contacts closed. Thanks for your help!




Offline bertie_bassett

  • Full Member
  • ***
  • Posts: 179
  • Country: 00
Re: Need Wiring Help For 12 Volt Motor
« Reply #5 on: December 11, 2014, 04:46:40 PM »
sorry not the best description on my part.

is there any other info with the pwm board? need to know whether the output  (motor) -ve is common to the input -ve , hopefully it is or what i drew up last night is wrong
if theres not further info it should be easy to inspect and/or test to find out.

also the way iv drawn things will put 12v onto the motor output + terminal, i dont think this will cause a problem, but the board may not like it. so need to check befor we go much further.


in fact, scrap that diagram, just realised it wrong and will go bang, sorry will have another think and try again

a competent engineer uses the tools and knowledge available, to get a challenging job done.

 An incompetent "engineer" tells his boss that the existing equipment "can't do the job" and to get another machine

Offline bertie_bassett

  • Full Member
  • ***
  • Posts: 179
  • Country: 00
Re: Need Wiring Help For 12 Volt Motor
« Reply #6 on: December 11, 2014, 05:09:17 PM »
also just thinking about a few ideas, and would you be happy having to use one stick to get things moving in a direction, then the other to override the speed?

so you'd select left with the latched stick and the motor would move left at the set speed, if the momentary stick was then moved in either direction the motor would continue to move left but at a faster pace, as soon as the momentary stick was let go the motor would slow back down to the set speed.


bit hard to describe but should work as follows:

latched joystick left,  momentary joy stick in neutral, :- motor moves left slowly

latched joystick left,  momentary joy stick in moved in either direction, :- motor moves left fast

latched joystick in neutral,  momentary joy stick moved in either direction, :- nothing happens



it might make the wiring a bit easier but youd not be able to just use the one stick for rapid traverse. i think its how the milwaukee i used to use at work was set up.
a competent engineer uses the tools and knowledge available, to get a challenging job done.

 An incompetent "engineer" tells his boss that the existing equipment "can't do the job" and to get another machine

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #7 on: December 11, 2014, 08:06:03 PM »
If you add a switch for ON/Off, this is what I come up with using your parts:



Please check before using.

Also please fuse the power supply positive before the switch.
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Re: Need Wiring Help For 12 Volt Motor
« Reply #8 on: December 11, 2014, 09:25:42 PM »
Thanks for your help guys. Problem is I'm somewhat baffled when it comes to schematic diagrams. I'll see if I can figure it out in the morning.

Offline velocette

  • Full Member
  • ***
  • Posts: 152
  • Country: nz
Re: Need Wiring Help For 12 Volt Motor
« Reply #9 on: December 11, 2014, 10:09:09 PM »
Hi
simpler way is to add wires to the pot on the controller middle terminal and the High speed side of the pot and a closed switch will give full speed.
Use the relays one for forward and one for reverse controlled with one joystick and the other one to short the wire on the pot.

Remember to allow the motor to STOP with the mains power switch off before reversing

Eric

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #10 on: December 11, 2014, 10:31:21 PM »
That would mean ignoring existing wiring terminals and soldering wires to the pot.

Not sure how that's simpler....
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #11 on: December 12, 2014, 09:08:05 AM »
Snub, here's an explanation of the schematic symbols. A schematic is just a wiring diagram -- the lines are wires.

A relay is just a switch that is pulled in by an electro-magnet (or coil). If you power that coil it attracts the armature and closes the switch.

Most relays have a normally closed switch and a normally open one. (So they are double throw ---- DT)

Double pole relays (DP) have two switches, both of which have normally open and normally closed contacts (or poles).

Hope this helps you figure out the schematic!  :dremel:

I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Re: Need Wiring Help For 12 Volt Motor
« Reply #12 on: December 12, 2014, 12:47:17 PM »
Thanks very much vtsteam. I said that the joysticks were SPST, when in fact it they each have 4 SPST switches independent of each other. I will only be using 2 of the switches on each joystick. In your schematic it appears that only one switch per joystick is being used. I will grab a picture if that will help.

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #13 on: December 12, 2014, 12:56:49 PM »
Yes, Snub, I took you at your word on SPST, so only one switch is shown for each joystick.

I don't think I'd change anything for 4PST. You could parallel all 4 if you want -- or just use one of them.

Now if they'd been 4PDT, we could have gotten rid of relays (or even 2PDT).

And of course a "center off" Joystick would have been nice, as Andrew said -- and would have eliminated the extra ON/OFF switch needed.
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #14 on: December 12, 2014, 01:16:31 PM »
And if you decide to build it according to the schematic, here's a suggested build sequence:

1.) connect the Joysticks and relays, power supply, and ON/OFF switch as shown, but don't connect the motor or PWM speed controller yet.

2.) check to see that moving either joystick causes its respective relay to "click" in.

3.) connect the motor, but don't add the PWM yet.

4.) check to see that moving the speed joystick will start the motor at full revs, while letting go turns it off

5.) check to see that the direction joystick changes the direction of the motor.

6.) check the wires that will connect to the PWM input have the correct polarity by measuring across them with a meter.

7.) with power disconnected, connect the PWM to the circuit.

8.) set the potentiometer to mid position and connect power to test the whole circuit.
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #15 on: December 12, 2014, 01:31:40 PM »
Potential problems to look out for (I assumed all parts had suitable specs for your purpose......but here are the possible problems if they aren't) :

Switch contacts not rated for relay current, or back EMF.
Relay contacts not rated for inductive load of motor
Relay arc suppression needed
PWM doesn't like output disconnected/connected

The first three would mean shortened component life.
The last might mean PWM dies.

The PWM output problem -- if it happens -- might be solved with velocette's potentiometer shorting method. Though changing direction will still momentarily disconnect the output, so, maybe not.

.....Shouldn't happen -- a brushed DC motor is constantly making and breaking current....... so if this PWM is designed for motors, it should handle a switched output.

« Last Edit: December 12, 2014, 02:11:00 PM by vtsteam »
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline John Rudd

  • Hero Member
  • *****
  • Posts: 2525
  • Country: gb
Re: Need Wiring Help For 12 Volt Motor
« Reply #16 on: December 12, 2014, 02:08:39 PM »
Following on from VT's testing procedure,

I'd suggest using an auto bulb(lamp?) in place of the motor and connect a fuse in series with the +ve supply lead ( use a 5watt bulb and a 1A fuse power the whole thing with a 12v battery before you use a big power supply...might stop any magic smoke coming out. )
eccentric millionaire financed by 'er indoors
Location:  Backworth Newcastle

Skype: chippiejnr

Offline bertie_bassett

  • Full Member
  • ***
  • Posts: 179
  • Country: 00
Re: Need Wiring Help For 12 Volt Motor
« Reply #17 on: December 12, 2014, 02:12:06 PM »
from the looks of those joysticks and the info given i thought  they had 4 N/O contacts, 2 of which are closed going left, and two going right, with a neutral in the middle where all contacts are open?


a competent engineer uses the tools and knowledge available, to get a challenging job done.

 An incompetent "engineer" tells his boss that the existing equipment "can't do the job" and to get another machine

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #18 on: December 12, 2014, 02:15:00 PM »
John, good idea!

Bertie, Well then they'd be 2P3T center off switches. Which would have made things a whole lot easier......




The 64 thousand dollar question, Snub..........

How many positions does the joystick have, 2, or 3?
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline bertie_bassett

  • Full Member
  • ***
  • Posts: 179
  • Country: 00
Re: Need Wiring Help For 12 Volt Motor
« Reply #19 on: December 12, 2014, 02:28:31 PM »
they would indeed!

pics seem to be standard N/O contacts  in pairs on a standard switch block.

[/quote]

And, yes, the joysticks have a neutral position with no contacts closed. Thanks for your help!

[/quote]

unless im mistaken ?

makes the direction control with one joystick easy but i think the relays are still needed if you want independant controll on the second joystick, iv got something drawn up but it needs electronic interlocks
a competent engineer uses the tools and knowledge available, to get a challenging job done.

 An incompetent "engineer" tells his boss that the existing equipment "can't do the job" and to get another machine

Offline snub

  • Full Member
  • ***
  • Posts: 151
  • Country: ca
  • Canada
Re: Need Wiring Help For 12 Volt Motor
« Reply #20 on: December 12, 2014, 02:34:40 PM »
These joysticks seem to be causing some confusion ( my fault ). They are 4 way joysticks with 4 separate SPST switches. They go left, right, up and down with center off. I am only using the left and right. All are normally open contacts. Too make it simpler when I was trying to come up with my own wiring diagram I left out the joysticks and drew 4 separate SPST switches. Unfortunately my scanner isn't working because I'd like to post it. I am trying now to fix it.

For now I will leave you with this:
One SPST switch for left (with PWM)
One SPST switch for right (with PWM)
One SPST switch for left (full power)
One SPST switch for right (full power)

Thanks guys!

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #21 on: December 12, 2014, 02:57:09 PM »
Oh, 4 way center off SPST joysticks!  :doh:

Okay, well we can use the center off feature to eliminate the ON/Off switch I showed in my schematic.

The direction relay will stay.

The speed relay can be eliminated, IF both joysticks are non-centering. Can you change the joystick that centers to a non-centering joystick, mechanically? That's often possible -- part of the design.

If not, the circuit I showed will function fine since it was designed for only one SPST joysticks. And at the least, you have that.

I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #22 on: December 12, 2014, 03:43:16 PM »
After noodling around, my head hurts now, and I'm taking a break from this -- I want to work on my shop!

But if interested the circuit I showed will work fine as-is. The joysticks will act like two position sticks, even though you have 3 positions -- two positions will be the same and the third will be the other choice. The ON/Off switch will what it was meant to do.

Maybe later tonight I'll think about it again, but for now there's one working circuit out there, at least.
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg

Offline John Rudd

  • Hero Member
  • *****
  • Posts: 2525
  • Country: gb
Re: Need Wiring Help For 12 Volt Motor
« Reply #23 on: December 12, 2014, 04:35:32 PM »
After noodling around, my head hurts now, and I'm taking a break from this -- .

Yeah....can't say I blame you....
I'd say there's an easier way to do this....but I don't want to confuse the OP any more....
Suffice to say, In my experience,pwm drivers have an open Source out...simplest way for max speed would be to just short the mosfet...but that needs a high current relay contact.....but then you could just pull the Gate high........hmmmm....

Watch for smoke.... :lol: :lol:
eccentric millionaire financed by 'er indoors
Location:  Backworth Newcastle

Skype: chippiejnr

Offline vtsteam

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6466
  • Country: us
  • Republic of Vermont
Re: Need Wiring Help For 12 Volt Motor
« Reply #24 on: December 12, 2014, 05:40:51 PM »
Well got a little done on the shop, and now it's dark.

A big enough diode to handle the amps would even do it:

The speed joystick SPST switches wipers would be hooked together (making them a SPDT). That side would be connected to power +.

One switch's output goes to the speed relay coil. And also, through the diode, to everything else needing power.

The other switch terminal output goes to everything BUT the speed relay. Diode prevents back feeding and energizing the speed relay.

Position 1 -- energize speed relay and rest of circuit
Mid position -- no power to anything.
Position 2 --  speed relay not energized, power present to rest of cicuit
I love it when a Plan B comes together!
Steve
https://www.youtube.com/watch?v=4sDubB0-REg