November 21, 2024, 03:51:29 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Using the park feature on a motor with a prop-1

Started by wdgoof, April 09, 2015, 09:48:43 AM

Previous topic - Next topic

wdgoof

I am working on a column for my graveyard that will open and close with a "monster" inside.  The requirements are pretty simple.  There is a trigger, some LEDs turn on, motor runs forward to open the door, a 45 second delay, motor runs in reverse to close the door, LEDs turn off. I am using a basic prop motor from frightprops.com to open and close the door. I am using a prop-1 with an RC-2 to interface with the motor.
With help from you guys, I have been able to make this work.  However over time the motor position would drift and the door no longer closed properly.  So now I have replaced the basic motor with a freight props motor with a park switch. 
Now my question is how do I make the prop-1 recognize and use the park switch to ensure the motor always starts from the same position? 
The people at freight props suggested I use a pico-volt controller to operate the motor.  This works, but does not run the lights.  To make this solution work I would need a second trigger, or be able to trigger the pico-volt from the prop-1.  But I really think I should not need that second controller just for the motor.

So with all that I open it up to you folks and look forward to whatever response you may have.

Thanks for always being so helpful.

JonnyMac

If you have a spare input you could put a N.O. contact switch on the Prop-1 such that it closes when the door is in the parked position. On power-up the Prop-1 would look at this input to part the motor (do it in a subroutine so you can call that code from the main part of your program, too). Once the motor is parked, power to the motor is cut off. Easy-peasy. No?
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

I don't own one of those motors but I believe the park position is factory built into the motor, it will always stop at the same position when the correct lead is energized/de-energized. You should be able to operate this with the Prop-1 and possibly another relay or two.

JonnyMac

I don't know exactly what motor you're referring to. Please provide a tech doc (PDF) or link to product.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

April 09, 2015, 10:56:33 AM #4 Last Edit: April 09, 2015, 10:58:19 AM by JackMan
He's referring to this one: http://www.frightprops.com/electric-motors/motors/dual-speed-high-torque-prop-motor-mot1-p.html

wdgoof,
   I have used a standard motor with a micro switch in one of my props. I just mounted a micro switch so it was closed when the motor was exactly where I wanted it to stop. I used the N.C. contacts on the switch to provide power to the motor paralleled  with power from the Prop-1 output that starts the motor. The motor starts when the Prop-1 energizes the relay and continues until the Prop-1 output stops, the motor then continues to rotate until it closes the micro switch and stops.

wdgoof

Here is a link to the schematic for this motor:  http://www.frightprops.com/faq/content/5/238/en/high_torque-parking-prop-motor-dimensional-drawings-mot1p.html

Thank you for all of the quick replies.  The switch you are referring to is a physical device?  Where can I get one?  Radio Shack?
Do you have a wiring diagram and/or sample code?  I hate to reinvent the wheel if this is available.

JonnyMac

No need for another switch; the park circuit *should* be usable as is. I need to think about it for a while -- unfortunately, the park circuitry connects to the motor power negative side hence his not dry (which would make it really easy).
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Okay... I think that diagram is showing "park" to be an open switch when the motor is parked. When the motor is out of the park zone, the park wire (yellow) will connect to ground -- this can be sensed by a controller with an active-low input.

PLEASE CONTACT FRIGHT PROPS TO VERIFY THE ABOVE STATEMENT.

If the park circuit is normally open when parked, connected to ground when out of park, we can connect P7 or P6 to the yellow wire to sense the park/unparked state. The ULN influence will need to be removed, and the SETUP jumper for the pin (P6 or P7) will have to be in the UP position.

AGAIN, VERIFY THE OPERATION OF THE YELLOW WIRE BEFORE PROCEEDING.
Jon McPhalen
EFX-TEK Hollywood Office

wdgoof

I feel like a third grader with my questions.

How do I remove the ULN influence?
To connect the yellow wire to p7 can I use out7 terminal or do I need a jumper wire?
Is there code I need to add to the program to tell it to return to park?

Thanks again for all of the help.

JonnyMac

We love that you're asking questions -- it means that you want to go beyond the basics and do really cool things.

This thread explains how to remove the ULN influence from P6 or P7
-- http://www.efx-tek.com/php/smf/index.php?topic=130.0

It would be best if you used one of our white-red-black extenders. Cut off one connector. The white wire will connect to the park (yellow) wire. The black wire will connect to ground (black) of the motor.

Again, be sure to move the SETUP jumper for the park input to the UP position. When the motor is parked, that pin will read as 1; when the motor is out of park it will read as 0.
Jon McPhalen
EFX-TEK Hollywood Office

