Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Input for linear slide actuator

Status
Not open for further replies.
Someone else lead to me to this schematic.
Blastgate controllers.jpg


There is a DC motor connected to a leadscrew. At either end of the travel there is a SPDT limit switch and diode. Power and ground are supplied at ports A and B. When the slide reaches the end of travel, the limit switch is tripped cutting power to the motor. When the polarity is reversed, power flows through the bypass diode and the closed switch at the opposite end and the slide moves the other direction. When the limit is reached, power is removed.

I have been trying to find a way tie into the switches to create a single output that signals the slide is in position. For Port A=12V, Port B=0V, the slide will travel left to right and I would really like to know when the limit switch is reached.

A couple of permitted items I have thought up:
1) The power will be removed from the motor once the slide is in position. The signal maybe lost, which is OK I already know it got there
2) If the solution results in a 1-0-1 pattern, that too would be fine. I would look for the 1-0 transition and then the 0-1 transition.
 
The signal "moving/stopped" is easy to generate. Moving CW and moving CCW is also easy to generate.

So moving CW and the next state is stopped then ...and
moving CCW and the next state is stopped then...

But you really need to know what it's commanded to do.
It could be DIR and NOT enable
or a fancy code with coast, brake, cw dir, ccw dir, not enable
 
The circuit you posted will work just fine as long as the motor is low enough current that the diodes can handle the current. Additionally since full motor current also runs through the limit switches those switches need to handle the full DC current of the motor. Without knowing motor voltage and current to include under load current and locked rotor current there is no way to say if that generic circuit will work. Really a full description of the project is needed especially if you want I/O data for a controller (computer) to run things.

Ron
 
I'm not sure there is much else beyond what I have written and what you asked. I will add that information now.

The drive "controller" for the motors is via relays. One DPST relay to provide the reversing function for each slide, and one relay to supply power for all. (ie., set each directional relay, then fire the power relay). The current method relies on timers to turn off the power. But as it expands and I don't like timers, I would like to change to using an input.

It looks like the diodes are rated for 3A, the switches for 10A. The motors are 12VDC. I do not have model numbers. Based on an external tach they turn about 2300RPM and the ammeter shows a draw of 600mA.
 
No problem since the motor draws pretty low current. Here are a few variations of the circuit you posted:

Limit Switches.png


In your case the DPDT switch is replaced by your existing relay. In either design the slide will reach full travel (limit switch) and stop. The limit switches used are SPDT so when a switch is tripped the motor stops and the unused normally open switch pole could be used to drive a LED indicating limit reached or send a signal to a controller or computer. Once either limit is reached and the motor stops the motor will only be allowed to run in the opposite direction. Either of these two circuits would work, the upper obviously includes diodes similar to the design you posted. If I wanted limit feedback signals I would likely use the lower design.

Ron

Ron
 
Two observations:

1) It looks like it would just be a matter of connecting the to open connections from each limit switch together and to an input. I'm only looking to know "Travel Done". Since I know which direction I'm sending it, I don't need two inputs that say FWD_Done and REV_Done. But that seems too easy.

2) It appears there is going to an electromechanical correlation required as well. The motor and leadscrew will need to spin in the direction such that the limit switch it is travelling towards has 12V.

The diagram below is your lower diagram, with the switches are shown in their respective position having traveled towards and reached the FWD limit switch.

gate design DPDT Relay.jpg
 
Perhaps you can place a resistor across the switch used to supply power to ("fire") the circuit. The resistor will supply enough current to provide a small, continuous bi-polar signal voltage across the motor, or either one of the unused poles of the limit switches to determine which end of travel is reached, but not nearly enough current to operate the motor.
 
Two observations:

1) It looks like it would just be a matter of connecting the to open connections from each limit switch together and to an input. I'm only looking to know "Travel Done". Since I know which direction I'm sending it, I don't need two inputs that say FWD_Done and REV_Done. But that seems too easy.

2) It appears there is going to an electromechanical correlation required as well. The motor and leadscrew will need to spin in the direction such that the limit switch it is travelling towards has 12V.

The diagram below is your lower diagram, with the switches are shown in their respective position having traveled towards and reached the FWD limit switch.

View attachment 90636

Yeah, you only need travel done but each limit switch will switch a different polarity when travel is done. That is why in the interest of simplicity I would have two limit LEDs. As to any electrical/mechanical correlation it is a matter of setting things up. If it works the wrong direction then just reverse the motor connections I would think. So that was my thinking anyway.

You can also do as KISS mentions with a bi color LED across the actual motor terminals but you do mention knowing the direction of travel.

Ron
 
you do mention knowing the direction of travel.

I know the direction as the controller set the direction relay. LEDs don't give an output I can see with another device (controller). So I haven't mentioned them as a possibility.

Ron: I'm not following you on the statement

Yeah, you only need travel done but each limit switch will switch a different polarity when travel is done.

It looks to me, given the correct mechanical correlation, if the positive drive voltage goes through the limit switch the slide is headed to then the NO terminal will always be +12 when the slide reaches and closes the switch.

Again, I have adjust the pictures below so the switches are drawn in position (not indicative of the NO/NC terminals). A picture is worth a thousand words (and no one wants to hear me ramble).

gate design DPDT Relay.jpg
 
If your actually building the controller, then an H-bridge does all of the reversing for you. Opto-couplers across the motor depending on how it's arranged can give you feedback of "moving/not moving" or [moving CW/not moving CW or moving CCW/Not moving CCW]

So if you know your suppposedly to be moving CCW but are not (after a small delay), then you have reached a limit.

Some of the H-bridge drivers have current limiting which can be set. When i was doing some research, this driver (Canakit) https://www.google.com/url?sa=t&rct...=j_h6H_-DFwZoHi-u7NsRGQ&bvm=bv.85464276,d.eXY appealed to me.

Something you haven't considered is if dynamic braking is required. I did this long ago with a relay for a model gantry crane. The over-run was way to great.

For "stupid protection", I used an LM317 and an SCR to reduce the output voltage to 1.2V when the motor stalled. I sort of integrated the current until the SCR latched. Turning power on/off recycled the latch. If I didn't do that the plastic gears on the gearhead would have broke. 6V motors. This was in the 80s.

Aside: I also made a drapery closer with a 24 VAC motor that worked very well. The motor was the key and it incorporated a integral clutch. Limits were easy. Just triangle pieces of aluminum glued to the drapery pulls and an adjustable bracket with a microswitch. The motor was spring loaded and pulled on a ladder chain. If there was a jam, the chain fell off.

So while PWM can be used to control speed and that's usually accomplished with the NOT enable signal, Current sensing for over runs requires you to ignore start up currents.

A lot of the technology didn't exist in the 80's when I did this.

A simple wall timer, an auto/off/manual type switch and an open/close switch worked the buttons. It was way before it;s time. I always wanted to add a single tapping type control.

I did design a filter wheel, which had 4 positions. I used a single microswitch and detent in each position. I could bypass the microswitch until the moving/not moving changed to moving and then wait for it to stop. Another system that was elegantly designed involved a rotary shutter. Limits and a slip clutch.
 
I didn't state, but alluded it, the original design is up, running, and deployed. They want to modify it and I have some lee way in how it is done and I'm trying to 'sneak' in a few improvements while I'm at it. An H-bridge isn't going to happen. Dynamic braking, PWM speed control, et al is not required, the system does not have it now and there is not much mass and the slide is not moving that fast. The moving signal is irrelevant as that would be too much to modify in the program. If I can limit the code change to one line of code from delay() to Wait (In==1), I should be able to get it in. I hate iffy sensor set-ups more than I hate timers. I hate timers when a robust 5-9s sensor solution exists. In this case the sensor is a switch and it is at least 5-9s as none of the motors or leadscrews have died yet. I'm sure the timer is overly long and using an input would speed things up.
 
Two observations:

1) It looks like it would just be a matter of connecting the to open connections from each limit switch together and to an input. I'm only looking to know "Travel Done". Since I know which direction I'm sending it, I don't need two inputs that say FWD_Done and REV_Done. But that seems too easy.

If you are referring to the circuit in your original (first) post, that should work just fine, no? Maybe it's not too simple to ignore. :)
 
If you are referring to the circuit in your original (first) post, that should work just fine, no? Maybe it's not too simple to ignore. :)

Actually I was referring to Ron's lower drawing. Maybe the original circuit is too simple and I'm over analyzing it. I was looking for an active high signal out of the first circuit, but it looks like it would be active low? Let's see if I've missed something in the original circuit.

I have adjusted the switches to be in the proper NC/NO positions.
Blastgate original.jpg


If S1 and S2 NO (Ports C and D) terminals are connected together to a 12V pullup resistor. The slide cannot reach both S1 and S2 at the same time, it is IMPOSSIBLE for both to be closed at once (unless the limit switch is broken).