wdgoof

OK I made the modifications you suggested and no magic smoke came out!

That's a good thing LOL.

But I am not certain it is picking up the park position.  I have included my code below. 
I am thinking I should shorten the close time to less then the open time to allow the park to pick up the rest of the space.  Does that make sense?

' =========================================================================
'
' File...... Column_V3.BS1
' Purpose...
' Author....
' E-mail....
' Started...
' Updated...
'
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' =========================================================================

' -----[ Program Description ]---------------------------------------------
' Automates column - Skull lights always on.
' Show = Turn inside light on, open the door, puase, close the door, turn inside lights off

' -----[ Revision History ]------------------------------------------------
' Added control for skull lights on outside of column
' adjusted door timing for slower moter speed.

' -----[ I/O Definitions ]-------------------------------------------------


'------------------New Stuff here --------------------
SYMBOL diffuse_sensor = PIN6   ' SETUP = jumper off

SYMBOL sensor          = B0
SYMBOL debounce        = B1
'-------------------------------------------------------



SYMBOL Lightsout = PIN3
SYMBOL LightsIn = PIN2
SYMBOL DoorClose = PIN1 ' to RC-2
SYMBOL DoorOpen = PIN0 ' to RC-2

' -----[ Constants ]-------------------------------------------------------

SYMBOL Yes = 1
SYMBOL No = 0

SYMBOL IsOn = 1 ' active-high I/O
SYMBOL IsOff = 0
SYMBOL  not_active  = 1

' -----[ Variables ]-------------------------------------------------------

'SYMBOL timer = B2 ' for debounce loop

' -----[ Initialization ]--------------------------------------------------

Power_Up:
' put code here that only happens at power-up/hard reset

Reset:
PINS = %00000000 ' all off
DIRS = %00111111 ' P5..P0 are outputs
LightsOut = IsOn
PAUSE 30000 ' PIR warm-up/re-trigger delay

' -----[ Program Code ]----------------------------------------------------

Main:

'Very simple code FOR diffuise sensors
IF diffuse_sensor = not_active THEN Main     'the diffuse sensors are active LOW

'More Advanced Debounce code for diffuse sensors
'DEBUG "sensor is ", #diffuse_sensor,"--",#sensor," debounce = ",#debounce, CR
'sensor = %00000001 &/ diffuse_sensor  'invert the pir_sensors output
'debounce = debounce + 1 * sensor  ' advance/clear timer
'IF debounce < 100 THEN Main



Run_Show:
LightsIn = IsOn

DoorOpen = IsOn
PAUSE 1500 ' wait 1.5s

DoorOpen = IsOff
PAUSE 30000 ' wait 30s

DoorClose = IsOn
PAUSE 1500 ' wait 1.8s

DoorClose = IsOff

LightsOut = IsOff

GOTO Reset

JonnyMac

Please do us a favor: describe what you want in English, not in code. Every programmer has his/her own approach, and yours may not make perfect sense to others. Leave the code up, but add a non-code description -- especially the interaction with the park motor.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Yeah, I totally agree with Jon, just explain exactly what you want to take place. There's several items in your code that I really don't know what you are trying to do. There's also several things missing for this to work. For example if you have the "yellow" park wire connected to P7.W, there is nothing in your code that pertains to it. There has to a section of code for the Prop-1 to detect when the motor is "parked". I'm pretty sure the park position is factory set and I'm assuming the motor has to make at least 1 full revolution to reach the park position each time it starts up. If this is the case, your linkage needs to be set up so that one full revolution of the motor opens the door and vise-versa.

wdgoof

There are 3 things controlled by the prop-1, outside lights, inside lights, and the motor both forward and reverse. The outside lights stay on all the time. They are just wired in here to save on additional power drops.  For the show, when the trigger is activated, the door opens, the inside lights turn on, pause 45 seconds, door closes, inside lights turn off.  If you look back to the original post, I had this working with a regular motor, but over time the motor position would drift.  So now I have replace the motor with one that includes the park switch.  The code above is my original code before the addition of the park switch.  You have answered the first part if my question in how to physically connect everything.  Now I need to understand what I need to add to the code.  If I u Der stand this correctly, I just need to "turn on" p7 though the show?

JackMan

The more I look at this, I really don't want to post any code for it. I don't have one of these motors and I'm uncertain as to how it needs to be wired. I don't think it's as easy as detecting "GND" on the yellow "park" wire. I would think this could be positive or negative voltage depending on the motor direction. More info from FP is needed.