1) With the slide to the left, apply 12V to Port A to move to the right. Since S1 NO is closed, port C will show 12V until the slide moves. Port D is open. Input to controller is 12VDC from Port C.
2) When the slide progresses to the right a small amount, S1 will open, now both C and D are open.
3) When the slide reaches the right side, S2 NO will close and supply a GND connection to the controller.

I have gotten that far, but I can't figure out how to prevent the controller input from floating while mid-travel. Pull-up to 12VDC? But that would mean in step 1, 12VDC is supplied to both sides of pull-up resistor, with one side (port C) directly connected to the controller. I will need to level shift the voltage as 12VDC cannot go directly to the input. I was thinking an optocoupler, but then Port C would bypass the current limiting pull-up resistor and blow the LED side.

It must either be a very simple solution I can't see it, or more complicated than I would like and don't want to see it.
 
Pull-up to 12VDC? But that would mean in step 1, 12VDC is supplied to both sides of pull-up resistor, with one side (port C) directly connected to the controller. I will need to level shift the voltage as 12VDC cannot go directly to the input. I was thinking an optocoupler, but then Port C would bypass the current limiting pull-up resistor and blow the LED side..

How about a resistor voltage divider between the junction of the two unused contact points of the limit switches and ground instead of a pull-up to +12V? Either +12V is applied to the voltage divider, and you have the logic high voltage your controller can handle (thanks to the voltage divider function), or no voltage is applied to the voltage divider and you have a low impedance to the input of your controller that acts as a logic low level.
 
How about a resistor voltage divider between the junction of the two unused contact points of the limit switches and ground instead of a pull-up to +12V? Either +12V is applied to the voltage divider, and you have the logic high voltage your controller can handle (thanks to the voltage divider function), or no voltage is applied to the voltage divider and you have a low impedance to the input of your controller that acts as a logic low level.

Nope. Not following. Add a pair of resistors between C and D and connect that junction to ground? That would be able to divide down the 12V to 5V, but when S1 and S2 are open it would be 0V and when S2 closes, also 0V. That would only signal when the slide left its starting position but not when it arrived.

Blastgate original ccurtis.jpg


I need to take a few minutes. I'm having an idea. maybe the diodes could be changed to face the opposite directions, the polarity on the motor reversed to compensate and the limit switches swapped and turned around (place common towards motor instead of pwr/gnd).

I still like Ron's lower drawing with no diodes at all and all dry contacts in the circuit. Just no sure how to make that work either.
 
Last edited:
If I'm understanding your current set-up and your desired feedback of switchover accomplishment:
FWD Complete.JPG
REV Complete.JPG

(And, of course, how the changeover relay is wired and powered is not as you have depicted)

Replace the LEDs with opto-couplers and you have feedback on the completion of the "end of travel". The 1K current limiter resistors may need to be adjusted since, obviously, some residual current will flow through the motor. In the SIM it was inadequate to cause the motor to turn.
 
With Optos:
upload_2015-2-8_17-18-42.png

FWD OPTO Complete.JPG

REV OPTO Complete.JPG

Feed the "Analog Pin" value to an Analog I/O monitor that value.
 
I know the direction as the controller set the direction relay. LEDs don't give an output I can see with another device (controller). So I haven't mentioned them as a possibility.

Ron: I'm not following you on the statement



It looks to me, given the correct mechanical correlation, if the positive drive voltage goes through the limit switch the slide is headed to then the NO terminal will always be +12 when the slide reaches and closes the switch.

Again, I have adjust the pictures below so the switches are drawn in position (not indicative of the NO/NC terminals). A picture is worth a thousand words (and no one wants to hear me ramble).

View attachment 90637


OK, when I mentioned "Yeah, you only need travel done but each limit switch will switch a different polarity when travel is done" would be thatfor example in your drawing. The FWD limit switch is always connected to power + and the reverse limit switch connected to power -.

So using things as drawn to replace the timing scheme, will that work for you?

Ron
 
OK, when I mentioned "Yeah, you only need travel done but each limit switch will switch a different polarity when travel is done" would be that for example in your drawing. The FWD limit switch is always connected to power + and the reverse limit switch connected to power -.

So using things as drawn to replace the timing scheme, will that work for you?

Ron

Drat! I used the voltage swap of my original drawing with the logic of yours. My drawing does not show the reversing relay which yours does. In actuality, the drawing in Post #10 only goes one direction. Now I understand the your original statement. Any thoughts on how I would develop an output stage to accommodate the fact that one limit switch is logic low and the other logic high? Since were talking about many switch pairs, hopefully the hardware is simple and easy. Right now the diodes are soldered to the switches and there are no PCBs at the actuator.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top